NOTE: This only extract apk, without native .so libraries.
If you don't know the package name of the app you're looking for, you can list all installed apps with the following command:
adb shell pm list packagesTo filter the list and find a specific app, you can use:
adb shell pm list packages -f | grep myAppOnce you've identified the package name, you can find the path to the APK with:
adb shell pm path com.example.myAppThe output will look something like this:
package:/data/app/com.example.myApp.apk
To pull the APK file from the device, use:
adb pull /data/app/com.example.myApp.apk