INSTALL_FAILED_UPDATE_INCOMPATIBLE shows up even after the original is completely removed

StackOverflow https://stackoverflow.com/questions/14592101

  •  06-03-2022
  •  | 
  •  

Question

I am trying to install a modified apk file onto my Nook Simple Touch. I modified the Reader.apk program, recompiled it, and signed it with my own key.

I know that you cannot install an app over a current app if the signing keys are different. However, I am getting the error INSTALL_FAILED_UPDATE_INCOMPATIBLE even after completely uninstalling the original Reader.apk app.

After checking the packages.xml file, I removed the entry for the old Reader.apk app. And I am still getting this error. The app is completely uninstalled, and I cannot install my modified version.

Even signing the original sources with my new key causes this error to come up (so it has nothing to do with the actual changes I made).

Was it helpful?

Solution 3

The solution is to modify the AndroidManifest.xml file. You need to remove the sharedUserId attribute in the second line.

The Reader.apk file is a system app, and it is made by the manufacturers of the device itself, who also made several other apps. Due to this, they were able to set the sharedUserId flag, which allows all of their apps to interact with each other. As a security design, all the apps are required to have the same signing key. When I tried to install the modified app, it failed to install because it was trying to share the user id with the other apps while lacking the proper signing key.

By removing the flag in the xml, you can successfully install the modified app. Change the following line in the AndroidManifest.xml file from this:

<manifest android:sharedUserId="android.media" android:versionCode="1"
    android:versionName="1.0" package="com.bn.nook.reader.activities"
    xmlns:android="http://schemas.android.com/apk/res/android">

to this:

<manifest android:versionCode="1" android:versionName="1.0"
    package="com.bn.nook.reader.activities"
    xmlns:android="http://schemas.android.com/apk/res/android">`

See this xda post for more details. (Full Disclosure: I wrote that post.)

OTHER TIPS

According to the docs, this error appears "if a previously installed package of the same name has a different signature than the new package (and the old package's data was not removed)."

If you're sure you removed it, there may be some spot where the old signature is still floating around that removal didn't, um, remove. Wiping the emulator/device data should clear up the problem.

If the original application was completed removed and we still having the same message:

INSTALL_FAILED_UPDATE_INCOMPATIBLE 

Go to Settings > Apps and you will find your app with the message:

"Not installed for this user"

, we have to uninstall manually for all users with the option:

"Uninstall for all users"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top