From beec6a6114d6e6e895bb4c77db7071ceac25f3d1 Mon Sep 17 00:00:00 2001 From: osm0sis Date: Tue, 29 Oct 2019 17:22:08 -0300 Subject: 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 --- META-INF/com/google/android/update-binary | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/META-INF/com/google/android/update-binary b/META-INF/com/google/android/update-binary index f848ca4..7d859a1 100755 --- a/META-INF/com/google/android/update-binary +++ b/META-INF/com/google/android/update-binary @@ -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 -- cgit v1.2.3