Skip to content

feat(lan): Wireless QR pairing, mDNS discovery, persistent root & UHID keyboard - #6

Merged
Exmeaning merged 10 commits into
masterfrom
arena/adbcda49-clickzen
Nov 9, 2026
Merged

Exmeaning merged 10 commits into
masterfrom
arena/adbcda49-clickzen

Conversation

@Exmeaning

Copy link
Copy Markdown
Owner

Summary

Upgrades ClickZen's local/LAN real-device interconnection and input injection experience:

  • Android 11+ Wireless Debugging QR Pairing & LAN mDNS Discovery:
    • Self-contained ISO/IEC 18004 QR Code encoder (QrCodeEncoder) + WIFI:T:ADB;S:...;P:...;; credential builder (AdbWirelessQrCredentials), optically verified against OpenCV's QRCodeDetector.
    • Pure-C# DNS-SD / mDNS querier & parser (MdnsPacket, AdbMdnsDiscovery) + adb mdns services supplement for _adb-tls-pairing._tcp, _adb-tls-connect._tcp, and _adb._tcp.
    • Automatic QR scan -> TLS pair -> connect port resolution (WirelessQrPairCoordinator) and dynamic-port self-healing in AutoConnector & DevicesViewModel.
    • One-click USB -> Wi-Fi (EnableWirelessAsync, tcpip:5555) on USB device cards and MCP tools (discover_lan_devices, enable_wireless_adb).
  • Persistent Root Fast Input Injection (PersistentRootInjector):
    • Maintains a single persistent uid=0 ADB socket shell keeping /dev/input/eventX open on fd 4, eliminating per-gesture su -c spawn overhead (~80-150 ms -> ~1-2 ms) with automatic fallback and mid-gesture slot cleanup.
  • Scrcpy v4.1 UHID Hardware Keyboard & Unicode Text Paste:
    • TYPE_UHID_CREATE / TYPE_UHID_DESTROY virtual USB keyboard toggle (DeviceDefaults.SuppressSoftKeyboard) to suppress on-screen soft keyboard popups while mirroring.
    • Automatic SET_CLIPBOARD(paste: true) routing in ScrcpyTouchInjector.TextAsync for Chinese/Unicode and >300-byte strings.
  • Smart ROM Input Rejection Diagnostics & Auto-Fallback:
    • Detects Xiaomi HyperOS/MIUI, VIVO, and OPPO INJECT_EVENTS SecurityException rejections in scrcpy-server output: automatically switches rooted phones to PersistentRootInjector or surfaces clear USB debugging (Security settings) guidance.

Exmeaning and others added 2 commits November 9, 2026 08:49
…UHID input

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@Exmeaning Exmeaning closed this Nov 9, 2026
@Exmeaning Exmeaning reopened this Nov 9, 2026
…Capability

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@Exmeaning Exmeaning closed this Nov 9, 2026
@Exmeaning Exmeaning reopened this Nov 9, 2026
…FakeAdbClient signatures

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@Exmeaning Exmeaning closed this Nov 9, 2026
@Exmeaning Exmeaning reopened this Nov 9, 2026
…ssAdbAsync

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@Exmeaning Exmeaning closed this Nov 9, 2026
@Exmeaning Exmeaning reopened this Nov 9, 2026
…iet zone

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@Exmeaning Exmeaning closed this Nov 9, 2026
@Exmeaning Exmeaning reopened this Nov 9, 2026
…ctAndDecode

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@Exmeaning Exmeaning closed this Nov 9, 2026
@Exmeaning Exmeaning reopened this Nov 9, 2026
…tic PNG contrast

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@Exmeaning Exmeaning closed this Nov 9, 2026
@Exmeaning Exmeaning reopened this Nov 9, 2026
…ations

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@Exmeaning Exmeaning closed this Nov 9, 2026
@Exmeaning Exmeaning reopened this Nov 9, 2026
…ptor

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@Exmeaning Exmeaning closed this Nov 9, 2026
@Exmeaning Exmeaning reopened this Nov 9, 2026
@Exmeaning
Exmeaning merged commit a1d57f1 into master Nov 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant