A Windows PowerShell utility for extracting APK files from Android devices or emulators using ADB. Supports single package, lists from a .txt file, auto-detect downloaded apps, multiple devices, and custom output directories.
-
Extract APKs from:
- a single package
- a list of packages (file input)
- a command-line list (comma/space separated)
- auto-detected installed apps
-
Supports multiple devices (interactive selection or
-d) -
Automatically cleans package names (removes
package:prefixes) -
Filters system packages if needed
-
Custom output directory support
-
Safe folder naming (removes invalid characters)
-
Works on:
- Android phones
- Android emulators (AVD / Genymotion)
- Any ADB-compatible device
- Windows 10 / 11
- PowerShell 5 or later
- Android SDK Platform Tools installed (adb.exe)
- USB debugging enabled on device OR an emulator running
Place the script (apk_to_win.ps1 or your renamed version) inside your
Android SDK platform-tools folder or any folder containing:
adb.exe
Example location:
C:\Users\<you>\AppData\Local\Android\Sdk\platform-tools\
Run PowerShell there:
cd C:\Users\<you>\AppData\Local\Android\Sdk\platform-tools\.\apk_to_win.ps1 -hExtract APKs from a file containing one package name per line.
Example file (packages.txt):
com.android.chrome
com.whatsapp
com.notion.id
Run:
.\apk_to_win.ps1 -i packages.txtProvide one or more packages directly:
Supports:
- comma-separated
- space-separated
- mixed
package:prefixes
Examples:
.\apk_to_win.ps1 -c com.whatsapp
.\apk_to_win.ps1 -c com.whatsapp,com.instagram.android
.\apk_to_win.ps1 -c "package:com.a, com.b com.c"All are accepted.
.\apk_to_win.ps1 -a autoEquivalent forms:
-a default
-a auto
.\apk_to_win.ps1 -a all.\apk_to_win.ps1 -l auto.\apk_to_win.ps1 -l allIf multiple devices are detected, the script will prompt you to select one.
Force a device manually:
.\apk_to_win.ps1 -d emulator-5554 -a allIf you omit -d, the script:
- selects automatically if only 1 device is found
- prompts you if more than 1 is found
Default:
.\apks-<device_serial>\
Custom output:
.\apk_to_win.ps1 -c com.whatsapp -o C:\DumpedAPKsAPK files are saved as:
<output folder>\
com.package1\
base.apk
split_config.arm64.apk
...
com.package2\
...
Each package gets its own folder.
.\apk_to_win.ps1 -a auto.\apk_to_win.ps1 -c com.android.chrome.\apk_to_win.ps1 -a all.\apk_to_win.ps1 -d R58N62MM123 -c com.whatsapp-c and -i support the following formats:
com.app.one,com.app.two
com.app.one com.app.two
package:com.app.one package:com.app.two
com.a, com.b com.c
The script cleans all forms automatically.
- Does not repackage split APKs into .apks or .apk-m bundles
- Does not extract OBB or data directories (APK only)
- Requires ADB authorization on the device