Windows
What you need
Section titled “What you need”- Windows 10 (version 2004 or later) or Windows 11, 64-bit, and an administrator account.
- A PC that stays on, ideally one used only for hosting, with Ethernet if you can, and a powered USB hub for the phones.
- About 20 minutes.
Stop Windows from sleeping: Settings › System › Power (or Power & battery), set the screen and sleep times to Never when plugged in.
1. Download the hub and Android’s tools
Section titled “1. Download the hub and Android’s tools”-
Download
pocketshare-hub-windows-x64.zipandSHA256SUMS. -
Check the download. In PowerShell, in your Downloads folder:
Terminal window (Get-FileHash .\pocketshare-hub-windows-x64.zip -Algorithm SHA256).Hash.ToLower()Select-String pocketshare-hub-windows-x64.zip .\SHA256SUMSThe two values must match. To check the release signature too, use OpenSSL as in Debian and Ubuntu.
-
Unpack the zip (right-click › Extract All).
-
Download Android’s SDK Platform-Tools for Windows and unpack them, for example to
C:\platform-tools. The hub uses itsadb.exe.
2. Install your phones’ USB drivers
Section titled “2. Install your phones’ USB drivers”Unlike Linux, Windows needs a USB driver before adb can see a phone:
- Pixel and other Google phones: the Google USB Driver.
- Samsung, Xiaomi, Sony and others: the maker’s driver, linked from Android’s OEM USB drivers page.
Then prepare a phone, plug it in, tap Allow on it, and check that Windows sees it:
C:\platform-tools\adb.exe devicesC:\platform-tools\adb.exe kill-serverThe phone should be listed as device. The second command stops this adb server again, so the
hub’s own adb service can use its port.
3. Install the hub
Section titled “3. Install the hub”-
Get a pairing code. On pocketshare.io, open Hosting › Hubs, choose Add hub, then Create pairing code. It works once and expires after 24 hours.
-
Open PowerShell with Run as administrator and go to the unpacked folder, for example:
Terminal window cd $HOME\Downloads\pocketshare-hub-windows-x64\pocketshare-hub-*-windows-x64 -
Check everything without changing anything:
Terminal window powershell -ExecutionPolicy Bypass -File .\install.ps1 -Code XXXX-XXXX-XXXX-XXXX -AdbDir C:\platform-tools -DryRun -
Install. It copies the hub and
adbtoC:\Program Files\PocketShare\Hub, enrolls the hub with your code and starts it:Terminal window powershell -ExecutionPolicy Bypass -File .\install.ps1 -Code XXXX-XXXX-XXXX-XXXX -AdbDir C:\platform-tools
The hub runs as two Windows services, PocketShareAdb and PocketShareHub, that start with Windows. Within a minute the PC appears under Hosting › Hubs as Online. The files aren’t code-signed yet, so Windows may show “Windows protected your PC”: choose More info, then Run anyway.
On a PC you also use for Android development, add -Devices with the serial numbers of the
phones you rent out (adb devices lists them), for example -Devices R58M123ABCD,1A2B3C4D5E6F,
so the hub never touches your other phones or emulators. Stop your own adb server before
installing, or give the hub another port with -AdbPort 5038.
Check on it
Section titled “Check on it”Get-Service PocketShareHub, PocketShareAdbGet-Content -Wait -Tail 20 "$env:ProgramData\PocketShare\Hub\logs\pocketshare-hub-service.out.log"Both services should be Running; the log shows one line per event. The hub’s settings file
is C:\ProgramData\PocketShare\Hub\config.json; see Run your hub for what
it can hold.
- Updates: the hub installs its own signed updates. To update by hand, download and unpack
the newest zip and run its
install.ps1without-Code(-AdbDir C:\platform-toolsis enough): it replaces the installed hub and keeps its enrollment. - A stuck phone: if a phone doesn’t come back after the restart at the end of a cleanup, the hub resets the USB hub it hangs off, which makes Windows find the phone again.
- Firewall: keep Windows Defender Firewall on for Public networks. A hosted phone switched to USB tethering shows up as a new Public network, and the firewall keeps it out of your PC.
Remove the hub
Section titled “Remove the hub”In an administrator PowerShell, in the unpacked folder:
powershell -ExecutionPolicy Bypass -File .\install.ps1 -UninstallThis stops and removes both services and the installed files, and keeps the hub’s enrollment,
so installing again reconnects the same hub. Add -RemoveState to delete its identity, logs
and settings too, then remove the hub in your dashboard.