3

What was the precise error message?

The error message displayed by F-Droid was on the lines of"The new package is requesting a shared user which is already installed on the device and does not have matching signature.". The eror code was INSTALL_FAILED_SHARED_USER_INCOMPATIBLE / -8.

When did I encounter this issue?

When trying to install the app "Termux" from F-Droid. Essentially installing the apk and not from the Play Store.

What have I tried to solve this issue?

  • Search Stackoverflow for solutions
  • Uninstall app / Uninstall App for all users
  • Install App from Play Store and then uninstall it again

Possible Cause:

I previously had the app installed from Play Store and then uninstalled it before trying to reinstall it from F-Droid. This is the most probable cause in my opinion although I wasn't able to reproduce it on another device.
(Preempting my answer) As it turns out /data/system/packages.xml still contained the shared-user entry for the app including the signature. Which explains why I couldn't install the other apk, since they were signed with different key although they're the same apps and opensource.

2 Answers 2

3

Problem solved without root access:

I also encountered 'Error (-8): The new package has requested a shared user which is already installed on the device and does not have matching signature." after uninstalling termux in Google Play and attempting to reinstall it from F-Droid.

The phone was not rooted, so the solution suggested above was not available. However I noticed that some accompanying termux apps were still installed, namely termux API, termux tasker and termux styling.

After uninstalling them, as well as emptying the cache and/or data (via android settings) of possibly relevant system apps including google play store (C), google play services (CD) and package installer (CD), I was able to install termux, along with the accompanying apps, from F-Droid.

C: app cache emptied; CD: app data also deleted

Sign up to request clarification or add additional context in comments.

Comments

2

How to solve it:

Warning: This is quite a brachial method to solve this issue. It also requires root access.

Based on one answer on xda-developers by the user tweakradje I have found the following to work for me:

  1. Copy /data/system/packages.xml to another location or your computer.

  2. Edit it with a text editor and remove the xml-block that has the the apps package-id as the name attribute. Example for the app "Termux" in this case:

    <shard-user name="com.termux" userId="10102"> <sigs count="1"> <cert [...]/> </sigs> </shared-user> 
  3. Copy the modified version to /data/system/packages.xml and overwrite the old one.

  4. Clear the dalvik cache ("adb shell rm /data/dalvik-chache/*" or via recovery)

  5. Reboot

  6. Install the apk which should go through this time

Note:

This most probably won't work for system packages (those that start with "android", e.g. "android.uid.system").

Further reading on shared-users:

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.