From 9aed64d10e1a576d52e07b866b4c1721705877eb Mon Sep 17 00:00:00 2001 From: James Woodall Date: Mon, 5 Aug 2024 21:17:03 +0200 Subject: [PATCH 1/2] Accept amStartArgs --- src/debugMain.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debugMain.js b/src/debugMain.js index de33a6e..d1611c8 100644 --- a/src/debugMain.js +++ b/src/debugMain.js @@ -568,7 +568,7 @@ class AndroidDebugSession extends DebugSession { // check we have something to launch - we do this again later, but it's a bit better to do it before we start device comms let launchActivity = args.launchActivity; - if (!launchActivity) + if (!launchActivity && !this.am_start_args) if (!(launchActivity = this.apk_file_info.manifest.launcher)) throw new Error('No valid launch activity found in AndroidManifest.xml or launch.json'); From eebabcac74a491c0e0031d274d7ce76c5a391d34 Mon Sep 17 00:00:00 2001 From: James Woodall Date: Mon, 5 Aug 2024 21:20:47 +0200 Subject: [PATCH 2/2] Check for empty array in amStartArgs --- src/debugMain.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debugMain.js b/src/debugMain.js index d1611c8..3dfb403 100644 --- a/src/debugMain.js +++ b/src/debugMain.js @@ -568,7 +568,7 @@ class AndroidDebugSession extends DebugSession { // check we have something to launch - we do this again later, but it's a bit better to do it before we start device comms let launchActivity = args.launchActivity; - if (!launchActivity && !this.am_start_args) + if (!launchActivity && !this.am_start_args?.length) if (!(launchActivity = this.apk_file_info.manifest.launcher)) throw new Error('No valid launch activity found in AndroidManifest.xml or launch.json');