About
Bytecode Viewer (BCV) is an easy-to-use Java & Android Reverse Engineering Suite!
BCV is designed to be extremely user and beginner-friendly, this means everything is accessible through an interface such as settings, tools, etc.
To start, simply drag your Jar/APK/Class file into the resource list.
How To - Java Importing
Java resources have no special preprocessing before you open them.
Import your Jar/Class/WAR/EAR file via the File>Open menu in Bytecode Viewer. (CTRL + O)
How To - Android Importing
Android resources have three options for preprocessing:
1). Decode Resources
2). Enjarify
3). Dex2Jar (d2j)
1). Decode Resources will run APKTool to decode any packed android-specific resources
2). Enjarify will convert the Android Dalvik Bytecode to Java Bytecode
3). Dex2Jar will convert the Android Dalvik Bytecode to Java Bytecode
Import your APK/WAPK/DEX file via the File>Open menu in Bytecode Viewer. (CTRL + O)
How To - File Navigation
To use the resource list - (Note: it will say "Files" on the title bar) - you can select all of the resources added into BCV.
Any archive (Zip, Jar, ETC.) will opened.
To select a resource click + button for each folder.
Using the search pane inside of the resource list you can search by file name and extension.
For case-sensitivity enable the checkbox labeled "Exact".
Settings
- Fat Jar: {fatJar}
- Java: {java}
- Javac: {javac}
- Python 2.7 (or PyPy): {python}
- Python 3.X (or PyPy): {python3}
- RT.jar: {rt}
- Optional Lib: {lib}
- BCV Dir: {bcvDir}
- Temp Dir: {tempDir}
- Krakatau Dir: {krakatauDir}
- Enjarify Dir: {enjarifyDir}
- BCV Krakatau version: v{krakatauVersion}
- BCV Enjarify version: v{enjarifyVersion}
Command Line Interface (CLI)
- -help Displays the help menu
- -list Displays the available decompilers
- -decompiler [decompiler] Selects the decompiler, procyon by default
- -i [input file] Selects the input file (Jar, Class, APK, ZIP, DEX all work automatically)
- -o [output file] Selects the output file (Java or Java-Bytecode)
- -t [target classname] Must either be the fully qualified classname or "all" to decompile all as zip
- -nowait Doesn't wait for the user to read the CLI messages
File
- Add (Ctrl + O) - If you add a jar/zip BCV will unzip it, if you add an APK or DEX file, BCV will run dex2jar
then run the jar input process.
- Reopen Recent File (Ctrl + L) - Reopens your last recent opened file.
- New Workspace (Ctrl + N) - It clears the opened jars/resources.
- Run (Ctrl + R) - Runs the classfiles you've loaded into BCV in a secure sandboxed JVM instance that you can
fully debug.
- Compile (Ctrl + T) - Tries to compile all of the editable panes you've selected, if it's Java it'll compile with
Ranino. Krakatau and *Smali use their own assemblers.
- Save As Jar - Export the class files and loaded resources as a runnable Jar file.
- Save As DEX - Run jar2dex and export the Classfiles as DEX.
- Save Files As - Save all the Classfiles and resources as a zip.
- Save Java File As - Save the currently opened decompiled Classfile.
- Save Java Files As - Save all of the decompiled Classfiles as a zip.
- Recent Files - Last 25 files/directories you've opened with BCV.
- About - A small information window about BCV.
- Exit - Closes BCV.
View Panes
- Editable - Defines if that viewing pane will be editable.
- None - Nothing will be displayed.
- Procyon - Decompiles with Procyon decompiler.
- CFR - Decompilers with CFR decompiler.
- FernFlower - Decompiles with FernFlower decompiler.
- JD-GUI - Decompiles with JD-GUI decompiler.
- Krakatau Java - Decompiles with Krakatau decompiler.
- Krakatau Bytecode - Disassembles with Krakatau disassembler.
- Smali - Disassembles with Smali.
- Bytecode - Decompiles the Bytecode via CFIDE. Not Editable.
- Hexcode - Shows the classfile in a hex viewer. Not Editable.
Settings
- Compile On Save - If selected whenever you do one of the File>Save * functions it will try to compile before it
saves.
- Compile On Refresh - If selected whenever you press refresh it compile before it reloads the resource/class.
- Update Check - If selected it queries https://github.com/Konloch/bytecode-viewer to ensure you've got the latest
version.
- Refresh On View Change - If selected whenever you change an option in the View Panes it will refresh the
currently opened resources/class.
- Decode APK Resources - If selected whenever you add an APK, it will first run APKTool.jar to decode the
resources.
- Set Python 2.7 Executable - Set the Python 2.7 executable if you want Krakatau decompiler/disassembler/assembler
to work.
- Set JRE RT Library - Set the JRE RT library for Krakatau decompiler.
Plugins
- Open Plugin - Open a .java plugin created for BCV.
- Recent Plugins - Last 25 plugins you've opened with BCV.
- Code Sequence Diagram - Builds a crude code sequence diagram for the classfile that's currently opened.
- Malicious Code Scanner - Allows you to define what to search for, and outputs what it found.
- Show Main Methods - Detects and outputs all of the public static void main(String[]) functions.
- Show All Strings - Grabs then outputs all of the strings in every classfile.
- Replace Strings - Allows you to do a simple permanent .replace on the classfile strings, very useful for URL swapping.
- Allatori String Decrypter - Decrypts the Allatori obfuscated/encrypted strings.
- ZKM String Decrypter - Decrypts the ZKM obfuscated/encrypted strings.
- ZStringArray String Decrypter - Decrypts the ZStringArray obfuscated/encrypted strings.
Code from various projects has been used, including but not limited to
- J-RET by WaterWolf
- JHexPane by Sam Koivu
- RSynaxPane by Robert Futrell
- Commons IO by Apache
- ASM by OW2
- FernFlower by Stiver
- Procyon by Mstrobel
- CFR by Lee Benfield
- CFIDE by Bibl
- Smali by JesusFreke
- Dex2Jar by pxb1988
- Krakatau by Storyyeller
- JD-GUI + JD-Core by The Java-Decompiler Team
- Enjarify by Storyyeller
Notes
- If BCV fails to boot simply append -clean as an argument to clean the lib directory.
- Relax and take notes
- BCV was created out of love for Java Reverse engineering.
- You can join our Discord server at https://discord.gg/aexsYpfMEf!
- Bytecode Viewer's Homepage is https://bytecodeviewer.com