From 5aad07422ec0c5964b074ab4d9a6dc0029a83b08 Mon Sep 17 00:00:00 2001 From: TheStrix Date: Wed, 3 Oct 2018 19:06:49 +0530 Subject: [PATCH] extract_utils: Fix output dex file name generated by vdexExtractor - Reflect the changes required by: https://github.com/anestisb/vdexExtractor/commit/ff58255706a18c11567df97da484157f832a1df7 - Also fix JARVDEX file path for deodexing jars Change-Id: Ief355b0bd9e69a67b552d0bd2060f43adb39fb5f --- build/tools/extract_utils.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/tools/extract_utils.sh b/build/tools/extract_utils.sh index 4a519915..3c52f594 100644 --- a/build/tools/extract_utils.sh +++ b/build/tools/extract_utils.sh @@ -830,7 +830,7 @@ function oat2dex() { "$CDEXCONVERTER" "$TMPDIR/$(basename "${OEM_TARGET%.*}")_classes.cdex" &> /dev/null mv "$TMPDIR/$(basename "${OEM_TARGET%.*}")_classes.cdex.new" "$TMPDIR/classes.dex" else - mv "$TMPDIR/$(basename "${OEM_TARGET%.*}").apk_classes.dex" "$TMPDIR/classes.dex" + mv "$TMPDIR/$(basename "${OEM_TARGET%.*}")_classes.dex" "$TMPDIR/classes.dex" fi else java -jar "$BAKSMALIJAR" deodex -o "$TMPDIR/dexout" -b "$BOOTOAT" -d "$TMPDIR" "$TMPDIR/$(basename "$OAT")" @@ -838,7 +838,7 @@ function oat2dex() { fi elif [[ "$LINEAGE_TARGET" =~ .jar$ ]]; then JAROAT="$TMPDIR/system/framework/$ARCH/boot-$(basename ${OEM_TARGET%.*}).oat" - JARVDEX="$TMPDIR/system/framework/$ARCH/boot-$(basename ${OEM_TARGET%.*}).vdex" + JARVDEX="$TMPDIR/system/framework/oat/$ARCH/$(basename ${OEM_TARGET%.*}).vdex" if [ ! -f "$JAROAT" ]; then JAROAT=$BOOTOAT; fi @@ -847,7 +847,7 @@ function oat2dex() { # fallback to boot.oat if vdex is not available if [ -f "$JARVDEX" ]; then "$VDEXEXTRACTOR" -o "$TMPDIR/" -i "$JARVDEX" > /dev/null - mv "$TMPDIR/boot-$(basename "${OEM_TARGET%.*}").apk_classes.dex" "$TMPDIR/classes.dex" + mv "$TMPDIR/$(basename "${OEM_TARGET%.*}")_classes.dex" "$TMPDIR/classes.dex" else java -jar "$BAKSMALIJAR" deodex -o "$TMPDIR/dexout" -b "$BOOTOAT" -d "$TMPDIR" "$JAROAT/$OEM_TARGET" java -jar "$SMALIJAR" assemble "$TMPDIR/dexout" -o "$TMPDIR/classes.dex"