135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lypage.title=Building for an Android Dev Phone 235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly@jd:body 335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly 435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<!-- 5768b82a9dfbdd8504eae2736d283a60a37c7a547Clay Murphy Copyright 2013 The Android Open Source Project 635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly 735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly Licensed under the Apache License, Version 2.0 (the "License"); 835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly you may not use this file except in compliance with the License. 935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly You may obtain a copy of the License at 1035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly 1135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly http://www.apache.org/licenses/LICENSE-2.0 1235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly 1335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly Unless required by applicable law or agreed to in writing, software 1435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly distributed under the License is distributed on an "AS IS" BASIS, 1535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly See the License for the specific language governing permissions and 1735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly limitations under the License. 1835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly--> 1935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<div id="qv-wrapper"> 2035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly <div id="qv"> 2135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly <h2>In this document</h2> 2235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly <ol id="auto-toc"> 2335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly </ol> 2435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly </div> 2535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</div> 2635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly 2735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p><em>The information on this page is a bit out of date. We'll update this 2835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lypage as soon as we can.</em></p> 2935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>The basic manifest for 1.6 defines which projects are 3035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lyneeded to do a generic build for the emulator or for unlocked Dream devices 3135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly(e.g. the Android Dev Phone 1). You need to have an appropriate device running 3235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lya matching official image.</p> 3335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>To build donut for dream (your 3435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Lydevice needs to be an ADP1 running an official 1.6 system):</p> 3535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<ol> 3635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<li> 3735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>Follow the <a href="downloading.html">normal steps</a> to setup repo and check out the sources.</p> 3835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</li> 3935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<li> 4035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>At the root of your source tree, run <code>. build/envsetup.sh</code> like you normally would for an emulator build.</p> 4135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</li> 4235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<li> 4335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>Run <code>make adb</code> if you don't already have adb in your path.</p> 4435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</li> 4535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<li> 4635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>run <code>adb root</code>.</p> 4735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</li> 4835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<li> 4935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>in <code>vendor/htc/dream-open/</code> there is a script called "extract-files.sh" that must be run (from that directory) to extract some proprietary binaries from your device (*). You only need to do this once.</p> 5035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</li> 5135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<li> 5235f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>run <code>lunch aosp_dream_us-eng</code> to specifically configure the build system for dream (the default is the equivalent of "lunch generic-eng", which doesn't contain dream-specific files).</p> 5335f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</li> 5435f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<li> 5535f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>run make from the top of the source tree.</p> 5635f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</li> 5735f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<li> 5835f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>from this point, the fastboot tool (which is put automatically in your path) can be used to flash a device: boot the device into the bootloader by holding the back key while pressing the power key, and run <code>fastboot -w flashall</code>.</p> 5935f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</li> 6035f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly</ol> 6135f2fda6aaeaf733ab68a3b7f7ccc67f009c09a9Robert Ly<p>Note: these instructions work for the sapphire (ADP2) build target, as 62768b82a9dfbdd8504eae2736d283a60a37c7a547Clay Murphywell. Simply replace "dream" with "sapphire" above.</p> 63