Bat - library to process and analyze byte code
The last couple of years I was busy with processing byte code with an amazing tool called ProGuard / DexGuard. After deciding to step back and take a break, I used the available spare time to work on my own tool to process any kind of byte code (class file, dex file) and perform some useful analysis on them.
You can access my initial take on this in my GitHub repo bat which is an acronym for byte code analysis toolkit.
The first useful utility that I created is a tool that copies the behavior of dexdump with some additional options, e.g. ability to filter the output for specific classes only:
The next thing to work on will be an explainer tool, which is intended as a utility to help with the shrinking capability of tools like ProGuard or R8. In general these tools work amazingly well, but it is quite difficult to understand why something is actually kept from being shrunk or which specific rule is responsible for that. The explainer will trace the exact reason why a certain class / method / field is being kept. Something that might also be very useful is the other way around: what items will be kept because of a specific method or class. A tool like that might help to reduce dependencies or complexity in the code.
Feel free to leave comments on other useful things that you would like to see in the near future.
Comments
No comments found for this article.
Join the discussion for this article on this ticket. Comments appear on this page instantly.