make it possible to run android dex file in original Java Virtual Machine.
- change every class before it will be loaded
- change every item of the class after it was loaded
- hook java method
- implement native method by yourself or unidbg...
- provide fake source line level debug ability powered by fernflower!!!
- only test fully with jdk 1.8 on OSX!!!
-
open the project with IDEA
-
add vm option => -Xverify:none
-
patch jdk_path/...../libjvm.dylib,which make it possible to load class,the name begin with "java"
-
use the jre you modified(or use jdk in appdbg-JDK)
-
change idea settings
- set gradle jdk version with the patched jdk
- set gradle java home with the patched jdk in gradle.properties
-
io redirect feature need the rt.jar generated in JDKmodifiy
-
build test apk by test-app sub project
-
run main
- run command
./gradlew publishToMavenLocal
implementation "jmp0.appdbg:core:1.0-SNAPSHOT"
auto implement reflection method by appdbg
- implement IApkConfig and set generateJarFile and jarWithDebugInfo true,run code,and the jar file will be generated in libs/tempLibs dir
- sync gradle file,and IDEA will index it
- select one file you want to debug,and click the label.
- chose the source files generated at temp/apkName/decompile_source, click open button.
- set IApkConfig forceDecompile false,and set source line breakpoint.
- run code with debug mode!!!
it's hard for me to implement all Android runtime well,if you can help me to make this project better,Thanks for your contribution.