Simple plugin for IntelliJ IDEA & Android Studio to easily compile a Java file 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.
- create or open a Java source file with your desired functionality
- click 'Build' and 'Compile to smali'
- wait while IDEA's indicating the compilation process
- the smali file is opened automatically in your editor
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.
- dx from the Android platform-tools is used to create a .dex version of the compiled Java (.class) file http://developer.android.com/tools/help/index.html#tools-platform
- baksmali, a great disassembler for Android's dex format, is used to create the final .smali output file https://github.com/JesusFreke/smali