Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Travis Build Status AppVeyor Build status Quality Gate status

Simple plugin for IntelliJ IDEA & Android Studio to easily compile Java & Kotlin files to smali.

Have you ever compiled and packaged a dummy Android application just to grab some Java sources in smali? Stop that! Transforming Java to smali just got easier.


  1. create or open a Java source file with your desired functionality
  2. click 'Build' and 'Compile to smali'
  3. wait while IDEA's indicating the compilation process
  4. the smali file is opened automatically in your editor

java2smali usage gif


java2smali is available at JetBrains Plugin Repository and can therefore be found in your IDE's plugin manager! Alternatively, you can download the plugin from the release section.

Build From Source

This plugin uses JetBrains gradle-intellij-plugin and can easily build from source.

Clone the repository:

git clone
cd intellij-java2smali

Build the plugin with Gradle:

./gradlew buildPlugin

The plugin can be found in /build/distributions/java2smali-$


To enable debug logging of the plugin, select Help -> Diagnostic Tools -> Debug Log Settings… and add the following line:


Third-Party Libraries & Credits

  • dx from the Android platform-tools is used to create a .dex version of the compiled Java (.class) file
  • baksmali – a great disassembler for Android's dex format is used to create the final .smali output file
  • intellij-emberjs – a nicely written plugin which uses the gradle-intellij-plugin with Kotlin