samedi 31 mai 2014

How to uninstall system apps (via adb) without restarting the device?


Vote count:

0




Background


One of my app 's features is to uninstall system apps using adb commands.


The problem


It works fine, but each time I uninstall a system app, it requires the user to restart the device.


Otherwise, there is a trace of the app that appears to the user as if the app wasn't really uninstalled, while it actually was removed and cannot be run.


Another problem that is caused by restarting without real uninstallation, is that the launchers aren't aware of the fact that the app got uninstalled.


What I've tried


There are plenty of places over the Internet (including here) which describe how to uninstall system apps, but none of them handles the need for restarting the device.


In all of the solution I've seen, the steps include:



  1. mount the "/system" to enable writing to it

  2. remove the APK of the app

  3. reverse step 1, by mounting "/system? as read-only.

  4. uninstall the app. This actually isn't needed, since after a reboot the OS already removes all of the traces of the app, because of the previous steps.


Some of the solutions I've seen even include editing the packages list on the "/system" folder, but this also didn't help.


Many of the solution have different commands for step 1 and 3 , but all succeed anyway (after a restart).


I've also tried something that I thought of: copying the APK file somewhere, do the uninstallation using steps 1-3, and then do a silent install of the APK and silent uninstall of it. It didn't work. no idea why.


The question


How do you use ADB to uninstall system apps without the need to restart the OS ?



asked 17 secs ago






Aucun commentaire:

Enregistrer un commentaire