I guess it's just like busybox (everyone uses it, except the AOSP) -
But perhaps due to licensing? I'm not sure.
/Ryan
--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.
--
On Dec 18, 12:22 pm, "Dennis.Yxun" <dennis.y...@gmail.com> wrote:
> good to hear~
> I would like a more advanced shell, I like tab completion
> current one is quite dumb and lack functionality
>
> for the binary size, not that much big, it should be acceptable
>
> On Wed, Dec 16, 2009 at 9:46 PM, mirabilos
> <tg+m...@mirbsd.org<tg%2Bm...@mirbsd.org>
>
>
>
> > wrote:
> > Hi again,
>
> > no feedback at all? Does nobody desire a shell with proper history,
> > tab completion, more secure builtins, etc. at not even two times
> > the size, either as /bin/sh or at least for development purposes?
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "android-platform" group.
> > To post to this group, send email to android-...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > android-platfo...@googlegroups.com<android-platform%2Bunsubscrib e...@googlegroups.com>
-rwxr-xr-x 1 root root 702160 May 12 2008 /bin/bash*
-rwxr-xr-x 1 root root 203132 Nov 23 14:10 /bin/mksh*
And that’s dynamically linked (mksh: libc, libbsd; bash: libc, libdl,
libncurses!).
Third, it is mostly bash/ksh93/zsh compatible and gets an increasing
featureset, but is a Korn shell and as such has some unique (except
ksh93 has them foo) functionality like co-processes, but for Android,
the thing I think most of you would find appealing is that it offers
good interactive behaviour (history, tab completion, etc.) that just
works (no ~/.inputrc, no ncurses, no readline) in a very small binary.
Here’s one (binary) for you to play with, to see how it “feels” like:
http://www.mirbsd.org/MirOS/dist/mir/mksh/ports/mksh-39.9.20091128-android15.tgz
Manpage: http://www.mirbsd.org/MirOS/dist/mir/mksh/mksh.pdf
Besides, GNU bash is so much a GNU/Linux thing, while Android
takes more of the tools from ancient NetBSD® so this fits just right
in. Korn Shell is the default on very many Unicēs.
--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
> Would you kind public the source?
Sure: https://eurynome.mirbsd.org/~tg/pub/android-ndk-1.6_r1~apps~mksh.tgz
is what I (think I) used to build that binary. Note it’s a draft, and
integration as
either projects/external/mksh or replacing /bin/sh will be done (only
slightly)
differently.
I just want to warm you people up to the idea first.
now that people like it… what about my original question, whom do I
contact to get that thing integrated?
One, it’s not possible since I cannot “checkout” a nonexisting
repository, it would
need to be created first.
(Or I’ll just send a patch that replaces the current sh… that’d be
even nicer.)
Second, will the licence terms (BSD/MIT-style) on the original source
code that
would be imported be preserved?
Two things…
One, it’s not possible since I cannot “checkout” a nonexisting
repository, it would
need to be created first.
(Or I’ll just send a patch that replaces the current sh… that’d be
even nicer.)
Second, will the licence terms (BSD/MIT-style) on the original source
code that
would be imported be preserved?
--
Android-x86 project
http://www.android-x86.org
You first need to apply this change:
https://review.source.android.com/#change,12676 • Change Iae258589:
Add declaration for sys_signame[] forgotten in change 12489
I have no idea how to mark it as dependency in Gerrit.
Then you apply the series of changes amounting to this:
https://review.source.android.com/#change,13148 • Change I5b5c9e78:
shlist.c is no longer needed without -DSH_HISTORY
That’s my replace-sh-with-mksh branch.
I’ve done a “make”, created my own AVD from it and booted it
successfully.
The shell works fine. The only thing missing is a default /.mkshrc
file, for
example for a nice prompt, but then, it’s already WAY better than the
old
NetBSD® ash-based shell.
Please test!
Thanks in advance,
//mirabilos
Now I think it’s ok for inclusion. I made an AVD out
of this and tested it in the emulator.
Chih-Wei Huang just mailed round that mksh has been merged
into eclair-x86 and that it is repo-sync-able.
Thanks for the acceptance!
I’ll continue to provide updates via Gerrit, if that is desired.
You need the following change in bionic, as usual:
https://review.source.android.com/12676
repo download platform/bionic 12676/2
Then you get system/core to mksh with these changes (series):
(up to) https://review.source.android.com/14102
repo download platform/system/core 14102/1
New in this version:
• more up to date mksh base code
• EXECSHELL is now /system/bin/sh by default, fixing “adb install”
and other things; thanks to Chih-Wei Huang
• there is a /system/etc/mkshrc which sets up a few environment
variables, shell aliases, and a default prompt
XXX $HOME defaults to /data but now that I boot it I can see that the
user
XXX has no permissions on that; better suggestion other than "/"
anyone?
The EXECSHELL thing was responsible for failing to run the command
/system/bin/pm which does not begin with a shebang line (the shell
falls back to using ${EXECSHELL:-/bin/sh} then); I’ve made the default
configurable at compile-time in the upstream code, same for the path
to ~/.mkshrc (which are strictly(!) intended to be used for single-
user
and/or embedded systems, not for regular distro packages, mind you).
I also disabled the mknod(8) builtin, so that setmode.c is also no
longer compiled (licence and space reasons; the old sh had none,
and people probably don’t need it – otherwise just tell me and I
will re-enable it).
I kept the printf builtin in. It can be kept, gotten rid of, or even
(with
some glue code I need to hack, less than a dozen lines probably)
be made a toolbox-like approach with a printf→mksh symlink so
that it’s exposed to other apps, if you like. I recommend, however,
to keep printf’s floating point code (the rest of mksh has none, but
printf is third-party code from BSD) disabled…
If the shell’s too big, I suggest disabling the Vi editing mode first
by using -DMKSH_S_NOVI when compiling. If the result would still
be too big, talk to me. I’d like to get mksh into Android, and ex-
pose its users to as much of its useful functionality as possible.
The current size, which I think is reasonable, is:
-rwxr-xr-x 1 tglase 151888 Mar 28 00:02 out/target/product/generic/
system/bin/sh*
The code (including the EXECSHELL change, but not the mkshrc)
has undergone testing via Android-x86, so I think it’s (almost… see
the $HOME issue above) ready for mainstream, if you want it.
By the way, does anyone know how I can make the changes from
system/core depend on the change from bionic? Gerrit dependen-
cies appear to be within the same git part-repository, not project-
wide…
Thanks for listening!
//mirabilos
--
FWIW, I'm quite impressed with mksh interactively. I thought it was
much
*much* more bare bones. But it turns out it beats the living hell out
of
ksh93 in that respect. I'd even consider it for my daily use if I
hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/
mksh
I have disabled -fstack-protector-all in the explicit flags,
both for the NDK (flag test) and final build. On Android,
in contrast to Android-x86, it is still built with ProPolice
(-fstack-protector) on because that’s a global flag, so
no need to worry there.
I also nuked the NDK (app build) and mksh-small parts
from Android.mk – if anybody had use for them nowadays,
they’re easy to get back I think, but they were not worth
the additional maintenance, and I wanted it cleaned up
for possible inclusion.
//m