A command-line interface for disassembling and assembling the Hermes Bytecode.
This video with MP4 format can be found at /image/hbctool_example.mp4.
To install hbctool, simply use pip:
pip install hbctool
hbctool --help to show the usage.
hbctool --help A command-line interface for disassembling and assembling the Hermes Bytecode. Usage: hbctool disasm <HBC_FILE> <HASM_PATH> hbctool asm <HASM_PATH> <HBC_FILE> hbctool --help hbctool --version Operation: disasm Disassemble Hermes Bytecode asm Assemble Hermes Bytecode Args: HBC_FILE Target HBC file HASM_PATH Target HASM directory path Options: --version Show hbctool version --help Show hbctool help manual Examples: hbctool disasm index.android.bundle test_hasm hbctool asm test_hasm index.android.bundle
For Android, the HBC file normally locates at
hbctool currently supports only Hermes Bytecode version 74.
Feel free to create an issue or submit the merge request. Anyway you want to contribute this project. I’m very happy about it.
However, please run the unit test before submiting the pull request.
cd hbctool python test.py
I use poetry to build this tool. To build it yourself, simply execute:
- Add the other Hermes bytecode versions
- Create a class abstraction
- Support overflow patching
- Do all TODO, NOTE, FIXME in source code