[HOWTO]Remove bash color codes

Adrynalyne

Account Deactivated
Dec 24, 2009
1,346
1,534
0
Anyone who uses the latest roms, mods, etc. is probably using bash. Bash is awesome, bash is great bash is...annoying if you use Windows with adb.



Familiar sight?







bash-4.1# ls

ls

←[1;36mbin←[0m ←[1;32minit.rc←[0m ←[1;34msbin←[0m

←[1;34mcache←[0m ←[1;32minit.smdkc110.rc←[0m ←[1;34msdcard←[0m

←[1;34mconfig←[0m ←[1;32minit.smdkc110.sh←[0m ←[1;34msqlite_stmt_journals←[0m

←[1;34mdata←[0m ←[1;36minit_samsung←[0m ←[1;34msys←[0m

←[1;34mdbdata←[0m ←[1;34mlib←[0m ←[1;34msystem←[0m

←[1;32mdefault.prop←[0m ←[1;32mlpm.rc←[0m ←[1;32msystem.prop←[0m

←[1;34mdev←[0m ←[1;34mmnt←[0m ←[1;34mtmp←[0m

←[1;34mefs←[0m ←[1;34mpreinstall←[0m ←[1;34muserdata←[0m

←[1;36metc←[0m ←[1;34mproc←[0m ←[1;36musr←[0m

←[1;32mfota.rc←[0m ←[1;32mrecovery.rc←[0m ←[1;34mvoodoo←[0m

←[1;36minit←[0m ←[1;34mres←[0m







Now my way:



bash-4.1# ls

ls

bin init.rc sbin

cache init.smdkc110.rc sdcard

config init.smdkc110.sh sqlite_stmt_journals

data init_samsung sys

dbdata lib system

default.prop lpm.rc system.prop

dev mnt tmp

efs preinstall userdata

etc proc usr

fota.rc recovery.rc voodoo

init res









Requirements:

Root.

Clockworkmod Recovery.


My color code removal patch.







Patch

http://dl.dropbox.com/u/2056318/bash_nocolor_1.1.zip



Install via cwm. Make a nandroid backup first, JUST IN CASE.



If my patch hosed ls on your phone, this should fix it. Sorry about that.
http://dl.dropbox.com/u/2056318/bash_nocolor_fix.zip
 
Last edited:
Hate to be the bringer of bad news, but something in this breaks WiFi. After installing it, I can no longer connect to my router, it just stalls at "Obtaining address". When I check the router, it's already assigned an address.

I reflashed DL09 cleanly, and it connects right away. I re-apply this fix, and WiFi stops working again.
 
I did say make a nandroid backup....right?

Anyway, you are correct. Patch has been removed until I can figure something else out. Please revert to an earlier nandroid.
 
Last edited:
First post updated with a better fix that disables color for bash, system wide. Thanks to enderst from irc for the help.
 
First post updated with a better fix that disables color for bash, system wide. Thanks to enderst from irc for the help.

I may be reading this wrong but the bash_nocolor_1.1 package that has the updated bashrc file in it still has the update-script set to remove ls... This might cause problems (unless it works in some other way.) I am a zip update noob so this may be the wrong interpretation.
 
I may be reading this wrong but the bash_nocolor_1.1 package that has the updated bashrc file in it still has the update-script set to remove ls... This might cause problems (unless it works in some other way.) I am a zip update noob so this may be the wrong interpretation.

Unless I'm mistaken, there is no ls on the phone to begin with, so chances are it's there to remove the ls that was added by his previous patch. And if someone didn't install the previous one, there will be nothing to remove, so it won't matter.
 
Unless I'm mistaken, there is no ls on the phone to begin with, so chances are it's there to remove the ls that was added by his previous patch. And if someone didn't install the previous one, there will be nothing to remove, so it won't matter.

ls is a pointer put in place when you root and install busybox. if you were to apply that patch it would (i believe) kill that symlink and stop you from using ls... at least until you recreated the symlink by doing `ln -s /system/xbin/busybox /system/xbin/ls`...
 
ls is a pointer put in place when you root and install busybox. if you were to apply that patch it would (i believe) kill that symlink and stop you from using ls... at least until you recreated the symlink by doing `ln -s /system/xbin/busybox /system/xbin/ls`...

You're correct, for some reason I wasn't seeing ls when I looked through system/xbin, but it is there (I've restored to before flashing the initial patch).

I'll have to experiment with this when I have more time.
 

Latest posts

Trending Posts

Members online

Forum statistics

Threads
956,944
Messages
6,970,758
Members
3,163,664
Latest member
jochu