如何在 adb (android) 中使用 Bash 而不是 Shell? [英] How to use Bash in adb (android ) instead of Shell?
问题描述
我目前正在使用 adb 终端访问我的数据库文件.但是,我只能使用此访问终端:
I'm currently using adb terminal to access my database files. However, I can only access the terminal using this:
./adb shell
我想从 sh 切换到 bash,因为它对于某些快捷方式更方便.我该怎么做?
I would like to switch from sh to bash as it is much more convenient for some shortcuts. How do I do that?
推荐答案
已回答 此处
找到合适的 &来自 Linux 机器的简单方法:
Found the proper & simple way from a Linux box:
adb shell -t bash -i
您直接通过 bash 以交互方式登录.
You logon directly via bash in interactive way.
为了不必一直记住这个命令,我个人使用别名,只需将其添加到 Linux 机器上的 ~/.bashrc
中:
To not having to remember this command all the times, I personally
use an alias, simply add this to your ~/.bashrc
on Linux box:
alias adb_shell='adb shell -t bash -i'
source ~/.bashrc
那么一切都配置好了,直接运行
Then all is configured, simply run
adb_shell
并享受所有 bash
功能,例如 Tab 补全等.\o/
and enjoy all bash
features like tab completion and anything. \o/
这篇关于如何在 adb (android) 中使用 Bash 而不是 Shell?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!