{"id":16953911,"url":"https://github.com/romainguy/kotlin-explorer","last_synced_at":"2025-05-15T03:05:03.775Z","repository":{"id":187789682,"uuid":"677575533","full_name":"romainguy/kotlin-explorer","owner":"romainguy","description":"Desktop tool to quickly explore disassembled Kotlin code.","archived":false,"fork":false,"pushed_at":"2025-05-08T22:56:45.000Z","size":26693,"stargazers_count":890,"open_issues_count":6,"forks_count":30,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-05-15T03:04:38.803Z","etag":null,"topics":["android","bytecode","dex","kotlin"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romainguy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-12T00:14:26.000Z","updated_at":"2025-05-14T23:21:08.000Z","dependencies_parsed_at":"2023-12-20T07:58:42.031Z","dependency_job_id":"809985c7-9a9d-4963-b74a-1cb9cf0ca19d","html_url":"https://github.com/romainguy/kotlin-explorer","commit_stats":{"total_commits":195,"total_committers":12,"mean_commits":16.25,"dds":0.2512820512820513,"last_synced_commit":"d42fe12f8d40b3e5b55a22032ea09aeb82397d72"},"previous_names":["romainguy/kotlin-explorer"],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romainguy%2Fkotlin-explorer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romainguy%2Fkotlin-explorer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romainguy%2Fkotlin-explorer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romainguy%2Fkotlin-explorer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romainguy","download_url":"https://codeload.github.com/romainguy/kotlin-explorer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254264765,"owners_count":22041793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","bytecode","dex","kotlin"],"created_at":"2024-10-13T22:08:17.641Z","updated_at":"2025-05-15T03:05:03.736Z","avatar_url":"https://github.com/romainguy.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 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 \u003e Build \u0026 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 \u003e 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 \u003e 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 \u003e Presentation Mode*: increase the font size to make the content more visible\n  when projected.\n- *Build \u003e Build on Startup*: to automatically launch a compilation when launching the\n  app.\n- *Build \u003e 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 \u003e Show Logs \u0026 Documentation*.\n\n# Kotlin Explorer and R8\n\nYou can use *Build \u003e 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\u003e [!IMPORTANT]  \n\u003e DEX bytecode and OAT assembly will only be displayed if you have an Android\n\u003e device or emulator that can be successfully reached via `adb`. The device\n\u003e must be recent enough to host the `oatdump` tool on its system image.\n\n# License\n\nPlease see [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromainguy%2Fkotlin-explorer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromainguy%2Fkotlin-explorer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromainguy%2Fkotlin-explorer/lists"}