[Guide] How to build android from source for the dell streak
This quide is a work in progress. (only testing with Ubuntu 10.04 x64)
After searching for a complete how to for building android from source I have determined there is none that are 100% complete.
Here is a compilation of guides from various sites that I used to build for the streak
Step One – install some packages.
Quote:
|
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
|
Step Two – select the right version of Java.
Quote:
|
sudo update-java-alternatives -s java-1.5.0-sun
|
Ubuntu doesn't have packages for the X11 libraries, but that can be worked around with the following command:
Quote:
|
sudo ln -s /usr/lib32/libX11.so.6 /usr/lib32/libX11.so
|
Step Three - Installing repo.
make bin dir in home directory and add to path
Quote:
cd ~
mkdir bin
export PATH=~/bin:$PATH
|
This can be made Permanent bay adding to the .bashrc file in ~/
Download the repo script and make it executable:
Step Four – Repo Init.
Create a working directory
Initialize the repo
Quote:
|
repo init –u git://android.git.kernel.org/platform/manifest.git
|
Or if you would like to check out a specific branch use the following
Quote:
repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake
(replace cupcake with your branch of choice)
|
If successful you will receive a message like:
“repo initialized in /mydroid”
To pull the files to your working directory now use:
Step Four – Verify tags.
Quote:
gpg --import
Then paste in the following:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu 5hOF9KXwCgkxMD
u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEa UA6U90sEoVks0Z
wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDya TrkANjd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2omNV6Ka1LNMwzSp9ILz8jEGqmU tkBszwo
G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+Bmr EOeCUOAJ9qmR0l
EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KL M=
=Wi5D
-----END PGP PUBLIC KEY BLOCK-----
|
Once you have done this press CTRL + D
Now there are a few changes we need to make before we build.
1.)We need to install gcc-4.3 (gcc-4.4 has more strict rules then previous versions that causes some issues during build)
Quote:
|
sudo apt-get install gcc-4.3 g++-4.3
|
2.)Add JAVE_HOME to ~/.bashrc
Add this to the end of the file:
Quote:
|
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.16
|
A small issue with gcc
Quote:
|
sudo apt-get install g++-multilib
|
Fix issue with webkit build later on
Quote:
cd ~
cd android/system/external/webkit
git cherry-pick 18342a41ab72e2c21931afaaab6f1b9bdbedb9fa
|
Now that this is complete the build is pretty straight forward.
bluez
2) build android by
. build/envsetup.sh
choosecombo (all default option)
make -j4
3) replace external/bluez, and 'export BOARD_HAVE_BLUETOOTH=true'
4) mmm external/bluez
-------------------------------------------------------------------------------
jpeg
2) build android by
. build/envsetup.sh
choosecombo (all default option)
make -j4
3) replace external/jpeg
4) mmm external/jpeg
-------------------------------------------------------------------------------
webkit
2) build android by
. build/envsetup.sh
choosecombo (all default option)
make -j4
3) replace external/webkit
4) mmm external/webkit
-------------------------------------------------------------------------------
wpa_supplicant
2) build android by
. build/envsetup.sh
choosecombo (all default option)
make -j4
3) replace external/wpa_supplicant
4) mmm external/wpa_supplicant
-------------------------------------------------------------------------------
kernel
2) repleace kernel
3) build android by
. build/envsetup.sh
choosecombo
Build for the simulator or the device?
1. Device
2. Simulator
Which would you like? [1]
Build type choices are:
1. release
2. debug
Which would you like? [1]
Product choices are:
1. emulator
2. generic
3. sim
4. msm7627_ffa
5. msm7627_surf
6. qsd8250_ffa
7. qsd8250_surf
You can also type the name of a product if you know it.
Which product would you like? [generic] 7
Variant choices are:
1. user
2. userdebug
3. eng
Which would you like? [eng]
4) make -j4
Guide not complete. Will finish shortly
Sources -
http://source.android.com/source/download.html
http://www.johandekoning.nl/index.ph...d-environment/
http://hi.baidu.com/caicry/blog/item...528388a9f.html
http://opensource.dell.com/releases/...W-TO-BUILD.txt