我可以使用adb shell命令将自己的应用程序安装到/system/app中。但是如何卸载它呢?有什么命令可以这样做吗?我的手机已经启动了。
发布于 2012-01-29 03:46:44
使用ADB手动卸载:
http://www.careace.net/2010/05/12/how-to-remove-android-apps-through-adb/
在网站宕机期间(如现在),请在此处查看已抓取的快照:
以编程方式:
public static void deleteFromSystem (final String file)
{
try
{
if (new File(file).exists())
{
String path = new File(file).getParent();
Process process = Runtime.getRuntime().exec("su");
DataOutputStream os = new DataOutputStream(process.getOutputStream());
os.writeBytes("mount -o rw,remount /system; \n");
os.writeBytes("chmod 777 " + path + "; \n");
os.writeBytes("chmod 777 " + file + "; \n");
os.writeBytes("rm -r " + file + "; \n");
os.writeBytes("mount -o ro,remount /system; \n");
os.writeBytes("reboot \n");
os.flush();
os.close();
process.waitFor();
}
}
catch (Throwable e) {e.printStackTrace();}
}发布于 2017-04-06 06:40:21
假设您拥有设备的root访问权限:
adb shell
su
mount -o rw,remount /system
rm -rf /system/app/myApp.apk
rm -rf /data/data/com.example.myapp
mount -o ro,remount /system
exit
exit发布于 2012-07-27 19:08:43
adb shell rm /system/app/MyApp*
adb uninstall org.my.apphttps://stackoverflow.com/questions/9047930
复制相似问题