|Uid mismatch||kypriakos||3/2/11 9:32 PM|
It seems that the install failure of a particular apk may be
mismatch uids. What causes such mismatches and is it possible to
correct them without losing the user data - particularly in this case
where only a certain app apk does that but the rest are fine. Where
do these uids get stored?
This is the message:
Package com.CP_16 has mismatched uid: 10048 on disk, 10045 in settings
If I create a new apk using the source from the apk that fails I still
the same message with a different uid:
Package com.WebCP_16 has mismatched uid: 10042 on disk, 10044 in
I will appreciate any hints on this or where to look for some.
|Re: [android-developers] Uid mismatch||Dianne Hackborn||3/2/11 10:08 PM|
The uid is stored in data/system/packages.xml and of course the uid of the directory and files owned by the app. You can't touch any of these unless you are running a non-user build.
Did you try to change the app between a shared user id and non-shared? If so, this will cause the problem; on older versions of the platform the install wouldn't fail, it would just result in mismatched uids.
Android framework engineer
Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.
|Re: [android-developers] Uid mismatch||kypriakos||3/2/11 10:33 PM|
No I didn't actually try to change the app from shared user to non-shared, it is a non-shared id app even though
I am seeing 7 shared uids mentioned in the logging below. Not sure why but I didn't set any shared user uids.
I am compiling and running this on a 1.6 Android phone and I do see the mismatch uids but also the install failing.
Not sure how the mismatch uids affect the install and looking over the log that may be the case anyway:
D/AndroidRuntime( 421): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 421): CheckJNI is OFF
D/AndroidRuntime( 421): --- registering native functions ---
I/jdwp ( 421): received file descriptor 17 from ADB
D/ddm-heap( 421): Got feature list request
D/PackageParser( 90): Scanning package: /data/app/vmdl60807.tmp
E/PackageManager( 90): Package com.p2pSOAAndroidWebCP2_16 has mismatched uid: 10042 on disk, 10036 in settings; read messages:
E/PackageManager( 90): Read completed successfully: 70 packages, 7 shared uids
I/PackageManager( 90): /data/app/vmdl60807.tmp changed; unpacking
D/installd( 53): DexInv: --- BEGIN '/data/app/vmdl60807.tmp' ---
W/dalvikvm( 427): partial write in inflate (32728 vs 32768)
W/dalvikvm( 427): DexOptZ: extraction of classes.dex from /data/app/vmdl60807.tmp failed
W/installd( 53): DexInv: --- END '/data/app/vmdl60807.tmp' --- status=0xff00, process failed
E/installd( 53): dexopt failed on '/data/dalvik-cache/data@email@example.com@classes.dex' res = 65280
W/PackageManager( 90): Package couldn't be installed in /data/app/com.p2pSOAAndroidWebCP2_16.apk
D/AndroidRuntime( 421): Shutting down VM
I also do se a partial write in inflate but that's all. Do you know what the res=65280 stand for in thefailed
Thanks for the feedback Dianne
|Re: [android-developers] Uid mismatch||Dianne Hackborn||3/2/11 11:11 PM|
1.6 is really old, so I am not going to be able to remember enough to help much off-hand. There may have been a bug in it that allowed uids to get re-assigned in certain bad situations.
I can't help you with dalvik errors.
I think what I would suggest at this point is to just uninstall the app and then re-install.
|Re: [android-developers] Uid mismatch||kypriakos||3/3/11 9:03 AM|
No problem Dianne I certainly understand and I still appreciate the help so far anyway.
I am primarily working with 2.2 and 2.3 versions of the OS but there was a requirement
to use these older phones for now so I need to dig in the ancient world a bit ;)
I did uninstall and install the app again multiple times but the issue remains. I am assuming
that I may need to clear up the data partition to fix this. Any other app I install works fine
on these phones so I think the issue is limited to this particular application. I am wondering
if an older corrupted version of this app has leftovers in the OS and it is messing up any
other effort beyond it.
I will post any solution I find on the list for reference and if anyone has any suggestions pleased
feel free to post it. I appreciate the help.
|Re: [android-developers] Uid mismatch||Dianne Hackborn||3/3/11 9:25 AM|
Huh, that doesn't make any sense. Uninstalling will remove all traces of the app and any uids associated with it, so when you install again it will be fresh.
Could you please post:
(1) The output of logcat when you are uninstalling.(2) The output of "adb shell dumpsys package" after uninstalling.
(3) The output of logcan when you are next installing.
(4) The output of "adb shell dumpsys package" after installing.
|Re: [android-developers] Uid mismatch||kypriakos||3/3/11 11:29 AM|
I agree with you - but I think the fact that something went wrong originally with some prior
installation this time around the app cannot be installed to begin with. So my posting below
was erroneous when I said I uninstalled and installed the app, I meant to say I tried installing
it multiple times but never succeeded. So outputs for (1) and (2) cannot be done.
The log I posted below shows what happens when I try to install it - what you are asking on (3)
For (4) I am attaching the output as a text file. I did search in there for the package in question (as you can
see above = com.p2pSOAAndroidWebCP2_16) but it does not exist. Another step I took was to create a new
project, import this code over and try to install this with completely new apk name but still no luck. So I was
wondering if there's something in the code that is causing this. The manifest file, the project properties etc they
all look good and very similar to other apps I have that install fine on this particular phone.
|Re: [android-developers] Uid mismatch||Dianne Hackborn||3/3/11 2:03 PM|
If the package is completely uninstalled and it is still failing when installed, I would like to see the log from when it failing and the "adb shell dumpsys package" output after the failure. It sounds like all you attached was the log from after uninstalling the package, when there is no data about it?
|Re: [android-developers] Uid mismatch||kypriakos||3/3/11 7:55 PM|
let me take this from the top:
First I try to install the package using "adb install" and I get back the following error:
The log during this failure is what I showed below - the mismatched uids and the
failire to extract files out of the temporary archive.
Therefore I am not sure if the above error is because the package is completely uninstalled
but when I do "adb uninstall" of it I get [Failure] telling me that it does not find it.
So I cannot install the package to begin with that's why the "adb shell dumpsys package"
has no data on it. What makes no sense is why am I getting the uid mismatch if I cannot
find the package anywhere ... as you said "There may have been a bug in it that allowed uids
to get re-assigned in certain bad situations". So may be this is one of those bad situations?
When I search the "adb shell dumpsys package" output I cannot find the
"mismatched uid: 10042 on disk, 10036 in settings; read messages" ids anywhere ...
Let me know if there is any other log that can reveal a bit more info on this and I will send it over.
Again thanks for the feedback
|Re: [android-developers] Uid mismatch||Dianne Hackborn||3/3/11 9:43 PM|
Oh so the problem isn't really the uid mismatch, but the failure installing? I guess something about your .apk is not compatible with Dalvik on that older version of the platform. I'm sorry I don't know enough about Dalvik to help any further than that.
Well a quick Google search shows some other discussions on this error: http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=partial+write+in+inflate+(32728+vs+32768)#sclient=psy&hl=en&source=hp&q=dalvik+partial+write+in+inflate&aq=f&aqi=&aql=&oq=&pbx=1&bav=on.2,or.&fp=132dbdd4b08c8461
|Re: [android-developers] Uid mismatch||kypriakos||3/3/11 10:18 PM|
Yes although I do get the uid mismatch with this particular apk and not any other project I have, I was not sure if the
mismatch also causes the partial inflate. I did google around and saw some of the postings that you are showing
below - some of them indeed blame this one space issues but in my case that is not the problem. So it may be
a file system problem afterall. I will keep at it a bit more and see if I can figure out something more and I will
post it on the list.
Dianne, thanks much for all of your responses!
|Re: [android-developers] Uid mismatch||kypriakos||3/4/11 1:39 PM|
Hi Dianne - on a separate note and without asking you directly but rather posting this
to the list anyway, I was wondering if you have any further info to help out with these.
I posted multiple times questions on these to the forum but didn't get much feedback
which makes me believe that not many people are working with this so I was wondering
if you have any pointers for me to follow - otherwise no worries at all:
I am running Ajax scripts on the native Android browser. I can see the outgoing messages
but the returned responses to these requests don't get rendered by the browser. I understand
that this could be a bug in the way the Ajax handling was implemented. I am trying to find out
where this handler implementation is or if in general what the model of response handling for
these browsers are. Do you think that this is something that is documented somewhere or
only looking through the code could reveal the answer? I know many people are looking elsewhere,
the browser is indeed capable to do so and we just don't know how to deal with it with the code.
Just wondering and please don't worry about it if you are not sure or don't have time for it.
Thanks for helping out with the other issue below I did get some good pointers to go by with.
|Re: [android-developers] Uid mismatch||Dianne Hackborn||3/4/11 2:46 PM|
Sorry I don't really know anything about Ajax, and am not involved with Android's Browser/WebView development.
|Re: [android-developers] Uid mismatch||kypriakos||3/4/11 2:51 PM|
Not a problem at all .. same here and I am learning ;) I will continue the effort to resolve
this and if I do find a resolution I will post it.