How to uninstall own app from /system/app?

2020-02-10 03:38发布

I'm able to install own application into /system/app using adb shell commands. But how to uninstall it? Is there any commands to do it? My phone is rooted.

6条回答
聊天终结者
2楼-- · 2020-02-10 03:59

Manual uninstall using ADB :
http://www.careace.net/2010/05/12/how-to-remove-android-apps-through-adb/

During website downtime (like now) see crawled snapshot here:
https://web.archive.org/web/20180222063358/http://www.careace.net/2010/05/12/how-to-remove-android-apps-through-adb/

Programmatically:

    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();}
    }
查看更多
姐就是有狂的资本
3楼-- · 2020-02-10 04:05

Im not sure if you have to do this on every device (may be it can be achieved just by root access on some devices ) but on htc desire you have to reboot to the recovery mode Then you can copy your apk to the sdcard and then using adb shell to the /system/app folder you should create a nandroid backup first

查看更多
Lonely孤独者°
4楼-- · 2020-02-10 04:09

Assuming you have root access to device:

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

查看更多
地球回转人心会变
5楼-- · 2020-02-10 04:12

Assuming you have root access to device:

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
查看更多
放我归山
6楼-- · 2020-02-10 04:19
adb shell rm /system/app/MyApp*
adb uninstall org.my.app
查看更多
倾城 Initia
7楼-- · 2020-02-10 04:24

Uninstall Android App via adb


Refer : xda

adb devices

adb shell

pm list packages

pm uninstall -k --user 0 *name of package
查看更多
登录 后发表回答