Skip to content

Instantly share code, notes, and snippets.

@jwhb
Created May 13, 2024 17:07
Show Gist options
  • Save jwhb/12767a6d25620748d69d106fd1293787 to your computer and use it in GitHub Desktop.
Save jwhb/12767a6d25620748d69d106fd1293787 to your computer and use it in GitHub Desktop.
Android ADB pull split apk
#!/bin/sh
adb shell pm path com.example.myapp | sed 's/^package://g' | xargs -L1 adb pull
@jwhb
Copy link
Author

jwhb commented May 13, 2024

❯ adb shell pm list packages | grep wireguard | sed 's/package://g'
com.wireguard.android
❯ adb shell pm path com.wireguard.android | sed 's/^package://g' | xargs -L1 adb pull
/data/app/~~mQKVR8_b4OGr_J60v-qMFg==/com.wireguard.android-t-vFaW0m6B15_1FCG2-4fg==/base.apk: 1 file pulled, 0 skipped. 1.0 MB/s (2435569 bytes in 2.418s)
/data/app/~~mQKVR8_b4OGr_J60v-qMFg==/com.wireguard.android-t-vFaW0m6B15_1FCG2-4fg==/split_config.arm64_v8a.apk: 1 file pulled, 0 skipped. 8.6 MB/s (2855474 bytes in 0.317s)
/data/app/~~mQKVR8_b4OGr_J60v-qMFg==/com.wireguard.android-t-vFaW0m6B15_1FCG2-4fg==/split_config.de.apk: 1 file pulled, 0 skipped. 1.7 MB/s (45465 bytes in 0.025s)
/data/app/~~mQKVR8_b4OGr_J60v-qMFg==/com.wireguard.android-t-vFaW0m6B15_1FCG2-4fg==/split_config.en.apk: 1 file pulled, 0 skipped. 2.1 MB/s (49561 bytes in 0.022s)
/data/app/~~mQKVR8_b4OGr_J60v-qMFg==/com.wireguard.android-t-vFaW0m6B15_1FCG2-4fg==/split_config.xxhdpi.apk: 1 file pulled, 0 skipped. 4.4 MB/s (303699 bytes in 0.066s)
❯ ls -1
base.apk
split_config.arm64_v8a.apk
split_config.de.apk
split_config.en.apk
split_config.xxhdpi.apk

@jwhb
Copy link
Author

jwhb commented May 13, 2024

To create *.apks bundle, use SAI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment