Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1304767
  • 博文数量: 478
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 4833
  • 用 户 组: 普通用户
  • 注册时间: 2014-06-28 11:12
文章分类

全部博文(478)

文章存档

2019年(1)

2018年(27)

2017年(21)

2016年(171)

2015年(258)

我的朋友

分类: Android平台

2017-10-31 15:03:57


抓取Log:
adb shell "cat /proc/kmsg | grep avc" > avc_log.txt
生成规则:
audit2allow -i avc_log.txt
>>>
#============= untrusted_app ==============
allow untrusted_app hwdata_data_file:file open;

添加到项目:
device/mediatek/common/sepolicy/untrusted_app.te

编译验证:
mmm external/sepolicy/
make -j8 ramdisk-nodeps
make -j8 bootimage-nodeps
刷入Bootimage

[MTK...]


在Android KK 4.4 版本后,Google 有正式有限制的启用SELinux, 来增强android 的安全保护。
在ENG 版本中, 可以使用setenforce 命令进行设置:
adb shell setenforce 0    //设置成permissive 模式
adb shell setenforce 1    //设置成enforce 模式
 
在ENG/USER 版本中,都可以使用getenforce 命令进行查询,如:
 # getenforce
getenforce
Enforcing
阅读(1505) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~