No description
Find a file
Simon Chan 4ea13ee5cb
Merge pull request #1 from yume-chan/dependabot/npm_and_yarn/acorn-7.1.1
chore(deps): bump acorn from 7.1.0 to 7.1.1
2020-03-15 11:27:40 +08:00
lib feat: bundle css 2020-01-31 17:11:06 +08:00
src feat: bundle css 2020-01-31 17:11:06 +08:00
.gitignore chore: publish gh-pages 2020-01-31 16:48:23 +08:00
LICENSE Initial commit 2020-01-31 16:17:13 +08:00
package-lock.json chore(deps): bump acorn from 7.1.0 to 7.1.1 2020-03-15 03:25:29 +00:00
package.json feat: bundle css 2020-01-31 17:11:06 +08:00
README.md feat: init commit 2020-01-31 16:39:49 +08:00
rollup.config.js feat: bundle css 2020-01-31 17:11:06 +08:00
test.html feat: bundle css 2020-01-31 17:11:06 +08:00
tsconfig.json feat: init commit 2020-01-31 16:39:49 +08:00

Yet Another WebADB

Connect to your Android phones from everything that can run (supported) web browser, including PC, mac, and even another Android phone.

Inspired by webadb.js, but completely rewritten.

How does it work

Currently only the interactive shell (adb shell) is implemented, but I think it's the most difficult but interesting part.

WebUSB API gives JavaScript running in supported web browsers access to USB devices, including Android phones.

ADB uses a fairly simple protocol to commnunicate, so it's pretty easy to reimplement with JavaScript.

adb shell, the interactive shell, uses plain PTY protocol, and xterm.js can handle it very well.

Build

npm run build

Run

npm start

And navigate to http://localhost:8080/test.html.

WebUSB API requires a secure context (basicly means HTTPS).

Chrome will treat localhost as one, but if you want to access test server running on another machine, you can configure you Chrome as following:

  1. Open chrome://flags/#unsafely-treat-insecure-origin-as-secure
  2. Add the protocol and domain part of your url (e.g. http://192.168.0.100:8080) to the input box
  3. Choose Enable from the dropdown menu
  4. Restart your browser