From b85a78f1d42c7bbeaebc52fe9b5465ae90c423c7 Mon Sep 17 00:00:00 2001 From: Shane Harris Date: Mon, 1 Aug 2022 11:20:43 +0100 Subject: [PATCH] fixed the launch app button --- desktop-app/src/app/adb-client.service.ts | 24 +++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/desktop-app/src/app/adb-client.service.ts b/desktop-app/src/app/adb-client.service.ts index 55dea4a..c06e787 100644 --- a/desktop-app/src/app/adb-client.service.ts +++ b/desktop-app/src/app/adb-client.service.ts @@ -160,17 +160,21 @@ export class AdbClientService { }); } launchApp(packageName) { - return this.adbCommand('shell', { - serial: this.deviceSerial, - command: 'dumpsys package ' + packageName + " | grep -A 1 'filter' | head -n 1 | cut -d ' ' -f 10", - }).then(res => - res - ? this.adbCommand('shell', { - serial: this.deviceSerial, - command: 'am start -n ' + res.trim(), - }) - : Promise.reject('Could not find activity name for ' + packageName) + return this.runAdbCommand( + `adb shell monkey -p ${packageName} -c com.oculus.intent.category.VR -c android.intent.category.LAUNCHER -vvv 3` ); + // + // return this.adbCommand('shell', { + // serial: this.deviceSerial, + // command: 'dumpsys package ' + packageName + " | grep -A 1 'filter' | head -n 1 | cut -d ' ' -f 10", + // }).then(res => + // res + // ? this.adbCommand('shell', { + // serial: this.deviceSerial, + // command: 'am start -n -a com.example.ACTION_NAME ' + res.trim(), + // }) + // : Promise.reject('Could not find activity name for ' + packageName) + // ); } installMultiFile(filepath) {