Backend: further fixes for GSIs

- ro.vendor.build.product (from #44) doesn't appear to actually exist in nature, so replace it with ro.product.vendor.device for API 28+ devices, per https://github.com/phhusson/vendor_hardware_overlay/issues/25
- no need to check so many props for getprop parsing fallback check, simply look for ro.build.type which all devices should have in antiquity
This commit is contained in:
osm0sis committed 2019-10-29 17:22:08 -03:00
1 parent 07def96480
commit beec6a6114
1 file changed
+3 -3
+3 -3
View File
@@ -173,7 +173,7 @@ if [ ! "$(getprop 2>/dev/null)" ]; then
done;
test "$propval" && echo "$propval" || echo "";
}
elif [ ! "$(getprop ro.product.device 2>/dev/null)" -a ! "$(getprop ro.build.product 2>/dev/null)" -a ! "$(getprop ro.vendor.product.device 2>/dev/null)" -a ! "$(getprop ro.vendor.build.product 2>/dev/null)" ]; then
elif [ ! "$(getprop ro.build.type 2>/dev/null)" ]; then
getprop() {
($(which getprop) | $bb grep "$1" | $bb cut -d[ -f3 | $bb cut -d] -f1) 2>/dev/null;
}
@@ -183,8 +183,8 @@ if [ "$(file_getprop anykernel.sh do.devicecheck)" == 1 ]; then
ui_print "Checking device...";
device=$(getprop ro.product.device 2>/dev/null);
product=$(getprop ro.build.product 2>/dev/null);
vendordevice=$(getprop ro.vendor.product.device 2>/dev/null);
vendorproduct=$(getprop ro.vendor.build.product 2>/dev/null);
vendordevice=$(getprop ro.product.vendor.device 2>/dev/null);
vendorproduct=$(getprop ro.vendor.product.device 2>/dev/null);
for testname in $(file_getprop anykernel.sh 'device.name.*'); do
for devicename in $device $product $vendordevice $vendorproduct; do
if [ "$devicename" == "$testname" ]; then