device_phh_treble/vndk-detect
Daniel Storozhev 61f0df3e71
Bluetooth fix for Kirin 65x
BTM_BYPASS_EXTRA_ACL_SETUP has to be true for Kirin 650/659 (aka hi6250) devices.
2018-04-23 13:34:39 +02:00

16 lines
407 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
if ( getprop ro.hardware | grep -q kirin970 ) || ( getprop ro.hardware | grep -q hi6250 );then
setprop persist.sys.bt_acl_bypass true
fi