summaryrefslogtreecommitdiff
path: root/META-INF
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2018-07-16 15:54:46 -0700
committerChris Renshaw <osm0sis@outlook.com>2018-07-16 21:28:54 -0300
commitcea9c5a24780f29c62c8bbb8e7944b93539e8f5b (patch)
tree4d0a09f8bebea9e053cba5a42c09725a04316927 /META-INF
parent303e50e371481da4de6fb2654a4339b4a87f34a7 (diff)
backend: Cache build.prop values in device check block
These values are static, we don't need to keep getting them with getprop. Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Diffstat (limited to 'META-INF')
-rwxr-xr-xMETA-INF/com/google/android/update-binary4
1 files changed, 3 insertions, 1 deletions
diff --git a/META-INF/com/google/android/update-binary b/META-INF/com/google/android/update-binary
index 304fa83..405d72b 100755
--- a/META-INF/com/google/android/update-binary
+++ b/META-INF/com/google/android/update-binary
@@ -100,9 +100,11 @@ unset LD_PRELOAD;
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)";
- if [ "$(getprop ro.product.device)" == "$testname" -o "$(getprop ro.build.product)" == "$testname" ]; then
+ if [ "$device" == "$testname" -o "$product" == "$testname" ]; then
ui_print "$testname";
match=1;
fi;