Code Monkey home page Code Monkey logo

dexsplitter's Introduction

DexSplitter Solution

As we all know, Google has provided aapt plugin for parsing apk, we can get a list of apk files by using 'aapt l -v '. We can divide each res file(assets file) into the module project which it belongs to. But source code of the project can not be divided directly because it will be shrinked optimized and obfuscated. DexSplitter can help you to divide source code.

中文文档

Scenarios

  • Analyze contribution rate of each module to the apk size
  • Diff the size of each module in the apk for every sprint

Apk Split Result

Android Origin Build Release.apk

SplitDexApk

DexSplitter Build Release.apk

SplitDexApk

splitter_result.txt

SplitDexApk

ps:more details:extra/hack_description.txt extra/hook_details.txt

Demo Introduction

  •  The most important purpose of dexSplitter is to build apk which has special dex files
    
  •  You can use extra/dx.jar directly 
    
  •  Host app(lib:gson), library module moduleone(lib:GreenDAO), library module moduletwo(lib:universalimageloader)
    
  •  subdexeslist.txt is used for splitting dex, TestClassForMainDex.class is just a test file
    
  •  Third libs will not be obfuscated
    
  •  Android Support library is marked as android_sys
    
  •  subdexeslist.txt should not contain duplicated class files
    

Schematic Diagram

SplitDexApk

Implementation

  • Divide the dex files with class files
  • Build apk which has special dex files
  • Python files for collecting class files
  • Obfuscated class list for release version

Future

  • Signed apk
  • Generate tables about the proportion of module projects
  • Parse changes of dex files by comparing different apk versions
  • Divide the dex files by author, module etc.

License

  • Copyright (c) 2018-present, iQIYI, Inc. All rights reserved. Most source code in dexSplitter are MIT licensed. Some other source code have Apache licenses. Please refer to the LICENSE file for detailed information.

dexsplitter's People

Contributors

jjbheda avatar jwu26 avatar

Watchers

James Cloos 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.