#!/usr/bin/env node
const { execSync } = require('child_process')
const path = require('path')

// Get adb path relative to project root
const projectRoot = path.resolve(__dirname, '../..')
const adbPath = path.join(projectRoot, 'exe', 'adb', 'adb.exe')

// Enable TCP/IP debugging on port 5555 via USB
const port = 5555
const command = `"${adbPath}" tcpip ${port}`
const output = execSync(command, { encoding: 'utf-8' })
console.log(output.trim())
