diff --git a/private/adbd.te b/private/adbd.te index 2008364288ded5ade37e9b7e3f38157d7b154fa9..d28b836f14ad69343f208b5191577ebbe4696874 100644 --- a/private/adbd.te +++ b/private/adbd.te @@ -3,6 +3,8 @@ typeattribute adbd coredomain; typeattribute adbd mlstrustedsubject; +init_daemon_domain(adbd) + domain_auto_trans(adbd, shell_exec, shell) userdebug_or_eng(` diff --git a/private/compat/26.0/26.0.ignore.cil b/private/compat/26.0/26.0.ignore.cil index 550c861ddde46cd91c8fd2b6c429372e8ef4b66f..af6b8081de3d44f0cd0b9caae2f34a43d4166ad8 100644 --- a/private/compat/26.0/26.0.ignore.cil +++ b/private/compat/26.0/26.0.ignore.cil @@ -3,7 +3,8 @@ ;; previous ones. Add here to pass checkapi tests. (typeattribute new_objects) (typeattributeset new_objects - ( broadcastradio_service + ( adbd_exec + broadcastradio_service e2fs e2fs_exec hal_cas_hwservice @@ -30,5 +31,6 @@ ;; Thus, these types are also not mapped, but recorded for checkapi tests (typeattribute priv_objects) (typeattributeset priv_objects - ( screencap + ( adbd_tmpfs + screencap screencap_exec )) diff --git a/private/file_contexts b/private/file_contexts index 32505377664b0352734b243af22f8cdff6989ae3..9b476603c3d4e3fb99887f0227d70b825f4a6553 100644 --- a/private/file_contexts +++ b/private/file_contexts @@ -273,6 +273,7 @@ /system/etc/selinux/plat_sepolicy.cil u:object_r:sepolicy_file:s0 /system/etc/selinux/plat_and_mapping_sepolicy\.cil\.sha256 u:object_r:sepolicy_file:s0 /system/bin/vr_hwc u:object_r:vr_hwc_exec:s0 +/system/bin/adbd u:object_r:adbd_exec:s0 ############################# # Vendor files diff --git a/private/init.te b/private/init.te index 558ba966b016c77706d59007a0ab3688fb51f49f..5c23f66f10f8d0f98b287a67cec1237bd220494b 100644 --- a/private/init.te +++ b/private/init.te @@ -3,12 +3,12 @@ typeattribute init coredomain; tmpfs_domain(init) # Transitions to seclabel processes in init.rc -domain_trans(init, rootfs, adbd) domain_trans(init, rootfs, charger) domain_trans(init, rootfs, healthd) domain_trans(init, rootfs, slideshow) domain_auto_trans(init, e2fs_exec, e2fs) recovery_only(` + domain_trans(init, rootfs, adbd) domain_trans(init, rootfs, recovery) ') domain_trans(init, shell_exec, shell) diff --git a/public/adbd.te b/public/adbd.te index 7ecd045fc0a8b8942b2e49056a58c4fd6c0fa36a..95854c01e7e6bcc5635ec98fd56179f9cde63829 100644 --- a/public/adbd.te +++ b/public/adbd.te @@ -1,3 +1,4 @@ # adbd seclabel is specified in init.rc since # it lives in the rootfs and has no unique file type. type adbd, domain; +type adbd_exec, exec_type, file_type;