install apk signed with platform certificate

3,950 views
Skip to first unread message

ludovic.perrier

unread,
Oct 28, 2009, 12:00:25 PM10/28/09
to android-platform
Hello

On my device development I run my own build signed with my custom
platform certificate. I try to install an apk build to run system
permission, on this apk I have this options

Add android:sharedUserId="android.uid.system" in androidmanifest.xml
Add LOCAL_CERTIFICATE := platform_custom in my android.mk
(platform_custom is my certificate in /build/target/product/security
folder)

to compile I use mmm command but I have this errors on install (It's
work if I use default certificate of git repo):

On logcat I have:
10-28 11:25:23.271: ERROR/PackageManager(930): Package
com.diotasoft.caster has no signatures that match those in shared user
android.uid.system; ignoring!
On Adb log I have:
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]

I don't understand because my system and my apk are signed with the
same certificate. Do you have an idea?

Part of my manifest

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.diotasoft.caster" android:versionName="0.1"
android:versionCode="1" android:sharedUserId="android.uid.system">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.INSTALL_PACKAGES" /
>
<uses-permission android:name="android.permission.DELETE_PACKAGES" />
<uses-permission android:name="android.permission.CLEAR_APP_CACHE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" /
>

...

Ne0

unread,
Oct 28, 2009, 12:32:51 PM10/28/09
to android-platform
I'm no expert, but i have a few system applications and have not
needed to use android:sharedUserId="android.uid.system">.

Liam

ludovic.perrier

unread,
Oct 28, 2009, 12:54:22 PM10/28/09
to android-platform
If I remove this I have not system permissions. for example I can't
write in /cache directory.

Ludo

ludovic.perrier

unread,
Oct 28, 2009, 12:57:24 PM10/28/09
to android-platform
If I remove I have also this message in log at install

10-28 12:50:45.091: WARN/PackageManager(930): Not granting permission
android.permission.INSTALL_PACKAGES to package com.diotasoft.caster
(protectionLevel=3 flags=0x44)
10-28 12:50:45.091: WARN/PackageManager(930): Not granting permission
android.permission.DELETE_PACKAGES to package com.diotasoft.caster
(protectionLevel=3 flags=0x44)


On 28 oct, 17:32, Ne0 <liamjamesalf...@googlemail.com> wrote:

ludovic.perrier

unread,
Oct 28, 2009, 2:18:38 PM10/28/09
to android-platform

I have a clue

If I use my platform_custom to compile PackageInstaller.apk I have
same problem. Yet my system image is compiled with the certificate
platform_custom.

Do you have an idea?

Thanks

Master_Ne0

unread,
Dec 1, 2009, 12:28:29 PM12/1/09
to android-platform
No sorry i dont. Though here is something odd to add to this. I have
two signatures, if i sign an app trying to use the
android:sharedUserId="android.uid.system with one i can install it
fine, though if i use the other i can't. Even though the system i am
installing it on is signed with neither. FYI its the dev phone system
from htc.

i get the install error

E/PackageManager( 76): Package com.testapp.test1 has no signatures
that match those in shared user android.uid.system; ignoring!

Have you got any more info on this?

On Oct 28, 6:18 pm, "ludovic.perrier" <ludovic.perr...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages