|
|
1 ano atrás | |
|---|---|---|
| .. | ||
| src | 1 ano atrás | |
| .npmignore | 1 ano atrás | |
| CHANGELOG.json | 1 ano atrás | |
| CHANGELOG.md | 1 ano atrás | |
| LICENSE | 1 ano atrás | |
| README.md | 1 ano atrás | |
| package.json | 1 ano atrás | |
| tsconfig.json | 1 ano atrás | |
Backend for @yume-chan/adb using WebUSB (MDN, Spec) API.
WebUSB API requires secure context (basically means HTTPS).
Chrome will treat localhost as secure, but if you want to access a dev server running on another machine, you need to add the domain to the allowlist:
chrome://flags/#unsafely-treat-insecure-origin-as-securehttp://192.168.0.100:9000) to the input boxEnable from the dropdown menupickDevicestatic async pickDevice(): Promise<AdbWebBackend | undefined>
Request browser to present a list of connected Android devices to let the user choose from.
Returns undefined if the user canceled the picker.
fromDevicestatic async fromDevice(device: USBDevice): Promise<AdbWebBackend>
Create an AdbWebBackend instance from an exist USBDevice instance.
connectasync connect(): Promise<ReadableWritablePair<AdbPacketCore, AdbPacketInit>>
Connect to a device and create a pair of AdbPacket streams.