diff --git a/pdk/docs/guide/build_cookbook.jd b/pdk/docs/guide/build_cookbook.jd index ad5f8b89f..b9d9f7cf8 100755 --- a/pdk/docs/guide/build_cookbook.jd +++ b/pdk/docs/guide/build_cookbook.jd @@ -10,7 +10,6 @@ pdk.version= Building a APK that should be signed with a specific vendor key
Adding a prebuilt APK
Adding a Static Java Library
- Using LOCAL_MODULE_TAGS

The Android Build Cookbook offers code snippets to help you quickly implement some common build tasks. For additional instruction, please see the other build documents in this section.

@@ -107,12 +106,443 @@ pdk.version= # Build a static jar file. include $(BUILD_STATIC_JAVA_LIBRARY) -

Random other build tidbits

-

LOCAL_MODULE_TAGS

-

This variable controls what build flavors the package gets included in. For example:

-

+ +

Product Definition Files

+ +

Product-specific variables are defined in product definition files. A product definition file can inherit from other product definition files, thus reducing the need to copy and simplifying maintenance.

+

Variables maintained in a product definition files include:

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescriptionExample
PRODUCT_NAMEEnd-user-visible name for the overall product. Appears in the "About the phone" info.
PRODUCT_MODELEnd-user-visible name for the end product
PRODUCT_LOCALESA space-separated list of two-letter language code, two-letter country code pairs that describe several settings for the user, such as the UI language and time, date and currency formatting. The first locale listed in PRODUCT_LOCALES is is used if the locale has never been set before.en_GB de_DE es_ES fr_CA
PRODUCT_PACKAGESLists the APKs to install.Calendar Contacts
PRODUCT_DEVICEName of the industrial designdream
PRODUCT_MANUFACTURERName of the manufactureracme
PRODUCT_BRANDThe brand (e.g., carrier) the software is customized for, if any
PRODUCT_PROPERTY_OVERRIDESList of property assignments in the format "key=value"
PRODUCT_COPY_FILESList of words like source_path:destination_path. The file at the source path should be copied to the destination path when building this product. The rules for the copy steps are defined in config/Makefile
PRODUCT_OTA_PUBLIC_KEYSList of OTA public keys for the product
PRODUCT_POLICYIndicate which policy this product should use
PRODUCT_PACKAGE_OVERLAYSIndicate whether to use default resources or add any product specific overlaysvendor/acme/overlay
PRODUCT_CONTRIBUTORS_FILEHTML file containing the contributors to the project.
PRODUCT_TAGSlist of space-separated words for a given product
PRODUCT_SDK_ADDON_NAME
PRODUCT_SDK_ADDON_COPY_FILES
PRODUCT_SDK_ADDON_COPY_MODULES
PRODUCT_SDK_ADDON_DOC_MODULE
+ +

+

The snippet below illustrates a typical product definition file.

+
+$(call inherit-product, build/target/product/generic.mk)
+
+#Overrides
+PRODUCT_NAME := MyDevice
+PRODUCT_MANUFACTURER := acme
+PRODUCT_BRAND := acme_us
+PRODUCT_LOCALES := en_GB es_ES fr_FR
+PRODUCT_PACKAGE_OVERLAYS := vendor/acme/overlay
+
+
+ +

Build Variants

+ +

+When building for a particular product, it's often useful to have minor +variations on what is ultimately the final release build. These are the +currently-defined build variants: +

+ + + + + + + + + + + + + + +
+ eng + + This is the default flavor. A plain "make" is the + same as "make eng". droid is an alias + for eng. +
    +
  • Installs modules tagged with: eng, debug, + user, and/or development. +
  • Installs non-APK modules that have no tags specified. +
  • Installs APKs according to the product definition files, in + addition to tagged APKs. +
  • ro.secure=0 +
  • ro.debuggable=1 +
  • ro.kernel.android.checkjni=1 +
  • adb is enabled by default. +
+ user + + "make user" +

+ This is the flavor intended to be the final release bits. +

    +
  • Installs modules tagged with user. +
  • Installs non-APK modules that have no tags specified. +
  • Installs APKs according to the product definition files; tags + are ignored for APK modules. +
  • ro.secure=1 +
  • ro.debuggable=0 +
  • adb is disabled by default. +
+ userdebug + + "make userdebug" +

+ The same as user, except: +

    +
  • Also installs modules tagged with debug. +
  • ro.debuggable=1 +
  • adb is enabled by default. +
+ +

+If you build one flavor and then want to build another, you should run +"make installclean" between the two makes to guarantee that +you don't pick up files installed by the previous flavor. "make +clean" will also suffice, but it takes a lot longer. +

+ \ No newline at end of file diff --git a/pdk/docs/guide/build_system.jd b/pdk/docs/guide/build_system.jd index 158a0a76e..36936aa54 100755 --- a/pdk/docs/guide/build_system.jd +++ b/pdk/docs/guide/build_system.jd @@ -10,7 +10,6 @@ pdk.version=1.0 Understanding the makefile
Layers
-Product Definition Files
Building the Android Platform
Device Code
@@ -31,8 +30,6 @@ pdk.version=1.0

Understanding Android's Build System

- -

Understanding the makefile

A makefile defines how to build a particular application. Makefiles typically include all of the following elements:

@@ -95,38 +92,6 @@ include $(BUILD_EXECUTABLE) - -

Product Definition Files

- -

Product-specific variables are defined in product definition files. A product definition file can inherit from other product definition files, thus reducing the need to copy and simplifying maintenance.

-

Variables maintained in a product definition files include:

-

    -
  • PRODUCT_DEVICE
  • -
  • LOCALES
  • -
  • BRANDING_PARTNER
  • -
  • PROPERTY_OVERRIDES
  • -
-

-

The snippet below illustrates a typical product definition file.

-
-//device/target/product/core.mk
-PRODUCT_PACKAGES := Home SettingsProvider ...
-//device/target/product/generic.mk
-PRODUCT_PACKAGES := Calendar Camera SyncProvider ...
-$(call inherit-product, target/product/core.mk)
-PRODUCT_NAME := generic
-//device/partner/google/products/core.mk
-PRODUCT_PACKAGES := Maps GoogleAppsProvider ...
-$(call inherit-product, target/product/core.mk)
-//device/partner/google/products/generic.mk
-PRODUCT_PACKAGES := Gmail GmailProvider ...
-$(call inherit-product, partner/google/products/core.mk)
-$(call inherit-product, target/product/generic.mk)
-PRODUCT_NAME := google_generic
-
-
- -

Building the Android Platform

This section describes how to build the default version of Android. Once you are comfortable with a generic build, then you can begin to modify Android for your own target device.

diff --git a/pdk/docs/guide/pdk_toc.cs b/pdk/docs/guide/pdk_toc.cs index 5944ce31f..e6b2cd597 100644 --- a/pdk/docs/guide/pdk_toc.cs +++ b/pdk/docs/guide/pdk_toc.cs @@ -56,6 +56,7 @@ function nothing() {}
  • Early Suspend
  • +
  • Sensors
  • Telephony