- Android Application Security Essentials
- Pragati Ogal Rai
- 273字
- 2021-08-13 16:25:30
Application level permissions
There are two ways to apply permissions to the entire application. In the first case, an application declares what permissions the application requires to function properly. So, an application that will be sending out SMS will declare such permission in the manifest file. In the second case, the application can declare what permissions other applications trying to interact with this application should have. For example, an application can declare that any application that wants to interact with one of its components should have permissions to access the camera. Both these kinds of permissions have to be declared in the manifest file. Let us go through them one by one.
This <uses-permission>
tag is declared inside <manifest>
and declares what permissions the application requests to function properly. The syntax of the tag is the following:
<uses-permission android:name=" " />
The user, when downloading the application, has to accept these permissions. android:name
is the name of the permission. An example declaration of this tag is as follows. The following permission declares that the application that the user is about to install would access the user's SMS:
<uses-permission android:name="android.permission.READ_SMS"/>
The <application>
tag has an attribute called android:permission
that declares blanket permissions for components. These are the permissions any application trying to interact with this application's components need to have. This is shown in the following code. The following code shows that applications interacting with any component of MyApplication
should have permission to access the camera:
<application android:name="MyApplication" android:icon="@drawable/icon" android:label="@string/app_name""android.permission.CAMERA"/>
As discussed in the next section, individual components can set permissions as well. Component permissions override the permission set using the <application>
tag. The preceding method is the best place to declare the blanket permissions for all components.
- Learning Python for Forensics
- 網絡安全保障能力研究
- 零信任網絡:在不可信網絡中構建安全系統
- 黑客攻防與電腦安全從新手到高手(微視頻+火力升級版)
- Wireshark 2 Quick Start Guide
- 電子支付的規制結構配置研究
- 計算機病毒分析與防范大全(第3版)
- Web安全與攻防入門很輕松(實戰超值版)
- 網絡安全三十六計:人人該懂的防黑客技巧
- Computer Forensics with FTK
- Advanced Penetration Testing for Highly:Secured Environments(Second Edition)
- Mastering Reverse Engineering
- 黑客攻防從入門到精通
- 交換機·路由器·防火墻(第2版)
- 黑客攻擊與防范實戰從入門到精通