Friday, April 16, 2010

Android shell

Lets look at the android shell, /system/bin/sh . By default, the build comes out with a shell that has no history, no tab completion, doesn't handle backspace or delete and various other excellent features. There's no easy way to switch to a recent shell because there's no automake and bionic has various other issues so those who enjoy more pain solve it by copying a staticly built busybox from some other build system. But... they're missing out. The great benefit of this Android shell is it provides regression therapy for embedded folks. Its like going back into 2002, or better known as 3-AB (3 years after busybox). You then poke at the shell code in the Android tree, praying to the spaghetti monster PBUH(er) that there's an ifdef IN_2010_NOW and instead, in their build scripts, you see stuff like:
make_ash_files:
p4 edit arith.c arith_lex.c arith.h builtins.h builtins.c
p4 edit init.c nodes.c nodes.h token.h

1999, here we come. :-) Is Vajpayee still prime minister?

Labels: