Skip to content

Commit 9f71a69

Browse files
joelgallantzamotany
authored andcommitted
feat: reads ANDROID_HOME for adb location (#627)
1 parent da18d3b commit 9f71a69

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/haul-core/src/utils/runAdbReverse.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ export default function runAdbReverse(
55
runtime: Runtime,
66
port: number
77
): Promise<string | undefined> {
8-
const command = `adb reverse tcp:${port} tcp:${port}`;
8+
const androidHome = process.env.ANDROID_HOME;
9+
const adb = androidHome ? `${androidHome}/platform-tools/adb` : 'adb';
10+
const command = `${adb} reverse tcp:${port} tcp:${port}`;
911

1012
return new Promise(resolve => {
1113
exec(command, error => {

0 commit comments

Comments
 (0)