fix: do not reopen zip file on every resource decode

This commit is contained in:
Skylot
2025-03-11 21:56:42 +00:00
parent d84f0389ec
commit 3209dbb7a4
6 changed files with 65 additions and 87 deletions
@@ -27,6 +27,7 @@ import jadx.gui.ui.tab.TabbedPane;
import jadx.gui.utils.CertificateManager;
import jadx.gui.utils.NLS;
import jadx.gui.utils.UiUtils;
import jadx.zip.IZipEntry;
public class ApkSignature extends JNode {
private static final long serialVersionUID = -9121321926113143407L;
@@ -45,9 +46,9 @@ public class ApkSignature extends JNode {
File apkFile = null;
for (ResourceFile resFile : wrapper.getResources()) {
if (resFile.getType() == ResourceType.MANIFEST) {
ResourceFile.ZipRef zipRef = resFile.getZipRef();
if (zipRef != null) {
apkFile = zipRef.getZipFile();
IZipEntry zipEntry = resFile.getZipEntry();
if (zipEntry != null) {
apkFile = zipEntry.getZipFile();
break;
}
}
@@ -56,7 +56,7 @@ public class JRoot extends JNode {
String splitPathStr = Pattern.quote(File.separator);
for (ResourceFile rf : resources) {
String rfName;
if (rf.getZipRef() != null) {
if (rf.getZipEntry() != null) {
rfName = rf.getDeobfName();
} else {
rfName = new File(rf.getDeobfName()).getName();