fixup! extract_utils: implement patchelf
* Move $PATCHELF exporting from oat2dex to setup_vendor
* Since it requires $HOST to be set, let's make it global, so oat2dex can also use it
Change-Id: I4556a3c19cd01c9b3a68d358d19a361217d9c3c1
diff --git a/extract_utils.sh b/extract_utils.sh
index 2cc8983..3e85100 100644
--- a/extract_utils.sh
+++ b/extract_utils.sh
@@ -30,6 +30,7 @@
FULLY_DEODEXED=-1
TMPDIR=$(mktemp -d)
+HOST="$(uname | tr '[:upper:]' '[:lower:]')"
#
# cleanup
@@ -102,6 +103,10 @@
VENDOR_STATE=0
VENDOR_RADIO_STATE=0
fi
+
+ if [ -z "$PATCHELF" ]; then
+ export PATCHELF="$LINEAGE_ROOT"/prebuilts/tools-lineage/${HOST}-x86/bin/patchelf
+ fi
}
# Helper functions for parsing a spec.
@@ -1249,7 +1254,6 @@
local SRC="$3"
local TARGET=
local OAT=
- local HOST="$(uname | tr '[:upper:]' '[:lower:]')"
if [ -z "$BAKSMALIJAR" ] || [ -z "$SMALIJAR" ]; then
export BAKSMALIJAR="$LINEAGE_ROOT"/prebuilts/tools-lineage/common/smali/baksmali.jar
@@ -1264,10 +1268,6 @@
export CDEXCONVERTER="$LINEAGE_ROOT"/prebuilts/tools-lineage/${HOST}-x86/bin/compact_dex_converter
fi
- if [ -z "$PATCHELF" ]; then
- export PATCHELF="$LINEAGE_ROOT"/prebuilts/tools-lineage/${HOST}-x86/bin/patchelf
- fi
-
# Extract existing boot.oats to the temp folder
if [ -z "$ARCHES" ]; then
echo "Checking if system is odexed and locating boot.oats..."