device_phh_treble/vndk-detect
Dil3mm4 db80eb1c21 Differentiate QC values for HI6250 and HI36x0 platform (#18)
The previous set values are not compatible over HI6250 platform.
They were causing thermal issues.
This differentiation is needed to avoid the "hot-pan" occurrence.
Tested on ANE-LX1.
2018-07-09 08:29:30 +02:00

39 lines
922 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 -qE '(kirin970|hi3660|hi6250|hi3670)' );then
FOUND_HUAWEI=1
setprop persist.sys.bt_acl_bypass true
fi
if getprop ro.vendor.build.fingerprint |grep -qiE '(huawei|honor|hi3660)' || [ -n "$FOUND_HUAWEI" ];then
FOUND_HUAWEI=1
setprop persist.sys.overlay.huawei true
fi
if [ -n "$FOUND_HUAWEI" ];then
setprop debug.hwui.profile true
fi
if getprop ro.hardware |grep -qiE qcom;then
FOUND_QCOM=1
setprop persist.sys.overlay.devinputjack true
fi
if ( getprop ro.hardware | grep -qE '(hi6250)' );then
setprop QC.HI6250 1
fi
if ( getprop ro.hardware | grep -qE '(hi3660|hi3670|kirin970)' );then
setprop QC.HI36x0 1
fi