简体   繁体   English

自定义ROM上的signatureOrSystem权限

[英]signatureOrSystem permissions on custom ROM

I'm wondering about how is a signatureOrSystem permissions enforced on custom ROMs. 我想知道如何在自定义ROM上强制执行signatureOrSystem权限。

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. 系统仅授予Android系统映像中或使用与系统映像中的证书相同的证书签名的应用程序的权限。

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)? 如果我使用的是自定义ROM(例如CyanogenMod),我是否可以获取他们假定免费提供的证书,并对我的应用程序进行签名,以便它可以使用这种许可(当然只有该ROM)?

Thanks ;) 谢谢 ;)

For CygenMod the platform key is here: https://github.com/CyanogenMod/android_build/tree/gingerbread/target/product/security . 对于CygenMod,平台密钥在此处: 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. 从Android 4.4开始,将应用程序放置在“ / system / priv-app”中还将启用授予标记为“ signatureOrSystem”的权限的权限,而不管使用该应用程序签名的密钥如何。 In theory older androids would do the same for an app on "/system". 理论上,较早的android会对“ / 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. 从Android 5.1开始,/ system / priv-app中的所有应用可能都必须位于其名称所在的子文件夹中。

Notice: The special handling of "/system/priv-app" is currently an undocumented feature. 注意:目前,“ / system / priv-app”的特殊处理是一个未记录的功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM