This tutorial shows how to build the UMIP.org MIPv6 implementation for an Android phone. I recommend to read a previous post on the issue, where it is explained how to compile and configure the UMIP.org for an ordinary (Ubuntu) Linux environment.
Initially I have tried to use the prebuilt Android toolchain and after a lot of time spent trying to patch the code to fit the Bionic and other libraries requirements, I started looking for alternatives.
Thanks to Christian Graffe, who in his post on the Nautilus6 forum, give me the hints on how to go on. The solution to almost all my problems was using the CodeSourcery ARM GNU/Linux toolchain, which I’ve already used in my initial steps but I didn’t realize to use for compiling UMIP.
Searching on the web you can find many ways of compiling Android native applications, I mean, the usual console application, daemon, C/C++ library, etc. you usually compile with no problem in your computer.
In order to compile for Android you need an ARM toolchain. The two main options I have found consists on using Android Prebuilt toolchain and the CodeSourcery one:
- Android Prebuilt toolchain
- CodeSourcery toolchain
Android doesn’t come with the traditional libc library. On the contrary it comes with Bionic, a slim libc developed by Google for use in the Android mobile software platform. Bionic is clearly tailored for supporting the Android system. In  you can find some of the peculiarities of this library.
The Android prebuilt toolchain has a prefix arm-linux-androideabi-.
CodeSourcery, in partnership with ARM, Ltd., develops improvements to the GNU Toolchain for ARM processors and provides regular, validated releases of the GNU Toolchain. This toolchains are provided in many different versions with this naming convention . For our case the one it is going to be used is arm-none-linux-gnueabi, which includes the glibc. In case using the arm-none-eabi, non glibc is included and it is oriented to be used to compile complete native libraries and applications (like for instance in FreeRTOS).
As of my later post, you are not getting the Nexus S kernel source. And what is more it seems rather difficult to customize it (include new modules or facilities, etc.).
Next it is shown how to do so. It is not as difficult as expected and the procedure is quite similar to a kernel customization and build in a computer.
This entry tries to cover howto compile the complete Android environment from scratch. It includes how to download the source code of all packages, building and images generation. For further information you can follow the official guide.
Both applications are available in the Market so once the system is rooted you can download them from it. It is the easiest way.
The applications’ names to search in the Market are :
- Android Teminal Emulator
- BusyBox by Stephen (Stericson)
Otherwise you can compile busybox from it’s source available at http://www.busybox.net. You have to setup a building environment.
Creating ROM Backup
Flash the recovery image
$ ./fastboot flash recovery recovery-clockwork-18.104.22.168-crespo.img sending 'recovery' (4040 KB)... OKAY [ 0.642s] writing 'recovery'... OKAY [ 0.540s] finished. total time: 1.187s
The ClockworkMod Recovery should now be installed on the Nexus S.
Rooting is a process that allows users of mobile phones and other devices running the Android operating system to attain privileged control. With root access the limitations imposed by manufactures are overcome and how have almost full control of what you can install on your phone.