diff --git a/tools/adb_shell.sh b/tools/adb_shell.sh new file mode 100755 index 0000000000..985c5c0726 --- /dev/null +++ b/tools/adb_shell.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env expect +spawn adb shell +expect "#" +send "cd usr/comma\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 c6abde67a3..b4508f7ef7 100755 --- a/tools/op.sh +++ b/tools/op.sh @@ -273,6 +273,11 @@ function op_venv() { esac } +function op_adb() { + op_before_cmd + op_run_command tools/adb_shell.sh +} + function op_check() { VERBOSE=1 op_before_cmd @@ -390,6 +395,7 @@ function op_default() { echo -e " ${BOLD}juggle${NC} Run PlotJuggler" echo -e " ${BOLD}replay${NC} Run Replay" echo -e " ${BOLD}cabana${NC} Run Cabana" + echo -e " ${BOLD}adb${NC} Run adb shell" echo "" echo -e "${BOLD}${UNDERLINE}Commands [Testing]:${NC}" echo -e " ${BOLD}sim${NC} Run openpilot in a simulator" @@ -446,6 +452,7 @@ function _op() { stop ) shift 1; op_stop "$@" ;; restart ) shift 1; op_restart "$@" ;; post-commit ) shift 1; op_install_post_commit "$@" ;; + adb ) shift 1; op_adb "$@" ;; * ) op_default "$@" ;; esac }