Jump to content

Changing default shell to bash in CM7


Guest sm4tik

Recommended Posts

Guest sm4tik

I already asked this in CM7 thread but I guess it's just too easy to get buried there so I'm making an own thread.

I'd like to change the default systemwide shell of CM7 to bash but haven't found a good solution to it yet. By systemwide I mean that terminal, adb shell, ssh, etc. would all default to bash when used. All the tutorials I've read are symlinking sh to bash, but that's not the proper way to do it. There's no chsh in CM7 and I've not done it any other way before, so what files do I need to edit/add to make it work? I'd also like this to be something I can do before flashing, so every fresh install would behave the same.

Thanks!

Link to comment
Share on other sites

Guest fonix232

You can do it, by editing the boot.img. Take it apart (kernel-split.pl or whatever it is called), and take a look into init.rc! There will be a service called console, simply modify that to run bash instead of sh.

Link to comment
Share on other sites

Guest sm4tik
You can do it, by editing the boot.img. Take it apart (kernel-split.pl or whatever it is called), and take a look into init.rc! There will be a service called console, simply modify that to run bash instead of sh.

Ok, found it thanks! I don't have mkbootfs or mkbootimg though, maybe I'll just get -compiling from source- working first and then give it another go. Or if anyone wants to upload those files, I'd be grateful!

Link to comment
Share on other sites

Guest sm4tik

Ok, so I edited init.rc by changing the line

service console /system/bin/sh

to

service console /system/xbin/bash

but after flashing the new boot.img, nothing's changed. Any ideas, anything else need to be modified?

BTW, where can I find the "official" commandline used with mkbootimg when compiling CM7? I'm still strugling with my setup and actually just found out it might take a few tries to get compiled with a 32bit system.. if even then.. So for now, maybe I'll be better off just modifying the precompiled rom instead.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.