Skip to content

Commit

Permalink
ocn: add runatboot.sh to set props based on mid and cid
Browse files Browse the repository at this point in the history
Will fix assert errors from custom ROM zips that expect the stock
values to be set by TWRP
  • Loading branch information
CaptainThrowback committed Jan 24, 2019
1 parent a75d66b commit 58fbd9a
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions recovery/root/sbin/runatboot.sh
@@ -0,0 +1,43 @@
#!/sbin/sh

bootmid=$(getprop ro.boot.mid)
bootcid=$(getprop ro.boot.cid)

case $bootmid in
"2PZC10000")
resetprop ro.build.product "htc_ocnuhl"
resetprop ro.product.device "htc_ocnuhl"
resetprop ro.product.model "HTC U11"
;;
"2PZC20000")
resetprop ro.build.product "htc_ocnuhljapan"
resetprop ro.product.device "htc_ocnuhljapan"
resetprop ro.product.model "601HT"
;;
"2PZC30000")
resetprop ro.build.product "htc_ocndugl"
resetprop ro.product.device "htc_ocndugl"
resetprop ro.product.model "HTC_U-3u"
;;
"2PZC40000")
resetprop ro.build.product "htc_ocndtwl"
resetprop ro.product.device "htc_ocndtwl"
resetprop ro.product.model "HTC U11"
;;
"2PZC50000")
resetprop ro.build.product "htc_ocnwhl"
resetprop ro.product.device "htc_ocnwhl"
if [ $bootcid == 'SPCS_001' ]; then
resetprop ro.product.model "2PZC5"
else
resetprop ro.product.model "HTC U11"
fi
;;
*)
resetprop ro.build.product "htc_ocnuhl"
resetprop ro.product.device "htc_ocnuhl"
resetprop ro.product.model "HTC U11"
;;
esac

exit 0

0 comments on commit 58fbd9a

Please sign in to comment.