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
5f0dbf85
Commit
5f0dbf85
authored
Mar 22, 2019
by
tRuNKator
Committed by
skylot
Mar 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: don't rename R class fields alias (PR #492)
* fix: R class fields alias * implemented with clearer approach
parent
2e9039da
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
Deobfuscator.java
jadx-core/src/main/java/jadx/core/deobf/Deobfuscator.java
+3
-0
AFlag.java
jadx-core/src/main/java/jadx/core/dex/attributes/AFlag.java
+1
-0
AndroidResourcesUtils.java
...n/java/jadx/core/utils/android/AndroidResourcesUtils.java
+2
-0
No files found.
jadx-core/src/main/java/jadx/core/deobf/Deobfuscator.java
View file @
5f0dbf85
...
...
@@ -11,6 +11,7 @@ import java.util.Map;
import
java.util.Set
;
import
java.util.TreeSet
;
import
jadx.core.dex.attributes.AFlag
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.Nullable
;
import
org.slf4j.Logger
;
...
...
@@ -225,6 +226,8 @@ public class Deobfuscator {
clsInfo
.
rename
(
cls
.
dex
().
root
(),
fullName
);
}
for
(
FieldNode
field
:
cls
.
getFields
())
{
if
(
field
.
contains
(
AFlag
.
DONT_RENAME
))
continue
;
renameField
(
field
);
}
for
(
MethodNode
mth
:
cls
.
getMethods
())
{
...
...
jadx-core/src/main/java/jadx/core/dex/attributes/AFlag.java
View file @
5f0dbf85
...
...
@@ -19,6 +19,7 @@ public enum AFlag {
DONT_SHRINK
,
DONT_INLINE
,
DONT_GENERATE
,
DONT_RENAME
,
// do not rename during deobfuscation
SKIP
,
REMOVE
,
...
...
jadx-core/src/main/java/jadx/core/utils/android/AndroidResourcesUtils.java
View file @
5f0dbf85
...
...
@@ -6,6 +6,7 @@ import java.util.Map;
import
java.util.TreeMap
;
import
com.android.dx.rop.code.AccessFlags
;
import
jadx.core.dex.attributes.AFlag
;
import
org.jetbrains.annotations.NotNull
;
import
org.jetbrains.annotations.Nullable
;
import
org.slf4j.Logger
;
...
...
@@ -124,6 +125,7 @@ public class AndroidResourcesUtils {
if
(
fieldNode
!=
null
&&
!
fieldNode
.
getName
().
equals
(
resName
)
&&
NameMapper
.
isValidIdentifier
(
resName
))
{
fieldNode
.
add
(
AFlag
.
DONT_RENAME
);
fieldNode
.
getFieldInfo
().
setAlias
(
resName
);
}
}
...
...
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