XXX*_*XXX 13 shell android uninstall
我可以使用adb shell命令将自己的应用程序安装到/ system/app中.但是如何卸载呢?有没有命令可以做到?我的手机扎根了.
XXX*_*XXX 15
使用ADB手动卸载:http:
//www.careace.net/2010/05/12/how-to-remove-android-apps-through-adb/
在网站停机期间(如现在),请在此处查看已抓取的快照:https://web.archive.org/web/20180222063358/http:
//www.careace.net/2010/05/12/how-to-remove-android-应用贯通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();}
}
Run Code Online (Sandbox Code Playgroud)
sgu*_*pta 14
假设您具有设备的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
Run Code Online (Sandbox Code Playgroud)
Tap*_*ter 12
adb shell rm /system/app/MyApp*
adb uninstall org.my.app
Run Code Online (Sandbox Code Playgroud)