Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
极致猎手
jadx
提交
cd612b45
J
jadx
项目概览
极致猎手
/
jadx
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jadx
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cd612b45
编写于
11月 06, 2020
作者:
S
Skylot
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: resolve some warnings reported by IntelliJ Idea
上级
009939f8
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
37 addition
and
43 deletion
+37
-43
jadx-core/src/main/java/jadx/api/JadxDecompiler.java
jadx-core/src/main/java/jadx/api/JadxDecompiler.java
+3
-3
jadx-core/src/main/java/jadx/core/codegen/AnnotationGen.java
jadx-core/src/main/java/jadx/core/codegen/AnnotationGen.java
+5
-2
jadx-core/src/main/java/jadx/core/codegen/ClassGen.java
jadx-core/src/main/java/jadx/core/codegen/ClassGen.java
+0
-3
jadx-core/src/main/java/jadx/core/codegen/CodeWriter.java
jadx-core/src/main/java/jadx/core/codegen/CodeWriter.java
+2
-6
jadx-core/src/main/java/jadx/core/deobf/Deobfuscator.java
jadx-core/src/main/java/jadx/core/deobf/Deobfuscator.java
+1
-4
jadx-core/src/main/java/jadx/core/deobf/OverridedMethodsNode.java
...e/src/main/java/jadx/core/deobf/OverridedMethodsNode.java
+1
-1
jadx-core/src/main/java/jadx/core/dex/nodes/InsnNode.java
jadx-core/src/main/java/jadx/core/dex/nodes/InsnNode.java
+1
-0
jadx-core/src/main/java/jadx/core/dex/nodes/RootNode.java
jadx-core/src/main/java/jadx/core/dex/nodes/RootNode.java
+1
-0
jadx-core/src/main/java/jadx/core/dex/nodes/parser/SignatureParser.java
...main/java/jadx/core/dex/nodes/parser/SignatureParser.java
+1
-0
jadx-core/src/main/java/jadx/core/dex/visitors/OverrideMethodVisitor.java
...in/java/jadx/core/dex/visitors/OverrideMethodVisitor.java
+1
-1
jadx-core/src/main/java/jadx/core/dex/visitors/regions/ProcessTryCatchRegions.java
...adx/core/dex/visitors/regions/ProcessTryCatchRegions.java
+3
-6
jadx-core/src/main/java/jadx/core/dex/visitors/regions/RegionMaker.java
...main/java/jadx/core/dex/visitors/regions/RegionMaker.java
+1
-1
jadx-core/src/main/java/jadx/core/dex/visitors/regions/RegionStack.java
...main/java/jadx/core/dex/visitors/regions/RegionStack.java
+6
-6
jadx-core/src/main/java/jadx/core/dex/visitors/typeinference/AbstractTypeConstraint.java
...re/dex/visitors/typeinference/AbstractTypeConstraint.java
+2
-2
jadx-core/src/main/java/jadx/core/dex/visitors/typeinference/TypeSearchState.java
...jadx/core/dex/visitors/typeinference/TypeSearchState.java
+1
-1
jadx-core/src/main/java/jadx/core/export/ExportGradleProject.java
...e/src/main/java/jadx/core/export/ExportGradleProject.java
+2
-2
jadx-core/src/main/java/jadx/core/utils/DebugChecks.java
jadx-core/src/main/java/jadx/core/utils/DebugChecks.java
+1
-1
jadx-core/src/main/java/jadx/core/utils/EncodedValueUtils.java
...core/src/main/java/jadx/core/utils/EncodedValueUtils.java
+1
-0
jadx-core/src/main/java/jadx/core/utils/ImmutableList.java
jadx-core/src/main/java/jadx/core/utils/ImmutableList.java
+1
-1
jadx-core/src/main/java/jadx/core/utils/android/ExtDataInput.java
...e/src/main/java/jadx/core/utils/android/ExtDataInput.java
+1
-1
jadx-core/src/main/java/jadx/core/xmlgen/BinaryXMLParser.java
...-core/src/main/java/jadx/core/xmlgen/BinaryXMLParser.java
+1
-1
jadx-core/src/main/java/jadx/core/xmlgen/ResourcesSaver.java
jadx-core/src/main/java/jadx/core/xmlgen/ResourcesSaver.java
+1
-1
未找到文件。
jadx-core/src/main/java/jadx/api/JadxDecompiler.java
浏览文件 @
cd612b45
...
...
@@ -69,9 +69,9 @@ import jadx.core.xmlgen.ResourcesSaver;
public
final
class
JadxDecompiler
implements
Closeable
{
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
JadxDecompiler
.
class
);
private
JadxArgs
args
;
private
JadxPluginManager
pluginManager
=
new
JadxPluginManager
();
private
List
<
ILoadResult
>
loadedInputs
=
new
ArrayList
<>();
private
final
JadxArgs
args
;
private
final
JadxPluginManager
pluginManager
=
new
JadxPluginManager
();
private
final
List
<
ILoadResult
>
loadedInputs
=
new
ArrayList
<>();
private
RootNode
root
;
private
List
<
JavaClass
>
classes
;
...
...
jadx-core/src/main/java/jadx/core/codegen/AnnotationGen.java
浏览文件 @
cd612b45
...
...
@@ -133,8 +133,11 @@ public class AnnotationGen {
public
EncodedValue
getAnnotationDefaultValue
(
String
name
)
{
IAnnotation
an
=
cls
.
getAnnotation
(
Consts
.
DALVIK_ANNOTATION_DEFAULT
);
if
(
an
!=
null
)
{
IAnnotation
defAnnotation
=
(
IAnnotation
)
an
.
getDefaultValue
().
getValue
();
return
defAnnotation
.
getValues
().
get
(
name
);
EncodedValue
defValue
=
an
.
getDefaultValue
();
if
(
defValue
!=
null
)
{
IAnnotation
defAnnotation
=
(
IAnnotation
)
defValue
.
getValue
();
return
defAnnotation
.
getValues
().
get
(
name
);
}
}
return
null
;
}
...
...
jadx-core/src/main/java/jadx/core/codegen/ClassGen.java
浏览文件 @
cd612b45
...
...
@@ -234,11 +234,8 @@ public class ClassGen {
}
/**
*
* @param clsCode
* @param printClassName allows to print the original class name as comment (e.g. for inlined
* classes)
* @throws CodegenException
*/
public
void
addClassBody
(
CodeWriter
clsCode
,
boolean
printClassName
)
throws
CodegenException
{
clsCode
.
add
(
'{'
);
...
...
jadx-core/src/main/java/jadx/core/codegen/CodeWriter.java
浏览文件 @
cd612b45
...
...
@@ -14,6 +14,7 @@ import jadx.api.ICodeInfo;
import
jadx.api.impl.SimpleCodeInfo
;
import
jadx.core.dex.attributes.nodes.LineAttrNode
;
import
jadx.core.utils.StringUtils
;
import
jadx.core.utils.Utils
;
public
class
CodeWriter
{
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
CodeWriter
.
class
);
...
...
@@ -153,17 +154,12 @@ public class CodeWriter {
return
this
;
}
@SuppressWarnings
(
"StringRepeatCanBeUsed"
)
private
void
updateIndent
()
{
int
curIndent
=
indent
;
if
(
curIndent
<
INDENT_CACHE
.
length
)
{
this
.
indentStr
=
INDENT_CACHE
[
curIndent
];
}
else
{
StringBuilder
s
=
new
StringBuilder
(
curIndent
*
INDENT_STR
.
length
());
for
(
int
i
=
0
;
i
<
curIndent
;
i
++)
{
s
.
append
(
INDENT_STR
);
}
this
.
indentStr
=
s
.
toString
();
this
.
indentStr
=
Utils
.
strRepeat
(
INDENT_STR
,
curIndent
);
}
}
...
...
jadx-core/src/main/java/jadx/core/deobf/Deobfuscator.java
浏览文件 @
cd612b45
...
...
@@ -368,7 +368,7 @@ public class Deobfuscator {
public
String
getPkgAlias
(
ClassNode
cls
)
{
ClassInfo
classInfo
=
cls
.
getClassInfo
();
PackageNode
pkg
=
null
;
PackageNode
pkg
;
DeobfClsInfo
deobfClsInfo
=
clsMap
.
get
(
classInfo
);
if
(
deobfClsInfo
!=
null
)
{
pkg
=
deobfClsInfo
.
getPkg
();
...
...
@@ -420,9 +420,6 @@ public class Deobfuscator {
/**
* Generate a prefix for a class name that bases on certain class properties, certain
* extended superclasses or implemented interfaces.
*
* @param cls
* @return
*/
private
String
makeClsPrefix
(
ClassNode
cls
)
{
if
(
cls
.
isEnum
())
{
...
...
jadx-core/src/main/java/jadx/core/deobf/OverridedMethodsNode.java
浏览文件 @
cd612b45
...
...
@@ -6,7 +6,7 @@ import jadx.core.dex.info.MethodInfo;
class
OverridedMethodsNode
{
private
Set
<
MethodInfo
>
methods
;
private
final
Set
<
MethodInfo
>
methods
;
public
OverridedMethodsNode
(
Set
<
MethodInfo
>
methodsSet
)
{
methods
=
methodsSet
;
...
...
jadx-core/src/main/java/jadx/core/dex/nodes/InsnNode.java
浏览文件 @
cd612b45
...
...
@@ -454,6 +454,7 @@ public class InsnNode extends LineAttrNode {
/**
* Compare instruction only by identity.
*/
@SuppressWarnings
(
"EmptyMethod"
)
@Override
public
final
int
hashCode
()
{
return
super
.
hashCode
();
...
...
jadx-core/src/main/java/jadx/core/dex/nodes/RootNode.java
浏览文件 @
cd612b45
...
...
@@ -434,6 +434,7 @@ public class RootNode {
return
appPackage
;
}
@Nullable
public
ClassNode
getAppResClass
()
{
return
appResClass
;
}
...
...
jadx-core/src/main/java/jadx/core/dex/nodes/parser/SignatureParser.java
浏览文件 @
cd612b45
...
...
@@ -259,6 +259,7 @@ public class SignatureParser {
* <p/>
* Example: "<T:Ljava/lang/Exception;:Ljava/lang/Object;>"
*/
@SuppressWarnings
(
"ConditionalBreakInInfiniteLoop"
)
public
List
<
ArgType
>
consumeGenericTypeParameters
()
{
if
(!
lookAhead
(
'<'
))
{
return
Collections
.
emptyList
();
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/OverrideMethodVisitor.java
浏览文件 @
cd612b45
...
...
@@ -84,7 +84,7 @@ public class OverrideMethodVisitor extends AbstractVisitor {
}
/**
* NOTE: Simplified version of method from
{@link ModVisitor#isFieldVisibleInMethod}
* NOTE: Simplified version of method from
ModVisitor.isFieldVisibleInMethod
*/
private
boolean
isMethodVisibleInCls
(
MethodNode
superMth
,
ClassNode
cls
)
{
AccessInfo
accessFlags
=
superMth
.
getAccessFlags
();
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/regions/ProcessTryCatchRegions.java
浏览文件 @
cd612b45
...
...
@@ -38,12 +38,9 @@ public class ProcessTryCatchRegions extends AbstractRegionVisitor {
Map
<
BlockNode
,
TryCatchBlock
>
tryBlocksMap
=
new
HashMap
<>(
2
);
searchTryCatchDominators
(
mth
,
tryBlocksMap
);
IRegionIterativeVisitor
visitor
=
new
IRegionIterativeVisitor
()
{
@Override
public
boolean
visitRegion
(
MethodNode
mth
,
IRegion
region
)
{
boolean
changed
=
checkAndWrap
(
mth
,
tryBlocksMap
,
region
);
return
changed
&&
!
tryBlocksMap
.
isEmpty
();
}
IRegionIterativeVisitor
visitor
=
(
regionMth
,
region
)
->
{
boolean
changed
=
checkAndWrap
(
regionMth
,
tryBlocksMap
,
region
);
return
changed
&&
!
tryBlocksMap
.
isEmpty
();
};
DepthRegionTraversal
.
traverseIncludingExcHandlers
(
mth
,
visitor
);
}
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/regions/RegionMaker.java
浏览文件 @
cd612b45
...
...
@@ -60,8 +60,8 @@ public class RegionMaker {
private
final
MethodNode
mth
;
private
final
int
regionsLimit
;
private
final
BitSet
processedBlocks
;
private
int
regionsCount
;
private
BitSet
processedBlocks
;
public
RegionMaker
(
MethodNode
mth
)
{
this
.
mth
=
mth
;
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/regions/RegionStack.java
浏览文件 @
cd612b45
...
...
@@ -34,12 +34,13 @@ final class RegionStack {
exits
=
new
HashSet
<>(
4
);
}
private
State
(
State
c
)
{
exits
=
new
HashSet
<>(
c
.
exits
);
private
State
(
State
c
,
IRegion
region
)
{
this
.
exits
=
new
HashSet
<>(
c
.
exits
);
this
.
region
=
region
;
}
public
State
copy
(
)
{
return
new
State
(
this
);
public
State
copy
With
(
IRegion
region
)
{
return
new
State
(
this
,
region
);
}
@Override
...
...
@@ -64,8 +65,7 @@ final class RegionStack {
if
(
stack
.
size
()
>
REGIONS_STACK_LIMIT
)
{
throw
new
JadxOverflowException
(
"Regions stack size limit reached"
);
}
curState
=
curState
.
copy
();
curState
.
region
=
region
;
curState
=
curState
.
copyWith
(
region
);
if
(
DEBUG
)
{
LOG
.
debug
(
"Stack push: {}: {}"
,
size
(),
curState
);
}
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/typeinference/AbstractTypeConstraint.java
浏览文件 @
cd612b45
...
...
@@ -11,8 +11,8 @@ import jadx.core.utils.Utils;
public
abstract
class
AbstractTypeConstraint
implements
ITypeConstraint
{
protected
InsnNode
insn
;
protected
List
<
SSAVar
>
relatedVars
;
protected
final
InsnNode
insn
;
protected
final
List
<
SSAVar
>
relatedVars
;
public
AbstractTypeConstraint
(
InsnNode
insn
,
InsnArg
arg
)
{
this
.
insn
=
insn
;
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/typeinference/TypeSearchState.java
浏览文件 @
cd612b45
...
...
@@ -17,7 +17,7 @@ import jadx.core.utils.exceptions.JadxRuntimeException;
public
class
TypeSearchState
{
private
Map
<
SSAVar
,
TypeSearchVarInfo
>
varInfoMap
;
private
final
Map
<
SSAVar
,
TypeSearchVarInfo
>
varInfoMap
;
public
TypeSearchState
(
MethodNode
mth
)
{
List
<
SSAVar
>
vars
=
mth
.
getSVars
();
...
...
jadx-core/src/main/java/jadx/core/export/ExportGradleProject.java
浏览文件 @
cd612b45
...
...
@@ -25,8 +25,8 @@ public class ExportGradleProject {
private
final
RootNode
root
;
private
final
File
outDir
;
private
File
srcOutDir
;
private
File
resOutDir
;
private
final
File
srcOutDir
;
private
final
File
resOutDir
;
public
ExportGradleProject
(
RootNode
root
,
File
outDir
)
{
this
.
root
=
root
;
...
...
jadx-core/src/main/java/jadx/core/utils/DebugChecks.java
浏览文件 @
cd612b45
...
...
@@ -160,6 +160,7 @@ public class DebugChecks {
InsnNode
parentInsn
=
useArg
.
getParentInsn
();
if
(
parentInsn
!=
null
&&
parentInsn
==
usedInPhi
)
{
found
=
true
;
break
;
}
}
if
(!
found
)
{
...
...
@@ -168,5 +169,4 @@ public class DebugChecks {
}
}
}
}
jadx-core/src/main/java/jadx/core/utils/EncodedValueUtils.java
浏览文件 @
cd612b45
...
...
@@ -41,6 +41,7 @@ public class EncodedValueUtils {
case
ENCODED_DOUBLE:
return
InsnArg
.
lit
(
Double
.
doubleToLongBits
((
Double
)
value
),
ArgType
.
DOUBLE
);
case
ENCODED_STRING:
// noinspection RedundantCast
return
(
String
)
value
;
case
ENCODED_TYPE:
...
...
jadx-core/src/main/java/jadx/core/utils/ImmutableList.java
浏览文件 @
cd612b45
...
...
@@ -88,8 +88,8 @@ public final class ImmutableList<E> implements List<E>, RandomAccess {
@Override
public
Iterator
<
E
>
iterator
()
{
return
new
Iterator
<
E
>()
{
private
final
int
len
=
arr
.
length
;
private
int
index
=
0
;
private
int
len
=
arr
.
length
;
@Override
public
boolean
hasNext
()
{
...
...
jadx-core/src/main/java/jadx/core/utils/android/ExtDataInput.java
浏览文件 @
cd612b45
...
...
@@ -84,7 +84,7 @@ public class ExtDataInput extends DataInputDelegate {
@SuppressWarnings
(
"InnerAssignment"
)
public
final
int
skipBytes
(
int
n
)
throws
IOException
{
int
total
=
0
;
int
cur
=
0
;
int
cur
;
while
((
total
<
n
)
&&
((
cur
=
super
.
skipBytes
(
n
-
total
))
>
0
))
{
total
+=
cur
;
...
...
jadx-core/src/main/java/jadx/core/xmlgen/BinaryXMLParser.java
浏览文件 @
cd612b45
...
...
@@ -56,7 +56,7 @@ public class BinaryXMLParser extends CommonBinaryParser {
private
int
namespaceDepth
=
0
;
private
int
[]
resourceIds
;
private
RootNode
rootNode
;
private
final
RootNode
rootNode
;
private
String
appPackageName
;
public
BinaryXMLParser
(
RootNode
rootNode
)
{
...
...
jadx-core/src/main/java/jadx/core/xmlgen/ResourcesSaver.java
浏览文件 @
cd612b45
...
...
@@ -20,7 +20,7 @@ public class ResourcesSaver implements Runnable {
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
ResourcesSaver
.
class
);
private
final
ResourceFile
resourceFile
;
private
File
outDir
;
private
final
File
outDir
;
public
ResourcesSaver
(
File
outDir
,
ResourceFile
resourceFile
)
{
this
.
resourceFile
=
resourceFile
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录