Decompiling apk to Dex format
1. Download Dex2Jar (Android runs applications which are in Dalvik Executable (.dex) format).
2. Run the command to convert apk to jar
dex2jar targetapp.apk file(./dex2jar targetapp.apk on terminal)
Viewing/Decompiling the Jar files to Java
1. Open ‘targetapp.apk.dex2jar.jar’ with jd-gui
2. File > Save All Sources to sava the class files in jar to java files.