AndroidNativeBinaries

From Groom

Jump to: navigation, search

Contents

Presentation

The aim of this humble webpage is to propose some native binaries I managed to compile for your Android devices.
They are of all kind, and if my collection gets bigger, I'll continue publishing here. If you have some you would like to publish, create an account and edit the page. If your want to propose these files on your site, please reference this page.
This work is based on Kyle Brandt's experiment. Many thanks to him !
I have used the CodeSourcery's ARM Cross Compilation toolkit on a Linux platform to build the following binaries, and tested them on a LG GW620 (Eve).

The Binaries

Download

Binaries available for download
Name Ver. Description Homepage Android stripped binaries only Complete build result (non stripped, including locales)
tar 1.23 The GNU Tar program provides the ability to create tar archives, as well as various other kinds of manipulation. For example, you can use Tar on previously created archives to extract files, to store additional files, or to update or list files which were already stored. Go Binary Tarball
bash 4.1 A real shell, much more powerful and usable than the one provided with the Android distro.
Bash is the shell, or command language interpreter, that will appear in the GNU operating system. Bash is an sh-compatible shell that incorporates useful features from the Korn shell (ksh) and C shell (csh). It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard. It offers functional improvements over sh for both programming and interactive use. In addition, most sh scripts can be run by Bash without modification.
Go Binary Tarball
grep 2.6 Provides grep, egrep, fgrep.
grep is a command line text search utility originally written for Unix.
Go 2MB tarball Tarball
coreutils 8.5 The GNU Core Utilities or coreutils is a package of GNU software containing many of the basic tools, such as cat, ls, cp, rm, needed for Unix-like operating systems.
Almost all you need to work efficiently with the linux shell, e.g. replace the painful Android ls by the normal, colored, detailled one !

The archive (uncompressed) is especially heavy because of static linking. You are advised to unpack it on your desktop computer and select the binaries you are interested in.

Go 58MB tarball Tarball
PHP 5.3.2 PHP: Hypertext Preprocessor is a widely used, general-purpose scripting language that was originally designed for web development to produce dynamic web pages.
Works like a charm with GroomDroid ! Now you have a PHP enabled webserver on your phone !
Go Binary N/A
wget 1.12 Wget is a computer program that retrieves content from web servers
Use it to download everything you want directly to your phone. Can be really powerful in when scripting.
Go Binary Tarball

Thanks to Wikipedia and the softwares websites for some descriptions.

Install Howto

Prerequisite:If you want to install a package of binaries coming in a tar archive (tarball), obviously the very first thing you should do is to download and install tar to unpack the archives directly on the phone !

  • You need to be root on your phone to make the binaries runnable (although on a linux host the perms should be already set to 755) and to copy them to /data.
  • You need to download, install and setup adb utility from Android SDK
  • Copy the binary (or archive) you want on your device by typing something like:

adb push myfile /data/
You can install the files everywhere you like: I suggest you create a directory like /data/bin or /opt. You can even imagine putting the binaries directly in /sbin. The only thing you should not do is putting them on the sdcard (/sdcard) as the files on this device cannot be executed, and moreover that's bad for health (see that thread).

  • Open a console with adb shell or directly on the phone by using the wonderful ConnectBot, and enjoy (e.g. with a beautiful ./ls -la --color).

The x permission shall already be set on the binaries, however if they cannot be executed, you may have to type chmod 755 myfile

FAQ

  • Q: What's the particularity of Android devices ?

A: They are ARM based computers running a tuned linux distro. Moreover, they use a special version of the standard C library (which is not the GNU libc like on our desktop computers).

  • Q: Isn't it stupid to have all these big fat statically linked binaries ?

A: Sure it is ! But that's mandatory to link statically not to rely on Android special libc. When you link statically, the functions you need are put directly in the executable, so that you do not need any external library. That saves us.

  • Q: How can I be sure a binary I have just compile is good for Android ?

A: In a linux console, type file mybinary. You should see the following message:
mybinary: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.16, statically linked, for GNU/Linux 2.6.16, not stripped