<commit_before># 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](http://blog.persistent.info/2014/05/per-package-method-counts-for-androids.html).

To use it:

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

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<commit_msg>Update README.md for Gradle support<commit_after># 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](http://blog.persistent.info/2014/05/per-package-method-counts-for-androids.html).

To run it with Ant:

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

or with Gradle:

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

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
{'fraction_non_alphanumeric': 0.0881578947368421, 'fraction_numerical': 0.05263157894736842, 'mean_word_length': 1.9882121807465618, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4834105', 'n_tokens_mistral': 531, 'n_tokens_neox': 442, 'n_words': 162}