Compile a native C Android application

September 2, 2011 6 comments

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
  • 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 [1] you can find some of the peculiarities of this library.
    The Android prebuilt toolchain has a prefix arm-linux-androideabi-.

  • CodeSourcery toolchain
  • 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 [2]. 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).

Read more…

Categories: Android Tags: , ,

Android Nexus S custom kernel

September 2, 2011 7 comments

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.

Read more…

Categories: Android Tags: , , , ,

Android Source Tree building environment

September 2, 2011 1 comment

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.

Read more…

Categories: Android Tags: ,

Install Busybox and Terminal Emulator on Android phone

September 1, 2011 Leave a comment

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 You have to setup a building environment.

Categories: Android Tags: ,

Android ROM backup and restore

September 1, 2011 3 comments

Creating ROM Backup

Flash the recovery image

$ ./fastboot flash recovery recovery-clockwork- 
  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.

Read more…

Enable root access on Android phone (Nexus S)

September 1, 2011 Leave a comment

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.

Read more…

Categories: Android Tags:

Unlock Android Nexus S bootloader

September 1, 2011 Leave a comment

It’s only possible to flash a custom system if the bootloader allows it. On Nexus One, Nexus S, and Nexus S 4G, the bootloader is locked by default. Next it is described the way to unlock it.

Before going any further I highly recommend to read the CyanogenMod Wiki on fastboot as it includes information about it uses, options, etc.

Note: After unlocking all the data already installed is deleted and the mobile phone is wiped.

Read more…

Categories: Android Tags: ,