Skip to content

Commit 0a8c2ba

Browse files
committed
Fix "SYS_KEYS has no physical keys but with factor 2.0%" on adbe start
This fixes following error on devices without physical keys: args: [-p, com.android.settings, -c, android.intent.category.LAUNCHER, 1] arg: "-p" arg: "com.android.settings" arg: "-c" arg: "android.intent.category.LAUNCHER" arg: "1" data="com.android.settings" data="android.intent.category.LAUNCHER" ** SYS_KEYS has no physical keys but with factor 2.0%. For details see appium/appium-android-driver#729 and https://stackoverflow.com/questions/44860475/how-to-use-the-monkey-command-with-an-android-system-that-doesnt-have-physical and ARM-software/lisa#408
1 parent 842bb8f commit 0a8c2ba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

adbe/adb_enhanced.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1426,7 +1426,9 @@ def cat_file(file_path: str) -> None:
14261426
# Source: https://stackoverflow.com/a/25398877
14271427
@ensure_package_exists
14281428
def launch_app(app_name: str) -> None:
1429-
adb_shell_cmd = f"monkey -p {app_name} -c android.intent.category.LAUNCHER 1"
1429+
# `--pct-syskeys 0` is needed on devices without physical keys.
1430+
# See https://github.com/ARM-software/lisa/pull/408 for details.
1431+
adb_shell_cmd = f"monkey --pct-syskeys 0 -p {app_name} -c android.intent.category.LAUNCHER 1"
14301432
execute_adb_shell_command3(adb_shell_cmd)
14311433

14321434

0 commit comments

Comments
 (0)