Samdogcom / appdbg

make it possible to run android dex file with original Java Virtual Machine.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Appdbg

make it possible to run android dex file in original Java Virtual Machine.

Features

  • 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!!!

Start

  • only test fully with jdk 1.8 on OSX!!!
  1. open the project with IDEA

  2. add vm option => -Xverify:none

  3. patch jdk_path/...../libjvm.dylib,which make it possible to load class,the name begin with "java"

  4. use the jre you modified(or use jdk in appdbg-JDK)

  5. exclude temp dir at project root dir.(if it exist)

  6. change idea settings

  • set gradle jdk version with the patched jdk
  • set gradle java home with the patched jdk in gradle.properties
  1. io redirect feature need the rt.jar generated in JDKmodifiy

  2. build test apk by test-app sub project

  3. run main

Publish to mavenLocal

  1. run command ./gradlew publishToMavenLocal
  2. implementation "jmp0.appdbg:core:1.0-SNAPSHOT"

Implement native method with unidbg

auto implement reflection method by appdbg

  • invoke method
  • native code source
  • result

source line level debug

  1. implement IApkConfig and set generateJarFile and jarWithDebugInfo true,run code,and the jar file will be generated in libs/tempLibs dir
  2. sync gradle file,and IDEA will index it
  3. select one file you want to debug,and click the label.
  4. chose the source files generated at temp/apkName/decompile_source, click open button.
  5. set IApkConfig forceDecompile false,and set source line breakpoint.
  6. run code with debug mode!!!

About

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.

Thanks

About

make it possible to run android dex file with original Java Virtual Machine.

License:Apache License 2.0


Languages

Language:Kotlin 94.2%Language:Java 4.0%Language:C++ 1.2%Language:CMake 0.7%