{"repo":"romainguy/kotlin-explorer","free":true,"listed":false,"github":"https://github.com/romainguy/kotlin-explorer","clone":"git clone https://github.com/romainguy/kotlin-explorer.git","description":"Desktop tool to quickly explore disassembled Kotlin code.","language":"Kotlin","stars":970,"topics":["android","bytecode","dex","kotlin"],"license":"Apache-2.0","category":"dev_tool","readme_excerpt":"# Kotlin Explorer\n![image](art/app-icon/icon.iconset/icon_256x256.png)\n\nKotlin Explorer is a desktop tool to quickly and easily disassemble Kotlin code into:\n- Java bytecode\n- Android DEX bytecode\n- Android OAT assembly\n\nAfter launching Kotlin Explorer, type valid Kotlin code in the left pane, then click\n*Build > Build & Disassemble* or use `Cmd-Shift-D` on macOS, `Ctrl-Shift-D`\non Linux and Windows.\n\nBy default, the middle pane will show the Android DEX bytecode, and the right panel\nthe native assembly resulting from ahead of time compilation (AOT). You can control\nwhich panels are visible using the *View* menu.\n\n![./art/kotlin-explorer.png](./art/kotlin-explorer.png)\n\n# Features\n\n- *Build > Optimize with R8*: turn on R8 optimizations. Turning this on will affect the\n  ability to see corresponding source line numbers in the byte code and DEX outputs.\n- *View > Sync Lines*: synchronize the current line in the source, byte code, and DEX\n  panels. This feature may require R8 optimizations to be turned off to work properly.\n- *View > Presentation Mode*: increase the font size to make the content more visible\n  when projected.\n- *Build > Build on Startup*: to automatically launch a compilation when launching the\n  app.\n- *Build > Run*: compile the Kotlin source code and run it locally. Any output is sent\n  to the logs panel.\n- Clicking a jump instruction will show an arrow to the jump destination.\n- Shows the number of instructions and branches per method.\n- Click a disassembled instruction or register to highlight all occurrences.\n- Inline aarch64 (ARM 64 bit) documentation. Use *View > Show Logs & Documentation*.\n\n# Kotlin Explorer and R8\n\nYou can use *Build > Optimize with R8* to optimize the compiled code with the R8 tool.\nBy default, all public classes/members/etc. will be kept, allowing you to analyze them\nin the disassembly panels.\n\nHowever, keeping everything is not representative of what R8 will do on an actual\napplication so you can disable that feature, and instead use the `@Keep` annotation\nto choose an entry point leading to the desired disassembly. You can also create a\n`fun main()` entry point and call your code from there. Be careful to not use constants\nwhen calling other methods as this may lead to aggressive optimization by R8.\n\n# Running Kotlin Explorer\n\nRun Kotlin Explorer with `./gradlew jvmRun`.\n\nKotlin Explorer needs to be told where to find the Android SDK and the Kotlin compiler.\nUnless you've set `$ANDROID_HOME` and `$KOTLIN_HOME` properly, Kotlin Explorer will ask\nyou to enter the path to those directories.\n\nFor `$ANDROID_HOME`, use the path to the root of the Android SDK (directory containing\n`build-tools/`, `platform-tools/`, etc.). Android Studio for macOS stores this in\n`$HOME/Library/Android/sdk`.\n\nFor `$KOTLIN_HOME`, use the path to the root of your\n[Kotlin installation](https://kotlinlang.org/docs/command-line.html). This directory\nshould contain `bin/kotlinc` and `lib/kotlin-stdlib-*.jar` for instance.\n\nKotlin explorer also requires `java` and `javap` to be in your `$PATH`.\n\n> [!IMPORTANT]  \n> DEX bytecode and OAT assembly will only be displayed if you have an Android\n> device or emulator that can be successfully reached via `adb`. The device\n> must be recent enough to host the `oatdump` tool on its system image.\n\n# License\n\nPlease see [LICENSE](./LICENSE).\n","default_branch":"main","files":95,"tree":[".github/workflows/presubmit.yml",".github/workflows/release.yml",".gitignore",".idea/.gitignore",".idea/codeStyles/Project.xml",".idea/codeStyles/codeStyleConfig.xml",".idea/gradle.xml",".idea/kotlinc.xml",".idea/misc.xml",".idea/vcs.xml","LICENSE","README.md","art/app-icon/icon.icns","art/app-icon/icon.ico","art/app-icon/icon.iconset/icon_128x128.png","art/app-icon/icon.iconset/icon_128x128@2x.png","art/app-icon/icon.iconset/icon_16x16.png","art/app-icon/icon.iconset/icon_16x16@2x.png","art/app-icon/icon.iconset/icon_256x256.png","art/app-icon/icon.iconset/icon_256x256@2x.png","art/app-icon/icon.iconset/icon_32x32.png","art/app-icon/icon.iconset/icon_32x32@2x.png","art/app-icon/icon.iconset/icon_512x512.png","art/app-icon/icon.iconset/icon_512x512@2x.png","art/app-icon/kotlin-explorer.afphoto","art/kotlin-explorer.png","build.gradle.kts","compose-desktop.pro","compose-stability.config","gradle.properties","gradle/libs.versions.toml","gradle/wrapper/gradle-wrapper.jar","gradle/wrapper/gradle-wrapper.properties","gradlew","gradlew.bat","scripts/.gitignore","scripts/aarch64.json","scripts/help-generator-arm.py","settings.gradle.kts","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/DependencyCache.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/Disassembly.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/DocumentChangeListener.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/KotlinExplorer.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/Logger.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/Menu.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/OS.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/Paths.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/PeekingIterator.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/Process.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/ProgressUpdater.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/Regex.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/Settings.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/SourceTextArea.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/Splitter.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/State.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/String.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/Swing.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/SyntaxTextArea.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/Theme.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/build/ByteCodeDecompiler.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/build/DexCompiler.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/build/KolinCompiler.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/bytecode/ByteCodeParser.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/code/Aarch64Docs.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/code/Code.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/code/CodeBuilder.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/code/CodeContent.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/code/CodeStyle.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/code/CodeTextArea.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/code/DataModels.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/code/Documentation.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/code/OpCodeDoc.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/code/SyntaxStyle.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/dex/DexDumpParser.kt","src/jvmMain/kotlin/dev/romainguy/kotlin/explorer/oat/OatDumpParser.kt","src/jvmMain/resources/icons/done.svg","src/jvmMain/resources/icons/error.svg","src/jvmMain/resources/icons/icon.ico","src/jvmMain/resources/themes/kotlin_explorer.xml","src/jvmMain/resources/themes/kotlin_explorer_disassembly.xml","src/jvmTest/kotlin/dev/romainguy/kotlin/explorer/bytecode/ByteCodeParserTest.kt","src/jvmTest/kotlin/dev/romainguy/kotlin/explorer/testing/Builder.kt","src/jvmTest/kotlin/testData/Issue_45-Bytecode.expected","src/jvmTest/kotlin/testData/Issue_45.javap","src/jvmTest/kotlin/testData/Issue_45.kt","src/jvmTest/kotlin/testData/TryCatch-Bytecode.expected","src/jvmTest/kotlin/testData/TryCatch.javap","src/jvmTest/kotlin/testData/TryCatch.kt","token-makers/build.gradle.kts","token-makers/src/main/java/dev/romainguy/kotlin/explorer/code/DexTokenMaker.flex","token-makers/src/main/java/dev/romainguy/kotlin/explorer/code/DexTokenMaker.java","token-makers/src/main/java/dev/romainguy/kotlin/explorer/code/KotlinTokenMaker.flex","token-makers/src/main/java/dev/romainguy/kotlin/explorer/code/KotlinTokenMaker.java","token-makers/src/main/java/dev/romainguy/kotlin/explorer/code/OatTokenMaker.flex","token-makers/src/main/java/dev/romainguy/kotlin/explorer/code/OatTokenMaker.java"],"storefront":"/r/romainguy","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/romainguy/kotlin-explorer/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}