signatureOrSystem permissions on custom ROM

喜夏-厌秋 提交于 2019-12-11 13:09:09

问题


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 ;)


回答1:


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.



来源:https://stackoverflow.com/questions/5688352/signatureorsystem-permissions-on-custom-rom

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!