Repository navigation
v1.1.6 — Real-Time Input Pipeline Overhaul, Desktop Station Isolation & Privilege Separation
Executive Summary
Tether v1.1.6 is a major reliability, precision, and security release centered on a complete re-engineering of the remote input and session execution subsystems.
Prior builds could experience intermittent input drops, stuck modifier states, or ERROR_ACCESS_DENIED injection failures across Windows session boundaries and high-integrity windows (such as Task Manager and UAC prompts). Version 1.1.6 eliminates these friction points by introducing a dedicated STA injection worker thread bound directly to the active interactive desktop (WinSta0\Default), linked token elevation for administrator sessions, multi-tier injection fallbacks, sub-pixel movement accumulation, unified touch gesture state machines, and fine-grained Windows privilege separation.
Key Highlights
- Desktop Window Station Isolation (
WinSta0\Default): Dedicated STA input injection thread eliminates thread detachment and Win32 access denials (ERROR_ACCESS_DENIED / 5). - UIPI Elimination via Elevated Linked Tokens: The Session 0 communication service now inspects
TokenLinkedTokento executeTether.SessionHelperat high integrity, unlocking input control across elevated administrative applications and security surfaces. - Sub-Pixel Motion Accumulators: Smooth micro-movements across trackpad drag, two-finger scrolling, and AirMouse gyroscope sensor streams prevent rounding truncation and cursor stutter.
- Unified Android Gesture Engine: Replaced competing Compose gesture recognizers with a single-pass touch-slop hysteresis state machine supporting seamless drags, two-finger scrolling, single/double taps, and right clicks.
- IME Sentinel Buffer: Eliminates silent Backspace dropouts across soft virtual keyboards (e.g., Gboard, Samsung Keyboard).
- Least-Privilege Desktop UI Architecture: Desktop UI runs standard user-level by default and utilizes modular, on-demand UAC elevation (
RunElevatedSelf) only when committing credentials or restarting services.
Detailed Changes by Subsystem
1. Windows Input Subsystem (Tether.SessionHelper)
- Dedicated Real-Time STA Worker Thread:
- Created
Tether.InputInjectorThreadwithAboveNormalpriority and strict FIFO dispatch using an asynchronous bounded channel (Channel<byte[]>with 2048 frame capacity andDropOldestbackpressure). - Removed thread-pool dispatch to eliminate out-of-order race conditions, named-pipe message tearing, and thread-switching latency.
- Created
- Window Station & Desktop Attachment:
- Explicitly binds the process and worker thread to
WinSta0andOpenInputDesktopviaSetProcessWindowStationandSetThreadDesktop. - Implemented automatic desktop re-probing and recovery upon Win32 errors
5(ERROR_ACCESS_DENIED),6(ERROR_INVALID_HANDLE), or1400(ERROR_INVALID_WINDOW_HANDLE).
- Explicitly binds the process and worker thread to
- Multi-Tier Injection Fallbacks:
- In addition to
user32!SendInput, automated fallbacks touser32!mouse_event,user32!keybd_event, anduser32!SetCursorPos(withGetCursorPos) dynamically bypass User Interface Privilege Isolation (UIPI) or transient desktop lockouts.
- In addition to
- Sub-Millisecond Lock State Detection:
- Replaced expensive ~17.5ms system-wide
Process.GetProcessesByName("LogonUI")polling on high-frequency packets withOpenInputDesktop(DESKTOP_READOBJECTS)andGetUserObjectInformation, cached with a 150ms TTL to sustain 120 Hz input rates. - Added session-scoped
LogonUI.exeverification to eliminate false-positive input suppression from lingering background processes after workstation unlock.
- Replaced expensive ~17.5ms system-wide
- Extended Key Lifecycle & Navigation Fixes:
- Explicitly flags
KEYEVENTF_EXTENDEDKEYon both down and up transitions for navigation keys (Arrow keys, Delete, Home, End, PageUp, PageDown, Windows Key), resolving logically stuck keys. - Mapped newline characters in Unicode streams to native
VK_RETURNdispatch. - Added
ReleaseAllHeld()fail-safe release for all tracked buttons and keys on pipe disconnection.
- Explicitly flags
- High-DPI PerMonitorV2 Manifest:
- Embedded application manifest declaring
PerMonitorV2DPI awareness to ensure 1:1 pixel coordinate parity across high-DPI displays.
- Embedded application manifest declaring
2. Windows Service & IPC Transport (Tether.CommunicationService)
- Session 0 Linked Token Elevation:
- In
HardwareExecutor, inspectedTokenLinkedTokenduringCreateProcessAsUserto launchTether.SessionHelperunder the administrator's high-integrity token when available. - Eliminates UIPI blocking across Task Manager, elevated shells, and administrative dialogs.
- In
- Atomic Named-Pipe Frame Serialization:
- Replaced fragmented multi-part writes in
InputForwarderwith atomic[length(4)][payload]buffer frames, eliminating IPC message boundary corruption. - Added background connection polling to promptly detect silent client terminations and recycle stale pipe server instances.
- Replaced fragmented multi-part writes in
- Session Helper Lifecycle & De-duplication:
- In
SessionHelperDaemon, audited active console session processes to identify and terminate hung or orphaned helpers (>20s without pipe connection), preventing IPC connection deadlocks. - Corrected cross-session permission validation in
IsTrustedServerProcessusing process table auditing instead of restricted limited-information handles.
- In
3. Android Companion (com.tether.phone)
- Sub-Pixel Precision Accumulators (
RemoteInputEngine.kt):- Implemented fractional accumulators for trackpad drag, two-finger scroll drag, and AirMouse gyroscope sensor feeds.
- Prevents micro-movements from rounding down to zero, providing smooth, continuous cursor glide even at slow physical speeds.
- Accumulators reset immediately on finger lift (
resetAccumulators()).
- Serialized Click Lane:
- Added
clickLane(Dispatchers.IO.limitedParallelism(1)) to sequence button down/delay/up phases, preventing rapid tap sequences from interleaving into malformed packet streams.
- Added
- Unified Gesture State Machine (
RemoteInputScreen.kt):- Consolidated conflicting
pointerInputdrag anddetectTapGestureslisteners into a single-pass event scope with touch-slop hysteresis. - Delivers distinct detection for single-finger drag, two-finger vertical scroll, single-tap left click, double-tap left click, and two-finger right click.
- Consolidated conflicting
- IME Sentinel Buffer for Soft Keyboards:
- Introduced a zero-width space (
\u200B) sentinel buffer intextBufferto intercept IMEdeleteSurroundingText(1, 0)calls, ensuring Backspace works on Gboard, Samsung Keyboard, and other modern mobile keyboards.
- Introduced a zero-width space (
- Input Pump Resiliency & Stream Hygiene (
TetherLanService.kt):- Corrected
startInputPump()to verify job activity (isActive) instead of instance reference nullity. - Triggered input pump initialization on pinned-key network reconnects.
- Flushes stale input frames from
inputFrameChannelupon link disconnection and reconnection to eliminate buffered replay bursts. - Offloaded AirMouse gyroscope sensor sampling to a dedicated background
HandlerThread.
- Corrected
4. Windows Desktop UI (Tether.DesktopUI)
- Privilege Separation Architecture:
- Removed requirement for the main application to run as Administrator continuously.
- Added
RunElevatedSelfhelper to prompt for UAC elevation on-demand only when writing to HKLM registry paths or stopping/starting Windows services.
- Centralized Service Control (
ServiceControl.cs):- Implemented native Win32 Service Control Manager (SCM) interactions (
advapi32.dll) to query, stop, and restartTetherCommServicewith timeouts and fallback to standalone executable execution.
- Implemented native Win32 Service Control Manager (SCM) interactions (
- Initial Telemetry Synchronization:
- Desktop UI now issues a
TELEMETRY_SYNC_REQUESTEDevent on startup to query current device connection state immediately.
- Desktop UI now issues a
- Credential Vault UX:
- Added Enter key handler to password input for immediate vault submission.
- Host automatically releases held modifiers on UI disconnect.
5. Web & Documentation (index.html)
- Visual Identity & Design System:
- Modernized color hierarchy following the 70/25/5 rule with neutral dark background, steel-tinted surfaces (
#0f151b), and vibrant signal green (#3ddc97) strictly reserved for active connection indicators.
- Modernized color hierarchy following the 70/25/5 rule with neutral dark background, steel-tinted surfaces (
- SEO & Social Sharing:
- Added OpenGraph meta tags (
og:title,og:description,og:type) and embedded an SVG favicon.
- Added OpenGraph meta tags (
- Interactive UI & Performance:
- Added responsive mobile navigation drawer with accessible ARIA state transitions.
- Added performant, one-shot
IntersectionObserverscroll-reveal animations respectingprefers-reduced-motion. - Added scroll-dependent header backdrop shadow.
6. Packaging & Deployment (installer/Tether.iss)
- Version Bump: Updated version identifier to
1.1.6. - Standard User Execution: Removed mandatory
runasadministrative elevation verb from post-install launch task, running the UI under standard user context in compliance with Windows application guidelines.
Upgrade & Installation Guide
Windows
- Download and run
Tether-Setup-1.1.6.exe. - Follow installer prompts. The installer will register the background communication service (
TetherCommService), register the credential provider (TetherCredentialProvider.dll), and configure necessary Windows Firewall rules. - The Desktop UI launches automatically without requiring global administrative permissions.
Android
- Install or update to
Tether-1.1.6.apk(Android 12+ required). - Connect to the same local Wi-Fi or LAN as your Windows PC.
- Pair using the QR code or link code; existing paired credentials will automatically reconnect.
Git Commit Summary (since ae3d18e)
5af1430 Bumped version to 1.1.6
c38cf8f fix(input): resolve input failure via desktop attachment, token elevation, and sub-pixel accumulation
72ad827 fix(input): resolve input pipeline failures across IPC, gesture handling, and session state
7c842a4 refactor: stabilize input handling, restart logic, and vault commit
6f83f9a style(web): improve home page SEO, layout, and interactions