.sh文件首先需要拷贝到对应目录下
/system/bin/
在system/core/rootdir/init.rc 有些项目是在device/目录下面
chmod 0777 /system/bin/dma.daemon.sh
on property:dev.bootcomplete=1
start network2
service network2 /system/bin/sh /system/bin/dma.daemon.sh
class main
group root
disabled
oneshot
user root
seclabel u:r🐚s0
编译版本烧录,看log是否有报权限问题
avc: denied { getattr } for path
然后根据log添加对应的权限
shell.te
allow shell shell:capability {net_raw net_admin dac_override};
allow shell system_data_file:file {open};