3

I am trying to install an apk (downloaded from one site) in ICS emulator through adb shell but its giving following error:

Failure [INSTALL_FAILED_UID_CHANGED]

What could be the issue?

AndroDev
  • 3,236
  • 8
  • 35
  • 49

3 Answers3

11

Simply rm -r the data directory in question. If you were installing and got this error, you'd simply run "rm -r /data/data/com.app.class" from an ADB shell. If you want to try preserving the data, you could find the proper UID and then "chown -R UID:UID /data/data/com.app.class".

In Android, the part of the source code that handles installing apps is PackageManagerService. Since the Android source is public, it's easy to see where Android will throw a INSTALL_FAILED_UID_CHANGED error. If the following is true: the package you are installing already has a data directory AND the permissions on that data directory are different than the UID assigned to this package, you'll get that error.

MicBib
  • 111
  • 1
  • 3
  • My android flash was corrupted and previously installed apps were not working, icon was shown on a desktop. Reinstall from Store gave "application not installed, error code -25". Used adb.exe Android SDK tool: c:> adb shell, $cd /data/data/com.app.class, $rm -r *, $cd .., $rmdir com.app.class – Whome Dec 07 '12 at 13:16
1

Uninstall the previous version of the app from the emulator first, then try again. You can do this by visiting System Settings > Applications > Manage Applications and selecting the app.

If the app still fails to install, then start the emulator with the Wipe user data option selected.

Michael Hampton
  • 9,737
  • 4
  • 55
  • 96
-3

Open command prompt and write below code in it:

adb devices

This will list down the number of devices attached or are active.Copy your apk in your System folder

adb -s DEVICE_NAME install YOUR_APK_NAME

through this you will be able to install your particular apk on the device by giving device name in above line.

AkashG
  • 7,868
  • 3
  • 28
  • 43