5,604,730 Members 33,095 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] install bash command line on your android

Tip us?
 
dheeraj (dhlalit11)
Old
(Last edited by dheeraj (dhlalit11); 4th September 2012 at 11:27 AM.)
#1  
dheeraj (dhlalit11)'s Avatar
Recognized Contributor - OP
Thanks Meter 1399
Posts: 2,391
Join Date: Sep 2011
Location: fatehabad (hry)
Prompt [GUIDE] install bash command line on your android

it is not tested on galaxy mini so I will say it beta, please its a request to post a reply whether it is working or not

bash:- an advanced command line than sh, it is colorful so you can differentiate the commands easily

Quote:
steps for installing bash if you have cwm and want automated process

1:- download the bash command line flashable zip from here

2. download bash enabler script from here

3. flash the bash command line dhlalit11.zip in cwm recovery

4. boot the device normally

5. with the help of script manager execute the bash install.sh script with su privilege

and you are done
Quote:
steps for installing bash if you don't have cwm or want to do it manually

1:- download the bash command line flashable zip from here

2. extract the files to a folder

3. go to /extracted folder/system

4. copy all the files to your system as they are placed

5. open terminal and type chmod 0755 /system/xbin/bash

and its done
note:- running bash will not give you root privilege automatically, you will need to type "su -c bash" to go directly into bash with root
The Following 2 Users Say Thank You to dheeraj (dhlalit11) For This Useful Post: [ Click to Expand ]
 
dheeraj (dhlalit11)
Old
#2  
dheeraj (dhlalit11)'s Avatar
Recognized Contributor - OP
Thanks Meter 1399
Posts: 2,391
Join Date: Sep 2011
Location: fatehabad (hry)
reserved
 
kurotsugi
Old
#3  
kurotsugi's Avatar
Recognized Contributor
Thanks Meter 1757
Posts: 2,520
Join Date: Feb 2012
Location: yogyakarta
if you don't mind...you can add this line into your updater script
Code:
set_perm(0, 0, 0755, "/system/blabla-the file position");
this one will automatically change the file permission for you so that we don't have to run the script anymore. you can also add symlink("/system/bin/bash", "/system/bin/sh"); to replace our old sh with bash so that everytime we use sh command, we will run bash instead. I was using these trick on my old ROM. however, this step will erase our sh binary file. so we must use it carefully. I usually did these step on a fresh rom installation. you might want to test it by yourself to make sure everything is alright.
 
dheeraj (dhlalit11)
Old
#4  
dheeraj (dhlalit11)'s Avatar
Recognized Contributor - OP
Thanks Meter 1399
Posts: 2,391
Join Date: Sep 2011
Location: fatehabad (hry)
I like to make scripts and one more reason is the script first looks for bash in /system/xbin to ensure a proper flash, if bash is not found it will tell the owner

didn't wanted to replace sh
 
kurotsugi
Old
#5  
kurotsugi's Avatar
Recognized Contributor
Thanks Meter 1757
Posts: 2,520
Join Date: Feb 2012
Location: yogyakarta
if the purpose is to check whether it was installed correctly or not you can use run_program command instead and make the installation a lot simpler. you can put the script temporary in cache and delete it after the installation complete. or else...you can play with aroma installer. you can design the UI with several option like
1. install bash
2. symlink bash to sh
3. check the bash installation status
4. etc etc (as you like)
aroma could make our usual installation stuff into sumething more fun and interactive ^,^v

anyway, this is only a suggestion. if you want to use aroma you can modify my multi tweak installer. you said that you like to make scripts. it will be easy for you to get the basic stuff on aroma and starting to made one for your self. the link is in my sig. check the akuro or one pack tweak thread and got the aroma from the latest version there.
 
dheeraj (dhlalit11)
Old
#6  
dheeraj (dhlalit11)'s Avatar
Recognized Contributor - OP
Thanks Meter 1399
Posts: 2,391
Join Date: Sep 2011
Location: fatehabad (hry)
script run in cwm do not print anything on the UI and the user will not see whether the it was done or not

and I had previously used aroma in my rom patch for galaxy s series but this is just a simple task to do

I will think about it, but sure it will take time and I don't have time as I wanted to update the sticky of this forum then I am working on two mods for my karbonn smart tab 1

but I will for sure figure it out
 
iSkateTrash420
Old
(Last edited by iSkateTrash420; 22nd February 2014 at 09:28 PM.) Reason: Added phone info
#7  
Junior Member
Thanks Meter 0
Posts: 3
Join Date: Jun 2013
Default installing bash

hi i have a Galaxy Centura tracphone and i get this error after executing su-c bash into the cmd via adb......I have installed the flashable zip and ran the installer script....



255|root@android:/system/bin # su -c bash
su -c bash
link_image[1936]: 7974 could not load needed library 'libncurses.so' for 'bash
(load_library[1091]: Library 'libncurses.so' not found)CANNOT LINK EXECUTABLE
255|root@android:/system/bin #


any ideas?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes