Merge branch 'master' into feature/edit-recipe-event-bus
This commit is contained in:
commit
3625712678
28 changed files with 6414 additions and 783 deletions
|
|
@ -192,7 +192,7 @@ async function connectWithRetry<T>(
|
|||
export async function connnectViaWebUSB(connectAndroidServer = true) {
|
||||
adbConnectionStatus.setConnecting();
|
||||
const device = await AdbDaemonWebUsbDeviceManager.BROWSER?.requestDevice();
|
||||
logger.info('usb ok', globalThis.navigator.usb);
|
||||
logger.info('usb ok', (globalThis.navigator as Navigator & { usb?: unknown }).usb);
|
||||
if (device) {
|
||||
logger.info('connect ', device.name);
|
||||
|
||||
|
|
@ -441,6 +441,15 @@ export async function executeCmd(command: string) {
|
|||
}
|
||||
}
|
||||
|
||||
export async function goToMachineHome() {
|
||||
if (!getAdbInstance()) return;
|
||||
try {
|
||||
await executeCmd('input keyevent KEYCODE_HOME');
|
||||
} catch (e) {
|
||||
console.error('[goToMachineHome] error', e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute an ADB command and stream its output via callbacks.
|
||||
* Used for commands like `logcat` that run indefinitely.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue