Commit 156c9798 authored by Skylot's avatar Skylot

fix: search smali class by original name

parent f846df53
package jadx.api;
import java.io.File;
import java.io.IOException;
import java.io.StringWriter;
import java.nio.file.Path;
import java.util.ArrayList;
......@@ -35,6 +34,7 @@ import jadx.core.dex.nodes.RootNode;
import jadx.core.dex.visitors.IDexTreeVisitor;
import jadx.core.dex.visitors.SaveCode;
import jadx.core.export.ExportGradleProject;
import jadx.core.utils.Utils;
import jadx.core.utils.exceptions.JadxRuntimeException;
import jadx.core.utils.files.InputFile;
import jadx.core.xmlgen.BinaryXMLParser;
......@@ -308,8 +308,7 @@ public final class JadxDecompiler {
void generateSmali(ClassNode cls) {
Path path = cls.dex().getDexFile().getPath();
String className = cls.getAlias().makeRawFullName();
className = 'L' + className.replace('.', '/') + ';';
String className = Utils.makeQualifiedObjectName(cls.getClassInfo().getType().getObject());
try {
DexBackedDexFile dexFile = DexFileFactory.loadDexFile(path.toFile(), Opcodes.getDefault());
boolean decompiled = false;
......@@ -326,7 +325,7 @@ public final class JadxDecompiler {
if (!decompiled) {
LOG.error("Failed to find smali class {}", className);
}
} catch (IOException e) {
} catch (Exception e) {
LOG.error("Error generating smali", e);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment