mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-03 01:39:21 +02:00
feat(adb): add partial support for ADB server version 40
This commit is contained in:
parent
fba7533d78
commit
ab98953b69
9 changed files with 396 additions and 187 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
import "source-map-support/register.js";
|
||||
|
||||
import { Adb, AdbServerClient } from "@yume-chan/adb";
|
||||
import { Adb, AdbServerClient, Ref } from "@yume-chan/adb";
|
||||
import { AdbServerNodeTcpConnector } from "@yume-chan/adb-server-node-tcp";
|
||||
import { WritableStream } from "@yume-chan/stream-extra";
|
||||
import { program } from "commander";
|
||||
|
@ -132,6 +132,8 @@ createDeviceCommand("shell [args...]")
|
|||
)
|
||||
.configureHelp({ showGlobalOptions: true })
|
||||
.action(async (args: string[], options: DeviceCommandOptions) => {
|
||||
const ref = new Ref();
|
||||
|
||||
const adb = await createAdb(options);
|
||||
const shell = await adb.subprocess.shell(args);
|
||||
|
||||
|
@ -169,6 +171,8 @@ createDeviceCommand("shell [args...]")
|
|||
process.exit(1);
|
||||
},
|
||||
);
|
||||
|
||||
ref.unref();
|
||||
});
|
||||
|
||||
createDeviceCommand("logcat [args...]")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue