bongtrop / hbctool

Hermes Bytecode Reverse Engineering Tool (Assemble/Disassemble Hermes Bytecode)
MIT License
444 stars 71 forks source link

HBC Version (84) Error #21

Closed dhaneshnarmatha closed 2 years ago

dhaneshnarmatha commented 2 years ago
# error
(hbctool) dnoscp@arupadaiveedu:~/Desktop/data/PATCH2$ hbctool disasm apktool/assets/index.android.bundle decompiled
[*] Disassemble 'apktool/assets/index.android.bundle' to 'decompiled' path
Traceback (most recent call last):
  File "/opt/tools/hbctool/bin/hbctool", line 8, in <module>
    sys.exit(main())
  File "/opt/tools/hbctool/lib/python3.10/site-packages/hbctool/__init__.py", line 61, in main
    disasm(args['<HBC_FILE>'], args['<HASM_PATH>'])
  File "/opt/tools/hbctool/lib/python3.10/site-packages/hbctool/__init__.py", line 33, in disasm
    hbco = hbc.load(f)
  File "/opt/tools/hbctool/lib/python3.10/site-packages/hbctool/hbc/__init__.py", line 29, in load
    assert version in HBC, f"The HBC version ({version}) is not supported."
AssertionError: The HBC version (84) is not supported.
# file info
(hbctool) dnoscp@arupadaiveedu:~/Desktop/data/PATCH2$ file apktool/assets/index.android.bundle 
apktool/assets/index.android.bundle: Hermes JavaScript bytecode, version 84
AlaaEdAouimeur commented 2 years ago

+1

dhaneshnarmatha commented 2 years ago

CLOSING THE ISSUE : Got the solution. from #12

@AlaaEdAouimeur, this worked for me. give it a try

# I did everything in a virtualenvironment
git clone https://github.com/niosega/hbctool.git
cd hbctool
git checkout origin/draft/hbc-v84
pip install -r requirements.txt
poetry install
hbctool disasm assets/index.android.bundle/ output