1

I'm wondering about how is a signatureOrSystem permissions enforced on custom ROMs.

Docs say:

A permission that the system grants only to applications that are in the Android system image or that are signed with the same certificates as those in the system image.

Where is this certificate? In case I'm using a custom ROM, say CyanogenMod, can I obtain their certificate, which I'm assuming is freely available, and sign my application so that it could use such a permission (only with that ROM of course)?

Thanks ;)

Venator85
  • 10,245
  • 7
  • 42
  • 57
  • As I understand it signatureOrSystem means that your application has to be signed by the platform key OR installed on the system partition. So just copy your apk to /system/app and it should work. – Matthias Weiler Sep 06 '12 at 23:00
  • possible duplicate of [How to compile Android Application with system permissions](http://stackoverflow.com/questions/3598662/how-to-compile-android-application-with-system-permissions) – Thor Sep 08 '12 at 10:51

1 Answers1

4

For CygenMod the platform key is here: https://github.com/CyanogenMod/android_build/tree/gingerbread/target/product/security.

As of Android 4.4 putting the app in "/system/priv-app" will also enable granting of permissions marked as "signatureOrSystem" regardless of what key the app is signed with. In theory older androids would do the same for an app on "/system". However, I was not able to get this to work.

As of Android 5.1 all apps in /system/priv-app may have to be in subfolder with their name to work.

Notice: The special handling of "/system/priv-app" is currently an undocumented feature.