PocketShare hub for Windows (x64)
=================================

Connects the Android phones plugged into this computer to PocketShare. It runs as two
Windows services: PocketShareAdb (an adb server on 127.0.0.1:5037) and PocketShareHub.

Before you start
  1. Check this zip against SHA256SUMS and its signature from the download page.
  2. Download "SDK Platform-Tools for Windows" from
     https://developer.android.com/tools/releases/platform-tools and unpack it.
  3. Create an enrollment code in the PocketShare dashboard (Add a hub).

Install (PowerShell, "Run as administrator", in this folder)
  powershell -ExecutionPolicy Bypass -File .\install.ps1 -Code XXXX-XXXX-XXXX-XXXX -AdbDir C:\path\to\platform-tools

  Add -Devices <serial>[,<serial>] (serials as "adb devices" prints them) so the hub
  only uses the phones you rent out. Do this whenever other phones or emulators are
  attached to this computer. -DryRun checks everything and changes nothing.

  Only one adb server can use the phones: stop your own ("adb kill-server") first, or
  install with -AdbPort 5038 and a -Devices list.

What it installs
  C:\Program Files\PocketShare\Hub\           the hub, WinSW and adb
  C:\ProgramData\PocketShare\Hub\             enrollment and key, config.json, logs\

Every day
  Logs:     C:\ProgramData\PocketShare\Hub\logs\pocketshare-hub-service.out.log
  Status:   "C:\Program Files\PocketShare\Hub\pocketshare-hub.exe" status
  Restart:  Restart-Service PocketShareHub
  Updates:  the hub installs signed updates itself while no phone is rented; turn this
            off with -NoSelfUpdate (or "selfUpdate": false in config.json).
  Remove:   .\install.ps1 -Uninstall   (add -RemoveState to delete the enrollment)

Windows may warn that pocketshare-hub.exe is from an unknown publisher: the hub is not
yet code-signed for Windows. Its integrity is covered by the signed SHA256SUMS instead.

Licences: WinSW (MIT) and the scrcpy server (Apache-2.0) are in licenses\.
