Stop whitelisting all oppo devices in the world, and regexp it

This commit is contained in:
Pierre-Hugues Husson 2020-03-03 00:58:55 +01:00
parent 552f710be1
commit 04583fa95a
1 changed files with 4 additions and 5 deletions

View File

@ -161,11 +161,10 @@ mount -o remount,ro / || true
for part in /dev/block/bootdevice/by-name/oppodycnvbk /dev/block/platform/bootdevice/by-name/nvdata;do
if [ -b "$part" ];then
for devname in RMX1931 CPH1859 CPH1861;do
if grep -q $devname $part;then
setprop ro.build.overlay.deviceid $devname
fi
done
oppoName="$(grep -aohE '(RMX|CPH)[0-9]{4}' "$part")"
if [ -n "$oppoName" ];then
setprop ro.build.overlay.deviceid "$oppoName"
fi
fi
done