Android7.1以后开机运行脚本selinux权限配置

1. device/amlogic/common/sepolicy/file_contexts 添加

/system/bin/preinstall.sh   u:object_r:preinstall_exec:s0

2.创建device/amlogic/common/sepolicy/preinstall.te

type preinstall, domain;

type preinstall_exec, exec_type, file_type;

3.init.rc添加脚本运行服务

service preinstall /system/bin/preinstall.sh
   user root
   group root
   disabled
   oneshot

   seclabel u:r:preinstall:s0

4.uboot修改selinux配置为EnableSelinux=permissive

你可能感兴趣的:(Android系统)