Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Tool:Hermes-dec

From ReverseEngineering.wiki
Tool
Developer P1 Security
License AGPL-3.0
Website https://github.com/P1sec/hermes-dec
On this wiki Facts · Code · Notes · Topics

hermes-dec (AGPL-3.0, P1 Security) is a pure-Python disassembler, header parser and pseudo-code decompiler for React Native Hermes bytecode (HBC).

Overview

Three commands: hbc-file-parser (headers; output not stable over time), hbc-disassembler in out.hasm and hbc-decompiler in out.js. It uses only the Python 3 standard library; install with pipx, uv, snap or AUR. The README example input is assets/index.android.bundle, reported by file as "Hermes JavaScript bytecode, version 84". A non-Hermes React Native bundle is plain minified JavaScript.

Failure modes

The README states the decompiler output is pseudo-code, not valid JavaScript yet, because it does not reconstruct loops and conditional structures. Opcode documentation per version is at p1sec.github.io/hermes-dec. The README gives no version list, but the opcode modules in src/hermes_dec/parsers/hbc_opcodes/ at commit 2e796663e1fedb93dca51060797ebf3327b3fedb are hbc51, 58, 59, 61, 62, 68, 69, 70, 72, 73, 76, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90, 92, 95, 96, 97, 98 and 99 (bytecode versions with a definition); a bundle of another version has no opcode table, so check its version against this directory.

Background from the README

Hermes became the default React Native engine on Android with RN 0.70 (September 2022), opt-in since 0.60.2, iOS since 0.64.

Related

Technique:Choosing a decompiler, Format:Hermes bytecode (HBC).

Sources

Code & repositories

  • https://github.com/P1sec/hermes-dec @ 2e796663e1fedb93dca51060797ebf3327b3fedb · license: AGPL-3.0-only (declared by the contributor; GitHub's detector did not recognize LICENSE)
    hermes-dec HBC disassembler and decompiler
    Tested on: source read, not run: not run; README read · checked 2026-10-18