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
22e9ac22
Commit
22e9ac22
authored
Feb 14, 2015
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: fix field search with obfuscated names
parent
8a6cdec7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
20 deletions
+10
-20
FieldInfo.java
jadx-core/src/main/java/jadx/core/dex/info/FieldInfo.java
+3
-14
ClassNode.java
jadx-core/src/main/java/jadx/core/dex/nodes/ClassNode.java
+7
-6
No files found.
jadx-core/src/main/java/jadx/core/dex/info/FieldInfo.java
View file @
22e9ac22
...
...
@@ -25,10 +25,6 @@ public class FieldInfo {
dex
.
getType
(
field
.
getTypeIndex
()));
}
public
static
String
getNameById
(
DexNode
dex
,
int
ind
)
{
return
dex
.
getString
(
dex
.
getFieldId
(
ind
).
getNameIndex
());
}
public
String
getName
()
{
return
name
;
}
...
...
@@ -50,16 +46,9 @@ public class FieldInfo {
return
false
;
}
FieldInfo
fieldInfo
=
(
FieldInfo
)
o
;
if
(!
name
.
equals
(
fieldInfo
.
name
))
{
return
false
;
}
if
(!
type
.
equals
(
fieldInfo
.
type
))
{
return
false
;
}
if
(!
declClass
.
equals
(
fieldInfo
.
declClass
))
{
return
false
;
}
return
true
;
return
name
.
equals
(
fieldInfo
.
name
)
&&
type
.
equals
(
fieldInfo
.
type
)
&&
declClass
.
equals
(
fieldInfo
.
declClass
);
}
@Override
...
...
jadx-core/src/main/java/jadx/core/dex/nodes/ClassNode.java
View file @
22e9ac22
...
...
@@ -28,6 +28,7 @@ import java.util.LinkedHashMap;
import
java.util.List
;
import
java.util.Map
;
import
org.jetbrains.annotations.TestOnly
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -317,19 +318,19 @@ public class ClassNode extends LineAttrNode implements ILoadable {
}
public
FieldNode
searchFieldById
(
int
id
)
{
String
name
=
FieldInfo
.
getNameById
(
dex
,
id
);
return
searchField
(
FieldInfo
.
fromDex
(
dex
,
id
));
}
public
FieldNode
searchField
(
FieldInfo
field
)
{
for
(
FieldNode
f
:
fields
)
{
if
(
f
.
get
Name
().
equals
(
name
))
{
if
(
f
.
get
FieldInfo
().
equals
(
field
))
{
return
f
;
}
}
return
null
;
}
public
FieldNode
searchField
(
FieldInfo
field
)
{
return
searchFieldByName
(
field
.
getName
());
}
@TestOnly
public
FieldNode
searchFieldByName
(
String
name
)
{
for
(
FieldNode
f
:
fields
)
{
if
(
f
.
getName
().
equals
(
name
))
{
...
...
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