From 1ec6d6b8ee8d6a3ab7a785f7b9023f0e1c1746f3 Mon Sep 17 00:00:00 2001 From: Davide Garberi Date: Thu, 9 May 2019 18:43:52 +0200 Subject: msm8996-common: Conditionally remove the OEM unlocking option * It would get disabled anyway when bootloader is unlocked, but this way makes safetynet pass even when unlocked Change-Id: I2dfe641bf60e0409f290b7b31492df00568c9916 --- rootdir/bin/init.qcom.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rootdir/bin/init.qcom.sh') diff --git a/rootdir/bin/init.qcom.sh b/rootdir/bin/init.qcom.sh index 12615aa..93439bb 100755 --- a/rootdir/bin/init.qcom.sh +++ b/rootdir/bin/init.qcom.sh @@ -65,3 +65,9 @@ if [ ! -f /vendor/firmware_mnt/verinfo/ver_info.txt -o "$prev_version_info" != " fi chmod g-w /data/vendor/modem_config setprop ro.vendor.ril.mbn_copy_completed 1 + +if [[ -z $(grep "androidboot.lock=unlocked" /proc/cmdline) ]]; then + setprop ro.oem_unlock_supported 1 +else + setprop ro.oem_unlock_supported 0 +fi -- cgit v1.2.3