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
2a42bd0ed2
commit
21cbb9b4c4
13
rw-system.sh
13
rw-system.sh
@ -516,12 +516,15 @@ 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
|
||||
|
||||
# Fix sprd adf for surfaceflinger to start
|
||||
# Somehow the names of the device nodes are incorrect on Android 10; fix them by mknod
|
||||
|
Loading…
Reference in New Issue
Block a user