3

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 Answers 2

6

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.

2
  • 2
    Is there any way to decompile the bytecode to readable javascript?
    – user37355
    Commented Jun 25, 2021 at 10:56
  • 1
    It only supports older versions of HBC unfortunately Commented Jun 2, 2022 at 0:28
2

Refer below link someone added support for version 84 in his forked repo

hbc-v84

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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