android system permissions

1. The difference between permissions under the System/app and system/priv-app folders
a) PermissionInfo.java system is divided into four levels of permissions normal dangerous signatrue signatureOrSystem
b) priv-app can obtain the highest signatureOrSystem permission
c) Only priv-app can Write WRITE_SECURE_SETTINGS permission
d)Add LOCAL_PRIVILEGED_MODULE := true to Android.mk
e)frameworks\base\core\res\AndroidManifest.xml
<!-- Allows an application to read or write the secure system settings.
    <p>Not for use by third-party applications. -->
    <permission android:name="android.permission.WRITE_SECURE_SETTINGS"
        android:permissionGroup="android.permission-group.DEVELOPMENT_TOOLS"
        android:protectionLevel="signature|system|development"
        android:label=" @string/permlab_writeSecureSettings"
        android:description="@string/permdesc_writeSecureSettings" />
f) framework/base/data/etc/platform.xml



normal indicates that the permission is low risk and will not cause harm to the system, user or other applications.

Dangerous indicates that the permission is high risk, and the system may require the user to enter relevant information before granting this permission.

The signature tells Android that the permission can only be granted to the application if it uses the same digital signature as all the digital signatures of the application declaring the permission.

signatureOrSystem tells Android to grant permissions to applications or Android package classes with the same digital signature. This level is suitable for very special cases, such as when multiple vendors need to share functionality through system images.

The other is the android:permissionGroup attribute, which represents a permission group. It is possible to put permissions in a group, but for custom permissions you should avoid setting this property. If you really want to set this property, you can use the following property instead: android.permission-group.SYSTEM_TOOLS.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326199121&siteId=291194637