Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phone Portal

Beam photos, videos, music and any other files from your Android phone straight into a folder on your Windows PC — over Wi-Fi or USB. Encrypted end to end, no cloud, no account, no cable required.


┌─────────────┐        Wi-Fi (auto-discovery)         ┌──────────────────┐
│  Android    │ ═══════════ TLS 1.2+ ═══════════════▶ │  Windows PC      │
│  app        │        or USB (adb tunnel)            │  Phone Portal    │
└─────────────┘                                       └── your folder ───┘

CI

Download

Grab the latest build from Releases:

File What it is
PhonePortal.exe The Windows app. Self-contained — no .NET install needed.
PhonePortal.apk The Android app. Sideload it.
SHA256SUMS.txt Checksums. Both apps verify against this when self-updating.

Both apps update themselves from here afterwards, and refuse to install anything whose hash does not match the published checksum.

Getting connected

Over Wi-Fi

  1. Phone and PC on the same Wi-Fi network.
  2. Open Phone Portal on the PC and leave it running. Windows Firewall will ask once — allow it on Private networks, or the phone can't reach it.
  3. Open the app on the phone. The PC appears in the list. Tap it.
  4. Both screens now show six digits. Check that they are the same, tap They match on the phone, then click They match — allow on the PC.
  5. Done. Pick files, hit Send.

That code comparison is the whole security model in one step — see SECURITY.md for why it works. You only do it once per phone; after that the app reconnects on its own, even if your router hands the PC a new address.

If auto-discovery is blocked (some routers isolate devices from each other), type the address shown in the PC app — for example 192.168.1.23 — into the phone's Connect by address field.

Over USB

  1. On the phone: enable USB debugging (Settings → Developer options).
  2. Plug in the cable and accept the "Allow USB debugging?" prompt.
  3. On the PC: click Enable USB mode. Phone Portal finds adb automatically if Android platform-tools are installed.
  4. On the phone: tap Connect over USB, then pair as above.

What it does

  • Real progress. Every bar and speed figure is actual bytes on the wire, on both ends.
  • Resumes interrupted transfers. Walk out of Wi-Fi range mid-video and it continues from where it stopped instead of starting the file again. Each file is retried three times.
  • Keeps going in the background. A foreground service plus a wake lock means locking the screen or switching apps doesn't kill a large transfer.
  • Lives in the notification area. Close the PC window and it keeps receiving; you get a notification when a batch lands.
  • Never overwrites. Name collisions get (1), (2) suffixes. Files are written to a .part file and renamed only once the size is verified.
  • Sorts if you want. Optionally files into Images / Videos / Audio / Files subfolders.
  • Updates itself from this repository, with checksum verification.

Security in one paragraph

Everything is TLS. The PC generates its own certificate on first run and keeps it encrypted with DPAPI; the phone pins that exact certificate at pairing and rejects anything else forever after. The six-digit code you compare is derived from that certificate, so a device impersonating your PC produces different digits and cannot get itself trusted. Bearer tokens are 256-bit random values, stored hashed on the PC and keystore-encrypted on the phone. Every filename that arrives is stripped of paths, device names and control characters, then the resolved path is re-checked to be inside your destination folder. Received files are tagged with a mark-of-the-web so Windows treats them like any other download.

The full write-up, including what is deliberately not protected, is in SECURITY.md.

Building from source

Windows app

Requires the .NET 8 SDK.

cd windows\PhonePortalDesktop
dotnet run

A standalone exe you can pin to the taskbar:

dotnet publish -c Release -o publish

Run the security test suite (no test framework needed — it is a plain console app):

dotnet run --project windows\PhonePortal.Tests

Android app

Requires JDK 17 and the Android SDK (platform 34, build-tools 34.0.0).

cd android
./gradlew assembleDebug          # app/build/outputs/apk/debug/app-debug.apk
./gradlew testDebugUnitTest      # pairing-code and version-comparison tests

Release builds need a signing key — see docs/RELEASING.md.

Repository layout

Folder What it is
windows/PhonePortalDesktop/ Windows desktop app (WPF, .NET 8, in-process Kestrel).
windows/PhonePortal.Tests/ Dependency-free checks on the security-critical logic.
android/ Android app (Kotlin + Jetpack Compose, OkHttp).
docs/ Release process and assets.

How it works

  • The PC runs a small HTTPS server (Kestrel) on port 52525 and answers UDP discovery probes on port 52526.
  • The phone broadcasts PP_DISCOVER_V2; the PC replies with its name, port and certificate fingerprint. The probe is padded larger than the reply so the socket can't be used as a traffic amplifier.
  • Pairing: POST /api/pair/begin returns a public nonce; both ends derive the six digits from it and the certificate; POST /api/pair/complete waits for the click on the PC and returns a token.
  • Transfers: one streamed HTTPS POST per file. GET /api/upload/status reports how many bytes of an interrupted file the PC still holds, and the phone resumes from there.

Ports

Port Protocol Purpose
52525 TCP / HTTPS Pairing and file transfer
52526 UDP LAN auto-discovery

Platforms

Android and Windows. There is no iOS or macOS version and none is planned.

About

Beam files from Android to Windows over your own Wi-Fi. Encrypted end to end, certificate-pinned, no cloud.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages