How yume-chan/ya-webadb works
Main Components
a. Core ADB Implementation Layer
• Authentication & Crypto (from libraries/adb/src/daemon)
• Command Processing (from libraries/adb/src/commands)
• Device Management (from libraries/adb/src/device-observer)
• Transport Layer (from libraries/adb/src/daemon/transport)
b. Platform-Specific Adapters (Top Layer)
• WebUSB Adapter (libraries/adb-daemon-webusb)
• Node.js TCP Adapter (libraries/adb-server-node-tcp)
• Web Credentials Handler (libraries/adb-credential-web)
c. Feature Modules (Right Side)
• Scrcpy Implementation (libraries/scrcpy)
• Android Binary Commands (libraries/android-bin)
• AOA Support (libraries/aoa)
d. Utility Layers (Left Side)
• Stream Handling (libraries/stream-extra)
• Event System (libraries/event)
• Struct Processing (libraries/struct)
• PCM Player (libraries/pcm-player)
Connection Flow
• User Interface → Platform Adapters
• Platform Adapters → ADB Core
• ADB Core → Feature Modules
• Utility Layers ↔ All Components
Specific Implementation Details
• Scrcpy Decoders:
• TinyH264 Decoder
• WebCodecs Decoder
• Command Types:
• Shell Commands
• File Transfer
• Device Control
• Authentication Methods
• Stream Processing
Cross-Platform Support
A section showing supported platforms:
• Chromium Browsers
• Node.js
• Electron
• Chrome for Android
External Interfaces
External connection points:
• USB Device Connections
• TCP/IP Connections
• WebUSB API
• Android Debug Bridge Protocol
Version Support
A small section showing supported ADB protocol versions and compatibility layers.
Key Considerations:
Maintain Clear Hierarchy
• Layered architecture from platform-specific to core implementation
• Modular nature of the system
Interfaces
• Communication points between modules
• Clear boundaries between platform-specific and platform-agnostic code
Important Details
• Protocol versions
• Key features
• Support matrix
Keep it Readable
• Use consistent spacing and alignment
• Clear labels
• Related components together