diff --git a/sepolicy/vndk_detect.te b/sepolicy/vndk_detect.te index ef4c7bf..01dec96 100644 --- a/sepolicy/vndk_detect.te +++ b/sepolicy/vndk_detect.te @@ -9,3 +9,8 @@ allow vndk_detect shell_exec:file rx_file_perms; allow vndk_detect toolbox_exec:file rx_file_perms; #/system/bin/grep allow vndk_detect system_file:file rx_file_perms; + +#mount -o bind /system/bin/adbd /sbin/adbd +allow vndk_detect adbd_exec:file { getattr }; +allow vndk_detect rootfs:file { mounton getattr }; +allow vndk_detect self:capability { sys_admin }; diff --git a/vndk-detect b/vndk-detect index b92de6c..3529a8a 100644 --- a/vndk-detect +++ b/vndk-detect @@ -8,3 +8,5 @@ grep -oE 'init_[0-9_]+' /vendor/etc/selinux/nonplat_sepolicy.cil | \ while read version;do setprop persist.sys.vndk $version done + +mount -o bind /system/bin/adbd /sbin/adbd