Skip to content

Commit

Permalink
fix: remove deprecated --deobf-rewrite-cfg (#1513)
Browse files Browse the repository at this point in the history
  • Loading branch information
skylot committed Jun 6, 2022
1 parent b4fa664 commit 39331d9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ options:
'read-or-save' - read if found, save otherwise (don't overwrite)
'overwrite' - don't read, always save
'ignore' - don't read and don't save
--deobf-rewrite-cfg - set '--deobf-cfg-file-mode' to 'overwrite' (deprecated)
--deobf-use-sourcename - use source file name as class name alias
--deobf-parse-kotlin-metadata - parse kotlin metadata to class and package names
--use-kotlin-methods-for-var-names - use kotlin intrinsic methods to rename variables, values: disable, apply, apply-and-hide, default: apply
Expand Down
13 changes: 1 addition & 12 deletions jadx-cli/src/main/java/jadx/cli/JadxCLIArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ public class JadxCLIArgs {
)
protected DeobfuscationMapFileMode deobfuscationMapFileMode = DeobfuscationMapFileMode.READ;

@Parameter(names = { "--deobf-rewrite-cfg" }, description = "set '--deobf-cfg-file-mode' to 'overwrite' (deprecated)")
protected boolean deobfuscationForceSave = false;

@Parameter(names = { "--deobf-use-sourcename" }, description = "use source file name as class name alias")
protected boolean deobfuscationUseSourceNameAsAlias = false;

Expand Down Expand Up @@ -259,11 +256,7 @@ public JadxArgs toJadxArgs() {
args.setReplaceConsts(replaceConsts);
args.setDeobfuscationOn(deobfuscationOn);
args.setDeobfuscationMapFile(FileUtils.toFile(deobfuscationMapFile));
if (deobfuscationForceSave) {
args.setDeobfuscationMapFileMode(DeobfuscationMapFileMode.OVERWRITE);
} else {
args.setDeobfuscationMapFileMode(deobfuscationMapFileMode);
}
args.setDeobfuscationMapFileMode(deobfuscationMapFileMode);
args.setDeobfuscationMinLength(deobfuscationMinLength);
args.setDeobfuscationMaxLength(deobfuscationMaxLength);
args.setUseSourceNameAsClassAlias(deobfuscationUseSourceNameAsAlias);
Expand Down Expand Up @@ -377,10 +370,6 @@ public DeobfuscationMapFileMode getDeobfuscationMapFileMode() {
return deobfuscationMapFileMode;
}

public boolean isDeobfuscationForceSave() {
return deobfuscationForceSave;
}

public boolean isDeobfuscationUseSourceNameAsAlias() {
return deobfuscationUseSourceNameAsAlias;
}
Expand Down
6 changes: 1 addition & 5 deletions jadx-gui/src/main/java/jadx/gui/settings/JadxSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -695,11 +695,7 @@ private void upgradeSettings(int fromVersion) {
fromVersion++;
}
if (fromVersion == 15) {
if (deobfuscationForceSave) {
deobfuscationMapFileMode = DeobfuscationMapFileMode.OVERWRITE;
} else {
deobfuscationMapFileMode = DeobfuscationMapFileMode.READ;
}
deobfuscationMapFileMode = DeobfuscationMapFileMode.READ;
fromVersion++;
}
if (fromVersion == 16) {
Expand Down

0 comments on commit 39331d9

Please sign in to comment.