0

Since React Native 0.60.4 developers can opt-in to use the Hermes JS Engine. This generates an index.android.bundle binary that contains Hermes JS bytecode.

The Hermes documentation mentions hbcdump which is described as a "Hermes bytecode disassembler"

By using hbcdump -pretty-disassemble -c disassemble -out out.txt index.android.bundle I do get something that is at least a little more human readable but it does not look like it can be compiled back again and is not easy to work with.

How can I decompile Hermes JS bytecode into JavaScript?
Alternatively: How can I modify the bytecode? Is there a tool that understands this bytecode?

2

My friend made this tool: hbctool, a Hermes bytecode disassembler/assembler.

This will help you disassemble the file into a more readable format (similar to hbcdump), so you can modify and re-assemble it.

1
  • Is there any way to decompile the bytecode to readable javascript? – janosch Jun 25 at 10:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.