Skip to content

chore: speed up initial APK loading#2745

Merged
skylot merged 1 commit intoskylot:masterfrom
jpstotz:zipsec
Jan 16, 2026
Merged

chore: speed up initial APK loading#2745
skylot merged 1 commit intoskylot:masterfrom
jpstotz:zipsec

Conversation

@jpstotz
Copy link
Copy Markdown
Collaborator

@jpstotz jpstotz commented Jan 15, 2026

java.io.File.getCanonicalFile() seems be pretty slow under certain conditions.

Switching to java.nio.file significantly improves execution speed and thus reduces the initial loading time JadxGUI requires

The new way to check for path traversal attacks is the recommended way to implement such a check using java.nio.file:
https://www.heise.de/en/background/Secure-Coding-Best-practices-for-using-Java-NIO-against-path-traversal-9996787.html

fixes issue #2744

@skylot
Copy link
Copy Markdown
Owner

skylot commented Jan 16, 2026

@jpstotz thanks, looks good to me.
Previous implementation was straightforward and simple, with new approach we will rely on normalize method which is fine. That method has several implementations and looks like these just search for .. string in path, but jadx already have a check for that string at start of method, so it looks a little pointless. Anyway, I think, new check is fast and might handle other cases, so keeping it is fine.

fixes issue #2744

Main issue is an endless loop in type inference visitor in o.ocx class, I hope I will be able to fix it.

@skylot skylot merged commit a0466d4 into skylot:master Jan 16, 2026
3 of 4 checks passed
@jpstotz jpstotz deleted the zipsec branch January 23, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants