Skip to main content

Overview

While WSABuilds provides pre-built packages with various configurations, you can create fully custom builds tailored to your specific needs using the MagiskOnWSALocal build script. This gives you complete control over:
  • WSA architecture and release channel
  • Root solution (Magisk, KernelSU, or none)
  • Magisk version and variant
  • GApps installation
  • Amazon Appstore removal
  • Custom device model spoofing

Prerequisites

Before building custom WSA packages, ensure you have:
  • Linux environment (Ubuntu 20.04+ recommended) or WSL2 on Windows
  • Python 3 installed
  • At least 20GB free disk space
  • Stable internet connection for downloading WSA and components

Using MagiskOnWSALocal

Setup

1

Clone the repository

git clone https://github.com/LSPosed/MagiskOnWSALocal.git
cd MagiskOnWSALocal
2

Install dependencies

cd scripts
./install_deps.sh
This script will install required packages including:
  • Python dependencies (aria2c, requests, etc.)
  • 7-Zip for archive extraction
  • Other build tools
3

Navigate to scripts directory

cd scripts
All build operations must be run from the scripts directory.

Building WSA

Basic Build Command

./build.sh
This creates a WSA build with default settings:
  • Architecture: x64
  • Release type: Retail
  • Root solution: Magisk (stable)
  • Compression: None

Build Parameters

--arch
string
default:"x64"
Target architecture for WSA buildOptions:
  • x64 - For Intel/AMD 64-bit processors
  • arm64 - For ARM64 processors (e.g., Surface Pro X)
--release-type
string
default:"retail"
WSA release channel to downloadOptions:
  • retail - Stable release channel
  • RP - Release Preview (newer features)
  • WIS - Windows Insider Slow
  • WIF - Windows Insider Fast (bleeding edge)
--root-sol
string
default:"magisk"
Root solution to integrateOptions:
  • magisk - Install Magisk for root access
  • kernelsu - Install KernelSU (kernel-based root)
  • none - No root access
--magisk-ver
string
default:"stable"
Magisk version to install (only applies if --root-sol magisk)Options:
  • stable - Latest stable release
  • beta - Beta channel
  • canary - Canary (nightly) builds
  • debug - Debug builds
  • release - Specific release version
--compress-format
string
default:"none"
Output compression formatOptions:
  • none - No compression (folder output)
  • zip - ZIP archive
  • 7z - 7-Zip archive (smaller size)

Additional Options

--install-gapps
boolean
Install Google Play Services and Play StoreNote: GApps requires Magisk to function, so --root-sol will be forced to magisk if you enable this.
--remove-amazon
boolean
Remove Amazon Appstore from the buildReduces installation size and removes pre-installed Amazon components.
--magisk-custom
boolean
Use a custom Magisk APK or ZIP filePlace your custom Magisk file in the download folder as:
  • magisk-[version].zip, or
  • app-[version].apk
--offline
boolean
Build in offline mode using previously downloaded filesUseful for rebuilding without re-downloading components.
--skip-download-wsa
boolean
Skip downloading WSA, only download dependenciesUse this if you already have the WSA package downloaded.

Build Examples

./build.sh --release-type retail --root-sol magisk --install-gapps --remove-amazon

Build Output

After successful build completion, your custom WSA package will be located in:
MagiskOnWSALocal/output/WSA_[VERSION]_[ARCH]/
The output folder contains:
  • Run.bat - Installation script
  • Install.ps1 - PowerShell installation script
  • WSA system files and dependencies
  • Pre-configured Magisk/KernelSU (if selected)

Installing Your Custom Build

1

Copy to Windows

Transfer the output folder to your Windows machine if building on Linux/WSL.
2

Run installation

Navigate to the output folder and double-click Run.bat to install.The script will:
  • Uninstall any existing WSA installation
  • Preserve user data if present
  • Install your custom WSA build
  • Register the package with Windows
3

Launch WSA

After installation, WSA Settings will open automatically. Enable Developer mode if needed.

Advanced Customization

Custom Device Model

You can modify the spoofed device model by editing the build scripts. This is useful for apps that require specific device models. Common device models:
  • redfin - Pixel 5 (default)
  • raven - Pixel 6 Pro
  • oriole - Pixel 6
  • panther - Pixel 7

Custom GApps Variant

The build script automatically downloads the appropriate GApps package. For custom GApps:
  1. Place your custom GApps .img file in the download folder
  2. Name it: gapps-[ANDROID_VERSION]-[ARCH].img
  3. Run build with --offline flag

Troubleshooting

Solution: Check your internet connection and try again. If the issue persists:
# Clear download cache
rm -rf ../download/*
./build.sh
Solution: Reinstall dependencies:
./install_deps.sh
Ensure you’re using Python 3.8 or newer:
python3 --version
Solution: The build process requires significant space:
  • WSA download: ~1-2GB
  • Extraction and build: ~10-15GB
  • Output: ~3-5GB
Free up at least 20GB before building.
Solution: Ensure your custom Magisk file is:
  • Located in the download folder
  • Named correctly: magisk-[version].zip or app-[version].apk
  • The version string matches the --magisk-ver parameter
Error: Unsupported combination: Install GApps and KernelSUSolution: GApps requires Magisk to mount system files. You cannot use GApps with KernelSU. Either:
  • Remove --install-gapps flag, or
  • Change --root-sol kernelsu to --root-sol magisk

Requesting Custom Builds

If you don’t have a Linux environment or prefer not to build yourself, you can request custom builds from the WSABuilds community.

Request a Custom Build

Open an issue on GitHub with your build requirements:
  • Target architecture (x64/arm64)
  • Root solution (Magisk/KernelSU/none)
  • Magisk variant (if applicable)
  • GApps requirement
  • Amazon Appstore preference
  • Device model (if specific)

Resources

MagiskOnWSALocal

Official build script repository

Build Script Documentation

Detailed parameter documentation

WSABuilds Issues

Report problems or request builds

Discord Community

Get help from the community

Build docs developers (and LLMs) love