diff --git a/build/tools/extract_utils.sh b/build/tools/extract_utils.sh index 12537006..5461cf4f 100644 --- a/build/tools/extract_utils.sh +++ b/build/tools/extract_utils.sh @@ -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