Giter Site home page Giter Site logo

huanli233 / multidexlib2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from auermich93/multidexlib2

0.0 0.0 0.0 222 KB

Multi-dex extensions for dexlib2

Home Page: https://dexpatcher.github.io/

License: GNU General Public License v3.0

Java 100.00%

multidexlib2's Introduction

multidexlib2

Multi-dex extensions for dexlib2.

Maven Central Build Status

This is a free software (GPLv3+) library on top of dexlib2 that features:

  • Multi-dex reading and writing.
  • Optional management of the content of the main dex file when writing multi-dex.
  • Simplified read/write access to multi-dex containers as plain-old dexlib2 DexFile objects, making it trivial to add multi-dex support to existing non-multi-dex-aware dexlib2 clients.
  • Faster dex reads than plain dexlib2.
  • Optional multi-threaded multi-dex writes that deliver greatly increased write performance.
  • Automatic management of dex version, dex opcodes, and API level.
  • Configurable naming of multi-dex member files.
  • Progress logging to a client-provided logger.

Limitations:

  • Only supports dex files. (Does not support odex/oat files.)
  • Only writes dex files to directories. (Does not write into zip files.)

DISTRIBUTION

Releases of multidexlib2 are distributed with coordinates com.github.lanchon.dexpatcher:multidexlib2 through the Maven Central Repository, with version numbers starting at 2.2.0 and matching the version of dexlib2 they were built against. Release changelog is available here.

USAGE

Interface:

  • MultiDexIO: read and write potentially multi-dex containers.
    • readDexFile(): read potentially multi-dex container and return a single, merged DexFile.
    • readMultiDexContainer(): read potentially multi-dex container and return a MultiDexContainer.
    • writeDexFile(): write potentially multi-dex container from a single DexFile.
  • RawDexIO: read and write single dex files (supersedes invoking dexlib2 directly).

Parameters:

  • boolean multiDex: true to enable multi-dex support.
  • File file: file or directory to read or write.
  • DexFileNamer namer: set to new BasicDexFileNamer().
  • Opcodes opcodes: null to auto-detect.
  • int maxDexPoolSize: set to DexIO.DEFAULT_MAX_DEX_POOL_SIZE.
  • int threadCount: thread count for multi-threaded multi-dex writes.
    • 1 to force single-threaded writes.
    • 0 to auto-detect optimum thread count.
  • int minMainDexClassCount, boolean minimalMainDex: main dex file content management.
    • 0, false to disable main dex management.
  • DexIO.Logger logger: null to disable logging.

Sample:

DexPatcher's file processor is a simple yet production-quality client of multidexlib2.

multidexlib2's People

Contributors

lanchon 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.