op: better adb SSH (#35135)

* op: better adb SSH

* fix
This commit is contained in:
Adeeb Shihadeh
2025-05-06 10:21:23 -07:00
committed by GitHub
parent 5c1f28591f
commit ddb19cc074
3 changed files with 8 additions and 9 deletions

View File

@@ -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

View File

@@ -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() {

7
tools/scripts/adb_ssh.sh Executable file
View File

@@ -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