Other Permission Enforcement
Arbitrarily fine-grained permissions can be enforced at any call into a
service. This is accomplished with the Context.checkCallingPermission()
method. Call with a desired
permission string and it will return an integer indicating whether that
permission has been granted to the current calling process. Note that this can
only be used when you are executing a call coming in from another process,
usually through an IDL interface published from a service or in some other way
given to another process.
There are a number of other useful ways to check permissions. If you have
the pid of another process, you can use the Context method Context.checkPermission(String, int, int)
to check a permission against that pid. If you have the package name of another
application, you can use the direct PackageManager method PackageManager.checkPermission(String, String)
to find out whether that particular package has been granted a specific permission.
在调用service的过程中可以设置任意的fine-grained permissions(这里我理解的是更为细化的权限)。这是通过Context.checkCallingPermission()
方法来完成的。呼叫的时候使用一个想得到的permission string,并且当该权限获批的时候可以返回给呼叫方一个Integer(没有获批也会返回一个Integer)。需要注意的是这种情况只能发生在来自另一个进程的呼叫,通常是一个service发布的IDL接口或者是其他方式提供给其他的进程。
Android提供了很多其他的方式用于检查permissions。如果你有另一个进程的pid,你就可以通过context method Context.checkPermission(String, int, int)
去针对那个pid去检查permission。如果你有另一个应用程序的package name,你可以直接用PackageManager method PackageManager.checkPermission(String, String)
来确定该package是否已经拥有了相应的权限。
分享到:
相关推荐
NULL 博文链接:https://tojaoomy.iteye.com/blog/1523880
controlling special permissions, encrypting file systems, and much moreMaster the art of securing a Linux environment with this end-to-end practical guideBook Description This book has extensive ...
Script complex GPMC operations with PowerShell, including linking, backup, restore, permissions changes, and more Create a "change management" system with Advanced Group Policy Management (AGPM v4) ...
Permissions
Explaining the Android security model and architecture, the book describes Android permissions, including Manifest permissions, to help readers analyze applications and understand permission ...
NTFS权限管理.超好用工具.Permissions Tools ,可以快速更改共享文件夹或子文件夹权限,包括继承和非继承。还可以复制权限,批量粘帖权限。神一样的NTFS权限管理工具。
Chapter 4: Permissions and Security Chapter 5: Managing Scope Chapter 6: Performance Optimization Chapter 7: Scalable Dynamic Lists Chapter 8: Parameter Sniffing Chapter 9: Dynamic PIVOT and UNPIVOT ...
Application Security for the Android Platform by Jeff Six (英文版 完全文字版, 文件大小 5.51...4. Component Security and Permissions 5. Protecting Stored Data 6. Securing Server Interactions 7. Summary
We introduce theAndroid ...effectiveness and efficiency by modularizing different security models from related work, such as dynamic permissions, inlined reference monitoring, and type enforcement
Laravel开发-permissions Laravel权限处理程序
Elenkov describes Android security architecture from the bottom up, delving into the implementation of major security-related components and subsystems, like Binder IPC, permissions, cryptographic ...
Windows7 Permissions zh-CN最高权限获取工具,删除正在运行的病毒文件和垃圾软件文件。
This sample shows runtime permissions available in Android M and above. It shows how to check and request permissions at runtime, handle backwards compatibility using the support library and how to ...
Chapter 1: The Android Security Model – the Big Picture 7 Installing with care 7 Android platform architecture 9 Linux kernel 9 Middleware 11 Dalvik virtual machine 11 Application layer 11 Android ...
Android 6.0 permissions Demo
Safeguard files and directories with permissions and attributes Create, manage, and protect storage devices: both local and networked Automate system security 24/7 by writing and scheduling scripts ...
4.Permissions and Security 5.Managing Scope 6.Performance Optimization 7.Scalable Dynamic Lists 8.Parameter Sniffing 9.Dynamic Pivot and Unpivot 10.Solving Common Problems 11.Applications of Dynamic ...
烧瓶许可 Flask-Permissions是一个简单的Flask权限扩展,可与。 尽管这不是严格的要求,但它也可以与配合使用。安装使用PIP可以快速轻松地安装: pip install Flask-Permissions入门导入Flask,Flask-SQLAlchemy,...
此存储库包含Permissions API的某些源,Permissions API是Web应用程序能够管理权限的接口。 最新的编辑草稿位于
文件描述:RequiredPermissions.dll 文件大小:188K