Fix dualsim for some Huawei phones (#143)
* Fix dualsim for some Huawei phones Huawei P20 Lite doesn't have /odm/phone.prop, we must use /vendor/phone.prop
This commit is contained in:
parent
656465ab76
commit
73b20785b8
13
rw-system.sh
13
rw-system.sh
@ -464,9 +464,12 @@ if [ "$has_hostapd" = false ];then
|
||||
fi
|
||||
|
||||
#Weird /odm/phone.prop Huawei stuff
|
||||
if [ -f /odm/phone.prop ];then
|
||||
HW_PRODID="$(sed -nE 's/.*productid=([0-9x]*).*/\1/p' /proc/cmdline)"
|
||||
if [ -n "$HW_PRODID" ];then
|
||||
eval "$(awk 'BEGIN { a=0 }; /\[.*\].*/ { a=0 }; tolower($0) ~ /.*0x39606014.*/ { a=1 }; /.*=.*/ { if(a == 1) print $0 }' /odm/phone.prop |sed -nE 's/(.*)=(.*)/setprop \1 "\2";/p')"
|
||||
HW_PRODID="$(sed -nE 's/.*productid=([0-9xa-f]*).*/\1/p' /proc/cmdline)"
|
||||
[ -z "$HW_PRODID" ] && HW_PRODID="0x$(od -A none -t x1 /sys/firmware/devicetree/base/hisi,modem_id | sed s/' '//g)"
|
||||
for part in odm vendor;do
|
||||
if [ -f /$part/phone.prop ];then
|
||||
if [ -n "$HW_PRODID" ];then
|
||||
eval "$(awk 'BEGIN { a=0 }; /\[.*\].*/ { a=0 }; tolower($0) ~ /.*'"$HW_PRODID"'.*/ { a=1 }; /.*=.*/ { if(a == 1) print $0 }' /$part/phone.prop |sed -nE 's/(.*)=(.*)/setprop \1 "\2";/p')"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user