feat: use more pipes

This commit is contained in:
Simon Chan 2022-02-16 18:09:20 +08:00
parent 86d518fdab
commit 8b78c9c331
18 changed files with 392 additions and 316 deletions

View file

@ -6,14 +6,14 @@ export class AdbTcpIpCommand extends AdbCommandBase {
throw new Error(`Invalid port ${port}`);
}
const output = await this.adb.createSocketAndReadAll(`tcpip:${port}`);
const output = await this.adb.createSocketAndWait(`tcpip:${port}`);
if (output !== `restarting in TCP mode port: ${port}\n`) {
throw new Error('Invalid response');
}
}
public async disable(): Promise<void> {
const output = await this.adb.createSocketAndReadAll('usb:');
const output = await this.adb.createSocketAndWait('usb:');
if (output !== 'restarting in USB mode\n') {
throw new Error('Invalid response');
}