Saturday, May 2, 2015

applications - How to manually remove an app?



I lack proper keywords to google efficiently to know how to manually remove an app. Basically I want to uninstall Chrome, but I also want to know deeper about Android system rather than rely on a third-party app like NoBloat. I suspect one just need to delete /data/app/com.android.chrome-2 folder, but I'm not sure if there is more to be removed too.


How to manually remove an app?



Answer



To manually remove an app, you'll need to (manually) delete all of the following items:



  • The app's package, usually in /data/app/. For system apps, delete /system/app/, /system/priv-app/ or /vendor/app/ instead, depending on where it resides. The folder and file name are not necessarily the same as package name for system/vendor apps, though.

  • The app's installation information, /data/system/packages.xml. This is very complicated as an app may define resources that can be used by other apps. Be sure to remove all related keys and leave unrelated keys intact, or you can mess the files up.


Additionally, these items may be removed, but they'll be pruned if some or all items listed above are manually removed or found missing. The automatic pruning usually happens during system booting.




  • The app's Dalvik cache, in /data/dalvik-cache, usually .odex or .oat files

  • The app's data, in /data/data/

  • The app's data in external storage, in /sdcard/Android/data/

  • The app's "simplified information" in /data/system/packages.list, which will be pruned if the app is gone from packages.xml


Sometimes you'll see some log in /data/system/uid_error.log if the above items are pruned by Android.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...