Execute adb shell. Use the pm list packages -f command to search the package list and check the path of the desired APK.
The reason for giving the -f option is to print the path of the package.
#adb shell shell@android:/ $ pm list packages -f package:/data/app/xxx.yyy.zzzz.apk=xxx.yyy.zzzz shell@android:/ $ exit
Exit shell mode with exit and extract apk using adb pull command.
#adb pull /data/app//xxx.yyy.zzzz.apk d:로컬경로xxx.yyy.zzzz.apk 3451 KB/s (10932952 bytes in 3.093s)
You can find the classes.dex file by extracting the extracted APK file with Alzip.
For decomple, you need to change the dex file to jar. Download dex2jar from the link below.
Change classes.dex to classes.jar by using the command below.
#dex2jar classes.dex this cmd is deprecated, use the d2j-dex2jar if possible dex2jar version: translator-0.0.9.12 dex2jar classes.dex -> classes_dex2jar.jar Done.
If you install JD-GUI from the link below and open the created jar file, you can see the java source.