Skip to content

Windows

  • 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 pocketshare-hub-windows-x64.zip and SHA256SUMS.

  2. 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 .\SHA256SUMS

    The two values must match. To check the release signature too, use OpenSSL as in Debian and Ubuntu.

  3. Unpack the zip (right-click › Extract All).

  4. Download Android’s SDK Platform-Tools for Windows and unpack them, for example to C:\platform-tools. The hub uses its adb.exe.

Unlike Linux, Windows needs a USB driver before adb can see a phone:

Then prepare a phone, plug it in, tap Allow on it, and check that Windows sees it:

Terminal window
C:\platform-tools\adb.exe devices
C:\platform-tools\adb.exe kill-server

The 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.

  1. 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.

  2. 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
  3. Check everything without changing anything:

    Terminal window
    powershell -ExecutionPolicy Bypass -File .\install.ps1 -Code XXXX-XXXX-XXXX-XXXX -AdbDir C:\platform-tools -DryRun
  4. Install. It copies the hub and adb to C:\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.

Terminal window
Get-Service PocketShareHub, PocketShareAdb
Get-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.ps1 without -Code (-AdbDir C:\platform-tools is 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.

In an administrator PowerShell, in the unpacked folder:

Terminal window
powershell -ExecutionPolicy Bypass -File .\install.ps1 -Uninstall

This 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.