Skip to content

Commit

Permalink
salami: detect and set variant props
Browse files Browse the repository at this point in the history
  • Loading branch information
nebrassy committed Sep 12, 2023
1 parent fdb1b56 commit 6653696
Showing 1 changed file with 100 additions and 0 deletions.
100 changes: 100 additions & 0 deletions twrp/recovery/root/system/bin/variant-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#!/system/bin/sh
# This script is needed to automatically set device props.

variant=$(getprop ro.boot.prjname)
region=$(getprop ro.boot.hw_region_id)

echo $variant
echo $region

case $region in
"21")
#China
case $variant in
"22811")
#China
resetprop ro.product.device "OP591BL1"
resetprop ro.product.vendor.device "OP591BL1"
resetprop ro.product.odm.device "OP591BL1"
resetprop ro.product.product.device "OP591BL1"
resetprop ro.product.device "OP591BL1"
resetprop ro.product.system_ext.device "OP591BL1"
resetprop ro.product.product.model "PHB110"
resetprop ro.product.model "PHB110"
resetprop ro.product.system.model "PHB110"
resetprop ro.product.system_ext.model "PHB110"
resetprop ro.product.vendor.model "PHB110"
resetprop ro.product.odm.model "PHB110"
resetprop ro.boot.hardware.revision "CN"
;;
"22861")
#India
resetprop ro.product.device "OP594DL1"
resetprop ro.product.odm.device "OP594DL1"
resetprop ro.product.product.device "OP594DL1"
resetprop ro.product.system_ext.device "OP594DL1"
resetprop ro.product.vendor.device "OP594DL1"
resetprop ro.product.product.model "CPH2447"
resetprop ro.product.product.model "CPH2447"
resetprop ro.product.model "CPH2447"
resetprop ro.product.system.model "CPH2447"
resetprop ro.product.system_ext.model "CPH2447"
resetprop ro.product.vendor.model "CPH2447"
resetprop ro.product.odm.model "CPH2447"
resetprop ro.boot.hardware.revision "IN"
;;
*)
resetprop ro.product.device "OP591BL1"
resetprop ro.product.vendor.device "OP591BL1"
resetprop ro.product.odm.device "OP591BL1"
resetprop ro.product.product.device "OP591BL1"
resetprop ro.product.device "OP591BL1"
resetprop ro.product.system_ext.device "OP591BL1"
resetprop ro.product.product.model "PHB110"
resetprop ro.product.model "PHB110"
resetprop ro.product.system.model "PHB110"
resetprop ro.product.system_ext.model "PHB110"
resetprop ro.product.vendor.model "PHB110"
resetprop ro.product.odm.model "PHB110"
resetprop ro.boot.hardware.revision "CN"
;;
esac
;;
"22")
#Europe
resetprop ro.product.device "OP594DL1"
resetprop ro.product.odm.device "OP594DL1"
resetprop ro.product.product.device "OP594DL1"
resetprop ro.product.device "OP594DL1"
resetprop ro.product.system_ext.device "OP594DL1"
resetprop ro.product.vendor.device "OP594DL1"
resetprop ro.product.product.model "CPH2449"
resetprop ro.boot.hardware.revision "EU"
;;
"23")
#NA
resetprop ro.product.device "OP594DL1"
resetprop ro.product.odm.device "OP594DL1"
resetprop ro.product.product.device "OP594DL1"
resetprop ro.product.system_ext.device "OP594DL1"
resetprop ro.product.vendor.device "OP594DL1"
resetprop ro.product.product.model "CPH2451"
resetprop ro.product.model "CPH2451"
resetprop ro.product.system.model "CPH2451"
resetprop ro.product.system_ext.model "CPH2451"
resetprop ro.product.vendor.model "CPH2451"
resetprop ro.product.odm.model "CPH2451"
resetprop ro.boot.hardware.revision "NA"
;;
*)
resetprop ro.product.device "OP594DL1"
resetprop ro.product.odm.device "OP594DL1"
resetprop ro.product.product.device "OP594DL1"
resetprop ro.product.system_ext.device "OP594DL1"
resetprop ro.product.vendor.device "OP594DL1"
resetprop ro.product.product.model "CPH2449"
resetprop ro.boot.hardware.revision "EU"
;;
esac

exit 0

0 comments on commit 6653696

Please sign in to comment.