Closed udezueoluomachi closed 1 year ago
Looks like you're trying to decompile an android React Native bundle - These aren't actually a JS bundle, which explains the reason for getting a syntax error. Android React Native bundles are compiled to Hermes bytecode.
This tool can only handle non-binary JS monolithic React Native Bundles (like the ones produced for iOS builds)
That said;
Since React Native 0.64, Hermes also runs on iOS. To enable Hermes for iOS, edit your ios/Podfile file and make the change illustrated below:
So this tool perhaps may become somewhat obsolete in the future.
https://github.com/P1sec/hermes-dec or https://github.com/bongtrop/hbctool looks like tools which can be used to decompile Hermes bytecode
rn-debundle ./resources/assets/index.android.bundle ./debundle
this is the error message that was returned to the console. `C:...\npm\node_modules\rn-debundle\node_modules\yargs\yargs.js:1193 else throw err ^
SyntaxError: Unexpected character '�' at Espree.raise (C:...\npm\node_modules\?[4mrn-debundle?[24m\node_modules\?[4mespree?[24m\lib\espree.js:190:25) at Espree.pp$9.getTokenFromCode (C:...\npm\node_modules\?[4mrn-debundle?[24m\node_modules\?[4macorn?[24m\dist\acorn.js:4708:10)
{ index: ?[33m0?[39m, lineNumber: ?[33m1?[39m, column: ?[33m1?[39m }`
OS : WINDOWS 10, NODE VERSION v16.13.0