MCPcopy Create free account
hub / github.com/Snapchat/Valdi / tryAdbForward

Function tryAdbForward

npm_modules/cli/src/utils/daemonClient.ts:378–384  ·  view source on GitHub ↗
(port: number)

Source from the content-addressed store, hash-verified

376// ─── Factory ─────────────────────────────────────────────────────────────────
377
378async function tryAdbForward(port: number): Promise<void> {
379 try {
380 await runCliCommand(`adb forward tcp:${port} tcp:${port}`);
381 } catch {
382 // adb may not be installed or no Android devices attached — non-fatal
383 }
384}
385
386export async function connectToDaemon(port: number = DEFAULT_PORT): Promise<DaemonConnection> {
387 // Only set up adb forwarding for mobile ports — standalone macOS apps listen

Callers 1

connectToDaemonFunction · 0.85

Calls 1

runCliCommandFunction · 0.90

Tested by

no test coverage detected