How to run an adb shell command and remain in the shell?

前端 未结 3 878
攒了一身酷
攒了一身酷 2021-01-11 12:48

Does anyone know how to run commands from adb shell and remain in shell session? What I`m trying to achieve is to set aliases in adb shell.

I have tried the followi

3条回答
  •  盖世英雄少女心
    2021-01-11 13:18

    There was a similar question answered in the comments here.

    In short, run the following from your terminal:

    stty raw -echo ; ( echo "ls" && cat ) | adb shell ; stty sane

    Note: without the stty magic, the command is piped to adb and tab complete etc. is not recognized.

提交回复
热议问题