Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[SOLVED] install failed shared user incompatible

OP tweakradje

15th August 2011, 12:35 PM   |  #1  
OP Senior Member
Flag Android
Thanks Meter: 285
 
621 posts
Join Date:Joined: Mar 2005
EDIT 31aug2012: also this message appears if there is no "classes.dex" in the apk

Hi,

When you try to install certain apk you might get this error when using "adb install something.apk"

Andoid creates "shared users" like app_1 app_3 etc for packages you install. These UID's are like 10001, 10002, 10003 etc.

Sometimes the administration of these shared users gets messed up and you get error messages like:

INSTALL_FAILED_SHARED_USER_INCOMPATIBLE


The shared user administration is kept in /data/system:

-rw-rw-r-- system system 129933 2011-08-15 12:08 packages.xml


How to solve? You need a rooted phone and adb:

adb shell chmod 666 /data/system/packages.xml

adb pull /data/system/packages.xml


Now edit (notepad++) and remove the shared user in question xml block from the file:
Code:
<shared-user name="com.navngo" userId="10000">
<sigs count="1">
<cert index="4" />
</sigs>
<perms>
<item name="android.permission.READ_PHONE_STATE" />
<item name="android.permission.DISABLE_KEYGUARD" />
<item name="android.permission.INTERNET" />
<item name="android.permission.WRITE_EXTERNAL_STORAGE" />
<item name="android.permission.ACCESS_FINE_LOCATION" />
<item name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<item name="android.permission.ACCESS_COARSE_LOCATION" />
<item name="android.permission.READ_CONTACTS" />
<item name="android.permission.WRITE_CONTACTS" />
<item name="android.permission.ACCESS_NETWORK_STATE" />
<item name="android.permission.WAKE_LOCK" />
<item name="android.permission.MODIFY_AUDIO_SETTINGS" />
</perms>
</shared-user>
adb push packages.xml /data/system

adb shell rm /data/dalvik-cache/*

adb reboot


Now you should be able to install that apk.

Cheers
Last edited by tweakradje; 31st August 2012 at 01:40 PM.
The Following 34 Users Say Thank You to tweakradje For This Useful Post: [ View ]
24th August 2011, 10:06 AM   |  #2  
OP Senior Member
Flag Android
Thanks Meter: 285
 
621 posts
Join Date:Joined: Mar 2005
This problem might also be solved using ad uninstall command. (only for user apps)

Lets keep the same program as above as an example the you type from a dos box:

adb uninstall com.navngo.igo.javaclient

Now install it again. You need to know the package name. You can open the apk with winrar/zip and view the AndroidManifest.xml file. There you see the package name.

Cheers
The Following 3 Users Say Thank You to tweakradje For This Useful Post: [ View ]
7th October 2011, 10:53 PM   |  #3  
Junior Member
Flag Vinnitsya
Thanks Meter: 3
 
14 posts
Join Date:Joined: Sep 2008
More
Thumbs up thanks
thanks,
that's helped me to install new dolphin browser on mine superpad tablet pc
12th October 2011, 06:41 AM   |  #4  
Star.Dust's Avatar
Junior Member
Thanks Meter: 0
 
1 posts
Join Date:Joined: Oct 2011
Hi,
I want to use android:sharedUserId="android.uid.system"

Then I get this error: Installation error: INSTALL_FAILED_SHARED_USER_INCOMPATIBLE

I removed the system uid following this procedure :P

It didn't work though

How to use system level privilege? I am working with hardware video codec, without system privilege. I am facing the same problem here : developer.nvidia.com/archived-tegra-forums/forum/android-how-call-libpvnvomxso-successfully

Any suggestion/idea would be welcome
8th December 2011, 07:18 PM   |  #5  
Junior Member
Thanks Meter: 0
 
1 posts
Join Date:Joined: Dec 2011
Unhappy The deleted "android.uid.system" in packages.xml comes back after reboot.
Hi,

I followed the instructions to remove section of android.uid.system in packages.xml. But after reboot, I felt that this file was re-generated and overwritten by system itself. I still can't install my app due to the same incompatible error.

Any help? Thanks!
31st January 2012, 11:03 AM   |  #6  
Junior Member
Flag Coimbatore
Thanks Meter: 3
 
4 posts
Join Date:Joined: Jan 2012
Comment out shared-user name="android.uid.shared" xml block
Quote:
Originally Posted by mylifeisjourney

Hi,

I followed the instructions to remove section of android.uid.system in packages.xml. But after reboot, I felt that this file was re-generated and overwritten by system itself. I still can't install my app due to the same incompatible error.

Any help? Thanks!


Hi,

It worked for me... All you want to do is just comment out the block of XML elements under <shared-user name="android.uid.shared" userId="10012">

Note: I have "Su" permission in my Device.

This is is how i did

<!-- <shared-user name="android.uid.shared" userId="10012">
<sigs count="1">
<cert index="3" />
</sigs>
<perms>
<item name="android.permission.USE_CREDENTIALS" />
<item name="com.google.android.googleapps.permission.GOO GLE_AUTH.mail" />
<item name="android.permission.WRITE_EXTERNAL_STORAGE" />
<item name="com.google.android.googleapps.permission.GOO GLE_AUTH.cp" />
<item name="android.permission.GET_ACCOUNTS" />
<item name="android.permission.READ_CONTACTS" />
<item name="android.permission.WRITE_CONTACTS" />
<item name="com.google.android.googleapps.permission.GOO GLE_AUTH" />
<item name="android.permission.READ_SYNC_STATS" />
<item name="android.permission.READ_PHONE_STATE" />
<item name="android.permission.READ_SMS" />
<item name="android.permission.MODIFY_PHONE_STATE" />
<item name="android.permission.WRITE_SETTINGS" />
<item name="android.permission.INTERNET" />
<item name="android.permission.SUBSCRIBED_FEEDS_READ" />
<item name="android.permission.VIBRATE" />
<item name="android.permission.SUBSCRIBED_FEEDS_WRITE" />
<item name="android.permission.WAKE_LOCK" />
<item name="android.permission.CALL_PRIVILEGED" />
</perms>
</shared-user> -->
The Following 2 Users Say Thank You to pradeepcse For This Useful Post: [ View ]
12th February 2012, 03:03 PM   |  #7  
Senior Member
Thanks Meter: 32
 
741 posts
Join Date:Joined: Jun 2010
Quote:
Originally Posted by mylifeisjourney

Hi,

I followed the instructions to remove section of android.uid.system in packages.xml. But after reboot, I felt that this file was re-generated and overwritten by system itself. I still can't install my app due to the same incompatible error.

Any help? Thanks!

same here, after I change the file and reboot it restore the line
15th February 2012, 02:55 PM   |  #8  
Senior Member
Thanks Meter: 32
 
741 posts
Join Date:Joined: Jun 2010
no one?
15th February 2012, 11:16 PM   |  #9  
OP Senior Member
Flag Android
Thanks Meter: 285
 
621 posts
Join Date:Joined: Mar 2005
android.uid.system (id 1000) is used for installing packages and I think this trick only works for 10.000 and higher id's.

Use google to find out more about the problem: https://www.google.com/search?num=40...oid.uid.system

Cheers
The Following 2 Users Say Thank You to tweakradje For This Useful Post: [ View ]
30th May 2012, 09:26 PM   |  #10  
Member
Thanks Meter: 3
 
45 posts
Join Date:Joined: Jun 2011
never mind
Last edited by it's; 30th May 2012 at 11:06 PM. Reason: -

Post Reply Subscribe to Thread
Previous Thread Next Thread