From 2886155138dac116a15ae18371ff95d605eae123 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 19 Feb 2018 00:06:31 +0100 Subject: [PATCH] mount bind /system/bin/adbd /sbin/adbd before adbd starts This is needed for master on A-only devices --- sepolicy/vndk_detect.te | 5 +++++ vndk-detect | 2 ++ 2 files changed, 7 insertions(+) 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