Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do we need a classes.dex? #8

Closed
zhuowei opened this issue Oct 10, 2017 · 2 comments
Closed

Do we need a classes.dex? #8

zhuowei opened this issue Oct 10, 2017 · 2 comments

Comments

@zhuowei
Copy link

zhuowei commented Oct 10, 2017

My understanding of https://github.com/android/platform_frameworks_base/blob/b056324630b8adfeb38393bcab49f3b9c720f4fd/core/java/android/content/pm/PackageParser.java#L3486 is that FLAG_HAS_CODE would only be set (and a classes.dex required) if we have an element in the manifest. Since we don't have an application element, what happens if you delete classes.dex?

@nneonneo
Copy link
Contributor

nneonneo commented Oct 11, 2017

Nope, you're right - deleting classes.dex is OK now, and drops ~100 bytes off the final APK.

We're now at 224 bytes unsigned and 824 bytes signed.

Given that it's your idea, it would be nice to submit a PR deleting it (just remove the touch classes.dex or something). Merging is gonna be fun eventually...

@zhuowei
Copy link
Author

zhuowei commented Oct 11, 2017

@nneonneo nah, you can do it. Thanks for testing this and making it work!

nneonneo added a commit to nneonneo/ApkGolf that referenced this issue Oct 11, 2017
nneonneo added a commit to nneonneo/ApkGolf that referenced this issue Oct 11, 2017
nneonneo added a commit to nneonneo/ApkGolf that referenced this issue Oct 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants