Skip to content

Commit 6e9a441

Browse files
fix: add missing arguments to adb shell (#1916)
1 parent 8d8d638 commit 6e9a441

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/cli-platform-android/src/commands/runAndroid/tryLaunchAppOnDevice.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,19 @@ function tryLaunchAppOnDevice(
2626
: [packageName, args.mainActivity].filter(Boolean).join('.');
2727

2828
try {
29+
// Here we're using the same flags as Android Studio to launch the app
2930
const adbArgs = [
3031
'shell',
3132
'am',
3233
'start',
3334
'-n',
3435
`${packageNameWithSuffix}/${activityToLaunch}`,
36+
'-a',
37+
'android.intent.action.MAIN',
38+
'-c',
39+
'android.intent.category.LAUNCHER',
3540
];
41+
3642
if (device) {
3743
adbArgs.unshift('-s', device);
3844
logger.info(`Starting the app on "${device}"...`);

0 commit comments

Comments
 (0)