With the appearance of WebUSB API, which allows JavaScript running in browsers to communicate with devices over USB, an interesting idea came into my mind: Can I implement the Android Debug Bridge (ADB) protocol in JavaScript?
Turns out someone has already tried that, but this one isn’t that well-featured (It even doesn’t support token authentication). So I thought it was still worth a shot.
I have already completed some features, during that I have so many details I want to record and share. In this series of blog posts, I want to achieve:
- Document the ADB protocol in detail. Current documentation of ADB itself is pretty outdated. ADB had added many iterations to exist features without documentation.
- Share reasons about my architecture decisions.
- Record the process of me implement each feature.
You can check the source code at https://github.com/yume-chan/ya-webadb.
I have also made an online demo you can try at https://yume-chan.github.io/ya-webadb. If you have any problems, file an issue at https://github.com/yume-chan/ya-webadb/issues.