Skip to content
Snippets Groups Projects
Select Git revision
  • 2025fd1476879c0e0f13f88bb91e93c32766f7c2
  • master default protected
  • android-7.1.2_r28_klist
  • pie-cts-release
  • pie-vts-release
  • pie-cts-dev
  • oreo-mr1-iot-release
  • sdk-release
  • oreo-m6-s4-release
  • oreo-m4-s12-release
  • pie-release
  • pie-r2-release
  • pie-r2-s1-release
  • oreo-vts-release
  • oreo-cts-release
  • oreo-dev
  • oreo-mr1-dev
  • pie-gsi
  • pie-platform-release
  • pie-dev
  • oreo-cts-dev
  • android-o-mr1-iot-release-1.0.4
  • android-9.0.0_r8
  • android-9.0.0_r7
  • android-9.0.0_r6
  • android-9.0.0_r5
  • android-8.1.0_r46
  • android-8.1.0_r45
  • android-n-iot-release-smart-display-r2
  • android-vts-8.1_r5
  • android-cts-8.1_r8
  • android-cts-8.0_r12
  • android-cts-7.1_r20
  • android-cts-7.0_r24
  • android-o-mr1-iot-release-1.0.3
  • android-cts-9.0_r1
  • android-8.1.0_r43
  • android-8.1.0_r42
  • android-n-iot-release-smart-display
  • android-p-preview-5
  • android-9.0.0_r3
41 results

file_contexts

Blame
    • Nick Kralevich's avatar
      2025fd14
      Label /oem files · 2025fd14
      Nick Kralevich authored
      Files on the /oem partition are weird. The /oem partition is an ext4
      partition, built in the Android tree using the "oem_image" build target
      added in build/ commit b8888432f0bc0706d5e00e971dde3ac2e986f2af. Since
      it's an ext4 image, it requires SELinux labels to be defined at build
      time. However, the partition is mounted using context=u:object_r:oemfs:s0,
      which ignores the labels on the filesystem.
      
      Assign all the files on the /oem image to be oemfs, which is consistent
      with how they'll be mounted when /oem is mounted.
      
      Other options would be to use an "unlabeled" label, or try to fix the
      build system to not require SELinux labels for /oem images.
      
      Bug: 20816563
      Change-Id: Ibe8d9ff626eace8a2d5d02c3f06290105baa59fe
      2025fd14
      History
      Label /oem files
      Nick Kralevich authored
      Files on the /oem partition are weird. The /oem partition is an ext4
      partition, built in the Android tree using the "oem_image" build target
      added in build/ commit b8888432f0bc0706d5e00e971dde3ac2e986f2af. Since
      it's an ext4 image, it requires SELinux labels to be defined at build
      time. However, the partition is mounted using context=u:object_r:oemfs:s0,
      which ignores the labels on the filesystem.
      
      Assign all the files on the /oem image to be oemfs, which is consistent
      with how they'll be mounted when /oem is mounted.
      
      Other options would be to use an "unlabeled" label, or try to fix the
      build system to not require SELinux labels for /oem images.
      
      Bug: 20816563
      Change-Id: Ibe8d9ff626eace8a2d5d02c3f06290105baa59fe
    file_contexts 13.04 KiB
    ###########################################
    # Root
    /			u:object_r:rootfs:s0
    
    # Data files
    /adb_keys		u:object_r:adb_keys_file:s0
    /default\.prop		u:object_r:rootfs:s0
    /fstab\..*		u:object_r:rootfs:s0
    /init\..*		u:object_r:rootfs:s0
    /res(/.*)?		u:object_r:rootfs:s0
    /ueventd\..*		u:object_r:rootfs:s0
    
    # Executables
    /charger		u:object_r:rootfs:s0
    /init			u:object_r:init_exec:s0
    /sbin(/.*)?		u:object_r:rootfs:s0
    
    # Empty directories
    /lost\+found		u:object_r:rootfs:s0
    /proc			u:object_r:rootfs:s0
    
    # SELinux policy files
    /file_contexts		u:object_r:rootfs:s0
    /property_contexts	u:object_r:rootfs:s0
    /seapp_contexts		u:object_r:rootfs:s0
    /sepolicy		u:object_r:rootfs:s0
    
    ##########################
    # Devices
    #
    /dev(/.*)?		u:object_r:device:s0
    /dev/akm8973.*		u:object_r:sensors_device:s0
    /dev/accelerometer	u:object_r:sensors_device:s0
    /dev/adf[0-9]*		u:object_r:graphics_device:s0
    /dev/adf-interface[0-9]*\.[0-9]*	u:object_r:graphics_device:s0
    /dev/adf-overlay-engine[0-9]*\.[0-9]*	u:object_r:graphics_device:s0
    /dev/alarm		u:object_r:alarm_device:s0
    /dev/android_adb.*	u:object_r:adb_device:s0
    /dev/ashmem		u:object_r:ashmem_device:s0
    /dev/audio.*		u:object_r:audio_device:s0
    /dev/binder		u:object_r:binder_device:s0
    /dev/block(/.*)?	u:object_r:block_device:s0
    /dev/block/dm-[0-9]+	u:object_r:dm_device:s0
    /dev/block/loop[0-9]*	u:object_r:loop_device:s0
    /dev/block/vold/.+	u:object_r:vold_device:s0
    /dev/block/ram[0-9]*	u:object_r:ram_device:s0
    /dev/bus/usb(.*)?       u:object_r:usb_device:s0
    /dev/cam		u:object_r:camera_device:s0
    /dev/console		u:object_r:console_device:s0
    /dev/cpuctl(/.*)?	u:object_r:cpuctl_device:s0
    /dev/device-mapper	u:object_r:dm_device:s0
    /dev/eac		u:object_r:audio_device:s0
    /dev/fscklogs(/.*)?	u:object_r:fscklogs:s0
    /dev/full		u:object_r:full_device:s0
    /dev/fuse		u:object_r:fuse_device:s0
    /dev/graphics(/.*)?	u:object_r:graphics_device:s0
    /dev/hw_random		u:object_r:hw_random_device:s0
    /dev/input(/.*)		u:object_r:input_device:s0
    /dev/iio:device[0-9]+   u:object_r:iio_device:s0
    /dev/ion		u:object_r:ion_device:s0
    /dev/kmem		u:object_r:kmem_device:s0
    /dev/log(/.*)?		u:object_r:log_device:s0
    /dev/mem		u:object_r:kmem_device:s0
    /dev/modem.*		u:object_r:radio_device:s0
    /dev/mpu		u:object_r:gps_device:s0
    /dev/mpuirq		u:object_r:gps_device:s0
    /dev/mtd(/.*)?		u:object_r:mtd_device:s0
    /dev/mtp_usb		u:object_r:mtp_device:s0
    /dev/pmsg0		u:object_r:pmsg_device:s0
    /dev/pn544		u:object_r:nfc_device:s0