GithubHelp home page GithubHelp logo

yanghaiquan / dex-method-counts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mihaip/dex-method-counts

0.0 2.0 0.0 326 KB

Command-line tool to count per-package methods in Android .dex files

License: Apache License 2.0

Shell 2.41% Java 97.59%

dex-method-counts's Introduction

dex-method-counts

Simple tool to output per-package method counts in an Android DEX executable grouped by package, to aid in getting under the 65,536 referenced method limit. More details are in this blog post.

To run it with Ant:

$ ant jar
$ ./dex-method-counts path/to/App.apk # or .zip or .dex or directory

or with Gradle:

$ ./gradlew assemble
$ ./dex-method-counts path/to/App.apk # or .zip or .dex or directory

You'll see output of the form:

Read in 65490 method IDs.
<root>: 65490
    : 3
    android: 6837
        accessibilityservice: 6
        bluetooth: 2
        content: 248
            pm: 22
            res: 45
        ...
    com: 53881
        adjust: 283
            sdk: 283
        codebutler: 65
            android_websockets: 65
        ...
    Overall method count: 65490

Supported options are:

  • --include-classes: Treat classes as packages and provide per-class method counts. One use-case is for protocol buffers where all generated code in a package ends up in a single class.
  • --package-filter=...: Only consider methods whose fullly qualified name starts with this prefix.
  • --max-depth=...: Limit how far into package paths (or inner classes, with --include-classes) counts should be reported for.
  • --filter=[all|defined_only|referenced_only]: Whether to count all methods (the default), just those defined in the input file, or just those that are referenced in it. Note that referenced methods count against the 64K method limit too.

The DEX file parsing is based on the dexdeps tool from the Android source tree.

dex-method-counts's People

Contributors

almozavr avatar dmide avatar mihaip avatar

Watchers

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