如何运行adb shell命令并保留在shell中? [英] How to run an adb shell command and remain in the shell?
问题描述
有人知道如何从adb shell运行命令并保持在shell会话中吗?
我想实现的目标是在adb shell中设置别名。
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 following without success
adb shell <<< "ls"
执行此命令后确实保留在shell中,但是无法接收任何其他命令的输出。
After executing this command indeed remain in shell, but cannot receive output of any further command.
我还尝试了以下操作:
adb shell <<EOF
ls
EOF
,结果相同。
推荐答案
运行时:
adb shell ls
您当前正在ADB外部运行此命令。
You are running this command currently outside of ADB.
首先,您需要输入ADB:
First, you need to enter ADB:
adb shell
一旦进入ADB shell,您将继续看到输出并输入更多命令。
Once you enter ADB shell, you can continue to see output and input more commands.
ls
help
要退出亚行,只需键入退出或按 Ctrl + C
To exit ADB, simply type "exit" or hit "Ctrl + C"
这篇关于如何运行adb shell命令并保留在shell中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!