mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-07 18:45:58 +01:00
parent
aee0792e00
commit
a561a95542
@ -70,7 +70,7 @@ public class Androlib {
|
|||||||
public void decodeSourcesRaw(ExtFile apkFile, File outDir, String filename)
|
public void decodeSourcesRaw(ExtFile apkFile, File outDir, String filename)
|
||||||
throws AndrolibException {
|
throws AndrolibException {
|
||||||
try {
|
try {
|
||||||
LOGGER.info("Copying raw classes.dex file...");
|
LOGGER.info("Copying raw " + filename + " file...");
|
||||||
apkFile.getDirectory().copyToDir(outDir, filename);
|
apkFile.getDirectory().copyToDir(outDir, filename);
|
||||||
} catch (DirectoryException ex) {
|
} catch (DirectoryException ex) {
|
||||||
throw new AndrolibException(ex);
|
throw new AndrolibException(ex);
|
||||||
@ -301,6 +301,7 @@ public class Androlib {
|
|||||||
public void buildNonDefaultSources(ExtFile appDir)
|
public void buildNonDefaultSources(ExtFile appDir)
|
||||||
throws AndrolibException {
|
throws AndrolibException {
|
||||||
try {
|
try {
|
||||||
|
// loop through any smali_ directories for multi-dex apks
|
||||||
Map<String, Directory> dirs = appDir.getDirectory().getDirs();
|
Map<String, Directory> dirs = appDir.getDirectory().getDirs();
|
||||||
for (Map.Entry<String, Directory> directory : dirs.entrySet()) {
|
for (Map.Entry<String, Directory> directory : dirs.entrySet()) {
|
||||||
String name = directory.getKey();
|
String name = directory.getKey();
|
||||||
@ -314,6 +315,18 @@ public class Androlib {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// loop through any classes#.dex files for multi-dex apks
|
||||||
|
File[] dexFiles = appDir.listFiles();
|
||||||
|
if (dexFiles != null) {
|
||||||
|
for (File dex : dexFiles) {
|
||||||
|
|
||||||
|
// skip classes.dex because we have handled it in buildSources()
|
||||||
|
if (dex.getName().endsWith(".dex") && ! dex.getName().equalsIgnoreCase("classes.dex")) {
|
||||||
|
buildSourcesRaw(appDir, dex.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch(DirectoryException ex) {
|
} catch(DirectoryException ex) {
|
||||||
throw new AndrolibException(ex);
|
throw new AndrolibException(ex);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user