extract_utils: Update backsmali command

-e no longer exists starting from v2.2b3, so update the
command. While at it, add the logic to deal with Android N
separated boot oat files.

Change-Id: Iab8e3946d6421824fea74e26dc43d2db38573022
gugelfrei
Gabriele M 8 years ago committed by Luca Stefani
parent ed8c248ec0
commit 4cf635a5ad

@ -690,8 +690,12 @@ function oat2dex() {
if get_file "$OAT" "$TMPDIR" "$SRC"; then
java -jar "$BAKSMALIJAR" deodex -o "$TMPDIR/dexout" -b "$BOOTOAT" -d "$TMPDIR" "$TMPDIR/$(basename "$OAT")"
elif [[ "$CM_TARGET" =~ .jar$ ]]; then
# try to extract classes.dex from boot.oat for framework jars
java -jar "$BAKSMALIJAR" deodex -o "$TMPDIR/dexout" -b "$BOOTOAT" -d "$TMPDIR" -e "/$OEM_TARGET" "$BOOTOAT"
# try to extract classes.dex from boot.oats for framework jars
JAROAT="$TMPDIR/system/framework/$ARCH/boot-$(basename ${OEM_TARGET%.*}).oat"
if [ ! -f "$JAROAT" ]; then
JAROAT=$BOOTOAT;
fi
java -jar "$BAKSMALIJAR" deodex -o "$TMPDIR/dexout" -b "$BOOTOAT" -d "$TMPDIR" "$JAROAT/$OEM_TARGET"
else
continue
fi

Loading…
Cancel
Save