diff --git a/cspell.config.yaml b/cspell.config.yaml index 096c0943..b3e91598 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -96,6 +96,7 @@ words: - SIGSTOP - storepass # From .github/workflows/e2e.yaml - storyboardc + - syskeys # From adb.dart - subosito # From .github dir, doesn't show up in "**" check? - swiftshader # From .github dir, doesn't show up in "**" check? - sysroot diff --git a/packages/shorebird_cli/lib/src/executables/adb.dart b/packages/shorebird_cli/lib/src/executables/adb.dart index 3c8f9324..46167e0e 100644 --- a/packages/shorebird_cli/lib/src/executables/adb.dart +++ b/packages/shorebird_cli/lib/src/executables/adb.dart @@ -51,6 +51,9 @@ class Adb { if (deviceId != null) ...['-s', deviceId], 'shell', 'monkey', + // Adjust percentage of "system" key events to 0. + // This is needed to support Android systems with no hardware keys. + '--pct-syskeys 0', '-p $package', '1', ]; diff --git a/packages/shorebird_cli/test/src/executables/adb_test.dart b/packages/shorebird_cli/test/src/executables/adb_test.dart index 5176fd67..84e798fd 100644 --- a/packages/shorebird_cli/test/src/executables/adb_test.dart +++ b/packages/shorebird_cli/test/src/executables/adb_test.dart @@ -157,7 +157,10 @@ void main() { completes, ); verify( - () => process.run(adbPath, 'shell monkey -p $package 1'.split(' ')), + () => process.run( + adbPath, + 'shell monkey --pct-syskeys 0 -p $package 1'.split(' '), + ), ).called(1); }); @@ -172,7 +175,8 @@ void main() { verify( () => process.run( adbPath, - '-s $deviceId shell monkey -p $package 1'.split(' '), + '-s $deviceId shell monkey --pct-syskeys 0 -p $package 1' + .split(' '), ), ).called(1); });