MCPcopy Create free account
hub / github.com/Action-State-Labs/android-action-kernel / run_adb_command

Function run_adb_command

actions.py:20–29  ·  view source on GitHub ↗

Executes a shell command via ADB.

(command: List[str])

Source from the content-addressed store, hash-verified

18
19
20def run_adb_command(command: List[str]) -> str:
21 """Executes a shell command via ADB."""
22 result = subprocess.run(
23 [Config.ADB_PATH] + command,
24 capture_output=True,
25 text=True
26 )
27 if result.stderr and "error" in result.stderr.lower():
28 print(f"❌ ADB Error: {result.stderr.strip()}")
29 return result.stdout.strip()
30
31
32def execute_action(action: Dict[str, Any]) -> None:

Callers 7

get_screen_stateFunction · 0.90
_execute_tapFunction · 0.85
_execute_typeFunction · 0.85
_execute_enterFunction · 0.85
_execute_swipeFunction · 0.85
_execute_homeFunction · 0.85
_execute_backFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected