Monday, September 26, 2016

applications - Completely uninstall an app on Lollipop



I am having a problem with uninstalling apps on Android 5.0 (Nexus 5). I am developing an Android app, so I debug/run the app directly on my device. For production, I exported the same app with my keystore, uninstalled the debug APK that I ran earlier, tried to install the signed APK, and I got this error:



An existing package by the same name with a conflicting signature is already installed.



Is it because the bytecodes are still in the ART runtime? Anyone has any idea how to solve this?



Answer



When you uninstall an app using usual pre-Lollipop approach (e.g. dragging to "trash" icon, or from App info > Uninstall), it's only uninstalled on current user. It can be confirmed by app showing "Not installed" on stock app manager. Android will detect that the app is still there, preventing the user to install the app with same package name.


It's due to Guest account (if it's activated), that when an app is installed, it's automatically installed on all users. So, you need to uninstall the app from there too, which can be troublesome in daily usage.


There are some approaches to uninstall the app completely (ordered by practicality):




  1. (from Owner account) Go to Settings > Apps, find and open the app info. Then, open the overflow menu (3 vertical dots), and choose Uninstall for all users.

  2. (from guest account) Deactivate the guest account if you don't need it (for more info: Removing the default guest user account from Android Lollipop)

  3. (from PC) Enter adb uninstall on command prompt/shell. This is the same as "uninstall for all users"

  4. (from guest/other accounts) Find the app and uninstall it normally.

    • In case you can't uninstall it, try to remove the account and create a new one, then try to find and uninstall the app again.




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 ...