Skip to content

Instantly share code, notes, and snippets.

@ctrl-freak
Last active August 28, 2025 23:00
Show Gist options
  • Save ctrl-freak/24ac0e61b7cf550a6945 to your computer and use it in GitHub Desktop.
Save ctrl-freak/24ac0e61b7cf550a6945 to your computer and use it in GitHub Desktop.

Revisions

  1. ctrl-freak revised this gist Apr 4, 2019. 1 changed file with 17 additions and 17 deletions.
    34 changes: 17 additions & 17 deletions android-adb-pull-apk.md
    Original file line number Diff line number Diff line change
    @@ -1,19 +1,19 @@
    https://stackoverflow.com/a/18003462/348146

    None of these suggestions worked for me, because Android was appending a sequence number to the package name to produce the final APK file name (this may vary with the version of Android OS). The following sequence of commands is what worked for me on a non-rooted device:

    1. Determine the package name of the app, e.g. `com.example.someapp`. Skip this step if you already know the package name.

    ````adb shell pm list packages````

    Look through the list of package names and try to find a match between the app in question and the package name. This is usually easy, but note that the package name can be completely unrelated to the app name. If you can't recognize the app from the list of package names, try finding the app in Google Play using a browser. The URL for an app in Google Play contains the package name.

    2. Get the full path name of the APK file for the desired package.

    ````adb shell pm path com.example.someapp````

    The output will look something like this: `package:/data/app/com.example.someapp-2.apk`

    3. Pull the APK file from the Android device to the development box.

    ````adb pull /data/app/com.example.someapp-2.apk````
    > None of these suggestions worked for me, because Android was appending a sequence number to the package name to produce the final APK file name (this may vary with the version of Android OS). The following sequence of commands is what worked for me on a non-rooted device:
    >
    > 1. Determine the package name of the app, e.g. `com.example.someapp`. Skip this step if you already know the package name.
    >
    > ````adb shell pm list packages````
    >
    > Look through the list of package names and try to find a match between the app in question and the package name. This is usually easy, but note that the package name can be completely unrelated to the app name. If you can't recognize the app from the list of package names, try finding the app in Google Play using a browser. The URL for an app in Google Play contains the package name.
    >
    > 2. Get the full path name of the APK file for the desired package.
    >
    > ````adb shell pm path com.example.someapp````
    >
    > The output will look something like this: `package:/data/app/com.example.someapp-2.apk`
    >
    > 3. Pull the APK file from the Android device to the development box.
    >
    > ````adb pull /data/app/com.example.someapp-2.apk````
  2. ctrl-freak revised this gist Feb 11, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions android-adb-pull-apk.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ https://stackoverflow.com/a/18003462/348146

    None of these suggestions worked for me, because Android was appending a sequence number to the package name to produce the final APK file name (this may vary with the version of Android OS). The following sequence of commands is what worked for me on a non-rooted device:

    1. Determine the package name of the app, e.g. "com.example.someapp". Skip this step if you already know the package name.
    1. Determine the package name of the app, e.g. `com.example.someapp`. Skip this step if you already know the package name.

    ````adb shell pm list packages````

    @@ -12,7 +12,7 @@ None of these suggestions worked for me, because Android was appending a sequenc

    ````adb shell pm path com.example.someapp````

    The output will look something like this: package:/data/app/com.example.someapp-2.apk
    The output will look something like this: `package:/data/app/com.example.someapp-2.apk`

    3. Pull the APK file from the Android device to the development box.

  3. ctrl-freak revised this gist Feb 11, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion android-adb-pull-apk.md
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,6 @@ None of these suggestions worked for me, because Android was appending a sequenc

    The output will look something like this: package:/data/app/com.example.someapp-2.apk

    3) Pull the APK file from the Android device to the development box.
    3. Pull the APK file from the Android device to the development box.

    ````adb pull /data/app/com.example.someapp-2.apk````
  4. ctrl-freak revised this gist Feb 11, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions android-adb-pull-apk.md
    Original file line number Diff line number Diff line change
    @@ -6,13 +6,13 @@ None of these suggestions worked for me, because Android was appending a sequenc

    ````adb shell pm list packages````

    Look through the list of package names and try to find a match between the app in question and the package name. This is usually easy, but note that the package name can be completely unrelated to the app name. If you can't recognize the app from the list of package names, try finding the app in Google Play using a browser. The URL for an app in Google Play contains the package name.
    Look through the list of package names and try to find a match between the app in question and the package name. This is usually easy, but note that the package name can be completely unrelated to the app name. If you can't recognize the app from the list of package names, try finding the app in Google Play using a browser. The URL for an app in Google Play contains the package name.

    2. Get the full path name of the APK file for the desired package.

    ````adb shell pm path com.example.someapp````

    The output will look something like this: package:/data/app/com.example.someapp-2.apk
    The output will look something like this: package:/data/app/com.example.someapp-2.apk

    3) Pull the APK file from the Android device to the development box.

  5. ctrl-freak revised this gist Feb 11, 2016. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions android-adb-pull-apk.md
    Original file line number Diff line number Diff line change
    @@ -4,14 +4,16 @@ None of these suggestions worked for me, because Android was appending a sequenc

    1. Determine the package name of the app, e.g. "com.example.someapp". Skip this step if you already know the package name.

    adb shell pm list packages
    ````adb shell pm list packages````

    Look through the list of package names and try to find a match between the app in question and the package name. This is usually easy, but note that the package name can be completely unrelated to the app name. If you can't recognize the app from the list of package names, try finding the app in Google Play using a browser. The URL for an app in Google Play contains the package name.

    2. Get the full path name of the APK file for the desired package.

    adb shell pm path com.example.someapp
    ````adb shell pm path com.example.someapp````

    The output will look something like this: package:/data/app/com.example.someapp-2.apk

    3) Pull the APK file from the Android device to the development box.

    adb pull /data/app/com.example.someapp-2.apk
    ````adb pull /data/app/com.example.someapp-2.apk````
  6. ctrl-freak created this gist Feb 11, 2016.
    17 changes: 17 additions & 0 deletions android-adb-pull-apk.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    https://stackoverflow.com/a/18003462/348146

    None of these suggestions worked for me, because Android was appending a sequence number to the package name to produce the final APK file name (this may vary with the version of Android OS). The following sequence of commands is what worked for me on a non-rooted device:

    1. Determine the package name of the app, e.g. "com.example.someapp". Skip this step if you already know the package name.

    adb shell pm list packages
    Look through the list of package names and try to find a match between the app in question and the package name. This is usually easy, but note that the package name can be completely unrelated to the app name. If you can't recognize the app from the list of package names, try finding the app in Google Play using a browser. The URL for an app in Google Play contains the package name.

    2. Get the full path name of the APK file for the desired package.

    adb shell pm path com.example.someapp
    The output will look something like this: package:/data/app/com.example.someapp-2.apk

    3) Pull the APK file from the Android device to the development box.

    adb pull /data/app/com.example.someapp-2.apk