mirror of
https://github.com/WSA-Installer/wsa-installer.git
synced 2026-07-29 11:24:06 -07:00
2.9 KiB
2.9 KiB
ADB Reference
ADB (Android Debug Bridge) is used by WSA Installer to communicate with WSA for Play Store installation and management.
ADB in WSA Installer
WSA Installer automates ADB operations for:
- Connecting to WSA
- Authorizing USB debugging
- Installing Play Store (GApps)
- Verifying package installation
- Managing WSA developer options
ADB Connection
Port
WSA exposes ADB on port 58526 by default.
Connect Command
adb connect 127.0.0.1:58526
Connection Process
WSA Installer automatically:
- Checks if WSA is running
- Probes port 58526
- Connects via ADB
- Handles authorization (if needed)
ADB Authorization
When connecting to WSA for the first time, you'll see an "Allow USB debugging" popup.
Automatic Authorization
WSA Installer automates this process using pywinauto:
- Detects the "Allow USB debugging" window
- Clicks "Always allow from this computer"
- Clicks "Allow"
Manual Authorization
If automatic authorization fails:
- Check the WSA window for the popup
- Check "Always allow from this computer"
- Click "Allow"
Common ADB Commands
Check Connected Devices
adb devices
Install APK
adb install -r package.apk
Uninstall Package
adb uninstall com.package.name
List Installed Packages
adb shell pm list packages
Check Specific Package
adb shell pm list packages com.android.vending
Start Activity
adb shell am start -n com.package/.Activity
Send Broadcast
adb shell am broadcast -a com.action.NAME
Troubleshooting ADB
"Device unauthorized"
- Check the WSA window for the authorization popup
- Enable Developer Mode in WSA Settings
- Disconnect and reconnect ADB:
adb disconnect adb connect 127.0.0.1:58526
"Connection refused"
- Ensure WSA is running
- Check that Developer Mode is enabled
- Restart WSA:
taskkill /F /IM WsaClient.exe wsa://system - Wait 30 seconds, then retry
"Device offline"
- Disconnect ADB:
adb disconnect - Kill ADB server:
adb kill-server - Restart ADB server:
adb start-server - Reconnect:
adb connect 127.0.0.1:58526
Port Changed
If WSA uses a different port:
- Check WSA Settings → Developer → Wireless debugging
- Note the port number
- Connect with the correct port:
adb connect 127.0.0.1:PORT_NUMBER
Multiple ADB Instances
If you have multiple ADB installations:
- Use the full path to the WSA Installer's ADB:
assets\adb.exe connect 127.0.0.1:58526
ADB in WSA WebDev
The WSA WebDev project uses ADB for server control:
# Start WebDAV server
adb shell am broadcast -a com.wsa.webdav.START
# Stop WebDAV server
adb shell am broadcast -a com.wsa.webdav.STOP
# Check status
adb shell am broadcast -a com.wsa.webdav.STATUS
See the WebDAV documentation for details.