From 6872cf5977fa8846a6a169ef00eec6fc91d25a3e Mon Sep 17 00:00:00 2001 From: osm0sis Date: Mon, 1 Jul 2019 17:42:34 -0300 Subject: [PATCH] AK3: add simple arch detect to optionally support arm + x86 in same zip - for use with broad zips targetting many devices including different architectures - enable support by putting current tools binary contents in tools/arm and adding tools/x86 (thanks @Zackptg5 for the nudge) --- META-INF/com/google/android/update-binary | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/META-INF/com/google/android/update-binary b/META-INF/com/google/android/update-binary index 2f3b4c7..610c9b6 100755 --- a/META-INF/com/google/android/update-binary +++ b/META-INF/com/google/android/update-binary @@ -71,6 +71,17 @@ unzip -o "$ZIPFILE"; if [ $? != 0 -o ! "$(ls tools)" ]; then abort "Unzip failed. Aborting..."; fi; +for arch32 in x86 arm; do + if [ -d $home/tools/$arch32 ]; then + bb=$home/tools/$arch32/busybox; + chmod 755 $bb; + $bb >/dev/null 2>&1; + if [ $? == 0 ]; then + $bb mv -f $home/tools/$arch32/* $home/tools; + break; + fi; + fi; +done; bb=$home/tools/busybox; chmod 755 $bb; $bb chmod -R 755 tools bin;