[Nexus One Android Development] SilentMobius:
Hi All,

I tried asking about this on the CM forums (given that I'm running CM) but only got so far, was hoping that some of the rom/system app devs might be able to give me a hand.

After some testing of all the keys in AOSP I found that the platform key was identical to the signing key used on SettingsProvider.apk so I stuffed that into a keystore and signed the app with it.

But it's still not working:

D/PackageParser( 106): Scanning package: /system/app/WMDroot.apk
I/PackageParser( 106): com.alienmanfc6.wheresmyandroid: compat added android.permission.WRITE_EXTERNAL_STORAGE
I/PackageManager( 106): /system/app/WMDroot.apk changed; collecting certs
D/PackageManager( 106): Scanning package com.alienmanfc6.wheresmyandroid
D/PackageManager( 106): Shared UserID android.uid.system (uid=1000): packages=[
PackageSetting{45dc0558 com.google.android.server.checkin/1000},
PackageSetting{45da6ea0 com.android.providers.settings/1000},
PackageSetting{45d73cd8 com.google.android.providers.subscribedfeeds/1000},
PackageSetting{45d3ea70 android/1000},
PackageSetting{45dc1db0 com.google.android.systemupdater/1000},
PackageSetting{45da5fd0 com.android.providers.subscribedfeeds/1000},
PackageSetting{45db0640 com.android.server.vpn/1000},
PackageSetting{45d75408 com.google.android.location/1000},
PackageSetting{45d906d8 org.zenthought.android.su/1000},
PackageSetting{45d7da08 com.google.android.backup/1000},
PackageSetting{45da46d8 com.android.settings/1000}]
E/PackageManager( 106): Package com.alienmanfc6.wheresmyandroid has no signatures that match those in shared user android.uid.system; ignoring!

Now maybe I messed up my signing somewhere so I pulled out my Nexus's SettingsProvider.apk and unzipped it to compare the CERT.RSA (the sp directory is the settingsprovider and the wm directory is the app I'm trying to give system permissions to)

x@Mneme:/var/Software/android/cert$ keytool -printcert -file sp/META-INF/CERT.RSA
Owner: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
Issuer: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
Serial number: b3998086d056cffa
Valid from: Tue Apr 15 23:40:50 BST 2008 until: Sat Sep 01 23:40:50 BST 2035
Certificate fingerprints:
MD5: 8D:DB:34:2F:2D:A5:40:84:02:D7:56:8A:F2:1E:29:F9
SHA1: 27:19:6E:38:6B:87:5E:76:AD:F7:00:E7:EA:84:E4:C6:EE:E3:3D:FA

x@Mneme:/var/Software/android/cert$ keytool -printcert -file wm/META-INF/CERT.RSA
Owner: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
Issuer: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
Serial number: b3998086d056cffa
Valid from: Tue Apr 15 23:40:50 BST 2008 until: Sat Sep 01 23:40:50 BST 2035
Certificate fingerprints:
MD5: 8D:DB:34:2F:2D:A5:40:84:02:D7:56:8A:F2:1E:29:F9
SHA1: 27:19:6E:38:6B:87:5E:76:AD:F7:00:E7:EA:84:E4:C6:EE:E3:3D:FA

They look identical to me, I'm stumped.

Here's my checklist:

Signed with platform key. (build/target/product/security/platform.[pk8|x509.pem])

Manifest tag in AndroidManifest.xml has the attribute android:sharedUserId="android.uid.system"

App has been pushed to /system/app and is owned by root:root permissions:0644 (not sure how necessary that is)