Sunday, December 26, 2010

Pain In The Thumb And Down The Thumb

Complete, comprehensive guide.

With this post we enter into the bowels of the robot that accompanies us in our pockets every day, learning to build Android from source.
 


First I state that the guidance and 'linux-user, if you Windows or Mac user
profane, and you want to follow the tutorial, I recommend you install GNU / Linux: D

I have compiled on Android Debian testing (Squeeze), and then installed the necessary dependencies: $ su # aptitude install git-core gnupg sun-java5-jdk gperf flex bison \\
libesd0-dev libsdl-dev libwxgtk2.6-dev build-essential zip curl \\
libncurses5-dev zlib1g-dev

 E 'recommended the use of the famous tool Valgrind to check for leaks memory etc. # aptitude install valgrind 


Now installed java-1.5, we can find in the repositories of Debian Stable (Lenny)
# echo "deb http://ftp.debian.org/debian/ stable main contrib non-free ">> / etc / apt / sources.list #

aptitude update # aptitude install sun-java5-jdk

If we had already ' java installed, identify the version that requires Android (1.5)
 
# update-java-alternatives-l

(of course the output of the command can 'vary)

java-1.5.0-sun 53 / usr / lib / jvm/java-1.5.0-sun --> Questa e' la versione giusta
java-6-sun 63 /usr/lib/jvm/java-6-sun
  
e selezioniamola:


# update-java-alternatives -s java-1.5.0-sun


Ora che abbiamo completato i preparativi, creiamo il nostro ambiente per Android. Mi raccomando, i sorgenti pesando più di 4GB, assicurate di avere lo spazio sufficiente.

 $ mkdir ~/android 
$ mdkir android/repo
$ curl http://android.git.kernel.org/repo > ~/android/repo
$ chmod a+x ~/android/repo
$ mkdir android/android
$ cd android/android
 $ repo init -u git://codeaurora.org/platform/manifest.git -b froyo_almond -M Q8650BSDCANLYA5025.xml 


use the branch Froyo Code of Aurora, for the optimization to the code.
It will take 'at the end we should have all the necessary files in the ~ / android.

Now compile the sources:

$ make-j8

`j` stands for the number of your processors * 2. So-j2 for a single core CPU, a dual-core-j4 etc..

Take a coffee ', go eat, take the dog for a walk, and at the end you should have finished the procedure.
in / out / target / product / generic / should have the `system.img` and `` userdata.img.
 Try our new "ROM" to be completed by AOSP our trusted virtual machine Android, of course, assuming that it already created. Let's move to the folder where we downloaded the SDK. (We downloaded the SDK?: P Go here: http://developer.android.com/sdk/index.html and choose the version you want to work.) 

cd ~ / miosdk / tools /
/. avd-system emulator @ ~ / mydroid / android / out / system.img-data ~ / mydroid / android / out / data.img

The emulator should run smoothly, showing the android you have done with your hands : D
's all, but I warn you: if you'd like to try the rom on your device, I do not assume any responsibility for damage done, of course. Do these cose con la dovuta attenzione.
 Nel prossimo post arriverà una manna dal cielo (si spera) per coloro che non vogliono fare tutto da terminale, ma vorrebbero un sistema  
automatico
:D


0 comments:

Post a Comment