Files
pawlet_rpi5/sepolicy/file_contexts
oxmc 690f2f249f sepolicy: fix pawlet_hwinfo and pawlet_memtier under enforcing
- Label the chosen/bootloader device-tree node (sysfs path; /proc/device-tree
  is only a symlink) and /dev/vcio for the native pawlet-hwinfo helper.
- Allow pawlet_memtier to exec the vendor shell and toybox.
- Let platform_app read ro.vendor.pawlet.hw.* for the hardware info screen.
2026-10-13 21:03:23 -07:00

82 lines
3.8 KiB
Plaintext

# CEC
/dev/cec0 u:object_r:cec_device:s0
/dev/cec1 u:object_r:cec_device:s0
# VideoCore firmware mailbox (pawlet-hwinfo)
/dev/vcio u:object_r:vcio_device:s0
# DRM
/data/vendor/mediadrm(/.*)? u:object_r:mediadrm_vendor_data_file:s0
# Camera — V4L2 media controller and video devices
/dev/media[0-9]+ u:object_r:video_device:s0
/dev/video[0-9]+ u:object_r:video_device:s0
# Graphics
/dev/dri(/.*)? u:object_r:gpu_device:s0
# Boot control HAL binary
/vendor/bin/hw/android\.hardware\.boot-service\.pawlet_rpi u:object_r:hal_boot_control_pawlet_rpi_exec:s0
# Android Auto head-unit daemon binary
/system/bin/pawlet\.androidauto-daemon u:object_r:pawlet_androidauto_daemon_exec:s0
# Partitions — 9-partition A/B layout:
# p1=boot_a p2=boot_b p3=recovery p4=misc p5=system
# p6=system_ext p7=vendor p8=metadata p9=userdata
/dev/block/mmcblk0p1 u:object_r:boot_block_device:s0
/dev/block/mmcblk0p2 u:object_r:boot_block_device:s0
/dev/block/mmcblk0p4 u:object_r:misc_block_device:s0
/dev/block/mmcblk0p5 u:object_r:system_block_device:s0
/dev/block/mmcblk0p6 u:object_r:system_block_device:s0
/dev/block/mmcblk0p7 u:object_r:system_block_device:s0
/dev/block/mmcblk0p8 u:object_r:metadata_block_device:s0
/dev/block/mmcblk0p9 u:object_r:userdata_block_device:s0
/dev/block/nvme0n1p1 u:object_r:boot_block_device:s0
/dev/block/nvme0n1p2 u:object_r:boot_block_device:s0
/dev/block/nvme0n1p4 u:object_r:misc_block_device:s0
/dev/block/nvme0n1p5 u:object_r:system_block_device:s0
/dev/block/nvme0n1p6 u:object_r:system_block_device:s0
/dev/block/nvme0n1p7 u:object_r:system_block_device:s0
/dev/block/nvme0n1p8 u:object_r:metadata_block_device:s0
/dev/block/nvme0n1p9 u:object_r:userdata_block_device:s0
/dev/block/sda1 u:object_r:boot_block_device:s0
/dev/block/sda2 u:object_r:boot_block_device:s0
/dev/block/sda4 u:object_r:misc_block_device:s0
/dev/block/sda5 u:object_r:system_block_device:s0
/dev/block/sda6 u:object_r:system_block_device:s0
/dev/block/sda7 u:object_r:system_block_device:s0
/dev/block/sda8 u:object_r:metadata_block_device:s0
/dev/block/sda9 u:object_r:userdata_block_device:s0
/dev/block/sdb1 u:object_r:boot_block_device:s0
/dev/block/sdb2 u:object_r:boot_block_device:s0
/dev/block/sdb4 u:object_r:misc_block_device:s0
/dev/block/sdb5 u:object_r:system_block_device:s0
/dev/block/sdb6 u:object_r:system_block_device:s0
/dev/block/sdb7 u:object_r:system_block_device:s0
/dev/block/sdb8 u:object_r:metadata_block_device:s0
/dev/block/sdb9 u:object_r:userdata_block_device:s0
# reboot-to-recovery chain-loader (vendor/pawlet/recoveryboot)
#
# Real bug found on real hardware (2026-10-11, pawlet_rpi4 first, mirrored
# here): this still said pawlet-recoveryboot\.sh, matching the install
# path from before Soong's sh_binary-installs-under-module-name bug was
# fixed in the .rc file -- since the real installed file is named
# pawlet-recoveryboot (no .sh), this regex never matched anything, so the
# binary fell back to the generic vendor_file label with no domain
# transition defined. init refuses to start ANY service whose exec file
# has no domain transition -- confirmed live via
# `setprop ctl.start pawlet_recoveryboot` and init's own error ("has
# incorrect label or no domain transition..."). This, not SELinux
# enforcement/trigger timing/exec path, was the real reason this service
# (and pawlet-memtier below) never ran on a real boot -- the init error
# explicitly fires even in permissive mode.
/vendor/bin/pawlet-recoveryboot u:object_r:vendor_misc_writer_exec:s0
# RAM-tier detection (vendor/pawlet/memtier)
/vendor/bin/pawlet-memtier u:object_r:pawlet_memtier_exec:s0
# Hardware info readout (vendor/pawlet/hwinfo) -- see pawlet_hwinfo.te
/vendor/bin/pawlet-hwinfo u:object_r:pawlet_hwinfo_exec:s0