mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-04 10:19:17 +02:00
feat: use more pipes
This commit is contained in:
parent
86d518fdab
commit
8b78c9c331
18 changed files with 392 additions and 316 deletions
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue