Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gui] Map file handle mode setting having no effect after settings upgrade from version 15 to 16 #1513

Closed
CmP-lt opened this issue Jun 5, 2022 · 2 comments

Comments

@CmP-lt
Copy link
Contributor

CmP-lt commented Jun 5, 2022

If deobfuscationForceSave is true when setting are upgraded from version 15 to 16

if (fromVersion == 15) {
if (deobfuscationForceSave) {
deobfuscationMapFileMode = DeobfuscationMapFileMode.OVERWRITE;
} else {
deobfuscationMapFileMode = DeobfuscationMapFileMode.READ;
}
fromVersion++;
}
the value will be saved in settings and there will be no way to set it to false from the application itself.

This causes the problem of deobfuscationMapFileMode being set to DeobfuscationMapFileMode.OVERWRITE regardless of which option is chosen in preference window:

if (deobfuscationForceSave) {
args.setDeobfuscationMapFileMode(DeobfuscationMapFileMode.OVERWRITE);
} else {
args.setDeobfuscationMapFileMode(deobfuscationMapFileMode);
}

That puts user in situation of having no control over map file handle mode, since it is forcefully overridden to OVERWRITE after saved settings are loaded on application startup.

The problem can be addressed using any of the following approaches (although there may be better ones):

  • set deobfuscationForceSave to false in the code for handling settings upgrade from version 15 to 16;
  • exclude deobfuscationForceSave from being saved (since it has been removed from preferences window).
@skylot
Copy link
Owner

skylot commented Jun 6, 2022

@CmP-lt thanks! This field, supposed to be excluded from saving in jadx-gui. But I think now it can be safely removed as it deprecated for several versions already.

@skylot
Copy link
Owner

skylot commented Jun 6, 2022

Done, field removed.

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

No branches or pull requests

2 participants