Skip to content

Instantly share code, notes, and snippets.

@cleysondiego
Last active October 31, 2024 11:44
Show Gist options
  • Select an option

  • Save cleysondiego/79b918e581d72a4bee04954757666965 to your computer and use it in GitHub Desktop.

Select an option

Save cleysondiego/79b918e581d72a4bee04954757666965 to your computer and use it in GitHub Desktop.
Extracting APK from device (and emulator) using ADB

Extracting APK from device (and emulator) using ADB

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 packages

To filter the list and find a specific app, you can use:

adb shell pm list packages -f | grep myApp

Once you've identified the package name, you can find the path to the APK with:

adb shell pm path com.example.myApp

The 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment