我能自己的应用程序安装到使用亚行的shell命令/系统/应用程序。但是如何卸载呢?是否有任何命令来做到这一点?我的手机是植根。
手动卸载使用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-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();}
}
假设你有到设备的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
adb shell rm /system/app/MyApp*
adb uninstall org.my.app
林不知道,如果你要做到这一点每个设备上(可能它可以只通过某些设备上的root访问权限来实现),但是,HTC渴望,你必须重新引导到恢复模式,然后您可以将您的apk复制到SD卡,然后使用亚行外壳到/系统/应用程序文件夹,你应该先创建一个备份nandroid
通过ADB卸载Android应用
请参阅:xda
adb devices
adb shell
pm list packages
pm uninstall -k --user 0 *name of package
假设你有到设备的root访问权限:
ADB壳苏安装邻RW,重新装入/系统室射频/system/app/myApp.apk室射频/data/data/com.example.myapp安装邻RO,重新装入/退出系统退出