Skip to content

Commit 58fbd9a

Browse files
ocn: add runatboot.sh to set props based on mid and cid
Will fix assert errors from custom ROM zips that expect the stock values to be set by TWRP
1 parent a75d66b commit 58fbd9a

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

recovery/root/sbin/runatboot.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/sbin/sh
2+
3+
bootmid=$(getprop ro.boot.mid)
4+
bootcid=$(getprop ro.boot.cid)
5+
6+
case $bootmid in
7+
"2PZC10000")
8+
resetprop ro.build.product "htc_ocnuhl"
9+
resetprop ro.product.device "htc_ocnuhl"
10+
resetprop ro.product.model "HTC U11"
11+
;;
12+
"2PZC20000")
13+
resetprop ro.build.product "htc_ocnuhljapan"
14+
resetprop ro.product.device "htc_ocnuhljapan"
15+
resetprop ro.product.model "601HT"
16+
;;
17+
"2PZC30000")
18+
resetprop ro.build.product "htc_ocndugl"
19+
resetprop ro.product.device "htc_ocndugl"
20+
resetprop ro.product.model "HTC_U-3u"
21+
;;
22+
"2PZC40000")
23+
resetprop ro.build.product "htc_ocndtwl"
24+
resetprop ro.product.device "htc_ocndtwl"
25+
resetprop ro.product.model "HTC U11"
26+
;;
27+
"2PZC50000")
28+
resetprop ro.build.product "htc_ocnwhl"
29+
resetprop ro.product.device "htc_ocnwhl"
30+
if [ $bootcid == 'SPCS_001' ]; then
31+
resetprop ro.product.model "2PZC5"
32+
else
33+
resetprop ro.product.model "HTC U11"
34+
fi
35+
;;
36+
*)
37+
resetprop ro.build.product "htc_ocnuhl"
38+
resetprop ro.product.device "htc_ocnuhl"
39+
resetprop ro.product.model "HTC U11"
40+
;;
41+
esac
42+
43+
exit 0

0 commit comments

Comments
 (0)