How to uninstall an android app from command line on the device

前端 未结 8 1687
死守一世寂寞
死守一世寂寞 2020-12-12 17:15

I can uninstall an app on the device from my computer using adb uninstall , but I\'d like to do the same with a script on the actual device.

相关标签:
8条回答
  • 2020-12-12 18:10

    Trying using the pm command:

    pm uninstall <package_name>
    

    or

    pm uninstall -k <package_name>
    

    The -k flag keeps the data and cache directories after the package is removed.

    I haven't tested this myself, but I don't think this should show a warning message.

    0 讨论(0)
  • 2020-12-12 18:10

    If you have an rooted android device then you can easily uninstall pre-installed apps from your device. My OnePlus device is rooted with Magisk manager.

    Rooting an Android device gives you admin privileges towards your device and so you can easily install or uninstall any system application.

    However, command line method also works most of the time. I have tested adb method on MIUI device for removing bloatware.

    You can follow stackoverflow read this thread....

    ADB command: pm uninstall -k <package_name>

    0 讨论(0)
提交回复
热议问题