chao faf16d266e update | il y a 6 mois | |
---|---|---|
.. | ||
src | il y a 6 mois | |
.npmignore | il y a 6 mois | |
CHANGELOG.json | il y a 6 mois | |
CHANGELOG.md | il y a 6 mois | |
LICENSE | il y a 6 mois | |
README.md | il y a 6 mois | |
package.json | il y a 6 mois | |
tsconfig.json | il y a 6 mois |
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-secure
http://192.168.0.100:9000
) to the input boxEnable
from the dropdown menupickDevice
static 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.
fromDevice
static async fromDevice(device: USBDevice): Promise<AdbWebBackend>
Create an AdbWebBackend
instance from an exist USBDevice
instance.
connect
async connect(): Promise<ReadableWritablePair<AdbPacketCore, AdbPacketInit>>
Connect to a device and create a pair of AdbPacket
streams.