mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-20 16:57:34 +01:00
Merge pull request #2153 from iBotPeaches/issue-2071
Update to smali/baksmali v2.3.0
This commit is contained in:
commit
683fef32ac
@ -24,6 +24,7 @@ import org.jf.dexlib2.Opcodes;
|
||||
import org.jf.dexlib2.dexbacked.DexBackedDexFile;
|
||||
import org.jf.dexlib2.dexbacked.DexBackedOdexFile;
|
||||
import org.jf.dexlib2.analysis.InlineMethodResolver;
|
||||
import org.jf.dexlib2.iface.MultiDexContainer;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -68,10 +69,27 @@ public class SmaliDecoder {
|
||||
jobs = 6;
|
||||
}
|
||||
|
||||
// create the dex
|
||||
DexBackedDexFile dexFile = DexFileFactory.loadDexEntry(mApkFile, mDexFile, true, Opcodes.forApi(mApi));
|
||||
// create the container
|
||||
MultiDexContainer<? extends DexBackedDexFile> container = DexFileFactory.loadDexContainer(mApkFile, Opcodes.forApi(mApi));
|
||||
MultiDexContainer.DexEntry<? extends DexBackedDexFile> dexEntry;
|
||||
DexBackedDexFile dexFile;
|
||||
|
||||
if (dexFile.isOdexFile()) {
|
||||
// If we have 1 item, ignore the passed file. Pull the DexFile we need.
|
||||
if (container.getDexEntryNames().size() == 1) {
|
||||
dexEntry = container.getEntry(container.getDexEntryNames().get(0));
|
||||
} else {
|
||||
dexEntry = container.getEntry(mDexFile);
|
||||
}
|
||||
|
||||
// Double check the passed param exists
|
||||
if (dexEntry == null) {
|
||||
dexEntry = container.getEntry(container.getDexEntryNames().get(0));
|
||||
}
|
||||
|
||||
assert dexEntry != null;
|
||||
dexFile = dexEntry.getDexFile();
|
||||
|
||||
if (dexFile.supportsOptimizedOpcodes()) {
|
||||
throw new AndrolibException("Warning: You are disassembling an odex file without deodexing it.");
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ subprojects {
|
||||
|
||||
ext {
|
||||
depends = [
|
||||
baksmali: 'org.smali:baksmali:2.2.7',
|
||||
baksmali: 'org.smali:baksmali:2.3',
|
||||
commons_cli: 'commons-cli:commons-cli:1.4',
|
||||
commons_io: 'commons-io:commons-io:2.4',
|
||||
commons_lang: 'org.apache.commons:commons-lang3:3.1',
|
||||
@ -117,7 +117,7 @@ subprojects {
|
||||
junit: 'junit:junit:4.12',
|
||||
proguard_gradle: 'net.sf.proguard:proguard-gradle:6.1.1',
|
||||
snakeyaml: 'org.yaml:snakeyaml:1.18:android',
|
||||
smali: 'org.smali:smali:2.2.7',
|
||||
smali: 'org.smali:smali:2.3',
|
||||
xmlpull: 'xpp3:xpp3:1.1.4c',
|
||||
xmlunit: 'xmlunit:xmlunit:1.6',
|
||||
]
|
||||
|
@ -3,11 +3,11 @@
|
||||
if [ "$TRAVIS_OS_NAME" = "windows" ]; then
|
||||
export GRADLE_OPTS=-Dorg.gradle.daemon=false
|
||||
choco install jdk8
|
||||
export PATH=$PATH:"/c/Program Files/Java/jdk1.8.0_211/bin"
|
||||
export JAVA_HOME="/c/Program Files/Java/jdk1.8.0_211"
|
||||
export PATH=$PATH:"/c/Program Files/Java/jdk1.8.0_221/bin"
|
||||
export JAVA_HOME="/c/Program Files/Java/jdk1.8.0_221"
|
||||
./gradlew.bat clean
|
||||
else
|
||||
./gradlew clean
|
||||
fi
|
||||
|
||||
exit $?
|
||||
exit $?
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
if [ "$TRAVIS_OS_NAME" = "windows" ]; then
|
||||
export GRADLE_OPTS=-Dorg.gradle.daemon=false
|
||||
export PATH=$PATH:"/c/Program Files/Java/jdk1.8.0_211/bin"
|
||||
export JAVA_HOME="/c/Program Files/Java/jdk1.8.0_211"
|
||||
export PATH=$PATH:"/c/Program Files/Java/jdk1.8.0_221/bin"
|
||||
export JAVA_HOME="/c/Program Files/Java/jdk1.8.0_221"
|
||||
./gradlew.bat build shadowJar proguard
|
||||
else
|
||||
./gradlew build shadowJar proguard
|
||||
fi
|
||||
|
||||
exit $?
|
||||
exit $?
|
||||
|
Loading…
x
Reference in New Issue
Block a user