Git Product home page Git Product logo

dexdumper's Introduction

DexDumper

     This is just a bridge,for specific app, you may needed to change some code to re-compile the project, note that it's just a gradle module, and it needs gradle-experimental plugin to compile, but standard gradle plugin is ok if you change build.gradle.

Actually, the plugin only works when it's running in the targeted process.So there's three way to work with it. 1.invoke it by xposed.I've implemented one,but too complex for newer to read.Here's an example
private Application mApplication;
private String mPackageName;
static Method DumpMethod;
if(DumpMethod==null){
   PackageManager pm = mApplication.getPackageManager();
   try {
         ApplicationInfo hookerApp = pm.getApplicationInfo("com.oslorde.dexdumper", PackageManager.GET_SHARED_LIBRARY_FILES);
         File out = mApplication.getDir(hookerApp.packageName, Context.MODE_PRIVATE);
         BaseDexClassLoader dexClassLoader = new BaseDexClassLoader(hookerApp.sourceDir, out, hookerApp.nativeLibraryDir, getClass().getClassLoader());
         Class DexHooker = dexClassLoader.loadClass("com.oslorde.extra.DexDumper");
         DumpMethod=DexHooker.getMethod("dumpDex", BaseDexClassLoader.class,String.class,int.class);
         } catch (Exception e) {}
}
DumpMethod.invoke(null,mApplication.getClassLoader(),storePath,mode);
2.replace the true application in the target apk file,load the true application in your custom application,keep the signature if there's a verification. But this manner may fail if there's a very strict verification. 3.load the application into this apk with required res,assets,dex file,snd then invoke the dumpdex method. ##Note: ####Since anti-detect is app depended,choose the right manner to deal with it. Some codes are tagged with todo, so you may need to ammend the code if these three cases are met 1.Total method replacement. the class along with the method is replaced by other class, instance method only, and static methods can be replaced totally without class change 2.Native method replacement. all the java codes are converted to native codes, and the native codes may be encrypted as well,so there may goes a very complex process. 3.Dex loaded by bytes directly by custom classloader. get it by reflection to get the cookie field. if it's stored by native code only, dlopen and dlsym

####Extra: 4.Dalvik support is a little bit experimental as there can be a lot of tricks dalvik runtime.'

5. I do suggest you to backsmali the dumped dex to find out potential problems since some code may be skip due to bugs(there may be some bugs I don't know) and after replacement, fix the application name in AndroidManifest.xml.

6.Not all of the classes in the dex file is valid and not all the dex file is valid.Generally, the biggest one is the right one,extra dex Files and classes can be ignored. 7.invoke example can be find in MainActivity.java.Don't run it in main thread

_Memory usage is optimized to a minimum so if you want a faster performance, write a c++ cache class like the ByteOut.java._

Chinese version introduction is aborted by my slow typing speed. English version is bad due to my poor English.Ha ha! Some codes are bad enough because it's my first c++ practice,but I am too lazy to'change it.

dexdumper's People

Contributors

qtiuto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.