Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Allow 0 ResourceTableChunks and TypeSpecChunk to be null #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rossbacher
Copy link

When processing .apks outputted from bundletool I noticed that some would not process by arscblamer (and also don't work in the apk analyzer tool in Android Studio.

While debugging I found two issues that this PR is fixing

  1. ResourceTableChunk checks if there is at least one entry. But there might be 0 entries (if this is e.g. a split apk for an abi split)
  2. TypeSpecChunk can be null I have not found out the reason why but as it does handle the null check one layer up anyway, I am allowing it.

These two changes made our .apks process so I wanted to share this upstream.

split apk for abi)

Allow TypeSpecChunk to be null as this can happen.
@google-cla
Copy link

google-cla bot commented Oct 12, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@nitinsethi86
Copy link

@rossbacher hey Ross, not sure if this is the right forum to ask for help. But the help for this tool is really sparse. I was trying to use it to analyse the resources.arsc file. Can you help with running the tool as mentioned in the read me. I see the below error when I try.

nitinsethi@Nitins-MacBook-Pro ~ % bazel --version
bazel 4.0.0-homebrew
nitinsethi@Nitins-MacBook-Pro ~ % bazel run //java/com/google/devrel/gmscore/tools/apk/arsc:ArscDumper -- --apk=/Users/nitinsethi/Teams-dev-x86-debug-17Apr.apk --keys > output.csv
ERROR: The 'run' command is only supported from within a workspace (below a directory having a WORKSPACE file).
See documentation at https://docs.bazel.build/versions/master/build-ref.html#workspace

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants