Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
colcode
jadx
提交
c59b65e7
J
jadx
项目概览
colcode
/
jadx
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jadx
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c59b65e7
编写于
9月 28, 2013
作者:
S
Skylot
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
build: add 'dist' task
上级
bd4c61d3
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
43 addition
and
39 deletion
+43
-39
.travis.yml
.travis.yml
+1
-1
README.md
README.md
+8
-8
build.gradle
build.gradle
+13
-7
jadx-core/src/main/java/jadx/core/Consts.java
jadx-core/src/main/java/jadx/core/Consts.java
+1
-3
jadx-core/src/main/java/jadx/core/Jadx.java
jadx-core/src/main/java/jadx/core/Jadx.java
+20
-0
jadx-core/src/main/java/jadx/core/utils/Utils.java
jadx-core/src/main/java/jadx/core/utils/Utils.java
+0
-20
未找到文件。
.travis.yml
浏览文件 @
c59b65e7
...
...
@@ -3,7 +3,7 @@ jdk:
-
oraclejdk7
-
openjdk7
-
openjdk6
script
:
gradle clean build
samples
script
:
gradle clean build
notifications
:
email
:
-
skylot@gmail.com
README.md
浏览文件 @
c59b65e7
...
...
@@ -16,7 +16,7 @@ Latest version available at
git clone https://github.com/skylot/jadx.git
cd jadx
./gradlew
clean build
./gradlew
dist
(on Windows, use
`gradlew.bat`
instead of
`./gradlew`
)
...
...
@@ -37,13 +37,13 @@ Run **jadx** on itself:
```
jadx[-gui] [options] <input file> (.dex, .apk or .jar)
options:
-d, --output-dir
- output directory
-j, --threads-count
- processing threads count
-f, --fallback
- make simple dump (using goto instead of 'if', 'for', etc)
--cfg
- save methods control flow graph
--raw-cfg
- save methods control flow graph (use raw instructions)
-v, --verbose
- verbose output
-h, --help
- print this help
-d, --output-dir - output directory
-j, --threads-count - processing threads count
-f, --fallback - make simple dump (using goto instead of 'if', 'for', etc)
--cfg
- save methods control flow graph to dot file
--raw-cfg - save methods control flow graph (use raw instructions)
-v, --verbose - verbose output
-h, --help - print this help
Example:
jadx -d out classes.dex
```
...
...
build.gradle
浏览文件 @
c59b65e7
...
...
@@ -12,16 +12,17 @@ subprojects {
gradle
.
projectsEvaluated
{
tasks
.
withType
(
Compile
)
{
options
.
compilerArgs
<<
"-Xlint"
<<
"-Xlint:unchecked"
<<
"-Xlint:deprecation"
if
(!
"${it}"
.
contains
(
":jadx-samples:"
))
{
options
.
compilerArgs
<<
"-Xlint"
<<
"-Xlint:unchecked"
<<
"-Xlint:deprecation"
}
}
}
jar
{
version
=
jadxVersion
}
manifest
{
mainAttributes
(
'jadx-version'
:
jadxVersion
)
manifest
{
mainAttributes
(
'jadx-version'
:
jadxVersion
)
}
}
dependencies
{
...
...
@@ -48,10 +49,16 @@ task pack(type: Zip, dependsOn: copyArtifacts) {
from
copyArtifacts
.
destinationDir
}
task
build
(
dependsOn:
pack
)
{
task
dist
(
dependsOn:
pack
)
{
description
=
'Build jadx distribution zip'
}
task
samples
(
dependsOn:
'jadx-samples:samples'
)
{
}
task
build
(
dependsOn:
[
dist
,
samples
])
{
}
task
clean
(
type:
Delete
)
{
delete
buildDir
}
...
...
@@ -59,4 +66,3 @@ task clean(type: Delete) {
task
wrapper
(
type:
Wrapper
)
{
gradleVersion
=
'1.8'
}
jadx-core/src/main/java/jadx/core/Consts.java
浏览文件 @
c59b65e7
package
jadx.core
;
import
jadx.core.utils.Utils
;
public
class
Consts
{
public
static
final
String
JADX_VERSION
=
Utils
.
getJadx
Version
();
public
static
final
String
JADX_VERSION
=
Jadx
.
get
Version
();
public
static
final
boolean
DEBUG
=
false
;
...
...
jadx-core/src/main/java/jadx/core/Jadx.java
浏览文件 @
c59b65e7
...
...
@@ -19,10 +19,15 @@ import jadx.core.dex.visitors.regions.ProcessVariables;
import
jadx.core.dex.visitors.regions.RegionMakerVisitor
;
import
jadx.core.dex.visitors.typeresolver.FinishTypeResolver
;
import
jadx.core.dex.visitors.typeresolver.TypeResolver
;
import
jadx.core.utils.Utils
;
import
java.io.File
;
import
java.io.IOException
;
import
java.net.URL
;
import
java.util.ArrayList
;
import
java.util.Enumeration
;
import
java.util.List
;
import
java.util.jar.Manifest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -73,4 +78,19 @@ public class Jadx {
passes
.
add
(
new
CodeGen
(
args
));
return
passes
;
}
public
static
String
getVersion
()
{
try
{
Enumeration
<
URL
>
resources
=
Utils
.
class
.
getClassLoader
().
getResources
(
"META-INF/MANIFEST.MF"
);
while
(
resources
.
hasMoreElements
())
{
Manifest
manifest
=
new
Manifest
(
resources
.
nextElement
().
openStream
());
String
ver
=
manifest
.
getMainAttributes
().
getValue
(
"jadx-version"
);
if
(
ver
!=
null
)
return
ver
;
}
}
catch
(
IOException
e
)
{
LOG
.
error
(
"Can't get manifest file"
,
e
);
}
return
"dev"
;
}
}
jadx-core/src/main/java/jadx/core/utils/Utils.java
浏览文件 @
c59b65e7
...
...
@@ -3,14 +3,10 @@ package jadx.core.utils;
import
jadx.core.utils.exceptions.JadxRuntimeException
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.io.StringWriter
;
import
java.net.URL
;
import
java.util.Enumeration
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.jar.Manifest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -126,22 +122,6 @@ public class Utils {
return
end
;
}
public
static
String
getJadxVersion
()
{
try
{
Enumeration
<
URL
>
resources
=
Utils
.
class
.
getClassLoader
().
getResources
(
"META-INF/MANIFEST.MF"
);
while
(
resources
.
hasMoreElements
())
{
Manifest
manifest
=
new
Manifest
(
resources
.
nextElement
().
openStream
());
String
ver
=
manifest
.
getMainAttributes
().
getValue
(
"jadx-version"
);
if
(
ver
!=
null
)
return
ver
;
}
}
catch
(
IOException
e
)
{
LOG
.
error
(
"Can't get manifest file"
,
e
);
}
return
"dev"
;
}
public
static
void
makeDirsForFile
(
File
file
)
{
File
dir
=
file
.
getParentFile
();
if
(!
dir
.
exists
())
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录