Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,771,526 Members 50,002 Now Online
XDA Developers Android and Mobile Development Forum

[SOLVED] install failed shared user incompatible

Tip us?
 
tweakradje
Old
(Last edited by tweakradje; 31st August 2012 at 12:40 PM.)
#1  
Senior Member - OP
Thanks Meter 281
Posts: 616
Join Date: Mar 2005
Location: Android
Default [SOLVED] install failed shared user incompatible

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
The Following 34 Users Say Thank You to tweakradje For This Useful Post: [ Click to Expand ]
 
tweakradje
Old
#2  
Senior Member - OP
Thanks Meter 281
Posts: 616
Join Date: Mar 2005
Location: Android
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: [ Click to Expand ]
 
coozoo
Old
#3  
Junior Member
Thanks Meter 3
Posts: 14
Join Date: Sep 2008
Location: Vinnitsya
Thumbs up thanks

thanks,
that's helped me to install new dolphin browser on mine superpad tablet pc
 
Star.Dust
Old
#4  
Star.Dust's Avatar
Junior Member
Thanks Meter 0
Posts: 1
Join Date: 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
 
mylifeisjourney
Old
#5  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: 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!
 
pradeepcse
Old
#6  
Junior Member
Thanks Meter 2
Posts: 4
Join Date: Jan 2012
Location: Coimbatore
Default Comment out shared-user name="android.uid.shared" xml block

Quote:
Originally Posted by mylifeisjourney View Post
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: [ Click to Expand ]
 
monkeydrufy
Old
#7  
Senior Member
Thanks Meter 32
Posts: 737
Join Date: Jun 2010
Quote:
Originally Posted by mylifeisjourney View Post
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
 
monkeydrufy
Old
#8  
Senior Member
Thanks Meter 32
Posts: 737
Join Date: Jun 2010
no one?
 
tweakradje
Old
#9  
Senior Member - OP
Thanks Meter 281
Posts: 616
Join Date: Mar 2005
Location: Android
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
My Samsung unlock thread: Here
Stock Data Usage Monitor in Android 2.x: Here
Android explained Here
The Following 2 Users Say Thank You to tweakradje For This Useful Post: [ Click to Expand ]
 
it's
Old
(Last edited by it's; 30th May 2012 at 10:06 PM.) Reason: -
#10  
Member
Thanks Meter 3
Posts: 45
Join Date: Jun 2011
never mind

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes