INSTALL_FAILED_SHARED_USER_INCOMPATIBLE while using shared user id

Follow these steps to fix the INSTALL_FAILED_SHARED_USER_INCOMPATIBLE error:

  1. Remove the existing application (if it was already installed)
  2. Remove the sharedUserId from AndroidManifest.xml
  3. Rebuild the application
  4. Reenter the sharedUserId to AndroidManifest.xml
  5. Rebuild the application (one more time)

This means something about your app was not correctly uninstalled. This steps help to force uninstall from internal commands:

  1. Connect your phone to PC with usb
  2. From your shell launch:
    $ adb shell
    shell@android:/ $ su
    shell@android:/ # pm list packages | grep <part of package>
    package:com.android.providers.applications
    package:com.android.providers.calendar
    package:com.android.providers.contacts
    package:com.android.providers.downloads
    ...
    shell@android:/ # pm uninstall <package>
    shell@android:/ # exit
    shell@android:/ $ exit
    $

Basically, you log into android shell, become superuser, find problematic packages, and uninstall it

Tags:

Android