Android Security-Permissions

Source: Internet
Author: User

Android's privilege Persion is also fine-grained privilege management.

Classification:

Normal
Dangerous (prompt during installation)
Signature (for vendor-defined permissions, a few apps developed by the vendor can be used, other third parties can not use, with the manufacturer's private key to sign)
Signatureorsystem (the manufacturer or the system comes with the available permissions)

You can see the defined permissions under Frameworks/base/core/res/androidmanifest.xml


Run-time permission control mode:

1. Through Pacakagemanage's checkpermission

Android-only service (the underlying platform Linux does not have)
So you need to control it in the Android framework.
Mainstream service is generally based on binder IPC or other IPC services
So at the lowest level of control (the server where the service resides) to avoid escape control
Bypass utility function directly invoke Remote Service
Example: Daydream



2. Mapping to specific properties of the OS

Non-Android-specific service (the underlying platform has been provided, such as file access, number of TCPIP
According to the transceiver, etc.)
Multiple portal access: Android API, Java api,ndk C API, Shell, etc
The underlying control criterion, the convergence port at the bottom, so at the bottom (OS level) unified control, which
Can avoid escape control
So some of the security control features of the multiplexed OS, such as GID
So you need to mapping the permission of the Android space to the OS gid.
Example: Access SDcard

When we declare that you have read and write SD card permissions


View file permissions, each with GID as SDCARD-_RW


How to add it?

Grammar:
UID Assigning Permission:<assign-permission
Name= "Permission_name" uid= "Target_uid"/>
Gids Mapping: <permission name= "Permission_name" >
<group gid= "Assigned gid"/>
<group gid= "Assigned gid"/>
............
</permission>
Time of occurrence: At the time of installation
Under the Etc/permissions directory
Any XML file below system/etc/permissions that conforms to the above syntax will be
The system reads the parse and uid/gid the mapping. Like Platform.xml.

Security: Only the root user is allowed to add or overwrite.


Android Security-Permissions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.