Search code examples
androidandroid-studioreverse-engineeringdecompiling

Is it possible to use Android Studio's decompiler from command line?


I'm a begginner in android pentest and I'm using some decompiler like jadx but sometimes It does'nt work on decompiling some classes,

but when I drag and drop the .class file in android studio it decompiles it.

So is there a tool that use the android decompiler to decompile android application ? Or is there any way to decompile a complete APK without drag & droping each class files to android studio ?

Thank you


Solution

  • Look here: $(Android Studio)/plugins/java-decompiler/lib/java-decompiler.jar

    Running from command line:

    $ java -jar java-decompiler.jar org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler
    

    Sources: https://github.com/JetBrains/intellij-community/tree/master/plugins/java-decompiler/engine

    You can decompile whole *.jar at once if you wish.