`op.sh`: adb (#34468)

* add op adb

* adb_shell.sh

* su comma

* add to op output
pull/34675/head
Mauricio Alvarez Leon 2 months ago committed by GitHub
parent 5bc58e0b36
commit d15d77f7bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      tools/adb_shell.sh
  2. 7
      tools/op.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

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

Loading…
Cancel
Save