Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
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
ab4721a8
Commit
ab4721a8
authored
Apr 09, 2019
by
Ahmed Ashour
Committed by
skylot
Apr 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: don't rename R class in deobfuscation (#572) (PR #573)
parent
23c05bb5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
Deobfuscator.java
jadx-core/src/main/java/jadx/core/deobf/Deobfuscator.java
+26
-0
No files found.
jadx-core/src/main/java/jadx/core/deobf/Deobfuscator.java
View file @
ab4721a8
...
...
@@ -226,6 +226,9 @@ public class Deobfuscator {
}
private
void
processClass
(
ClassNode
cls
)
{
if
(
isR
(
cls
.
getParentClass
()))
{
return
;
}
ClassInfo
clsInfo
=
cls
.
getClassInfo
();
String
fullName
=
getClassFullName
(
clsInfo
);
if
(!
fullName
.
equals
(
clsInfo
.
getFullName
()))
{
...
...
@@ -559,4 +562,27 @@ public class Deobfuscator {
public
PackageNode
getRootPackage
()
{
return
rootPackage
;
}
private
static
boolean
isR
(
ClassNode
cls
)
{
if
(!
cls
.
getClassInfo
().
getShortName
().
equals
(
"R"
))
{
return
false
;
}
if
(!
cls
.
getMethods
().
isEmpty
()
||
!
cls
.
getFields
().
isEmpty
())
{
return
false
;
}
for
(
ClassNode
inner
:
cls
.
getInnerClasses
())
{
for
(
MethodNode
m
:
inner
.
getMethods
())
{
if
(!
m
.
getMethodInfo
().
isConstructor
()
&&
!
m
.
getMethodInfo
().
isClassInit
())
{
return
false
;
}
}
for
(
FieldNode
field
:
cls
.
getFields
())
{
ArgType
type
=
field
.
getType
();
if
(
type
!=
ArgType
.
INT
&&
(!
type
.
isArray
()
||
type
.
getArrayElement
()
!=
ArgType
.
INT
))
{
return
false
;
}
}
}
return
true
;
}
}
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