Find file
Fetching contributors…
Cannot retrieve contributors at this time
153 lines (108 sloc) 3.62 KB
How To Comile Android
and Comile TaintDroid
#####################
##########
Überblick: Android 2.3.4
hanno@odin:~/Uni/Master-Arbeit.big/workspace_traceDroid_v1$ du -sh *
34M bionic
5,9M bootable
7,7M build
147M cts
61M dalvik
93M development
17M device
1,2G external
457M frameworks
39M hardware
95M libcore
12K Makefile
21M ndk
191M packages
1,5G prebuilt
25M sdk
48M system
#####################
Target:
1. Build Android 2.1 = "Eclair"
2. Build TaintDroid with Android 2.1
####################
Kurz Anleit, wenn alles schon instaliert:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
$ repo init -u git://android.git.kernel.org/platform/manifest.git -b eclair
$ repo sync
$ source build/envsetup.sh
$ lunch full-eng
$ sudo update-java-alternatives -s java-1.5.0-sun # Auswählen der richtigen Java Version
$ make -j4
--> wait
$ emulator
#################
2011-05-09:
HowTo [1]
Needs:
- Python 2.6 OK
- JDK 6 OK
- JDK 5 -> [3]
downloading from
-> http://archive.ubuntu.com/ubuntu/pool/multiverse/s/sun-java5/...
hanno@THOR:~/Uni/Master-Arbeit.big/Quellen_Packete$ sudo dpkg -i sun-java5-bin_1.5.0-19-0ubuntu0.9.04_amd64.deb sun-java5-jre_1.5.0-19-0ubuntu0.9.04_all.deb sun-java5-jdk_1.5.0-19-0ubuntu0.9.04_amd64.deb sun-java5-demo_1.5.0-19-0ubuntu0.9.04_amd64.deb
(Java SDK wechelsn)
hanno@THOR:~/Uni/Master-Arbeit.big/Quellen_Packete$ update-java-alternatives -l
java-1.5.0-sun 53 /usr/lib/jvm/java-1.5.0-sun
java-6-sun 63 /usr/lib/jvm/java-6-sun
hanno@THOR:~/Uni/Master-Arbeit.big/Quellen_Packete$ sudo update-java-alternatives -s java-1.5.0-sun
- git 1.7.1 OK
-> (optional) Valgrind (finding Memory Leaks)
################ [1]
#Installing required packages
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev
lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
#Pachages for Froyo and older
$ sudo apt-get install gcc-multilib g++-multilib libc6-i386 libc6-dev-i386
###
#Configuring USB Access
-> not nessesarry
############### [5]
#Installing Repo
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl http://android.git.kernel.org/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
##
# Initialzing a Repo client (mit 2.1)
$ cd Uni/Master-Arbeit.big/workspace_Android.source/
$ repo init -u git://android.git.kernel.org/platform/manifest.git -b eclair
$ gpg --import ...
############### [6]
# Building the System
$ source build/envsetup.sh
$ lunch generic-eng
# Make mit 4 Threads
$ make -j4
###############
# Probleme beim Build:
Es fehlen Packete:
libx11-dev
libncurses5-dev
-> Lösung des Problems:
lib32ncurses5-dev nach Anleitung [7]
-> Lösung nächstes Problem:
lib32z1-dev [7] $ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
#Emultor startet nicht:
hanno@THOR:~/Uni/Master-Arbeit.big/workspace_Android.source2.1$ emulator
SDL init failure, reason is: No available video device
-> Lösung [8] nicht
-> Lösung einfach: [9]
$ export DISPLAY=:0
Source:
[1] http://source.android.com/source/initializing.html
[2] http://sites.google.com/site/easylinuxtipsproject/java
[3] http://blog.codepainters.com/2010/10/27/compiling-android-sdk-on-ubuntu-10-10-maverick-meerkat/
[4] http://blog.codepainters.com/2009/12/18/first-android-platform-build/
[5] http://source.android.com/source/downloading.html
[6] http://source.android.com/source/building.html
[7] http://translate.google.de/translate?hl=de&sl=auto&tl=de&u=http%3A%2F%2Fbreakice1016.blogspot.com%2F2011%2F03%2Fubuntu-1010-64bit-jdk15.html (Ubuntu 10.10 auf 64-Bit)
[8] http://stackoverflow.com/questions/4841908/sdl-init-failure-reason-is-no-available-video-device
[9] http://jovechia.blogspot.com/2009/04/sdl-init-failure.html