mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
Always handle alternative property files for oem_unlock_supported
Some of these devices were not being patched, such as: - pro1x - oneplus/sm8150-common - oneplus/sm8250-common - oneplus/sm8350-common Signed-off-by: Tavi <tavi@divested.dev>
This commit is contained in:
parent
8f6fa700a4
commit
e1586ec317
@ -209,41 +209,86 @@ sed -i 's/^\treturn VERITY_STATE_DISABLE;//' kernel/*/*/drivers/md/dm-android-ve
|
||||
|
||||
#Ensure OEM unlocking toggle is always available
|
||||
[[ -d device/essential/mata ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/essential/mata/system.prop &>/dev/null || true;
|
||||
[[ -d device/essential/mata ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/essential/mata/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/fairphone/FP3 ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/fairphone/FP3/system.prop &>/dev/null || true;
|
||||
[[ -d device/fairphone/FP3 ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/fairphone/FP3/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/fairphone/FP4 ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/fairphone/FP4/system.prop &>/dev/null || true;
|
||||
[[ -d device/fairphone/FP4 ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/fairphone/FP4/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/fxtec/pro1 ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/fxtec/pro1/system.prop &>/dev/null || true;
|
||||
[[ -d device/fxtec/pro1 ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/fxtec/pro1/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/fxtec/pro1x ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/fxtec/pro1x/system.prop &>/dev/null || true;
|
||||
[[ -d device/fxtec/pro1x ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/fxtec/pro1x/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/bluejay ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/bluejay/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/bluejay ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/bluejay/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/bonito ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/bonito/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/bonito ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/bonito/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/coral ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/coral/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/coral ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/coral/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/crosshatch ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/crosshatch/product.prop &>/dev/null || true;
|
||||
[[ -d device/google/crosshatch ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/crosshatch/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/crosshatch ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/crosshatch/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/dragon ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/dragon/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/felix ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/felix/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/felix ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/felix/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/lynx ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/lynx/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/lynx ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/lynx/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/marlin ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/marlin/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/marlin ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/marlin/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/pantah ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/pantah/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/pantah ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/pantah/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/pantah/cheetah ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/pantah/cheetah/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/pantah/cheetah ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/pantah/cheetah/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/pantah/panther ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/pantah/panther/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/pantah/panther ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/pantah/panther/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/raviole ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/raviole/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/raviole ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/raviole/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/raviole/oriole ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/raviole/oriole/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/raviole/oriole ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/raviole/oriole/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/raviole/raven ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/raviole/raven/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/raviole/raven ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/raviole/raven/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/redbull ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/redbull/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/redbull ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/redbull/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/sunfish ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/sunfish/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/sunfish ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/sunfish/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/tangorpro ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/tangorpro/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/tangorpro ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/tangorpro/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/wahoo ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/wahoo/system.prop &>/dev/null || true;
|
||||
#[[ -d device/google/yellowstone ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/yellowstone/system.prop &>/dev/null || true;
|
||||
[[ -d device/huawei/angler ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/huawei/angler/system.prop &>/dev/null || true;
|
||||
[[ -d device/lge/bullhead ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/lge/bullhead/system.prop &>/dev/null || true;
|
||||
[[ -d device/moto/shamu ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/moto/shamu/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/wahoo ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/wahoo/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/nextbit/ether ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/nextbit/ether/system.prop &>/dev/null || true;
|
||||
[[ -d device/nextbit/ether ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/nextbit/ether/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/oneplus/avicii ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/oneplus/avicii/system.prop &>/dev/null || true;
|
||||
[[ -d device/oneplus/avicii ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/oneplus/avicii/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/oneplus/msm8998-common ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/oneplus/msm8998-common/system.prop &>/dev/null || true;
|
||||
[[ -d device/oneplus/msm8998-common ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/oneplus/msm8998-common/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/oneplus/oneplus2 ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/oneplus/oneplus2/system.prop &>/dev/null || true;
|
||||
[[ -d device/oneplus/oneplus2 ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/oneplus/oneplus2/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/oneplus/oneplus3 ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/oneplus/oneplus3/system.prop &>/dev/null || true;
|
||||
[[ -d device/oneplus/oneplus3 ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/oneplus/oneplus3/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/oneplus/sdm845-common ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/oneplus/sdm845-common/system.prop &>/dev/null || true;
|
||||
[[ -d device/oneplus/sdm845-common ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/oneplus/sdm845-common/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/oneplus/sm8150-common ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/oneplus/sm8150-common/system.prop &>/dev/null || true;
|
||||
[[ -d device/oneplus/sm8150-common ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/oneplus/sm8150-common/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/oneplus/sm8250-common ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/oneplus/sm8250-common/system.prop &>/dev/null || true;
|
||||
[[ -d device/oneplus/sm8250-common ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/oneplus/sm8250-common/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/oneplus/sm8350-common ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/oneplus/sm8350-common/system.prop &>/dev/null || true;
|
||||
[[ -d device/oneplus/sm8350-common ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/oneplus/sm8350-common/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/razer/aura ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/razer/aura/system.prop &>/dev/null || true;
|
||||
[[ -d device/razer/aura ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/razer/aura/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/razer/cheryl ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/razer/cheryl/system.prop &>/dev/null || true;
|
||||
#[[ -d device/yandex/Amber ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/yandex/Amber/system.prop &>/dev/null || true;
|
||||
[[ -d device/razer/cheryl ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/razer/cheryl/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/yandex/Amber ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/yandex/Amber/system.prop &>/dev/null || true;
|
||||
[[ -d device/yandex/Amber ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/yandex/Amber/vendor.prop &>/dev/null || true;
|
||||
|
||||
#FIXME: needs makefile edits instead
|
||||
[[ -d device/google/dragon ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/dragon/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/dragon ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/dragon/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/google/yellowstone ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/yellowstone/system.prop &>/dev/null || true;
|
||||
[[ -d device/google/yellowstone ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/google/yellowstone/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/huawei/angler ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/huawei/angler/system.prop &>/dev/null || true;
|
||||
[[ -d device/huawei/angler ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/huawei/angler/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/lge/bullhead ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/lge/bullhead/system.prop &>/dev/null || true;
|
||||
[[ -d device/lge/bullhead ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/lge/bullhead/vendor.prop &>/dev/null || true;
|
||||
[[ -d device/moto/shamu ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/moto/shamu/system.prop &>/dev/null || true;
|
||||
[[ -d device/moto/shamu ]] && sed -zi '/ro.oem_unlock_supported=1/!s/$/\nro.oem_unlock_supported=1\n/' device/moto/shamu/vendor.prop &>/dev/null || true;
|
||||
|
||||
cd "$DOS_BUILD_BASE";
|
||||
echo -e "\e[0;32m[SCRIPT COMPLETE] Verity enablement complete\e[0m";
|
||||
|
Loading…
Reference in New Issue
Block a user