How ollide/intellij-java2smali works
java2smali is an IntelliJ IDEA/Android Studio plugin that turns a selected Java or Kotlin file into a .smali file and opens it in the editor. The documented workflow is represented by the action, IDE build, class-to-dex conversion, dex disassembly, and editor display stages. The sampled source supports these runtime links; README documents dx and baksmali, while plugin registration details were not sampled.
Main entry points: DexCompiler.kt Dex compiler · Class2DexHelper.kt Class-to-dex helper · Dex2SmaliHelper.kt Dex disassembler helper · GenerateAction.kt Generate action
Components 16
IDE workflow
- Java/Kotlin source
- Generate action
src/main/kotlin/org/ollide/java2smali/GenerateAction.kt - Dex compiler
src/main/kotlin/org/ollide/java2smali/DexCompiler.kt - Task API adapter
src/main/kotlin/org/ollide/java2smali/SupportProjectTaskManager.kt - IDE project build
- Compiled class files
- IDE editor
Conversion
- Class-to-dex helper
src/main/kotlin/org/ollide/java2smali/Class2DexHelper.kt - Android dx
- Dex file
- Dex disassembler helper
src/main/kotlin/org/ollide/java2smali/Dex2SmaliHelper.kt - Baksmali library
- Smali output
Logging
- Log output stream
src/main/kotlin/org/ollide/java2smali/log/LogOutputStream.kt - IDE logger
Other components
- IDE user
Connections 18
- IDE user → Java/Kotlin source: selects
- IDE user → Generate action: invokes
- Generate action → Dex compiler: starts
- Dex compiler → Task API adapter: runs build via
- Task API adapter → IDE project build: dispatches
- IDE project build → Compiled class files: compiles
- Dex compiler → Compiled class files: locates
- Dex compiler → Class-to-dex helper: converts via
- Class-to-dex helper → Android dx: invokes
- Android dx → Dex file: writes
- Dex compiler → Dex disassembler helper: disassembles via
- Dex disassembler helper → Dex file: reads
- Dex disassembler helper → Baksmali library: invokes
- Baksmali library → Smali output: writes
- Dex compiler → IDE editor: opens output in
- IDE editor → Smali output: displays
- Class-to-dex helper → Log output stream: routes tool output
- Log output stream → IDE logger: logs