device_phh_treble/vndk-detect
Pierre-Hugues Husson 2886155138 mount bind /system/bin/adbd /sbin/adbd before adbd starts
This is needed for master on A-only devices
2018-02-19 00:06:48 +01:00

13 lines
269 B
Bash

#!/system/bin/sh
grep -oE 'init_[0-9_]+' /vendor/etc/selinux/nonplat_sepolicy.cil | \
uniq | \
sort -n | \
head -n 1 | \
sed -E 's/.*init_([0-9]+).*/\1/g' | \
while read version;do
setprop persist.sys.vndk $version
done
mount -o bind /system/bin/adbd /sbin/adbd