1 page.title=Host System Setup 2 pdk.version=1.0 3 doc.type=porting 4 @jd:body 5 6 <a name="toc"/> 7 <div style="padding:10px"> 8 <a href="#androidSourceSetupIntro">Introduction</a><br/> 9 <a href="#androidSourceSetupBuildSystemSetupPackages">Installing Packages</a><br/><div style="padding-left:40px"> 10 11 <a href="#androidSourceSetupBuildSystemSetupRequiredPackages">Required Packages</a><br/> 12 <a href="#androidSourceSetupUbuntu606Intro">Ubuntu 6.06 (Dapper)</a><br/> 13 <a href="#androidSourceSetupUbuntu710Intro">Ubuntu 7.10</a><br/> 14 <a href="#androidSourceSetupUbuntu804Intro">Ubuntu 8.04</a><br/></div> 15 <a href="#androidSourceSetupBuildSystemSetupJavaIntro">Installing Java</a><br/></div> 16 17 <a name="androidSourceSetupIntro"></a><h2>Introduction</h2> 18 19 <p>This section provides instructions on how to configure your host system to build Android for mobile devices. While Android is designed as host-environment agnostic, it has been tested and is known to work on the following Linux operating system; Ubuntu 6.06 (Dapper), 7.10 (Gutsy), and 8.04. Cygwin is not recommended. </p> 20 21 22 <a name="androidSourceSetupBuildSystemSetupPackages"></a><h2>Installing Packages</h2> 23 24 25 26 <a name="androidSourceSetupBuildSystemSetupRequiredPackages"></a><h3>Required Packages</h3> 27 28 <p>Android requires the following system packages:</p> 29 <p><ul> 30 <li>flex: This lexical analyzer generator is used to read a given input file for a description of a scanner to generate.</li> 31 <li>bison: This is a general-purpose parser generator.</li> 32 <li>gperf: This is a perfect hash function generator.</li> 33 <li>libesd0-dev: This enlightened sound daemon (dev files) is used to mix digitized audio streams for playback by a single device.</li> 34 <li>libwxgtk2.6-dev: This package provides GUI components and other facilities for many different platforms.</li> 35 <li>build-essential: This package contains a list of packages considered fundamental to building Debian packages.</li> 36 </ul></p> 37 38 39 <a name="androidSourceSetupUbuntu606Intro"></a><h3>Ubuntu 6.06 (Dapper)</h3> 40 41 <p>On a clean Dapper system, type the following:</p> 42 <pre class="prettyprint"> 43 % sudo apt-get install flex bison gperf libesd0-dev libwxgtk2.6-dev zlib1g-dev 44 build-essential 45 </pre> 46 <p>This snippet includes an artificial line break to maintain a print-friendly document.</p> 47 48 49 <a name="androidSourceSetupUbuntu710Intro"></a><h3>Ubuntu 7.10</h3> 50 51 <ol><li>The libwxgtk2.6-dev package will only work if the following code is included in your /etc/apt/source file. 52 <p><pre class="prettyprint"> 53 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 54 ## team, and may not be under a free license. Please satisfy yourself as to 55 ## your rights to use the software. Also, please note that software in 56 ## universe WILL NOT receive any review or updates from the Ubuntu security 57 ## team. 58 # Line commented out by installer because it failed to verify: 59 deb http://us.archive.ubuntu.com/ubuntu/ gutsy universe 60 # Line commented out by installer because it failed to verify: 61 deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy universe 62 # Line commented out by installer because it failed to verify: 63 deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates universe 64 # Line commented out by installer because it failed to verify: 65 deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-updates universe 66 </pre></p></li> 67 <li>Install required packages with the following command: 68 <p><pre class="prettyprint"> 69 % sudo apt-get install flex bison gperf libesd0-dev libwxgtk2.6-dev zlib1g-dev 70 build-essential 71 </pre></p> 72 This snippet includes an artificial line break to maintain a print-friendly document. 73 </li> 74 <li> 75 <p>Install the X11 development environment with the following commands:</p> 76 <p><pre class="prettyprint"> 77 % sudo apt-get install x-dev 78 % sudo apt-get install libx11-dev 79 % sudo apt-get install libncurses5-dev 80 </pre></p> 81 </li> 82 </ol> 83 84 85 <a name="androidSourceSetupUbuntu804Intro"></a><h3>Ubuntu 8.04</h3> 86 87 <p>On a clean system, type the following:</p> 88 <pre class="prettify"> 89 % sudo apt-get install flex bison gperf libesd0-dev libwxgtk2.6-dev 90 zlib1g-dev build-essential 91 % sudo apt-get install x-dev 92 % sudo apt-get install libx11-dev 93 % sudo apt-get install libncurses5-dev 94 % sudo apt-get install sun-java5-jdk 95 </pre> 96 97 98 <a name="androidSourceSetupBuildSystemSetupJavaIntro"></a><h2>Installing Java</h2> 99 100 <p>Android source code includes a hard dependency on the Java Developer Kit (JDK) 5.0 Update 12 or greater. The specific file name of the Update 12 package is <code>jdk-1_5_0_12-linux-i586.bin</code>. To download this version of the Java JDK:</p> 101 <p><ol> 102 <li>Navigate to: <a href="http://java.sun.com/products/archive/">http://java.sun.com/products/archive/</a>.</li> 103 <li>Select '5.0 Update 12' from the 'Java 2 Platform Standard Edition (J2SE)' -> 'JDK/JRE - 5.0' field and click 'Go.'</li> 104 <li>Click 'Download JDK.'</li> 105 <li>In the 'Linux Platform' section, click 'Linux self-extracting file' associated with the jdk-1_5_0_12-linux-i586.bin package.</li> 106 <li>Follow the installation instructions.</li> 107 </ol> 108 </p> 109 110 <p>Once you have cleanly installed the JDK, modify your PATH environment variable to include <code><jdk-install-dir>/jdk1.5.0_12/bin</code> at its beginning so that Dapper will use the correct installation. </p> 111 <p><b>Ubuntu 7.10</b></p> 112 <p>An alternative method to quickly install Java is to enable multiverse repo in <code>/etc/apt/sources.list</code> and then execute:</p> 113 <pre class="prettyprint"> 114 % sudo apt-get install sun-java5-jdk 115 </pre> 116 117 118 119