Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android INSTALL_FAILED_UID_CHANGED

Tags:

android

I have been doing debugging on Android using my Nexus 4, however I recently encountered this error here. After doing some research on this error, it seems to be an issue with the app not being deleted properly. The app I am debugging runs fine on my other Android devices as well as the emulators, this error is only occuring on my Nexus 4. I plugged my device into computer, and have tried deleting the data/data folders but I am still getting the same issue. I also checked settings-apps to check it was definitely uninstalled.

Does anyone have any idea how to resolve this issue? According to some users, I need root access to properly delete data/data, is this true? Or is there another way around this?

like image 212
AdamM Avatar asked Apr 29 '13 11:04

AdamM


2 Answers

Sometimes you have to also uninstall the data folders. For me, I had a package in userspace of com.kikin.cts, and also a folder directory in /data/data/com.kikin.cts. Kept getting INSTALL_FAILED_UID_CHANGED, but after removing the data folder, the error went away.

like image 169
Ehtesh Choudhury Avatar answered Oct 26 '22 09:10

Ehtesh Choudhury


For rooted devices:

Run the below command

adb rm -rf /data/data/<your.package.name> 

For non-rooted device:

  1. Change the ApplicationId of the app. Refer this link to change ApplicationId.
  2. Build and install the app. App will install successfully because it is treated as new app.
  3. Now uninstall this app. Which will clear the data.
  4. Now change the ApplicationId to the previous one.
  5. Build and install. Magic.. It will install.
like image 36
Rajesh Hegde Avatar answered Oct 26 '22 11:10

Rajesh Hegde