![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@yume-chan/adb-daemon-webusb
Advanced tools
Adb daemon transport connection for `@yume-chan/adb` using WebUSB API.
ADB daemon transport device for @yume-chan/adb
using WebUSB (MDN, Spec) API.
AdbDaemonWebUsbDevice
AdbDaemonWebUsbDeviceManager
Chrome | Edge | Firefox | Internet Explorer | Safari |
---|---|---|---|---|
611 | 791 | No | No | No |
1: Chrome for Android is supported, Chrome for iOS is NOT supported.
Node.js | usb NPM Package |
---|---|
10.5 | 2.8.1 |
Node.js doesn't have native support for WebUSB API, but the usb
NPM package provides a WebUSB compatible API.
To use a custom WebUSB API implementation, pass it to the constructor of AdbDaemonWebUsbDevice
, AdbDaemonWebUsbDeviceManager
and AdbDaemonWebUsbConnectionWatcher
via the usbManager
parameter.
AdbDaemonWebUsbDevice
public constructor(
device: USBDevice,
filters: AdbDeviceFilter[] = [ADB_DEFAULT_DEVICE_FILTER]
usbManager: USB
);
Create a new instance of AdbDaemonWebUsbDevice
using a specified USBDevice
instance.
USBDevice
and USB
types are from WebUSB API.
The filters
parameter specifies the classCode
, subclassCode
and protocolCode
to use when searching for ADB interface. The default value is [{ classCode: 0xff, subclassCode: 0x42, protocolCode: 0x1 }]
, defined by Google.
raw
public get raw(): USBDevice;
Gets the raw USBDevice
from the device. Allow sending/receiving USB packets to other interfaces/endpoints. For example can be used with @yume-chan/aoa
package.
connect
public async connect(): Promise<
ReadableWritablePair<AdbPacketData, Consumable<AdbPacketInit>>
>
Claim the device and create a pair of AdbPacket
streams to the ADB interface.
AdbDaemonWebUsbDeviceManager
A helper class that wraps the WebUSB API.
BROWSER
public static readonly BROWSER: AdbDaemonWebUsbDeviceManager | undefined;
Gets the instance of AdbDaemonWebUsbDeviceManager
using browser WebUSB implementation.
May be undefined
if the browser does not support WebUSB.
public constructor(usbManager: USB);
Create a new instance of AdbDaemonWebUsbDeviceManager
using the specified WebUSB API implementation.
requestDevice
public async requestDevice(
filters: AdbDeviceFilter[] = [ADB_DEFAULT_DEVICE_FILTER]
): Promise<AdbDaemonWebUsbDevice | undefined>
Request access to a connected device.
This is a convince method for usb.requestDevice()
.
The filters
parameter must have classCode
, subclassCode
and protocolCode
fields for selecting the ADB interface. It can also have vendorId
, productId
or serialNumber
fields to limit the displayed device list.
Returns an AdbDaemonWebUsbDevice
instance, or undefined
if the user cancelled the picker.
getDevices
public async getDevices(
filters: AdbDeviceFilter[] = [ADB_DEFAULT_DEVICE_FILTER]
): Promise<AdbDaemonWebUsbDevice[]>
Get all connected and authenticated devices.
This is a convince method for usb.getDevices()
.
WebUSB requires a secure context (HTTPS).
localhost
is considered secure, so local development works. But to access a self-hosted server running on another machine, either add a certificate, or add the domain name to the allowlist on each client machine:
chrome://flags/#unsafely-treat-insecure-origin-as-secure
http://192.168.0.100:9000
) to the input boxEnable
from the dropdown menuFAQs
Adb daemon transport connection for `@yume-chan/adb` using WebUSB API.
The npm package @yume-chan/adb-daemon-webusb receives a total of 40 weekly downloads. As such, @yume-chan/adb-daemon-webusb popularity was classified as not popular.
We found that @yume-chan/adb-daemon-webusb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.