mekya

19Jul/110

How to build Android GingerBread on fresh Ubuntu 10.10

You can download all required packages to build Android and run it in emulator. Having these packages, bundled in an archive, is a life saver for those whose ubuntu is offline.

You can learn how to download Android source codes by following instructions on http://source.android.com/source/downloading.html and now, let me give some instructions for how to build Android and run emulator on ubuntu 10.10

  • Download packages from here
  • Open a terminal and go to directory where you download packages
  • Run these command to extract packages and enter the directory

tar -zxf required_packages_to_build_gingerbread_on_10.10.tar.gz

cd archives

  • To install all packages in these directory run this command

sudo dpkg -i -R ./

  • To make g++ available under /usr/bin, create a symbolic link

sudo ln -s /usr/bin/g++_4.4 /usr/bin/g++

  • Go to directory where you download Android sources
  • If you are building on 32 bit, then follow the instructions on this step. If your system is 64 bit, you can pass this step
    • Open the file build/core/main.mk and change this line

ifneq (64,$(findstring 64,$(build_arch)))

to

ifneq (i686,$(findstring i686,$(build_arch)))

  • Open these files

external/clearsilver/cgi/Android.mk

external/clearsilver/util/Android.mk

external/clearsilver/java-jni/Android.mk

external/clearsilver/cs/Android.mk

change the lines below for each file

LOCAL_CFLAGS += -m64

LOCAL_LDFLAGS += -m64

to

LOCAL_CFLAGS += -m32

LOCAL_LDFLAGS += -m32

  • Run these commands

source ./build/envsetup.sh

lunch 1

make

  • It can take some time to build Android according to your system and lastly run the emulator

emulator

Related posts:

    Understanding Android Makefile (Android.mk)
Filed under: Android Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

(required)

No trackbacks yet.