Simple bulk .xapk -> .apk unpacker script for Apkpure downloaded Android apps
This PowerShell script automates the handling of .xapk files, which are extended Android application packages.
It performs the following tasks:
.xapk files to .zip.apk files into a single destination folderThis tool is useful for developers or testers managing multiple .xapk distributions at once.
Removed_APKs folder.xapk → .zip and extracts contents.apk files.apk files (excluding those containing “config”) into a single destination folderAfter execution, your working directory will look similar to this:
YourFolder/
│
├── Removed_APKs/
│ ├── app1.apk
│ ├── app2.apk
│ └── ...
│
├── app1/
│ ├── manifest.json
│ ├── APK/
│ └── ...
│
├── app1.zip
├── app2.zip
└── xapk.ps1
Place xapk.ps1 in the same directory as your .xapk files.
Open PowerShell in that directory.
Run the script:
.\xapk.ps1
The script will:
Removed_APKs directory (if missing).xapk file sequentially.apk files into the destination folderTo automatically remove extracted .zip files and temporary folders,
uncomment the following lines near the end of the script:
# Remove-Item -Path $zipName -Force
# Remove-Item -Path $extractionPath -Recurse -Force
# Write-Host "Cleaned up '$zipName' and '$extractionPath'"
Created destination folder: C:\Projects\Removed_APKs
Processing file: sample.xapk
Renamed 'sample.xapk' to 'sample.zip'
Created extraction folder: C:\Projects\sample
Extracted 'sample.zip' to 'C:\Projects\sample'
Moved 'C:\Projects\sample\base.apk' to 'C:\Projects\Removed_APKs'
All files have been processed successfully.
.xapk files continue processing even after one fails.