Merge "Add remount.te to allow adb remount-related operations" am: 635f273be5

Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1878144

Change-Id: Idf5173bc71b216c14b894c4c8315b94a10237205
This commit is contained in:
Yi-Yo Chiang 2021-11-08 06:59:54 +00:00 committed by Automerger Merge Worker
commit a60b99fef5
2 changed files with 16 additions and 0 deletions

View file

@ -277,6 +277,7 @@
/system/bin/recovery-refresh u:object_r:recovery_refresh_exec:s0 /system/bin/recovery-refresh u:object_r:recovery_refresh_exec:s0
/system/bin/sdcard u:object_r:sdcardd_exec:s0 /system/bin/sdcard u:object_r:sdcardd_exec:s0
/system/bin/snapshotctl u:object_r:snapshotctl_exec:s0 /system/bin/snapshotctl u:object_r:snapshotctl_exec:s0
/system/bin/remount u:object_r:remount_exec:s0
/system/bin/dhcpcd u:object_r:dhcp_exec:s0 /system/bin/dhcpcd u:object_r:dhcp_exec:s0
/system/bin/dhcpcd-6\.8\.2 u:object_r:dhcp_exec:s0 /system/bin/dhcpcd-6\.8\.2 u:object_r:dhcp_exec:s0
/system/bin/mtpd u:object_r:mtp_exec:s0 /system/bin/mtpd u:object_r:mtp_exec:s0

15
private/remount.te Normal file
View file

@ -0,0 +1,15 @@
type remount, domain, coredomain;
type remount_exec, system_file_type, exec_type, file_type;
userdebug_or_eng(`
# Allow init to run clean_scratch_files and do auto domain transfer.
init_daemon_domain(remount)
# Allow talking to gsid.
binder_use(remount)
allow remount gsi_service:service_manager find;
binder_call(remount, gsid)
# Allow searching for /metadata/gsi/remount/lp_metadata.
allow remount { metadata_file gsi_metadata_file_type }:dir search;
')