summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiano Barezzi <barezzisebastiano@gmail.com>2020-12-23 16:35:43 +0100
committerMichael Bestas <mikeioannina@gmail.com>2020-12-27 22:02:20 +0200
commit490e38efd748f0c623baab1e4cb1f4adb34f43d1 (patch)
tree6851649e3c0398b10d796cc95214dab0771114b6
parente14de31ff56e5a8e2257251bfa39c3f301121301 (diff)
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
-rw-r--r--extract_utils.sh10
1 files changed, 5 insertions, 5 deletions
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 @@ ARCHES=
FULLY_DEODEXED=-1
TMPDIR=$(mktemp -d)
+HOST="$(uname | tr '[:upper:]' '[:lower:]')"
#
# cleanup
@@ -102,6 +103,10 @@ function setup_vendor() {
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 @@ function oat2dex() {
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 @@ function oat2dex() {
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..."