Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature request: Skip assets #1605
tl;dr: It would be nice to be able to add e.g. -a to the decode command to skip assets altogether.
Questions to ask before submission
Short and simple -- would like to be able to skip extracting assets. As far as I've seen personally these can usually be extracted with a simple unzip tool, but regardless, extracting the assets is (at least in situations where I've been using apktool) often unnecessary and in some cases flat out undesirable (for instance, I have an APK here (which I don't think I can share) that's 260MB compressed, 1.6GB uncompressed, and all we're interested in in this particular case is some of the metadata).
Currently, we have 2 options that either skip sources or resources.
As you probably know, if we skip resources than we just pass the
Likewise for the sources, if enabled we just pass the
So enter assets. Right now we move them to the filesystem while remembering their compression. If we skipped assets they would be stuck in the original application and to the best of my knowledge short of making an "asset" zip in root, there is no way around keeping the compressed files outside the zip.
I'm not sure for the best course of action yet for this feature request.
(I responded to this earlier but either I can't reply-to-comment like Github seems to imply, something went wrong, or it went to your personal email instead or something.)
What I would expect in this case is that they are simply not extracted. Yes, this would mean that you can't rebuild the app as-is with the directory where everything else was extracted, but I'm not sure how else the feature would be interpreted. If it's a question of terminology, "don't extract" could be used instead of "skip". I doubt that in every usage of apktool the intent is to later rebuild the app.
If there were really intent to rebuild, I dunno, I'd say there'd need to be a separate feature for that that would request the original APK or something. At surface value I'd say rebuilding & skipping assets are simply mutually exclusive.
I don't have a problem adding an additional parameter for this. It may be an advanced command (thus only long version like
Let me get #1602 merged first as it touches the CLI/parameters and I can swing back to this.
Well, it's possible for there to be incompatible arguments; If you want to prevent any confusion then
At any rate, that all sounds good to me and