上传者: 42103128
|
上传时间: 2022-02-11 23:45:39
|
文件大小: 10KB
|
文件类型: -
基于 WebUSB 的 Android 调试桥 (adb) 的一站式 .js
let webusb = await Adb . open ( "WebUSB" ) ;
let adb = await webusb . connectAdb ( "host::" ) ;
let shell = await adb . shell ( "uname -a" ) ;
console . log ( await shell . receive ( ) ) ;
安装
来自 NPM:
npm install --save webadb
从CDN:
< script src =" https://cdn.jsdelivr.net/gh/webadb/webadb.js@master/webadb.js " > </ script >