<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://elinux.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://elinux.org/index.php?title=Android_Device&amp;feed=atom&amp;action=history</id>
		<title>Android Device - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://elinux.org/index.php?title=Android_Device&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=Android_Device&amp;action=history"/>
		<updated>2013-05-23T17:35:11Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.21alpha</generator>

	<entry>
		<id>http://elinux.org/index.php?title=Android_Device&amp;diff=50653&amp;oldid=prev</id>
		<title>Jkes: Breakdown how a device is specified and how Android is configured for it. Also add a new device specification to Android.</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=Android_Device&amp;diff=50653&amp;oldid=prev"/>
				<updated>2011-06-10T21:21:12Z</updated>
		
		<summary type="html">&lt;p&gt;Breakdown how a device is specified and how Android is configured for it. Also add a new device specification to Android.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is a breakdown of the files build/envsetup.sh, Makefile and the files they use, which describes how a device is specified and how Android is configured for it.&lt;br /&gt;
&lt;br /&gt;
For each file there are some comments and code lines from the make files or scripts, which describe  what they are doing and which files they are using. Also the files which can be used as an example are presented and the commands how to search for them.&lt;br /&gt;
&lt;br /&gt;
This text is for developers who want to add a new device or change the configuration of an existing device. This gives some indications which files are involved.&lt;br /&gt;
&lt;br /&gt;
== build/envsetup.sh ==&lt;br /&gt;
&lt;br /&gt;
Some functions are defined by calling&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
. build/envsetup.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the top directory.&lt;br /&gt;
&lt;br /&gt;
Some environment variables are set by calling&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lunch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the top directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export TARGET_PRODUCT=$product&lt;br /&gt;
export TARGET_BUILD_VARIANT=$variant&lt;br /&gt;
export TARGET_SIMULATOR=false&lt;br /&gt;
export TARGET_BUILD_TYPE=release&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vendorsetup.sh is searched at this places:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vendor/*/vendorsetup.sh &lt;br /&gt;
vendor/*/*/vendorsetup.sh &lt;br /&gt;
device/*/*/vendorsetup.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== vendorsetup.sh ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This file is executed by build/envsetup.sh, and can use anything&lt;br /&gt;
defined in envsetup.sh.&lt;br /&gt;
&lt;br /&gt;
In particular, you can add lunch options with the add_lunch_combo&lt;br /&gt;
function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add_lunch_combo full_crespo-userdebug&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The values of the macros TARGET_PRODUCT and TARGET_BUILD_VARIANT are derived from the option name: add_lunch_combo $TARGET_PRODUCT-$TARGET_BUILD_VARIANT&amp;lt;br/&amp;gt;&lt;br /&gt;
In the above example the resulting values are TARGET_PRODUCT=full_crespo and TARGET_BUILD_VARIANT=userdebug.&lt;br /&gt;
&lt;br /&gt;
These files can be used as an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
find . -name vendorsetup.sh &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./device/samsung/crespo/vendorsetup.sh&lt;br /&gt;
./device/samsung/crespo4g/vendorsetup.sh&lt;br /&gt;
./device/htc/passion/vendorsetup.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Makefile ==&lt;br /&gt;
&lt;br /&gt;
Build process is started by calling&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the top directory.&lt;br /&gt;
&lt;br /&gt;
The Makefile calls build/core/main.mk&lt;br /&gt;
&lt;br /&gt;
== build/core/main.mk ==&lt;br /&gt;
&lt;br /&gt;
Set up various standard variables based on configuration and host information.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
include $(BUILD_SYSTEM)/config.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows us to force a clean build - included after the config.make&lt;br /&gt;
environment setup is done, but before we generate any dependencies.  This&lt;br /&gt;
file does the rm -rf inline so the deps which are all done below will&lt;br /&gt;
be generated correctly&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
include $(BUILD_SYSTEM)/cleanbuild.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the modifier targets that don't do anything themselves, but&lt;br /&gt;
change the behavior of the build.&lt;br /&gt;
(must be defined before including definitions.make)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INTERNAL_MODIFIER_TARGETS := showcommands checkbuild all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bring in standard build system definitions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
include $(BUILD_SYSTEM)/definitions.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== build/core/config.mk ==&lt;br /&gt;
&lt;br /&gt;
Various mappings to avoid hard-coding paths all over the place&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
include $(BUILD_SYSTEM)/pathmap.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Try to include buildspec.mk, which will try to set stuff up.&lt;br /&gt;
If this file doesn't exist, the environemnt variables will&lt;br /&gt;
be used, and if that doesn't work, then the default is an&lt;br /&gt;
arm build&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-include $(TOPDIR)buildspec.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Define most of the global variables.  These are the ones that&lt;br /&gt;
are specific to the user's build configuration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
include $(BUILD_SYSTEM)/envsetup.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Search for BoardConfig.mk in &amp;lt;br/&amp;gt;&lt;br /&gt;
$(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)/BoardConfig.mk  &amp;lt;br/&amp;gt;&lt;br /&gt;
		device/*/$(TARGET_DEVICE)/BoardConfig.mk &amp;lt;br/&amp;gt;&lt;br /&gt;
		vendor/*/$(TARGET_DEVICE)/BoardConfig.mk  &amp;lt;br/&amp;gt;&lt;br /&gt;
and load the file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 include $(board_config_mk)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 include $(BUILD_SYSTEM)/dumpvar.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== BoardConfig.mk ==&lt;br /&gt;
&lt;br /&gt;
These files can be used as an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
find . -name BoardConfig.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./device/samsung/crespo/BoardConfig.mk&lt;br /&gt;
./device/samsung/crespo4g/BoardConfig.mk&lt;br /&gt;
./device/htc/passion/BoardConfig.mk&lt;br /&gt;
./build/target/board/generic/BoardConfig.mk&lt;br /&gt;
./build/target/board/generic_x86/BoardConfig.mk&lt;br /&gt;
./build/target/board/emulator/BoardConfig.mk&lt;br /&gt;
./build/target/board/sim/BoardConfig.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== build/buildspec.mk.default ==&lt;br /&gt;
&lt;br /&gt;
This is a do-nothing template file.  To use it, copy it to a file&lt;br /&gt;
named &amp;quot;buildspec.mk&amp;quot; in the root directory, and uncomment or change&lt;br /&gt;
the variables necessary for your desired configuration.  The file&lt;br /&gt;
&amp;quot;buildspec.mk&amp;quot; should never be checked in to source control.&lt;br /&gt;
&lt;br /&gt;
Choose a product to build for.  Look in the products directory for ones&lt;br /&gt;
that work.&amp;lt;br/&amp;gt;&lt;br /&gt;
TARGET_PRODUCT&lt;br /&gt;
&lt;br /&gt;
Choose a variant to build.  If you don't pick one, the default is eng.&amp;lt;br/&amp;gt;&lt;br /&gt;
User is what we ship.  &amp;lt;br/&amp;gt;&lt;br /&gt;
Userdebug is that, with a few flags turned on&lt;br /&gt;
for debugging.  &amp;lt;br/&amp;gt;&lt;br /&gt;
Eng has lots of extra tools for development.&amp;lt;br/&amp;gt;&lt;br /&gt;
TARGET_BUILD_VARIANT&lt;br /&gt;
&lt;br /&gt;
CUSTOM_MODULES&amp;lt;br/&amp;gt;&lt;br /&gt;
TARGET_SIMULATOR&lt;br /&gt;
&lt;br /&gt;
Set this to debug or release if you care.  Otherwise, it defaults to&lt;br /&gt;
release for arm and debug for the simulator.&amp;lt;br/&amp;gt;&lt;br /&gt;
TARGET_BUILD_TYPE&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HOST_BUILD_TYPE&amp;lt;br/&amp;gt;&lt;br /&gt;
DEBUG_MODULE_ModuleName&amp;lt;br/&amp;gt;&lt;br /&gt;
TARGET_TOOLS_PREFIX&amp;lt;br/&amp;gt;&lt;br /&gt;
HOST_CUSTOM_DEBUG_CFLAGS&amp;lt;br/&amp;gt;&lt;br /&gt;
TARGET_CUSTOM_DEBUG_CFLAGS&amp;lt;br/&amp;gt;&lt;br /&gt;
CUSTOM_LOCALES&amp;lt;br/&amp;gt;&lt;br /&gt;
OUT_DIR&amp;lt;br/&amp;gt;&lt;br /&gt;
ADDITIONAL_BUILD_PROPERTIES&amp;lt;br/&amp;gt;&lt;br /&gt;
NO_FALLBACK_FONT&amp;lt;br/&amp;gt;&lt;br /&gt;
WEBCORE_INSTRUMENTATION&amp;lt;br/&amp;gt;&lt;br /&gt;
ENABLE_SVG&amp;lt;br/&amp;gt;&lt;br /&gt;
BUILD_ENV_SEQUENCE_NUMBER&lt;br /&gt;
&lt;br /&gt;
== build/envsetup.mk ==&lt;br /&gt;
&lt;br /&gt;
Set up version information.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
include $(BUILD_SYSTEM)/version_defaults.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you update the build system such that the environment setup&lt;br /&gt;
or buildspec.mk need to be updated, increment this number, and&lt;br /&gt;
people who haven't re-run those will have to do so before they&lt;br /&gt;
can build.  Make sure to also update the corresponding value in&lt;br /&gt;
buildspec.mk.default and envsetup.sh.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CORRECT_BUILD_ENV_SEQUENCE_NUMBER := 10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
include $(BUILD_SYSTEM)/product_config.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TARGET_PRODUCT: sim  full &amp;lt;br/&amp;gt;&lt;br /&gt;
TARGET_BUILD_VARIANT: eng user userdebug tests&lt;br /&gt;
&lt;br /&gt;
== build/core/version_defaults.mk ==&lt;br /&gt;
&lt;br /&gt;
Handle various build version information.&lt;br /&gt;
&lt;br /&gt;
Guarantees that the following are defined:&amp;lt;br/&amp;gt;&lt;br /&gt;
PLATFORM_VERSION&amp;lt;br/&amp;gt;&lt;br /&gt;
PLATFORM_SDK_VERSION&amp;lt;br/&amp;gt;&lt;br /&gt;
PLATFORM_VERSION_CODENAME&amp;lt;br/&amp;gt;&lt;br /&gt;
DEFAULT_APP_TARGET_SDK&amp;lt;br/&amp;gt;&lt;br /&gt;
BUILD_ID&amp;lt;br/&amp;gt;&lt;br /&gt;
BUILD_NUMBER&lt;br /&gt;
&lt;br /&gt;
Look for an optional file $(BUILD_SYSTEM)/build_id.mk containing overrides of the defaults &amp;lt;br/&amp;gt;&lt;br /&gt;
INTERNAL_BUILD_ID_MAKEFILE&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
include $(BUILD_SYSTEM)/build_id.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== build/core/build_id.mk ==&lt;br /&gt;
&lt;br /&gt;
BUILD_ID is usually used to specify the branch name&amp;lt;br/&amp;gt;&lt;br /&gt;
BUILD_ID&lt;br /&gt;
&lt;br /&gt;
DISPLAY_BUILD_NUMBER&lt;br /&gt;
&lt;br /&gt;
== build/product_config.mk ==&lt;br /&gt;
&lt;br /&gt;
Provide &amp;quot;PRODUCT-&amp;lt;prodname&amp;gt;-&amp;lt;goal&amp;gt;&amp;quot; targets, which lets you build&lt;br /&gt;
a particular configuration without needing to set up the environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET_PRODUCT := $(word 1,$(product_goals))&lt;br /&gt;
TARGET_BUILD_VARIANT := $(word 2,$(product_goals))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Provide &amp;quot;APP-&amp;lt;appname&amp;gt;&amp;quot; targets, which lets you build&lt;br /&gt;
an unbundled app.&lt;br /&gt;
&lt;br /&gt;
Include the product definitions.&lt;br /&gt;
We need to do this to translate TARGET_PRODUCT into its&lt;br /&gt;
underlying TARGET_DEVICE before we start defining any rules.&lt;br /&gt;
&lt;br /&gt;
PRODUCT_DEVICE is defined in the product file $(TARGET_PRODUCT).mk.&amp;lt;br/&amp;gt;&lt;br /&gt;
The product file $(TARGET_PRODUCT).mk is searched in the list of product make files $(PRODUCT_MAKEFILES).&amp;lt;br/&amp;gt;&lt;br /&gt;
PRODUCT_MAKEFILES is set in AndroidProducts.mk files. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(call import-products,$(call get-product-makefiles,&lt;br /&gt;
      $(SRC_TARGET_DIR)/product/AndroidProducts.mk))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Convert a short name like &amp;quot;sooner&amp;quot; into the path to the product&lt;br /&gt;
file defining that product.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INTERNAL_PRODUCT := $(call resolve-short-product-name, $(TARGET_PRODUCT))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET_DEVICE := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEVICE)&lt;br /&gt;
PRODUCT_LOCALES := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_LOCALES))&lt;br /&gt;
PRODUCT_BRAND&lt;br /&gt;
PRODUCT_MODEL&lt;br /&gt;
PRODUCT_MANUFACTURER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PRODUCT_OTA_PUBLIC_KEYS&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AndroidProducts.mk ==&lt;br /&gt;
&lt;br /&gt;
This file should set PRODUCT_MAKEFILES to a list of product makefiles&lt;br /&gt;
to expose to the build system.  LOCAL_DIR will already be set to&lt;br /&gt;
the directory containing this file.&lt;br /&gt;
&lt;br /&gt;
This file may not rely on the value of any variable other than&lt;br /&gt;
LOCAL_DIR; do not use any conditionals, and do not look up the&lt;br /&gt;
value of any variable that isn't set in this file or in a file that&lt;br /&gt;
it includes.&lt;br /&gt;
&lt;br /&gt;
File device/samsung/crespo/AndroidProducts.mk&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PRODUCT_MAKEFILES := \&lt;br /&gt;
    $(LOCAL_DIR)/full_crespo.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files can be used as an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
find . -name AndroidProducts.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./device/sample/products/AndroidProducts.mk&lt;br /&gt;
./device/samsung/crespo/AndroidProducts.mk&lt;br /&gt;
./device/samsung/crespo4g/AndroidProducts.mk&lt;br /&gt;
./device/htc/passion/AndroidProducts.mk&lt;br /&gt;
./build/target/product/AndroidProducts.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command which returns the list of all AndroidProducts.mk files is defined in build/core/product.mk :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define _find-android-products-files&lt;br /&gt;
$(shell test -d device &amp;amp;&amp;amp; find device -maxdepth 6 -name AndroidProducts.mk) \&lt;br /&gt;
  $(shell test -d vendor &amp;amp;&amp;amp; find vendor -maxdepth 6 -name AndroidProducts.mk) \&lt;br /&gt;
  $(SRC_TARGET_DIR)/product/AndroidProducts.mk&lt;br /&gt;
endef&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Product Files ==&lt;br /&gt;
&lt;br /&gt;
Search for the files which can be used as an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep -R PRODUCT_DEVICE device build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
device/samsung/crespo/full_crespo.mk:PRODUCT_DEVICE := crespo&lt;br /&gt;
device/samsung/crespo4g/full_crespo4g.mk:PRODUCT_DEVICE := crespo4g&lt;br /&gt;
device/htc/passion/full_passion.mk:PRODUCT_DEVICE := passion&lt;br /&gt;
build/target/product/sdk.mk:PRODUCT_DEVICE := generic&lt;br /&gt;
build/target/product/generic.mk:PRODUCT_DEVICE := generic&lt;br /&gt;
build/target/product/generic_x86.mk:PRODUCT_DEVICE := generic_x86&lt;br /&gt;
build/target/product/core.mk:PRODUCT_DEVICE := generic&lt;br /&gt;
build/target/product/full_x86.mk:PRODUCT_DEVICE := generic_x86&lt;br /&gt;
build/target/product/full.mk:PRODUCT_DEVICE := generic&lt;br /&gt;
build/target/product/sim.mk:PRODUCT_DEVICE := sim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PRODUCT_DEVICE is used in these files&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
build/core/product.mk:    PRODUCT_DEVICE \&lt;br /&gt;
build/core/product_config.mk:TARGET_DEVICE := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEVICE)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Add new device ==&lt;br /&gt;
&lt;br /&gt;
Add the configuration files for the new device mydevice of the company mycompany.&lt;br /&gt;
&lt;br /&gt;
Create AndroidProducts.mk&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p device/mycompany/mydevice&lt;br /&gt;
nano device/mycompany/mydevice/AndroidProducts.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PRODUCT_MAKEFILES := \&lt;br /&gt;
    $(LOCAL_DIR)/full_mydevice.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create file full_mydevice.mk&amp;lt;br/&amp;gt;&lt;br /&gt;
Example is build/target/product/full.mk&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nano device/mycompany/mydevice/full_mydevice.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)&lt;br /&gt;
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic/device.mk)&lt;br /&gt;
&lt;br /&gt;
# Overrides&lt;br /&gt;
PRODUCT_NAME := full_mydevice&lt;br /&gt;
PRODUCT_DEVICE := mydevice&lt;br /&gt;
PRODUCT_BRAND := Android&lt;br /&gt;
PRODUCT_MODEL := Full Android on mydevice&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create file vendorsetup.sh&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nano device/mycompany/mydevice/vendorsetup.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
add_lunch_combo full_mydevice-eng&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create file BoardConfig.mk&lt;br /&gt;
&lt;br /&gt;
Examples are&amp;lt;br/&amp;gt; &lt;br /&gt;
build/target/board/generic/BoardConfig.mk&amp;lt;br/&amp;gt;&lt;br /&gt;
device/samsung/crespo/BoardConfig.mk &amp;lt;br/&amp;gt;&lt;br /&gt;
device/samsung/crespo/BoardConfigCommon.mk&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p device/mycompany/mydevice&lt;br /&gt;
nano device/mycompany/mydevice/BoardConfig.mk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# config.mk&lt;br /&gt;
#&lt;br /&gt;
# Product-specific compile-time definitions.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# The generic product target doesn't have any hardware-specific pieces.&lt;br /&gt;
TARGET_NO_BOOTLOADER := true&lt;br /&gt;
TARGET_NO_KERNEL := true&lt;br /&gt;
TARGET_CPU_ABI := armeabi&lt;br /&gt;
HAVE_HTC_AUDIO_DRIVER := true&lt;br /&gt;
BOARD_USES_GENERIC_AUDIO := true&lt;br /&gt;
&lt;br /&gt;
# no hardware camera&lt;br /&gt;
USE_CAMERA_STUB := true&lt;br /&gt;
&lt;br /&gt;
# Set /system/bin/sh to mksh, not ash, to test the transition.&lt;br /&gt;
TARGET_SHELL := mksh&lt;br /&gt;
&lt;br /&gt;
# CPU&lt;br /&gt;
TARGET_ARCH_VARIANT := armv7-a-neon&lt;br /&gt;
ARCH_ARM_HAVE_TLS_REGISTER := true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure Android for mydevice&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
. build/envsetup.sh &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
including device/htc/passion/vendorsetup.sh&lt;br /&gt;
including device/mycompany/mydevice/vendorsetup.sh&lt;br /&gt;
including device/samsung/crespo4g/vendorsetup.sh&lt;br /&gt;
including device/samsung/crespo/vendorsetup.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lunch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
You're building on Linux&lt;br /&gt;
&lt;br /&gt;
Lunch menu... pick a combo:&lt;br /&gt;
     1. full-eng&lt;br /&gt;
     2. full_x86-eng&lt;br /&gt;
     3. simulator&lt;br /&gt;
     4. full_passion-userdebug&lt;br /&gt;
     5. full_mydevice-eng&lt;br /&gt;
     6. full_crespo4g-userdebug&lt;br /&gt;
     7. full_crespo-userdebug&lt;br /&gt;
&lt;br /&gt;
Which would you like? [full-eng] 5&lt;br /&gt;
&lt;br /&gt;
============================================&lt;br /&gt;
PLATFORM_VERSION_CODENAME=AOSP&lt;br /&gt;
PLATFORM_VERSION=AOSP&lt;br /&gt;
TARGET_PRODUCT=full_mydevice&lt;br /&gt;
TARGET_BUILD_VARIANT=eng&lt;br /&gt;
TARGET_SIMULATOR=false&lt;br /&gt;
TARGET_BUILD_TYPE=release&lt;br /&gt;
TARGET_BUILD_APPS=&lt;br /&gt;
TARGET_ARCH=arm&lt;br /&gt;
TARGET_ARCH_VARIANT=armv7-a-neon&lt;br /&gt;
HOST_ARCH=x86&lt;br /&gt;
HOST_OS=linux&lt;br /&gt;
HOST_BUILD_TYPE=release&lt;br /&gt;
BUILD_ID=OPENMASTER&lt;br /&gt;
============================================&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Build Android for mydevice&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make -j4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Combining NOTICE files: out/target/product/mydevice/obj/NOTICE.html&lt;br /&gt;
Target system fs image: out/target/product/mydevice/obj/PACKAGING/systemimage_intermediates/system.img&lt;br /&gt;
Install system fs image: out/target/product/mydevice/system.img&lt;br /&gt;
Installed file list: out/target/product/mydevice/installed-files.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Android]]&lt;/div&gt;</summary>
		<author><name>Jkes</name></author>	</entry>

	</feed>