Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
a75d66b
commit 58fbd9a
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |