2025年5月10日星期六

Android8添加开机Service 必须添加相应的te文件



selinux的原因,添加Service必须添加.te文件

(即使是permissive)也要添加.te文件

否则seclabel会出错。

firefly 的 rk3399pro Android8.1


.te文件放在device/rockchip/common/sepolicy/下面


.te文件内容

type autorun,domain;
type autorun_exec,exec_type,file_type;
permissive autorun;


init.rk30board.rc内容:

# autorun
service autorun /system/bin/auto_run.sh
seclabel u:r:autorun:s0
user root
group root
disabled
oneshot

on property:persist.sys.auto_run=0
stop autorun

on property:persist.sys.auto_run=1
start autorun

没有评论:

发表评论

CVE-2026-31431 漏洞验证和临时修复方案

昨天披露了一个漏洞,CVE-2026-31431。 简单说就是普通用户一旦拿到shell,就可以利用该漏洞直接提权到root。 漏洞验证: git clone https://github.com/rootsecdev/cve_2026_31431.git cd cve_2026...