SEAndroid中sepolicy/adbd.te策略文件分析
2015-09-18 17:04
567 查看
在adbd.te策略文件中,很明显,定义了一些关于adbd,也就是adb守护进程的一些策略.下面我们先来看一下这个策略源码:
总的来说,这里首先是定义了一个域标识符adbd,同时,设置了他的运行模式,也为该域定义了一些策略,允许其自动转换成新域,并且无论是新标志符还是旧标志符都可以访问/data/misc/adb下的文件.
# adbd seclabel is specified in init.rc since # adbd安全标签是在init.rc中被指定的 # it lives in the rootfs and has no unique file type. # 他存在于根文件系统中,没有唯一的文件类型。 type adbd, domain; # 定义adbd类型标识符,其属性集合为domain permissive adbd; # 将adbd设置为permissive运行方式,也就是即使出现问题,也不会影响正常的运行,仅仅就是把错误发送给dmesg unconfined_domain(adbd) # 无约束的域 # 直接调用宏,后面讲解; # 在这里的作用是:通过执行一个被贴上标志符的文件来自动从旧域转到新域 domain_auto_trans(adbd, shell_exec, shell) # this is an entrypoint # 这是一个入口点 allow adbd rootfs:file entrypoint; # Read /data/misc/adb/adb_keys. # 读取 /data/misc/adb/adb_keys文件 allow adbd adb_keys_file:dir search; allow adbd adb_keys_file:file r_file_perms; # Allow access in case /data/misc/adb still has the old type. # 当/data/misc/adb依然有旧域的话,也允许访问 allow adbd system_data_file:dir search; allow adbd system_data_file:file r_file_perms;
总的来说,这里首先是定义了一个域标识符adbd,同时,设置了他的运行模式,也为该域定义了一些策略,允许其自动转换成新域,并且无论是新标志符还是旧标志符都可以访问/data/misc/adb下的文件.
相关文章推荐
- Android数据适配器(Adapter)优化:高效ViewHolder
- Android加载通话记录流程分析
- 使用Gradle构建Android工程
- Android 经验
- android学习历程,自定义listview并从服务器端获取数据填充进listview
- Android的intent之间复杂参数的传递
- Android常用开源组件
- android EditText问题多行文本输入
- android framework 重启LOG分析方法
- android开关屏幕
- Android 开源项目分类汇总
- android中相机的简单调用
- Android中一个textviewz中的字符串俩个颜色显示
- Android layout属性大全
- Android 蓝牙开发小结与探讨
- android学习----overridePendingTransition
- Android-开发遇到的问题汇总
- Android CheckBox自定义
- Android中onSaveInstanceState和onRestoreInstanceState的调用
- Android开发之SurfaceView详解