From da8c2d1e6cf5b5cdb250ec30e758c794fd48f54d Mon Sep 17 00:00:00 2001 From: osm0sis Date: Fri, 14 Dec 2018 15:40:25 -0400 Subject: [PATCH] Backend: allow infinite device.name= device check properties (#34) --- META-INF/com/google/android/update-binary | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/META-INF/com/google/android/update-binary b/META-INF/com/google/android/update-binary index d0ee4a8..9b450c9 100755 --- a/META-INF/com/google/android/update-binary +++ b/META-INF/com/google/android/update-binary @@ -94,8 +94,7 @@ if [ "$(file_getprop /tmp/anykernel/anykernel.sh do.devicecheck)" == 1 ]; then ui_print "Checking device..."; device="$(getprop ro.product.device)"; product="$(getprop ro.build.product)"; - for i in 1 2 3 4 5; do - testname="$(file_getprop /tmp/anykernel/anykernel.sh device.name$i)"; + for testname in $($bb grep "^device.name.*=" /tmp/anykernel/anykernel.sh | $bb cut -d= -f2); do test "$testname" || break; if [ "$device" == "$testname" -o "$product" == "$testname" ]; then ui_print "$testname";