1 <html devsite><head> 2 <title></title> 3 <meta name="project_path" value="/_project.yaml"/> 4 <meta name="book_path" value="/_book.yaml"/> 5 </head> 6 <body> 7 <!-- 8 Copyright 2017 The Android Open Source Project 9 10 Licensed under the Apache License, Version 2.0 (the "License"); 11 you may not use this file except in compliance with the License. 12 You may obtain a copy of the License at 13 14 http://www.apache.org/licenses/LICENSE-2.0 15 16 Unless required by applicable law or agreed to in writing, software 17 distributed under the License is distributed on an "AS IS" BASIS, 18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 See the License for the specific language governing permissions and 20 limitations under the License. 21 --> 22 23 <p> Android <code>master</code></p> 24 25 <p class="note"><strong></strong> Android 6.0 <a href="jack.html"> Jack </a></p> 26 27 <h2 id="obtaining-proprietary-binaries"></h2> 28 29 <p> AOSP AOSP<a href="requirements.html#binaries"></a></p> 30 31 <h3 id="downloading-proprietary-binaries"></h3> 32 33 <p> AOSP <a href="https://developers.google.com/android/nexus/drivers">Google Nexus </a> AOSP master <a href="https://developers.google.com/android/nexus/blobs-preview">Nexus </a> master <a href="/source/build-numbers.html"></a></p> 34 35 <h3 id="extracting-proprietary-binaries"></h3> 36 37 <p> Makefile <code>vendor/</code> </p> 38 39 <h3 id="cleaning-up"></h3> 40 41 <p></p> 42 <pre><code>$ make clobber 43 </code></pre> 44 45 <h2 id="initialize"></h2> 46 <p> <code>envsetup.sh</code> <code>source</code> <code>.</code></p> 47 <pre><code>$ source build/envsetup.sh 48 </code></pre> 49 <p></p> 50 <pre><code>$ . build/envsetup.sh 51 </code></pre> 52 53 <h2 id="choose-a-target"></h2> 54 <p> <code>lunch</code> </p> 55 <pre><code>$ lunch aosp_arm-eng 56 </code></pre> 57 <p></p> 58 <p><code>lunch</code> </p> 59 <p> <code>BUILD-BUILDTYPE</code> <code>BUILD</code> </p> 60 61 <p>BUILDTYPE </p> 62 <table> 63 <thead> 64 <tr> 65 <th></th> 66 <th></th> 67 </tr> 68 </thead> 69 <tbody> 70 <tr> 71 <td>user</td> 72 <td></td> 73 </tr> 74 <tr> 75 <td>userdebug</td> 76 <td>user root </td> 77 </tr> 78 <tr> 79 <td>eng</td> 80 <td></td> 81 </tr> 82 </tbody> 83 </table> 84 <p><a href="running.html"></a></p> 85 86 <h2 id="build-the-code"></h2> 87 88 <p> Android <a href="running.html"></a></p> 89 90 <p> <code>make</code> GNU Make <code>-jN</code> N 1-2 E5520 2 CPU CPU 4 2 <code>make -j16</code> <code>make -j32</code> </p> 91 92 <pre> 93 $ make -j4 94 </pre> 95 96 <h2 id="run-it"></h2> 97 98 <p> <code>lunch</code> </p> 99 100 <p class="note"><strong></strong><a href="#obtaining-proprietary-binaries"></a> Blob<code>make clobber</code> </p> 101 102 <h3 id="flash-a-device"> fastboot </h3> 103 104 <p> <code>fastboot</code><a href="running.html#flashing-a-device"></a></p> 105 106 <h3 id="emulate-an-android-device"> Android </h3> 107 108 <p></p> 109 110 <pre> 111 $ emulator 112 </pre> 113 114 <h2 id="troubleshooting-common-build-errors"></h2> 115 116 <h3 id="wrong-java-version">Java </h3> 117 118 <p> Android Java <code>make</code> </p> 119 <pre> 120 ************************************************************ 121 You are attempting to build with the incorrect version 122 of java. 123 124 Your version is: WRONG_VERSION. 125 The correct version is: RIGHT_VERSION. 126 127 Please follow the machine setup instructions at 128 https://source.android.com/source/initializing.html 129 ************************************************************ 130 </pre> 131 132 <p></p> 133 134 <ul> 135 <li> <a href="requirements.html#jdk">JDK </a> JDK</li> 136 <li> JDK JDK JDK</li> 137 </ul> 138 139 <h3 id="python-version-3">Python 3</h3> 140 141 <p>Repo Python 2.x Python 3 Repo Python 2.x</p> 142 143 <pre> 144 $ apt-get install python 145 </pre> 146 147 <h3 id="case-insensitive-filesystem"></h3> 148 149 <p> Mac OS HFS </p> 150 <pre> 151 ************************************************************ 152 You are building on a case-insensitive filesystem. 153 Please move your source tree to a case-sensitive filesystem. 154 ************************************************************ 155 </pre> 156 <p><a href="initializing.html"></a></p> 157 158 <h3 id="no-usb-permission"> USB </h3> 159 160 <p> Linux USB <a href="initializing.html"></a> USB </p> 161 162 <p> adb <code>adb kill-server</code> adb </p> 163 164 </body></html>