github地址:https://github.com/CalebFenton/simplify
下载或更新:
git clone --recursive https://github.com/CalebFenton/simplify.git
or git submodule update --init --recursive
windows 编译命令:
G:\workspace\simplify>gradlew.bat fatjar
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
Download https://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom
Download https://repo1.maven.org/maven2/org/apache/commons/commons-parent/5/commons-parent-5.pom
Download https://repo1.maven.org/maven2/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1.pom
Download https://repo1.maven.org/maven2/net/sf/proguard/proguard-parent/5.2.1/proguard-parent-5.2.1.pom
Download https://repo1.maven.org/maven2/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1.pom
Download https://repo1.maven.org/maven2/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1.jar
Download https://repo1.maven.org/maven2/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1.jar
Download https://repo1.maven.org/maven2/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2.pom
Download https://repo1.maven.org/maven2/org/antlr/antlr-master/3.5.2/antlr-master-3.5.2.pom
Download https://repo1.maven.org/maven2/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2.jar
BUILD SUCCESSFUL in 2m 12s
9 actionable tasks: 9 executed
命令行使用方法:
G:\workspace\simplify>java -jar simplify/build/libs/simplify-1.2.1.jar -h
usage: java -jar simplify.jar <input> [options]
deobfuscates a dalvik executable
-et,--exclude-types <pattern> Exclude classes and methods which include
REGEX, eg: "com/android", applied after
include-types
-h,--help Display this message
-ie,--ignore-errors Ignore errors while executing and optimizing
methods. This may lead to unexpected behavior.
--include-support Attempt to execute and optimize classes in
Android support library packages, default:
false
-it,--include-types <pattern> Limit execution to classes and methods which
include REGEX, eg: ";->targetMethod\("
--max-address-visits <N> Give up executing a method after visiting the
same address N times, limits loops, default:
10000
--max-call-depth <N> Do not call methods after reaching a call dept
of N, limits recursion and long method chains,
default: 50
--max-execution-time <N> Give up executing a method after N seconds,
default: 300
--max-method-visits <N> Give up executing a method after executing N
instructions in that method, default: 1000000
--max-passes <N> Do not run optimizers on a method more than N
times, default: 100
-o,--output <file> Output simplified input to FILE
--output-api-level <LEVEL> Set output DEX API compatibility to LEVEL,
default: 15
-q,--quiet Be quiet
--remove-weak Remove code even if there are weak side
effects, default: true
-v,--verbose <LEVEL> Set verbosity to LEVEL, default: 0
G:\workspace\simplify>
通常执行命令:
G:\workspace\simplify>java -jar simplify/build/libs/simplify-1.2.1.jar -it 'org/cf' G:\workspace\simplify\simplify\src\test\resources\obfuscated-example -o g:\example.dex
Simplification complete:
total classes = 0
total methods = 0
optimized methods = 0
failed methods = 0
run time = 473 ms
Total optimizations:
Writing output to g:\example.dex
G:\workspace\simplify>