Logo Computer scientist,
engineer, and educator
• Software  • The KBOX3 project

KBOX logo

KBOX3 downloads and packages

Please read the installation instructions before downloading any of this software.

Base system

Base system installer

The base system contains Busybox and the libraries and utilties necessary to emulate a proper Linux root filesystem under Android. In particular, it provides the dpkg utility, which can be used to install optional packages. Please see the installation instructions for guidance on installing the base system.

Packages

In general, download these to your SD card Download directory, and install using dpkg -F depends -i {filename.deb}

andplay

Download

A simple utility I wrote to play music files at the command line. Usage:

$ andplay [files...]
andplay has the slight advantage over utilities like mpg123 that all it does is invoke the built-in media server in Android. Memory and CPU usage are therefore very low. The kinds of media that andplay will play depend to some extent on the platform. On my Samsung Galaxy, it will play FLAC and MIDI files, which I found somewhat surprising, since support for these formats wasn't well-documented. It will also extract and play the audio streams from video files, which can sometimes be useful. Of course, I can't take any credit for this — all the heavy lifting is done by Android.

BBCWeatherJ

Download

Dependencies: java-support

A simple command-line utility to retrieve and format weather forecast feeds from the BBC. BBCWeatherJ is written in Java, and needs the java-support package. For more information on BBCWeatherJ, see here.

bc

Download

Dependencies: readline, ncurses

The scientific calculator application. I have included the general function library from phodd.net, and the bc script will load this automatically. The built in functions don't work anyway, for some reason. So if you want sine function, do sin() rather than the older s() etc. But look at phodd.net for full details.

coreutils

Download

This is a build of the standard GNU/Linux core utilities pacakge, which includes most of the basic Linux file and directory management commands. Most of these commands are already part of KBOX, because they are included in Busybox. However, the Busybox versions are rather limited in some areas, to minimize space requirements. Installing this pacakge will replace the Busybox versions of these utilities with the full versions, adding about 10Mb of code to your installation.

I would expect that for most KBOX users, this package is not necessary. You mind find it useful if you are running scripts that expect the commands to take certain switches that are missing from the Busybox versions. Even then, it might be preferable to download the package and unpack it to extract the specific binaries you need.

For the record, the utilities included in the package are: arch, base64, basename, cat, chcon, chgrp, chown, chroot, cksum, comm, cp, csplit, cut, date, dir, dircolors, dirname, du, echo, env, expand, expr, factor, false, fmt, fold, getlimits, groups, head, hostname, id, join, kill, link, ln, logname, ls, md5sum, mkdir, mkfifo, mknod, mktemp, mv, nice, nl, nohup, nproc, numfmt, od, paste, pathchk, pinky, pr, printenv, printf, ptx, pwd, readlink, realpath, rm, rmdir, runcon, seq, sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, shred, shuf, sleep, sort, split, stdbuf, stty, sum, sync, tac, tail, tee, test, timeout, touch, tr, true, truncate, tsort, tty, uname, unexpand, uniq, unlink, uptime, users, vdir, wc, who, whoami, and yes.

Curl

Download

Curl is a utility for fetching files using HTTP/S and a number of other common network protocols. As well as a command-line utility, Curl provides a library which is used by many other utilities (git, for example). The package includes the development bits as well as binaries: header files are in /usr/include/curl, and static libraries are in /usr/lib. Curl uses openssl for SSH support and, by default, checks the server certificate for authenticity. No CA certificates are provided with this package, as they seem to be out of data as soon as they're released. If validating the server certificate is important, extract the CA certs from a recent installation of Firefox in PEM format, and use the --cacert switch to reference them. Alternatively, you can turn off server certificate checks using the -y switch.

Dropbear

Download

Dependencies: kbox-login

Dropbear provides an ssh client and server

ssh (client)

Keys will be cached in $HOME/.ssh in the usual way. No non-standard arguments need be used, but bear in mind that you'll have to specify a specific user on remote service to which you are connecting, because the Android user ID is arbitrary in a non-rooted device. This is common enough with remote logins, of course.

scp

Should work as on any other Linux system.

ssh (server)

This is a somewhat modified version of the Dropbear ssh server, which takes the user credentials as command-line arguments. This is because Android Linux has no user-level authentication. Note that the user ID (specified by the -U argument) must be the user ID of the terminal emulator app running the script, or nobody will be able to log in.

The package provides a script /bin/ssh_daemon.sh that will launch the ssh server with somewhat sensible arguments, specifying user credentials and port number 10022. This script is provided as a basis for customization, and is not really intended to be used as it is. The credentials are taken from /etc/kbox-passwd, which is a plain text file; defaults are kbox/kbox. This file is provided by installing the kbox-login package. The script will read an RSA server key from $HOME/.rsa_host_key. The dropbearkey utility can be used to create this key, but it should be created automatically the first time ssh_daemon.sh is executed.

In order to connect to the sshd server, when run as described above, clients need to specify the port number on the command line (e.g., ssh -p 10022 kbox@[my_andoid_ip]).

epub2txt

Download

A simply utility for extracting and formatting text from EPUB e-books. epup2txt my_book.epub|nroff|more makes a servicable reader for EPUB e-books althrough there are, of course, fully featured graphical EPUB readers for Android. For more information, see here.

espeak

Download

Dependencies: kbaudiosink

eSpeak is a simple, command-line text-to-speech utility. It can render its command line arguments, or a specified text file, to audio. For more information about eSpeak, see the eSpeak web site.

Note that eSpeak has no knowledge of Android audio. To use eSpeak with KBOX, you'll need to pipe its output into kbaudiosink, like this:

% espeak -w stdout "Hello, world" | kbaudiosink
A couple of scripts are provided to simplify this operation:
% say These are the words I will speak 
% sayfile {file_of_text}
You might need to modify these scripts, to pass particular arguments to espeak, to control reading speed, etc.

file

Download

A simple utility for guessing the contents of a file.

frobtads

Download

Dependencies: ncurses

frobtads is an interpreter for TADS games like 'Ecdysis.' If you don't know what that means, you probably won't be interested in this. For more information, see here.

frotz

Download

Dependencies: ncurses

frotz is an interpreter for z-code games like 'Zork' and 'Sherlock'. If you don't know what that means, you probably won't be interested in this. This version supports text styles and colouring, but not sound (it requires old-style OSS audio drivers, which Android does not provide). If you install an Android keyboard with cursor keys, it supports line editing and history, too. Unfortunately, as with any terminal-based application, fonts are fixed pitch, and this can be irritating when reading large amounts of text. From this point of view, 'ZMPP' is a better z-code interpreter, but Frotz under KBOX is faster, because it is written entirely in C and runs natively on the Android OS, and supports line editing, ASCII art, menus, and many other features that the Android apps lack. For more information, see here.

ftp

Dependencies: readline, ncurses

Download

The standard command-line FTP client.

gawk

Download

The GNU version of the awk text processing language. I'm not really an awk user myself, so there's not a lot I can do to check this works fully. Please note that I haven't included the source-code library files (*.awk) in this package. Presumably they could be copied from desktop Linux installation if required.

gcc

Download

The standard GNU C/C++ compiler. Please be aware that this package will take up over 300Mb of storage when installed. For more information on building C/C++ applications for KBOX3, please see here. Contributed by Cyd Hasleton.

git

Download

git is command-line tool for software version control. This build supports the use of git:, http:, and https: access to remote repositories. It statically links libcurl so you don't need to install Curl explicity (although it is useful). Note that no CA certificates are included in this package so, if you want to do certificate verification, you'll need to install some. Please see the Git documentation for information on this. Otherwise export GIT_SSL_NO_VERIFY=1 to turn off certificate checks.

glulxe

Download

Dependencies: ncurses

glulxe is a console-based runtime environment for for the Glulx interactive fiction system. It supports line editing and simple text formatting. For more information about interactive fiction under KBOX, see here.

gnuchess

Download

Dependencies: readline, ncurses

The notoriously strong chess engine. Only for die-hard chess fans: the user interface is character based, so you'll need a real board alongside you to interpret the computer's moves. Still, might be an option for those few of us who can beat all the other computer chess programs. This package does not include the full openings library (it's available from the gnuchess website), so it thrashes me in eight moves rather than six.

GNU Privacy Guard (gpg)

Download

The standard public-key cryptography utility. Note that this is a 1.4.x version of GnuPG; 2.0 is an improvement in some ways, but is not easy to cross-compile.

groff

Download

The traditional text formmating utilities. This package provides groff, troff, and nroff, among other things. You'll need this package if you want to display man pages — although the man utility is part of the base system, all it really does is feed documents into nroff, which is where this package comes in.

htop

Download

Dependencies: ncurses

htop is a console-based interactive process manager, like top on steroids. Please note that the functionality in htop for listing the files opened by a process doesn't work, and won't ever work, because Android simply doesn't make that information available to unprivilged processes.

java-support

Download

Utilities and configuration changes to assist with building and running Java command-line applications under KBOX3. See here for details.

kbaudiosink

Download

kbaudiosink is not intended to be used on its own — it is a helper to make it easier to port to KBOX utilities that produce audio output. kbaudiosink consumes WAV or raw PCM streams from standard input, and plays them using the Android OpenSLES APIs. The intention is that other utilities will pipe their audio data to standard output rather than the audio device, where it will be consumed and played by kbaudiosink. This is at best an interim solution, until audio-capable utilities can be properly ported to use the OpenSLES API, or Google does the decent thing and makes it possible to use the underlying ALSA directly.

kbox-login

Download

kbox-login is a simple helper application for various other services, such as the telnet daemon. Android has no authentication for users, so this package replaces the ordinary Linux login. It reads its user credentials from /etc/kbox-passwd, which can be edited with a text editor like vi. Regardless of the user ID specified, a user will actually have the ID of the terminal emulator process that hosts KBOX2, so choice of credentials is not critical.

KCalc

Download

Dependencies: ncurses

KCalc is a lightweight, command-line calculator, intended to fill the gap beween bc and Matlab. For more information, see here.

KCrypt6

Download

KCrypt6 is a simple, command-line file encrypter and obfuscator. It is designed to offer reasonable security, while still being convenient to use. For full details, see the main project page here.

Please bear in mind that KCrypt was originally a Windows program; it has had relatively little testing on Android. Please use with considerable caution.

Lynx

Download

Dependencies: ncurses

By popular request (honestly), a console-mode web browser. Quite why anybody would want to use a text-only web browser when there's a wide choice of really good graphical browsers for Android escapes me, but what the heck.

make

Download

The GNU make utility, for use in C/C++ development on the Android device (and perhaps other applications)

nano

Download

The GNU nano utility is a small, fast text editor that uses the ncurses interface.

ncurses

Download

Standard screen management library, used by almost everything that does formatted console input or output. Nothing in here is likely to be useful to an end-user, but it is a dependency of many other packages.

nmap

Download

Network scanner and security analysis tool. Contributed by David Martinez.

OpenSSL

Download

Do not install this under Android 5. Android 5 has its own version of OpenSSL installed, and this will clash with the version in this package, which is more recent. This package should no longer be needed (at least after Android 5) and I have removed all dependencies on it in other packages.

The common command-line utility and library for managing SSL certificates and communications. Please note that the Dropbear SSH package in the KBOX distribution does not depend on OpenSSL, but some other utilities do. The development header files are in /usr/openssl/include/openssl, and the static libraries in /usr/openssl/lib.

Perl

Download

Perl version 5.20.2, default build. I'm not sure how much of the complete Perl system gets built (or works), but it seems to work fine for routine text processing applications and the like.

Python 3

Download

Tools and runtime environment for the Python programming language, version 3.4.3. Please be aware that this is a fairly large package — 70Mb installed size.

readline

Download

Dependencies: ncurses

Library for line editing; not very useful by itself, but used by many utilities that accept keyboard input.

rsync

Download

Dependencies: dropbear, kbox-login

rsync as a client

rsync can be used as a client with the default use of ssh to start the server on the remote system. It can also be used to talk to a stand-alone rsync daemon. I haven't (yet) included an rsh client, so the use of rsh to start a remote session (-e rsh) isn't working. No special usage considerations should be necessary except that, Android being what it is, you'll need to use IP numbers to connect to local systems that don't have a DNS entry — unprivileged users cannot edit the hosts file.

rsync as a server

At present, rsync can only be run as a server in stand-alone daemon mode. This mode does not require any other dameon processes (e.g., sshd) to be running on the device. The potential downside is that there is no authentication of clients, so such a daemon should probably not be left running for extended periods. The command line to start the rsync daemon is:
% rsync --daemon --config [config_file] --port [port] --no-detach \
  --log-file /dev/null 
You don't need to redirect the log to /dev/null — but the standard log location won't work, so you'll have to send it somewhere. The config file specifies what files will be made available in what modes, and how they will be identified by the client. A sample config file is provided in /etc/rsyncd.conf. This config makes all files available, read/write, under the identifier 'all'. The client will do transfers like this:
% rsync --port [rsync_port] [device_ip]::all/path/to/file [local_path]
This is essentially the normal usage of rsync as a client, except that the path is prefixed ':all', and the port number is given explicitly.

Note that the rsync daemon will have access only to the same files as the terminal emulator has, in an unrooted device.

To simplify usage, there is a script rsync_daemon.sh that starts the daemon as above, on port 10873. So, for example to copy a file from the KBOX user home directory you could run rsync on another host like this:

% rsync --port 10873 [device_ip]::all/home/kbox/somefile .

solunar

Download

solunar is a command-line utility for displaying sunrise, sunset, moon phase, and related data, for specific locations. For more information, see here. Please note that, when using times other than GMT/UTC, solunar is only as accurate as the platform's underlying ability to handle timezone conversions. This is something of an unknown with Android.

tmux

Download

tmux is a terminal multiplexer: it allows a number of terminal sessions to be controlled from a single terminal, using an ncurses interface to control the screen. The controlling terminal can be detached and reattached, leaving the sessions running. For further information about tmux, see here.

Please note that tmux was hard to port to Android. There is a lot of functionality missing from the Bionic C library, and some missing from the kernel. I can't be sure that all features will work properly.

uconv

Download

A command-line unit converter with a very flexible syntax for expressing units. See here for more details.

unrar

Download

Decompressor and unpacker for RAR-format archives.

utelnetd

Download

Dependencies: kbox-login

A minimal telnet server. The server listens on part 10023 by default, but this can be changed using the -p switch. This package uses kbox-login for authentication — see that package for information about setting the user credentials (default is kbox/kbox).

vim

Download

The complete build of vim, including syntax highlighting files, tutorial, etc. This is quite a large package by mobile device standards. Note that vim does not replace the small vi that is included in the base system, so you'll need to run it as vim explicitly. You can put startup commands in $HOME/.vimrc in the usual way.

zsh

Download

The zsh shell. Maybe a better shell than the cut-down Bash implementation provided by Busybox.

zip

Download

The standard ZIP compressor, from Info-ZIP.

Copyright © 1994-2015 Kevin Boone. Updated Feb 08 2017