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> Makefile</p> 24 25 <h2 id="build-layers"></h2> 26 27 <p></p> 28 29 <table> 30 <tbody><tr> 31 <th></th> 32 <th></th> 33 <th></th> 34 </tr> 35 <tr> 36 <td></td> 37 <td>myProductmyProduct_eumyProduct_eu_frj2sdk</td> 38 <td><p> Makefile CDMA GSM 39 </p></td> 40 41 </tr> 42 <tr> 43 <td>/</td> 44 <td>sardinetroutgoldfish</td> 45 <td>/ QWERTY AZERTY /</td> 46 </tr> 47 <tr> 48 <td></td> 49 <td>armx86mipsarm64x86_64mips64</td> 50 <td> ABI</td> 51 </tr> 52 </tbody></table> 53 54 <h2 id="build-variants"></h2> 55 56 <p> <code>LOCAL_MODULE_TAGS</code> <code>optional</code><code>debug</code><code>eng</code></p> 57 58 <p> <code>LOCAL_MODULE_TAGS</code> <code>optional</code> <code>PRODUCT_PACKAGES</code> </p><p></p> 59 60 <table border="1"> 61 <tbody><tr> 62 <td> 63 <code>eng<code> 64 </code></code></td> 65 <td> 66 <ul> 67 <li> <code>eng</code> / <code>debug</code> 68 </li><li></li> 69 <li><code>ro.secure=0</code> 70 </li><li><code>ro.debuggable=1</code> 71 </li><li><code>ro.kernel.android.checkjni=1</code> 72 </li><li><code>adb</code> 73 </li></ul></td> 74 </tr> 75 <tr> 76 <td> 77 <code>user<code> 78 </code></code></td> 79 <td> 80 <ul> 81 <li> <code>user</code> </li> 82 <li></li> 83 <li><code>ro.secure=1</code> </li> 84 <li><code>ro.debuggable=0</code> </li> 85 <li><code>adb</code> </li> 86 </ul></td> 87 </tr> 88 <tr> 89 <td> 90 <code>userdebug<code> 91 </code></code></td> 92 <td> <code>user</code> <ul> 93 <li> <code>debug</code> 94 </li><li><code>ro.debuggable=1</code> 95 </li><li><code>adb</code> 96 </li></ul></td> 97 </tr> 98 </tbody></table> 99 100 <h2 id="use-resource-overlays"></h2> 101 102 <p>Android <code>PRODUCT_PACKAGE_OVERLAYS</code> </p> 103 104 <p><a href="https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml">frameworks/base/core/res/res/config.xml</a> </p> 105 106 <p></p> 107 108 <pre> 109 PRODUCT_PACKAGE_OVERLAYS := device/<i>device_implementer</i>/<i>device_name</i>/overlay 110 </pre> 111 112 <p></p> 113 114 <pre> 115 PRODUCT_PACKAGE_OVERLAYS := vendor/<i>vendor_name</i>/overlay 116 </pre> 117 118 <p></p> 119 120 <pre> 121 vendor/foobar/overlay/frameworks/base/core/res/res/config.xml 122 </pre> 123 124 <p> <code>config.xml</code> </p> 125 126 <h2 id="build-a-product"></h2> 127 128 <p> Nexus 6 129 </p> 130 <p> Nexus 6 <code>shamu</code> Makefile Makefile <code>device/moto/shamu</code> 131 </p> 132 <h3 id="makefiles"> Makefile</h3> 133 <p> Nexus 6 Makefile</p> 134 <ol> 135 <li> <code>device/<company_name>/<device_name></code> <code>device/moto/shamu</code> Makefile 136 </li> 137 138 <li> <code>device.mk</code> Makefile <code>device/moto/shamu/device.mk</code> 139 </li> 140 141 <li> Makefile Makefile <code>device/moto/shamu/aosp_shamu.mk</code> Makefile <code>device/moto/shamu/device.mk</code> <code>vendor/moto/shamu/device-vendor.mk</code> 142 143 <pre> 144 # Inherit from the common Open Source product configuration 145 $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk) 146 147 PRODUCT_NAME := aosp_shamu 148 PRODUCT_DEVICE := shamu 149 PRODUCT_BRAND := Android 150 PRODUCT_MODEL := AOSP on Shamu 151 PRODUCT_MANUFACTURER := motorola 152 PRODUCT_RESTRICT_VENDOR_FILES := true 153 154 $(call inherit-product, device/moto/shamu/device.mk) 155 $(call inherit-product-if-exists, vendor/moto/shamu/device-vendor.mk) 156 157 PRODUCT_NAME := aosp_shamu 158 159 PRODUCT_PACKAGES += \ 160 Launcher3 161 </pre> 162 163 <p> Makefile <a href="#prod-def"></a> 164 </p> 165 </li> 166 167 <li> Makefile <code>AndroidProducts.mk</code> Makefile <code>device/moto/shamu/AndroidProducts.mk</code><pre> 168 # 169 # This file should set PRODUCT_MAKEFILES to a list of product makefiles 170 # to expose to the build system. LOCAL_DIR will already be set to 171 # the directory containing this file. 172 # 173 # This file may not rely on the value of any variable other than 174 # LOCAL_DIR; do not use any conditionals, and do not look up the 175 # value of any variable that isn't set in this file or in a file that 176 # it includes. 177 # 178 179 PRODUCT_MAKEFILES := \ 180 $(LOCAL_DIR)/aosp_shamu.mk 181 </pre> 182 </li> 183 184 <li> <code>BoardConfig.mk</code> Makefile <code>device/moto/shamu/BoardConfig.mk</code> 185 </li> 186 187 <li> <code>vendorsetup.sh</code> <a href="#build-variants"></a><pre> 188 add_lunch_combo <product_name>-userdebug 189 </pre> 190 </li> 191 192 <li> 193 </li> 194 195 </ol> 196 <h3 id="prod-def"></h3> 197 <p> Makefile </p> 198 <table> 199 <tbody> 200 <tr> 201 <th></th> 202 <th></th> 203 <th></th> 204 </tr> 205 <tr> 206 <td>PRODUCT_AAPT_CONFIG</td> 207 <td> 208 <code>aapt</code> </td> 209 <td></td> 210 </tr> 211 <tr> 212 <td>PRODUCT_BRAND</td> 213 <td></td> 214 <td></td> 215 </tr> 216 <tr> 217 <td>PRODUCT_CHARACTERISTICS</td> 218 <td> 219 <code>aapt</code> 220 </td> 221 <td>tabletnosdcard</td> 222 </tr> 223 <tr> 224 <td>PRODUCT_COPY_FILES</td> 225 <td> <code>source_path:destination_path</code>config/Makefile </td> 226 <td></td> 227 </tr> 228 <tr> 229 <td>PRODUCT_DEVICE</td> 230 <td> <code>BoardConfig.mk.</code> 231 </td> 232 <td> 233 <code>tuna</code> 234 </td> 235 </tr> 236 <tr> 237 <td>PRODUCT_LOCALES</td> 238 <td>/PRODUCT_LOCALES 239 </td> 240 <td> 241 <code>en_GB de_DE es_ES fr_CA</code> 242 </td> 243 </tr> 244 <tr> 245 <td>PRODUCT_MANUFACTURER</td> 246 <td></td> 247 <td> 248 <code>acme</code> 249 </td> 250 </tr> 251 <tr> 252 <td>PRODUCT_MODEL</td> 253 <td></td> 254 <td></td> 255 </tr> 256 <tr> 257 <td>PRODUCT_NAME</td> 258 <td>> 259 </td> 260 <td></td> 261 </tr> 262 <tr> 263 <td>PRODUCT_OTA_PUBLIC_KEYS</td> 264 <td> (OTA) </td> 265 <td></td> 266 </tr> 267 <tr> 268 <td>PRODUCT_PACKAGES</td> 269 <td> APK 270 </td> 271 <td> 272 <code>Calendar Contacts</code> 273 </td> 274 </tr> 275 <tr> 276 <td>PRODUCT_PACKAGE_OVERLAYS</td> 277 <td></td> 278 <td> 279 <code>vendor/acme/overlay</code> 280 </td> 281 </tr> 282 <tr> 283 <td>PRODUCT_PROPERTY_OVERRIDES</td> 284 <td>key=value</td> 285 <td></td> 286 </tr> 287 </tbody> 288 </table> 289 290 </body></html>