Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jadx
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
jadx
Commits
d111fd06
Commit
d111fd06
authored
Mar 23, 2019
by
Ahmed Ashour
Committed by
skylot
Mar 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add a flag to disable debug info (#276) (PR #502)
parent
eed762df
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
1 deletion
+23
-1
JadxCLIArgs.java
jadx-cli/src/main/java/jadx/cli/JadxCLIArgs.java
+8
-0
JadxCLIArgsTest.java
jadx-cli/src/test/java/jadx/cli/JadxCLIArgsTest.java
+3
-0
JadxArgs.java
jadx-core/src/main/java/jadx/api/JadxArgs.java
+9
-0
Jadx.java
jadx-core/src/main/java/jadx/core/Jadx.java
+3
-1
No files found.
jadx-cli/src/main/java/jadx/cli/JadxCLIArgs.java
View file @
d111fd06
...
...
@@ -47,6 +47,9 @@ public class JadxCLIArgs {
@Parameter
(
names
=
{
"--no-imports"
},
description
=
"disable use of imports, always write entire package name"
)
protected
boolean
useImports
=
true
;
@Parameter
(
names
=
{
"--no-debug-info"
},
description
=
"disable debug info"
)
protected
boolean
debugInfo
=
true
;
@Parameter
(
names
=
"--no-replace-consts"
,
description
=
"don't replace constant value with matching constant field"
)
protected
boolean
replaceConsts
=
true
;
...
...
@@ -160,6 +163,7 @@ public class JadxCLIArgs {
args
.
setRespectBytecodeAccModifiers
(
respectBytecodeAccessModifiers
);
args
.
setExportAsGradleProject
(
exportAsGradleProject
);
args
.
setUseImports
(
useImports
);
args
.
setDebugInfo
(
debugInfo
);
return
args
;
}
...
...
@@ -203,6 +207,10 @@ public class JadxCLIArgs {
return
useImports
;
}
public
boolean
isDebugInfo
()
{
return
debugInfo
;
}
public
boolean
isDeobfuscationOn
()
{
return
deobfuscationOn
;
}
...
...
jadx-cli/src/test/java/jadx/cli/JadxCLIArgsTest.java
View file @
d111fd06
...
...
@@ -33,11 +33,14 @@ public class JadxCLIArgsTest {
@Test
public
void
testOptionsOverride
()
{
assertThat
(
override
(
new
JadxCLIArgs
(),
"--no-imports"
).
isUseImports
(),
is
(
false
));
assertThat
(
override
(
new
JadxCLIArgs
(),
"--no-debug-info"
).
isDebugInfo
(),
is
(
false
));
assertThat
(
override
(
new
JadxCLIArgs
(),
""
).
isUseImports
(),
is
(
true
));
JadxCLIArgs
args
=
new
JadxCLIArgs
();
args
.
useImports
=
false
;
assertThat
(
override
(
args
,
"--no-imports"
).
isUseImports
(),
is
(
false
));
args
.
debugInfo
=
false
;
assertThat
(
override
(
args
,
"--no-debug-info"
).
isDebugInfo
(),
is
(
false
));
args
=
new
JadxCLIArgs
();
args
.
useImports
=
false
;
...
...
jadx-core/src/main/java/jadx/api/JadxArgs.java
View file @
d111fd06
...
...
@@ -27,6 +27,7 @@ public class JadxArgs {
private
boolean
showInconsistentCode
=
false
;
private
boolean
useImports
=
true
;
private
boolean
debugInfo
=
true
;
private
boolean
isSkipResources
=
false
;
private
boolean
isSkipSources
=
false
;
...
...
@@ -133,6 +134,14 @@ public class JadxArgs {
this
.
useImports
=
useImports
;
}
public
boolean
isDebugInfo
()
{
return
debugInfo
;
}
public
void
setDebugInfo
(
boolean
debugInfo
)
{
this
.
debugInfo
=
debugInfo
;
}
public
boolean
isSkipResources
()
{
return
isSkipResources
;
}
...
...
jadx-core/src/main/java/jadx/core/Jadx.java
View file @
d111fd06
...
...
@@ -67,7 +67,9 @@ public class Jadx {
passes
.
add
(
new
BlockFinish
());
passes
.
add
(
new
SSATransform
());
passes
.
add
(
new
DebugInfoVisitor
());
if
(
args
.
isDebugInfo
())
{
passes
.
add
(
new
DebugInfoVisitor
());
}
passes
.
add
(
new
TypeInference
());
if
(
args
.
isRawCFGOutput
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment