Compiling Android

From iDroidWiki

Revision as of 22:48, 23 September 2021 by Ddominator (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Open-Source Licenses

The iDroid Project is an Open-Source Project. Android is under Apache License, version 2.0. As such, changes to the source code must be made public.

If you plan to compile Android with your own changes to the source code, please make your changes public. What you have changed may be helpful for the iDroid Project and for helping in troubleshooting.

If you don't have a git repo to put you changes, that's ok. You can always create a pastie of the diffs you've created, especially if only 1 line was changed.

Preparing your build system

The following instructions are for ubuntu 10.04

First you need to ensure you have the jaunty multiverse in your apt sources list (the required jdk version is not available in newer ubuntu versions)

sudo vi /etc/apt/sources.list

Add the following:

deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse

Update your apt-cache:

sudo apt-get update

Now onto installing required packages to build

x86_64

sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl sun-java5-jdk zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev

i386/i686

sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev

Android repo tool. - All Platforms

cd ~
mkdir bin
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo

Building

This procedure will download the source from all of the required repositories and then compile them. It would be a good idea to look through the Android guide listed above to prepare your machine before continuing. Note, however, that the compile instructions there are not for building iDroid sources.

mkdir froyo 
cd froyo 
repo init -u git://github.com/iDroid-Project/platform_manifest.git -b froyo-iphone
repo sync
. build/envsetup.sh && choosecombo

If the repo tool is not in your PATH, you will need to use 'repo-dir-path/repo' above instead of 'repo'.

Selections:

make -j2
(-j = num of compile processes, 2 per core)

Wait for everything to compile and there you go.

References

Preliminary Guide

Android Source & Compile Guide

Personal tools
Namespaces
Variants
Actions
Wiki
Community
Toolbox