Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tools/e2e/adb_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

SDK_DEFAULT = "/opt/homebrew/share/android-commandlinetools"
PACKAGE = "com.handlive.android"
# applicationId differs from the Kotlin/manifest namespace, so component names (unlike pm/am package args) need this
NAMESPACE = "app.handlive.android"


def lines_since(text: str, since: float) -> list[str]:
Expand Down Expand Up @@ -113,7 +115,7 @@ def granted(self, permission: str, package: str = PACKAGE) -> bool:
return re.search(rf"android\.permission\.{permission}: granted=true", dump) is not None

def start_app(self, package: str = PACKAGE) -> None:
self.shell(f"am start -W -n {package}/.MainActivity", timeout=60)
self.shell(f"am start -W -n {package}/{NAMESPACE}.MainActivity", timeout=60)

def force_stop(self, package: str = PACKAGE) -> None:
self.shell(f"am force-stop {package}", check=False)
Expand Down
9 changes: 6 additions & 3 deletions tools/e2e/fake_mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@


def capability(platform: str = "macos", *, clipboard: bool = True, sms: bool = True, call: bool = True,
relay: bool = False, notify: bool = True, app_calls: bool = False) -> dict:
relay: bool = False, notify: bool = True, app_calls: bool = False,
app_version: str = "0.0.0 (e2e)") -> dict:
"""0.7.2 as the Apple app builds it (apple/…/LocalDevice.swift): clipboard, SMS, calls and the relay switch;
iPhone and iPad add sms.notify and call.notify. A Mac reports call.app_calls (CALL-05) only when a scenario asks
for it, so the other scenarios never get calls of other apps."""
for it, so the other scenarios never get calls of other apps. `app_version` defaults to a value that marks the
traffic as the fake client's own in logs and benchmarks; callers staging real-looking screenshots may override
it."""
mobile = platform in ("ios", "ipados")
features = {
"clipboard": {"enabled": clipboard, "auto_send": True, "max_text_bytes": 1_048_576,
Expand All @@ -34,7 +37,7 @@ def capability(platform: str = "macos", *, clipboard: bool = True, sms: bool = T
**({"app_calls": app_calls and call} if not mobile else {})},
"relay": {"enabled": relay},
}
return {"protocol": 1, "app_version": "0.0.0 (e2e)", "platform": platform,
return {"protocol": 1, "app_version": app_version, "platform": platform,
"os_version": "18.0" if mobile else "15.0", "model": CLIENT_MODELS.get(platform, "Mac15,3"),
"features": features}

Expand Down
Loading