Android, like any Unix OS and in general like any other operating system has a shell(wikipedia) [Obviously we talk about the Shell textual or command line], which works thanks to a emulator of command line (Terminal). Android has the shell "sh"(/ System / bin / sh), emulated or" operated "in simple words generally by"adb shell“, Thanks to USB debugging and a PC equipped with another shell (Batch for Windows, Bash for GNU / Linux systems and also BSD, etc etc ...), but in the Play Store there are emulators that allow it to work directly on the OS itself, and obviously we will get the advantage: we have the possibility of interact with the operating system itself directly from your phone, without needing to connect it to a PC. To extend, the functionality of the shell and the Android OS in general is also installed BusyBox, thanks to the root a patch of Unix functions that extend the default ones of Android, there is also to say that leaving your shell on the device with root enabled is risky. Today we see how to install Bash on Android and set it as default shell for an emulator and how to run it on adb.
Install Bash X from the Play Store
Download the Bash X app from the Play Store which will be used to install Bash for ARM architectures
Download in English: Bash X
From the Bash X app we press Install then #root shell
Then the Bash binary file will be installed in the device, ready to be used, by pressing root shell we will check if bash is installed (it returns the version of bash (bash –version))
Let's go into the terminal settings and set it as the default Shell ...
the path to the bash binary file: "/data/data/com.bitcubate.android.bash.installer/bash -"
... and if we want we set an initial command
therefore from the popup we select the command that will be executed as soon as the terminal is opened by the user
That's all! Bash installed!
And for ADB?
For the ADB SHELL utility just run the following command "../data/data/com.bitcubate.android.bash.installer/bash" you can also use this command from the Sh shell from the terminal on the phone, if you don't want to replace Sh .