From ddb19cc0742a8f7cbf6e71fdd00dfbb5c7a80139 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Tue, 6 May 2025 10:21:23 -0700 Subject: [PATCH] op: better adb SSH (#35135) * op: better adb SSH * fix --- tools/adb_shell.sh | 8 -------- tools/op.sh | 2 +- tools/scripts/adb_ssh.sh | 7 +++++++ 3 files changed, 8 insertions(+), 9 deletions(-) delete mode 100755 tools/adb_shell.sh create mode 100755 tools/scripts/adb_ssh.sh diff --git a/tools/adb_shell.sh b/tools/adb_shell.sh deleted file mode 100755 index f757f7d4d0..0000000000 --- a/tools/adb_shell.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env expect -spawn adb shell -expect "#" -send "cd data/openpilot\r" -send "export TERM=xterm-256color\r" -send "su comma\r" -send "clear\r" -interact diff --git a/tools/op.sh b/tools/op.sh index 8a8faaf237..25a4670cd1 100755 --- a/tools/op.sh +++ b/tools/op.sh @@ -275,7 +275,7 @@ function op_venv() { function op_adb() { op_before_cmd - op_run_command tools/adb_shell.sh + op_run_command tools/scripts/adb_ssh.sh } function op_check() { diff --git a/tools/scripts/adb_ssh.sh b/tools/scripts/adb_ssh.sh new file mode 100755 index 0000000000..43c8e07de6 --- /dev/null +++ b/tools/scripts/adb_ssh.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -e + +# this is a little nicer than "adb shell" since +# "adb shell" doesn't do full terminal emulation +adb forward tcp:2222 tcp:22 +ssh comma@localhost -p 2222