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
This commit is contained in:
committed by
Michael Bestas
parent
e14de31ff5
commit
490e38efd7
@@ -30,6 +30,7 @@ ARCHES=
|
|||||||
FULLY_DEODEXED=-1
|
FULLY_DEODEXED=-1
|
||||||
|
|
||||||
TMPDIR=$(mktemp -d)
|
TMPDIR=$(mktemp -d)
|
||||||
|
HOST="$(uname | tr '[:upper:]' '[:lower:]')"
|
||||||
|
|
||||||
#
|
#
|
||||||
# cleanup
|
# cleanup
|
||||||
@@ -102,6 +103,10 @@ function setup_vendor() {
|
|||||||
VENDOR_STATE=0
|
VENDOR_STATE=0
|
||||||
VENDOR_RADIO_STATE=0
|
VENDOR_RADIO_STATE=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$PATCHELF" ]; then
|
||||||
|
export PATCHELF="$LINEAGE_ROOT"/prebuilts/tools-lineage/${HOST}-x86/bin/patchelf
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Helper functions for parsing a spec.
|
# Helper functions for parsing a spec.
|
||||||
@@ -1249,7 +1254,6 @@ function oat2dex() {
|
|||||||
local SRC="$3"
|
local SRC="$3"
|
||||||
local TARGET=
|
local TARGET=
|
||||||
local OAT=
|
local OAT=
|
||||||
local HOST="$(uname | tr '[:upper:]' '[:lower:]')"
|
|
||||||
|
|
||||||
if [ -z "$BAKSMALIJAR" ] || [ -z "$SMALIJAR" ]; then
|
if [ -z "$BAKSMALIJAR" ] || [ -z "$SMALIJAR" ]; then
|
||||||
export BAKSMALIJAR="$LINEAGE_ROOT"/prebuilts/tools-lineage/common/smali/baksmali.jar
|
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
|
export CDEXCONVERTER="$LINEAGE_ROOT"/prebuilts/tools-lineage/${HOST}-x86/bin/compact_dex_converter
|
||||||
fi
|
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
|
# Extract existing boot.oats to the temp folder
|
||||||
if [ -z "$ARCHES" ]; then
|
if [ -z "$ARCHES" ]; then
|
||||||
echo "Checking if system is odexed and locating boot.oats..."
|
echo "Checking if system is odexed and locating boot.oats..."
|
||||||
|
|||||||
Reference in New Issue
Block a user