INNER CODE UNIT · Python
log
CursorTouch/Android-MCP · e2e_test.py:35
def log(tag, msg, color=CYAN):
print(f"{color}{BOLD}[{tag}]{RESET} {msg}", flush=True)
# ── Resolve ADB ───────────────────────────────────────────────────────────────
def _find_adb() -> Optional[str]:
candidates = [
shutil.which("adb"),
"/opt/homebrew/bin/adb",
os.path.expanduser("~/Library/Android/sdk/platform-tools/adb"),
"/usr/local/bin/adb",
"/usr/bin/adb",
]
for c in candidates:
if c and os.path.isfile(c) and os.access(c, os.X_OK):
return c
return None