Cheers, folks

I am trying to install an apk to my Nexus 5 with ROM from AOSP and I want 
this .apk to have system uid on install. I know, that it must be signed by 
platform certificate. It's an easy task when you have appropriate private 
keys by your hand such as the case with AOSP, but what if you have some ROM 
and don't have access platform certificate. I want my app to launch with 
system uid on those ROMs either, so I decided to resign all platform-signed 
apks with my own certificate in such third-party ROMs. I identified all 
apks signed with platform certificate  remove the META-INF directory from 
inside of these apks and signed them with my cert using jarsigner. I have 
also updated mac_permissions.xml file and inserted my platform cert there 
instead of old one. After booting such ROM everything worked fine except 
some apps crashed (especially NFC app constantly tried to initialize and 
failed at resource loading). I could also sign my apk with my platform cert 
and everything works fine, still these other apps crashing are bothering 
me. Could someone please address me the right place, where ROM's platform 
certs "have power" i mean where there signatures are check, maybe i missed 
something.

I used for debugging AOSP 4.4.2 on Nexus 5

Log of crushing com.android.nfc :

05-28 13:35:42.569: I/ActivityManager(872): Start proc com.android.nfc for 
added application com.android.nfc: pid=1295 uid=1027 gids={41027, 3002, 
3001, 1028, 1015}
05-28 13:35:42.789: D/BrcmNfcJni(1295): 
register_com_android_nfc_NativeNfcManager: enter
05-28 13:35:42.799: D/BrcmNfcJni(1295): 
register_com_android_nfc_NativeNfcManager: exit
05-28 13:35:42.799: D/BrcmNfcJni(1295): 
register_com_android_nfc_NativeNfcTag
05-28 13:35:43.789: E/AndroidRuntime(1295): Process: com.android.nfc, PID: 
1295
05-28 13:35:43.789: E/AndroidRuntime(1295): at 
com.android.nfc.NfcService.initSoundPool(NfcService.java:540)
05-28 13:35:43.789: E/AndroidRuntime(1295): at 
com.android.nfc.NfcService$EnableDisableTask.enableInternal(NfcService.java:749)
05-28 13:35:43.789: E/AndroidRuntime(1295): at 
com.android.nfc.NfcService$EnableDisableTask.doInBackground(NfcService.java:684)
05-28 13:35:43.789: E/AndroidRuntime(1295): at 
com.android.nfc.NfcService$EnableDisableTask.doInBackground(NfcService.java:650)
05-28 14:35:47.549: W/BroadcastQueue(872): Skipping deliver [background] 
BroadcastRecord{42b16fc8 u0 android.intent.action.PACKAGE_CHANGED} to 
ReceiverList{4280db40 1295 com.android.nfc/1027/u-1 remote:4283fab0}: 
process crashing
05-28 14:35:47.549: W/BroadcastQueue(872): Skipping deliver [background] 
BroadcastRecord{42b16fc8 u0 android.intent.action.PACKAGE_CHANGED} to 
ReceiverList{42b21ff8 1295 com.android.nfc/1027/u-1 remote:42a985e0}: 
process crashing
08-26 15:57:24.963: W/BroadcastQueue(872): Skipping deliver [background] 
BroadcastRecord{42c88ab0 u0 android.intent.action.PACKAGE_CHANGED} to 
ReceiverList{4280db40 1295 com.android.nfc/1027/u-1 remote:4283fab0}: 
process crashing
08-26 15:57:24.963: W/BroadcastQueue(872): Skipping deliver [background] 
BroadcastRecord{42c88ab0 u0 android.intent.action.PACKAGE_CHANGED} to 
ReceiverList{42b21ff8 1295 com.android.nfc/1027/u-1 remote:42a985e0}: 
process crashing
08-26 15:57:24.983: W/BroadcastQueue(872): Skipping deliver [background] 
BroadcastRecord{42bebe50 u0 android.intent.action.PACKAGE_CHANGED} to 
ReceiverList{4280db40 1295 com.android.nfc/1027/u-1 remote:4283fab0}: 
process crashing
08-26 15:57:24.983: W/BroadcastQueue(872): Skipping deliver [background] 
BroadcastRecord{42bebe50 u0 android.intent.action.PACKAGE_CHANGED} to 
ReceiverList{42b21ff8 1295 com.android.nfc/1027/u-1 remote:42a985e0}: 
process crashing
08-26 15:57:24.983: W/BroadcastQueue(872): Skipping deliver [background] 
BroadcastRecord{42b81e40 u0 android.intent.action.PACKAGE_CHANGED} to 
ReceiverList{4280db40 1295 com.android.nfc/1027/u-1 remote:4283fab0}: 
process crashing
08-26 15:57:24.983: W/BroadcastQueue(872): Skipping deliver [background] 
BroadcastRecord{42b81e40 u0 android.intent.action.PACKAGE_CHANGED} to 
ReceiverList{42b21ff8 1295 com.android.nfc/1027/u-1 remote:42a985e0}: 
process crashing
08-26 15:57:24.993: W/BroadcastQueue(872): Skipping deliver [background] 
BroadcastRecord{42aabd30 u0 android.intent.action.PACKAGE_CHANGED} to 
ReceiverList{4280db40 1295 com.android.nfc/1027/u-1 remote:4283fab0}: 
process crashing
08-26 15:57:24.993: W/BroadcastQueue(872): Skipping deliver [background] 
BroadcastRecord{42aabd30 u0 android.intent.action.PACKAGE_CHANGED} to 
ReceiverList{42b21ff8 1295 com.android.nfc/1027/u-1 remote:42a985e0}: 
process crashing
08-26 15:57:25.003: W/BroadcastQueue(872): Skipping deliver [background] 
BroadcastRecord{42751c48 u0 android.intent.action.PACKAGE_CHANGED} to 
ReceiverList{4280db40 1295 com.android.nfc/1027/u-1 remote:4283fab0}: 
process crashing
08-26 15:57:25.003: W/BroadcastQueue(872): Skipping deliver [background] 
BroadcastRecord{42751c48 u0 android.intent.action.PACKAGE_CHANGED} to 
ReceiverList{42b21ff8 1295 com.android.nfc/1027/u-1 remote:42a985e0}: 
process crashing
08-26 15:57:25.023: W/BroadcastQueue(872): Skipping deliver [background] 
BroadcastRecord{428ac750 u0 android.intent.action.PACKAGE_CHANGED} to 
ReceiverList{4280db40 1295 com.android.nfc/1027/u-1 remote:4283fab0}: 
process crashing
08-26 15:57:25.023: W/BroadcastQueue(872): Skipping deliver [background] 
BroadcastRecord{428ac750 u0 android.intent.action.PACKAGE_CHANGED} to 
ReceiverList{42b21ff8 1295 com.android.nfc/1027/u-1 remote:42a985e0}: 
process crashing
08-26 15:57:32.582: I/ActivityManager(872): Process com.android.nfc (pid 
1295) has died.

-----------
Pavel

-- 
You received this message because you are subscribed to the Google Groups 
"Android Security Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/android-security-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply via email to