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
diff --git a/build/tools/extract_utils.sh b/build/tools/extract_utils.sh
index 4a51991..3c52f59 100644
--- a/build/tools/extract_utils.sh
+++ b/build/tools/extract_utils.sh
@@ -830,7 +830,7 @@
"$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 @@
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 @@
# 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"