Skip to content

Adding smali classes and multidexing #985

@pvertenten

Description

@pvertenten

I've written a few shell scripts that can take an arbitrary aar file and include the resources, classes, etc. in the aar and merge them in with an app decompiled with apktool.

It works flawlessly for most apps, but some apps have near the maximum number of methods for a single classes.dex, so when I copy the classes from the aar into the apk smali directory I will get a build error that the short value can't support the number of methods in that classes.dex.

Wondering if I am missing some other step.

Also I am not sure if there is any interest in adding this feature to apktool.

The feature opens up the apk, copies over the libraries, examines the public.xml and the R.txt in the aar, generates new ids for all of the resources, updates the ids.xml with the new resources, updates the public.xml with the new resources, smalis the classes from the aar and copies them into the app.

For most people the feature might not be that useful however, as they would need to edit some of the other code to actually use the newly included code, but it could be as simple as adding an additional service to AndroidManifest.xml etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions