Bash Shell Environment

TechRemedy

Member
Jan 4, 2011
83
2
Hey guys! I know the following post is messy, but I'm still working out the kinks. I really wanted to get the bash shell environment working on my S7. I started looking around the webs and found this thread on the xda forums:

shell bash for android - xda-developers

Following those instructions, here's what I've done so far (This all assumes that the user has root of course. I used z4root):

# echo $SHELL
/system/bin/sh
I want that to say /system/bin/bash instead! I love bash because of color coding, simplified scripting options, tab auto-complete, no semi-colons at the end of every line of a script...etc.

Here's the file:

http://pub.mzet.net/bash

First, I downloaded the above file and moved it to /system/bin

Next, I did the following in the terminal:

$su
#cd /system/bin
#chmod 0755 bash
#mv sh sh0
#ln -s bash sh
Next, I rebooted and opened up the terminal emulator. Excellent! bash is now running! Auto-complete using tab now works!

So the problem I'm having now is that I can't seem to connect to the internet from the prompt when I am connected to the S7 via ssh:

bash-3.2# ping google.com
ping: unknown host google.com

This issue is only happening through ssh...My browser on the S7 still works as it did before and internet still works via terminal emulator.

I will keep hacking away at this and hopefully come up with a solution. I would also prefer to not run bash via symlink. It would be nice to get this all working correctly and then adjust the init.rc to use bash as the shell.

Feel free to add anything that you think might help.
 
I might give this a go sometime today. not that I really need the bash shell.

Sent from my Ideos S7 using Android Tablet Forum App
 
how to use <TAB> ???

I use SmartKeyboard Pro - it's not free, but there's a trial so you can verify if it works or not before buying. The <TAB> key is in the 3rd level of the keyboard. First press the "?123" key, then the "Alt" key. Now, the upside down question mark above the period is functioning as a tab key for me...not sure why, but it works!
 
I did this download the bash binary file
Copy bash to /system/bin/
Change permission to bash
And on terminal emulator select preference
Initial command type in
su -c bash
Viola bash on start
I know it was very annoying that the history does not scroll lol.
 
Thanks for sharing this. It worked for me on Android gingerbread 2.3.1. Bash shell is much better than the default coming with Android.

Concerning the <TAB> key, I'm using the Hacker's Keyboard, which can be found on the Android Market.

Plecto
 
Back
Top