我需要阻止sequence强制执行,从Android引导序列中的最早时间开始。
我读过"selinux=0“的内核参数可以阻止这种情况。它没有:
smarc_mx8mq:/ # cat /proc/cmdline
selinux=0 console=ttymxc2,115200 earlycon=imxuart,0x30880000,115200 init=/init video=HDMI-A-1:1080x1920-32@60 androidboot.console=ttymxc0 androidboot.hardware=freescale androidboot.fbTileSupport=enable cma=1280M androidboot.primary_display=imx-drm firmware_class.path=/vendor/firmware transparent_hugepage=never loop.max_part=7 buildvariant=eng ...
smarc_mx8mq:/ # getenforce
Enforcing我能做些什么来绝对阻止SE从启动序列开始强制执行呢?(我可以访问根shell,并可以更改内核配置或AOSP构建的任何其他部分。)
发布于 2021-02-01 12:01:27
,我能做些什么来绝对阻止SE从启动序列开始强制执行?(我可以访问根shell,并可以更改内核配置或AOSP构建的任何其他部分。)
通过设置:在BoardConfig.mk中关闭selinux:
BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive然后在构建和目标闪烁之后,cat /proc/cmdline显示androidboot.selinux=permissive
hikey960:/ # cat /proc/cmdline
androidboot.hardware=hikey960 firmware_class.path=/vendor/firmware loglevel=15 efi=noruntime
overlay_mgr.overlay_dt_entry=hardware_cfg_enable_android_fstab androidboot.selinux=permissive发布于 2021-02-01 11:59:50
解决方案是使用androidboot.selinux=permissive而不是selinux=0。
我读到过androidboot.selinux=disabled也会起作用。
https://stackoverflow.com/questions/65992054
复制相似问题