|
发表于 2021-7-27 11:52:02
7463 浏览 0 回复
mt6737-android7.0-user版本Settings应用获取gpio的selinux权限
例如添加gpio节点后,Settings应用想通过jni控制gpio拉高拉低,先要这样修改:
1.device/lentek/len6737m_65_sh_n/init.project.rc
chmod 777 /dev/mtgpio
2.device/mediatek/common/sepolicy/basic/file_contexts.te
/dev/mtgpio u : object_r:mtgpio_device:s0
3.device/mediatek/common/sepolicy/basic/device.te
type mtgpio_device, dev_type;
4.device/mediatek/common/sepolicy/basic/system_app.te
allow system_app mtgpio_device:chr_file { read write ioctl open };
|
|
|
|
|
|
|
登录或注册
|