【问题标题】:Stop SE Linux from Enforcing on Android AOSP阻止 SE Linux 在 Android AOSP 上强制执行
【发布时间】:2021-05-05 14:11:23
【问题描述】:

我需要从 Android 启动序列中的最早时间开始阻止 SE Linux 强制执行。

我读到“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 Linux 从启动序列开始执行? (我可以拥有 root shell 访问权限,并且可以更改内核配置或 AOSP 构建的任何其他部分。)

【问题讨论】:

  • 请将标题Encorcing 中的错字更正为Enforcing

标签: android-source selinux


【解决方案1】:

我可以做些什么来绝对阻止 SE Linux 从启动序列开始执行? (我可以拥有 root 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

【讨论】:

    【解决方案2】:

    解决方案是使用androidboot.selinux=permissive 而不是selinux=0

    我听说androidboot.selinux=disabled 也可以。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-05-22
      • 2017-04-20
      相关资源
      最近更新 更多