SlideShare a Scribd company logo
1 of 42
Download to read offline
BuildSystem.mk
Rémy Gottschalk 
● SoftAtHome : 3 years - 
Linux System for HGW 
and STB 
● Genymobile : 2 years - 
ROM cooking 
Charles-Henry Prunier 
● Archos : 3 years - ROM 
cooking for Archos 
devices (Archos 5 IT - 
GEN 10) 
● Genymobile : 2 years - 
ROM cooking 
SPEAKERS
01 
How to make 
02 
Device 
definition 
03 
Android.mk 
04 
One last bite 
AGENDA
HOW TO MAKE 
source, lunch, make !
HOW TO MAKE 
# source ./build/envsetup.sh 
# 
# head -n 15 build/envsetup.sh 
function hmm() { 
cat <<EOF 
Invoke ". build/envsetup.sh" from your shell to add the following functions to your 
environment: 
- lunch: lunch <product_name>-<build_variant> 
- tapas: tapas [<App1> <App2> ...] [arm|x86|mips|armv5] [eng|userdebug|user] 
- croot: Changes directory to the top of the tree. 
- m: Makes from the top of the tree. 
- mm: Builds all of the modules in the current directory, but not their 
dependencies. 
- mmm: Builds all of the modules in the supplied directories, but not their 
dependencies. 
- mma: Builds all of the modules in the current directory, and their 
dependencies. 
- mmma: Builds all of the modules in the supplied directories, and their 
dependencies. 
- cgrep: Greps on all local C/C++ files. 
- jgrep: Greps on all local Java files. 
- resgrep: Greps on all local res/*.xml files. 
- godir: Go to the directory containing a file. 
#
HOW TO MAKE 
lunch
HOW TO MAKE 
make 
make -j42 
It’s coffee time !
DEVICE DEFINITION 
What’s my target ?
vendorsetup.sh 
Lunch entry point 
TYPE = eng | userdebug | release 
AndroidProducts.mk 
The first makefile 
DEVICE DEFINITION 
vendorsetup.sh, AndroidProduct.mk 
add_lunch_combo TARGETNAME-TYPE 
PRODUCT_MAKEFILES = TARGETNAME.mk
DEVICE DEFINITION 
vendorsetup.sh, AndroidProduct.mk 
# tail -n1 device/lge/hammerhead/vendorsetup.sh 
add_lunch_combo aosp_hammerhead-userdebug 
# 
# tail -n3 device/lge/hammerhead/AndroidProducts.mk 
PRODUCT_MAKEFILES :=  
$(LOCAL_DIR)/aosp_hammerhead.mk  
$(LOCAL_DIR)/full_hammerhead.mk
DEVICE DEFINITION 
BoardConfig.mk 
Define your 
device hardware 
Can include other 
BoardConfig.mk 
A bunch of 
specific 
defines 
BoardConfig.mk
DEVICE DEFINITION 
BoardConfig.mk 
# cat device/lge/hammerhead/BoardConfig.mk | grep -vP "(^$|^#.*$)" 
TARGET_CPU_ABI := armeabi-v7a 
TARGET_CPU_ABI2 := armeabi 
TARGET_CPU_SMP := true 
TARGET_ARCH := arm 
TARGET_ARCH_VARIANT := armv7-a-neon 
TARGET_CPU_VARIANT := krait 
TARGET_NO_BOOTLOADER := true 
BOARD_KERNEL_BASE := 0x00000000 
BOARD_KERNEL_PAGESIZE := 2048 
BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.hardware=hammerhead 
user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1 
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02900000 --tags_offset 0x02700000 
MAX_EGL_CACHE_KEY_SIZE := 12*1024 
MAX_EGL_CACHE_SIZE := 2048*1024 
BOARD_USES_ALSA_AUDIO := true 
BOARD_HAVE_BLUETOOTH := true 
BOARD_HAVE_BLUETOOTH_BCM := true 
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/lge/hammerhead/bluetooth 
WPA_SUPPLICANT_VERSION := VER_0_8_X 
BOARD_WLAN_DEVICE := bcmdhd 
BOARD_WPA_SUPPLICANT_DRIVER := NL80211 
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) 
BOARD_HOSTAPD_DRIVER := NL80211 
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) 
WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcmdhd/parameters/firmware_path"
DEVICE DEFINITION 
BoardConfig.mk 
WIFI_DRIVER_FW_PATH_AP := "/vendor/firmware/fw_bcmdhd_apsta.bin" 
WIFI_DRIVER_FW_PATH_STA := "/vendor/firmware/fw_bcmdhd.bin" 
BOARD_USES_SECURE_SERVICES := true 
TARGET_NO_RADIOIMAGE := true 
TARGET_BOARD_PLATFORM := msm8974 
TARGET_BOOTLOADER_BOARD_NAME := hammerhead 
TARGET_BOARD_INFO_FILE := device/lge/hammerhead/board-info.txt 
BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := $(TARGET_BOARD_PLATFORM) 
TARGET_NO_RPC := true 
BOARD_EGL_CFG := device/lge/hammerhead/egl.cfg 
USE_OPENGL_RENDERER := true 
VSYNC_EVENT_PHASE_OFFSET_NS := 7500000 
SF_VSYNC_EVENT_PHASE_OFFSET_NS := 5000000 
TARGET_USES_ION := true 
TARGET_USERIMAGES_USE_EXT4 := true 
BOARD_BOOTIMAGE_PARTITION_SIZE := 23068672 
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 23068672 
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1073741824 
BOARD_USERDATAIMAGE_PARTITION_SIZE := 13725837312 
BOARD_CACHEIMAGE_PARTITION_SIZE := 734003200 
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 
BOARD_FLASH_BLOCK_SIZE := 131072 
BOARD_CHARGER_DISABLE_INIT_BLANK := true 
BOARD_CHARGER_ENABLE_SUSPEND := true 
TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888 
TARGET_RECOVERY_UI_LIB := librecovery_ui_hammerhead
DEVICE DEFINITION 
BoardConfig.mk 
TARGET_RECOVERY_FSTAB = device/lge/hammerhead/fstab.hammerhead 
TARGET_RELEASETOOLS_EXTENSIONS := device/lge/hammerhead 
PDK_PLATFORM_ZIP_PRODUCT_BINARIES := device/lge/hammerhead-kernel/vmlinux.bz2 
BOARD_HAL_STATIC_LIBRARIES := libdumpstate.hammerhead 
BOARD_SEPOLICY_DIRS :=  
device/lge/hammerhead/sepolicy 
BOARD_SEPOLICY_UNION :=  
device.te  
app.te  
file_contexts 
HAVE_ADRENO_SOURCE:= false 
OVERRIDE_RS_DRIVER:= libRSDriver_adreno.so 
TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true 
TARGET_TOUCHBOOST_FREQUENCY:= 1200 
-include vendor/lge/hammerhead/BoardConfigVendor.mk
DEVICE DEFINITION 
device.mk 
Define your 
device software 
No specific 
naming 
Heavy use of 
inheritance 
device.mk
DEVICE DEFINITION 
device.mk 
INHERIT BASE DEVICE 
INHERIT OVERLAY 
INHERIT VENDOR STUFF 
INHERIT PRODUCT VARIATION
DEVICE DEFINITION 
device.mk 
Name your device 
PRODUCT_NAME 
PRODUCT_MODEL 
PRODUCT_DEVICE 
PRODUCT_MANUFACTURER 
PRODUCT_BRAND
DEVICE DEFINITION 
device.mk 
Include software 
PRODUCT_PACKAGES 
PRODUCT_PACKAGES_DEBUG 
PRODUCT_PACKAGES_ENG 
PRODUCT_PACKAGES_TESTS 
PRODUCT_COPY_FILES
DEVICE DEFINITION 
device.mk 
Customize 
PRODUCT_PROPERTY_OVERRIDES 
PRODUCT_DEFAULT_PROPERTY_OVERRIDES 
PRODUCT_RESTRICT_VENDOR_FILES 
PRODUCT_PACKAGE_OVERLAYS 
DEVICE_PACKAGE_OVERLAYS
DEVICE DEFINITION 
device.mk 
Some leftovers 
PRODUCT_AAPT_CONFIG 
PRODUCT_AAPT_PREF_CONFIG 
PRODUCT_OTA_PUBLIC_KEYS 
PRODUCT_EXTRA_RECOVERY_KEYS 
PRODUCT_DEFAULT_DEV_CERTIFICATE 
And more in build/core/product.mk
DEVICE DEFINITION 
device.mk 
# cat device/lge/hammerhead/device.mk | magic_summarize 
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL) 
PRODUCT_COPY_FILES :=  
$(LOCAL_KERNEL):kernel 
PRODUCT_COPY_FILES +=  
device/lge/hammerhead/init.hammerhead.rc:root/init.hammerhead.rc  
device/lge/hammerhead/fstab.hammerhead:root/fstab.hammerhead  
device/lge/hammerhead/ueventd.hammerhead.rc:root/ueventd.hammerhead.rc 
# Input device files for hammerhead 
PRODUCT_COPY_FILES +=  
device/lge/hammerhead/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl  
device/lge/hammerhead/gpio-keys.kcm:system/usr/keychars/gpio-keys.kcm  
[...] device/lge/hammerhead/thermal-engine-hammerhead.conf:system/etc/thermal-engine. 
conf 
PRODUCT_TAGS += dalvik.gc.type-precise 
# This device is xhdpi. However the platform doesn't 
# currently contain all of the bitmaps at xhdpi density so 
# we do this little trick to fall back to the hdpi version 
# if the xhdpi doesn't exist. 
PRODUCT_AAPT_CONFIG := normal hdpi xhdpi xxhdpi 
PRODUCT_AAPT_PREF_CONFIG := xxhdpi 
PRODUCT_CHARACTERISTICS := nosdcard 
DEVICE_PACKAGE_OVERLAYS :=  
device/lge/hammerhead/overlay
DEVICE DEFINITION 
device.mk 
PRODUCT_PACKAGES +=  
gralloc.msm8974  
libgenlock  
hwcomposer.msm8974  
[...] 
flp.msm8974 
PRODUCT_PROPERTY_OVERRIDES +=  
ro.hwui.texture_cache_size=72  
debug.qualcomm.sns.hal=w  
debug.qualcomm.sns.daemon=w  
[...] 
debug.qualcomm.sns.libsensor1=w 
PRODUCT_DEFAULT_PROPERTY_OVERRIDES +=  
rild.libpath=/system/lib/libril-qc-qmi-1.so 
# Camera configuration 
PRODUCT_DEFAULT_PROPERTY_OVERRIDES +=  
camera.disable_zsl_mode=1 
# Input resampling configuration 
PRODUCT_PROPERTY_OVERRIDES +=  
ro.input.noresample=1 
# setup dalvik vm configs. 
$(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk) 
$(call inherit-product-if-exists, hardware/qcom/msm8x74/msm8x74.mk) 
$(call inherit-product-if-exists, vendor/qcom/gpu/msm8x74/msm8x74-gpu-vendor.mk) 
$(call inherit-product-if-exists, 
hardware/broadcom/wlan/bcmdhd/firmware/bcm4339/device-bcm.mk)
Android.mk 
A piece of Android
Android.mk 
Android.mk, Android.mk everywhere 
Android.mk, Android.mk everywhere 
Define a component 
# find ./ -name Android.mk | wc -l 
2242
Android.mk 
Common content 
Any component needs 
A working directory 
LOCAL_PATH := $(call my-dir) 
A clean environment 
include $(CLEAR_VARS) 
A name 
LOCAL_MODULE := mymodule 
LOCAL_PACKAGE_NAME := mypackage
Android.mk 
Common content 
Any component needs 
A type 
include BUILD_something 
Usually, some source files 
LOCAL_SRC_FILES= files 
A tag 
LOCAL_MODULE_TAGS := tag
Android.mk 
Component types 
Many types of components 
# cat build/core/config.mk 
[...] 
BUILD_HOST_STATIC_LIBRARY:= $(BUILD_SYSTEM)/host_static_library.mk 
BUILD_HOST_SHARED_LIBRARY:= $(BUILD_SYSTEM)/host_shared_library.mk 
BUILD_STATIC_LIBRARY:= $(BUILD_SYSTEM)/static_library.mk 
BUILD_RAW_STATIC_LIBRARY := $(BUILD_SYSTEM)/raw_static_library.mk 
BUILD_SHARED_LIBRARY:= $(BUILD_SYSTEM)/shared_library.mk 
BUILD_EXECUTABLE:= $(BUILD_SYSTEM)/executable.mk 
BUILD_RAW_EXECUTABLE:= $(BUILD_SYSTEM)/raw_executable.mk 
BUILD_HOST_EXECUTABLE:= $(BUILD_SYSTEM)/host_executable.mk 
BUILD_PACKAGE:= $(BUILD_SYSTEM)/package.mk 
BUILD_PHONY_PACKAGE:= $(BUILD_SYSTEM)/phony_package.mk 
BUILD_HOST_PREBUILT:= $(BUILD_SYSTEM)/host_prebuilt.mk 
BUILD_PREBUILT:= $(BUILD_SYSTEM)/prebuilt.mk 
BUILD_MULTI_PREBUILT:= $(BUILD_SYSTEM)/multi_prebuilt.mk 
BUILD_JAVA_LIBRARY:= $(BUILD_SYSTEM)/java_library.mk 
BUILD_STATIC_JAVA_LIBRARY:= $(BUILD_SYSTEM)/static_java_library.mk 
BUILD_HOST_JAVA_LIBRARY:= $(BUILD_SYSTEM)/host_java_library.mk 
BUILD_DROIDDOC:= $(BUILD_SYSTEM)/droiddoc.mk 
BUILD_COPY_HEADERS := $(BUILD_SYSTEM)/copy_headers.mk 
BUILD_NATIVE_TEST := $(BUILD_SYSTEM)/native_test.mk 
BUILD_HOST_NATIVE_TEST := $(BUILD_SYSTEM)/host_native_test.mk 
BUILD_NOTICE_FILE := $(BUILD_SYSTEM)/notice_files.mk 
[...]
Android.mk 
Keywords (linking) 
Some useful keywords 
For linking 
LOCAL_SHARED_LIBRARY 
LOCAL_STATIC_LIBRARY 
LOCAL_JAVA_LIBRARY 
LOCAL_STATIC_JAVA_LIBRARY
Android.mk 
Keywords (signing) 
Some useful keywords 
For signing 
LOCAL_CERTIFICATE 
LOCAL_PRIVILEGED_MODULE
Android.mk 
Keywords (native) 
Some useful keywords 
For native code 
LOCAL_CFLAGS 
LOCAL_CPPFLAGS
Android.mk 
Keywords (java) 
Some useful keywords 
For java stuff 
LOCAL_PROGUARD_FLAG_FILES 
LOCAL_PROGUARD_ENABLED 
LOCAL_AAPT_FLAGS
Android.mk 
Keywords (dependency) 
Some useful keywords 
For dependency handling 
LOCAL_REQUIRED_MODULES 
LOCAL_PACKAGE_OVERRIDES
Android.mk 
Keywords (full list) 
Some useful keywords 
And even more 
Full list in build/core/clear_vars.mk
Android.mk 
Functions 
Many useful functions 
in build/core/definitions.mk 
all-java-files-under 
all-files-under 
all-makefiles-under 
and many more
Android.mk 
packages/apps/Settings/Android.mk 
# cat packages/apps/Settings/Android.mk 
LOCAL_PATH:= $(call my-dir) 
include $(CLEAR_VARS) 
LOCAL_JAVA_LIBRARIES := bouncycastle conscrypt telephony-common 
LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 android-support-v13 jsr305 
LOCAL_MODULE_TAGS := optional 
LOCAL_SRC_FILES :=  
$(call all-java-files-under, src)  
src/com/android/settings/EventLogTags.logtags 
LOCAL_PACKAGE_NAME := Settings 
LOCAL_CERTIFICATE := platform 
LOCAL_PRIVILEGED_MODULE := true 
LOCAL_PROGUARD_FLAG_FILES := proguard.flags 
LOCAL_AAPT_FLAGS += -c zz_ZZ 
include $(BUILD_PACKAGE) 
# Use the folloing include to make our test apk. 
include $(call all-makefiles-under,$(LOCAL_PATH))
One last bite 
There’s always more
One last bite 
More makefiles 
More makefiles 
untold module makefiles 
CleanSpec.mk 
Application.mk
One last bite 
Even more makefiles 
Even more makefiles 
The build system itself 
build/core/main.mk 
build/core/*.mk 
Base devices 
build/target/**
One last bite 
Other tools 
Non-make stuff 
Python 
build/tool/releasetools/ 
├── build_image.py 
├── img_from_target_files 
└── ota_from_target_files
One last bite 
Other tools 
Non-make stuff 
Java 
build/tools/signapk
Thank You for your time ! 
If you have any question ? 
Rémy Gottschalk 
rgottschalk@genymobile.com 
Charles-Henry Prunier 
0682079415 
chprunier@genymobile.com 
@charly_prunier
Copyrights 
The following copyright have been stripped 
from all the examples : 
# 
# Copyright (C) 2013 The Android Open-Source Project 
# 
# Licensed under the Apache License, Version 2.0 (the "License"); 
# you may not use this file except in compliance with the License. 
# You may obtain a copy of the License at 
# 
# http://www.apache.org/licenses/LICENSE-2.0 
# 
# Unless required by applicable law or agreed to in writing, software 
# distributed under the License is distributed on an "AS IS" BASIS, 
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
# See the License for the specific language governing permissions and 
# limitations under the License. 
#

More Related Content

Similar to Buildsystem.mk - DroidCon Paris 2014

Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time Optimization
Kan-Ru Chen
 
Virtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetVirtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + Puppet
Omar Reygaert
 
Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013
Opersys inc.
 

Similar to Buildsystem.mk - DroidCon Paris 2014 (20)

Introduction of unit test on android kernel
Introduction of unit test on android kernelIntroduction of unit test on android kernel
Introduction of unit test on android kernel
 
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configuration
 
Study on Android Emulator
Study on Android EmulatorStudy on Android Emulator
Study on Android Emulator
 
Labs_BT_20221017.pptx
Labs_BT_20221017.pptxLabs_BT_20221017.pptx
Labs_BT_20221017.pptx
 
XPDDS18: A dive into kbuild - Cao jin, Fujitsu
XPDDS18: A dive into kbuild - Cao jin, FujitsuXPDDS18: A dive into kbuild - Cao jin, Fujitsu
XPDDS18: A dive into kbuild - Cao jin, Fujitsu
 
Android open source project build system phi innovations - android summit 2015
Android open source project build system   phi innovations - android summit 2015Android open source project build system   phi innovations - android summit 2015
Android open source project build system phi innovations - android summit 2015
 
How to create a secured multi tenancy for clustered ML with JupyterHub
How to create a secured multi tenancy for clustered ML with JupyterHubHow to create a secured multi tenancy for clustered ML with JupyterHub
How to create a secured multi tenancy for clustered ML with JupyterHub
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time Optimization
 
Dev ops
Dev opsDev ops
Dev ops
 
linux_Commads
linux_Commadslinux_Commads
linux_Commads
 
Asian Spirit 3 Day Dba On Ubl
Asian Spirit 3 Day Dba On UblAsian Spirit 3 Day Dba On Ubl
Asian Spirit 3 Day Dba On Ubl
 
Virtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetVirtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + Puppet
 
Ansible best practices
Ansible best practicesAnsible best practices
Ansible best practices
 
005 skyeye
005 skyeye005 skyeye
005 skyeye
 
Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013
 
Android tools for testers
Android tools for testersAndroid tools for testers
Android tools for testers
 
Beagleboard xm-setup
Beagleboard xm-setupBeagleboard xm-setup
Beagleboard xm-setup
 
Php7 extensions workshop
Php7 extensions workshopPhp7 extensions workshop
Php7 extensions workshop
 
Smart pos stepbystep-v2-0
Smart pos stepbystep-v2-0Smart pos stepbystep-v2-0
Smart pos stepbystep-v2-0
 

More from Paris Android User Group

Workshop: Amazon developer ecosystem - DroidCon Paris2014
Workshop: Amazon developer ecosystem - DroidCon Paris2014Workshop: Amazon developer ecosystem - DroidCon Paris2014
Workshop: Amazon developer ecosystem - DroidCon Paris2014
Paris Android User Group
 
Framing the canvas - DroidCon Paris 2014
Framing the canvas - DroidCon Paris 2014Framing the canvas - DroidCon Paris 2014
Framing the canvas - DroidCon Paris 2014
Paris Android User Group
 
Death to passwords - DroidCon Paris 2014
Death to passwords - DroidCon Paris 2014Death to passwords - DroidCon Paris 2014
Death to passwords - DroidCon Paris 2014
Paris Android User Group
 
Google glass droidcon - DroidCon Paris 2014
Google glass droidcon - DroidCon Paris 2014Google glass droidcon - DroidCon Paris 2014
Google glass droidcon - DroidCon Paris 2014
Paris Android User Group
 
Efficient Image Processing - Nicolas Roard
Efficient Image Processing - Nicolas RoardEfficient Image Processing - Nicolas Roard
Efficient Image Processing - Nicolas Roard
Paris Android User Group
 

More from Paris Android User Group (20)

Workshop: building your mobile backend with Parse - Droidcon Paris2014
Workshop: building your mobile backend with Parse - Droidcon Paris2014Workshop: building your mobile backend with Parse - Droidcon Paris2014
Workshop: building your mobile backend with Parse - Droidcon Paris2014
 
Workshop: Amazon developer ecosystem - DroidCon Paris2014
Workshop: Amazon developer ecosystem - DroidCon Paris2014Workshop: Amazon developer ecosystem - DroidCon Paris2014
Workshop: Amazon developer ecosystem - DroidCon Paris2014
 
Extending your apps to wearables - DroidCon Paris 2014
Extending your apps to wearables -  DroidCon Paris 2014Extending your apps to wearables -  DroidCon Paris 2014
Extending your apps to wearables - DroidCon Paris 2014
 
Scaling android development - DroidCon Paris 2014
Scaling android development - DroidCon Paris 2014Scaling android development - DroidCon Paris 2014
Scaling android development - DroidCon Paris 2014
 
Ingredient of awesome app - DroidCon Paris 2014
Ingredient of awesome app - DroidCon Paris 2014Ingredient of awesome app - DroidCon Paris 2014
Ingredient of awesome app - DroidCon Paris 2014
 
Framing the canvas - DroidCon Paris 2014
Framing the canvas - DroidCon Paris 2014Framing the canvas - DroidCon Paris 2014
Framing the canvas - DroidCon Paris 2014
 
Deep dive into android restoration - DroidCon Paris 2014
Deep dive into android restoration - DroidCon Paris 2014Deep dive into android restoration - DroidCon Paris 2014
Deep dive into android restoration - DroidCon Paris 2014
 
Archos Android based connected home solution - DroidCon Paris 2014
Archos Android based connected home solution - DroidCon Paris 2014Archos Android based connected home solution - DroidCon Paris 2014
Archos Android based connected home solution - DroidCon Paris 2014
 
Porting VLC on Android - DroidCon Paris 2014
Porting VLC on Android - DroidCon Paris 2014Porting VLC on Android - DroidCon Paris 2014
Porting VLC on Android - DroidCon Paris 2014
 
Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014
Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014
Robotium vs Espresso: Get ready to rumble ! - DroidCon Paris 2014
 
maximize app engagement and monetization - DroidCon Paris 2014
maximize app engagement and monetization - DroidCon Paris 2014maximize app engagement and monetization - DroidCon Paris 2014
maximize app engagement and monetization - DroidCon Paris 2014
 
Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014
 
Holo material design transition - DroidCon Paris 2014
Holo material design transition - DroidCon Paris 2014Holo material design transition - DroidCon Paris 2014
Holo material design transition - DroidCon Paris 2014
 
Death to passwords - DroidCon Paris 2014
Death to passwords - DroidCon Paris 2014Death to passwords - DroidCon Paris 2014
Death to passwords - DroidCon Paris 2014
 
Google glass droidcon - DroidCon Paris 2014
Google glass droidcon - DroidCon Paris 2014Google glass droidcon - DroidCon Paris 2014
Google glass droidcon - DroidCon Paris 2014
 
Embedded webserver implementation and usage - DroidCon Paris 2014
Embedded webserver implementation and usage - DroidCon Paris 2014Embedded webserver implementation and usage - DroidCon Paris 2014
Embedded webserver implementation and usage - DroidCon Paris 2014
 
Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014
Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014
Petit design Grande humanité par Geoffrey Dorne - DroidCon Paris 2014
 
What's new in android 4.4 - Romain Guy & Chet Haase
What's new in android 4.4 - Romain Guy & Chet HaaseWhat's new in android 4.4 - Romain Guy & Chet Haase
What's new in android 4.4 - Romain Guy & Chet Haase
 
Efficient Image Processing - Nicolas Roard
Efficient Image Processing - Nicolas RoardEfficient Image Processing - Nicolas Roard
Efficient Image Processing - Nicolas Roard
 
Build a user experience by Eyal Lezmy
Build a user experience by Eyal LezmyBuild a user experience by Eyal Lezmy
Build a user experience by Eyal Lezmy
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Buildsystem.mk - DroidCon Paris 2014

  • 2. Rémy Gottschalk ● SoftAtHome : 3 years - Linux System for HGW and STB ● Genymobile : 2 years - ROM cooking Charles-Henry Prunier ● Archos : 3 years - ROM cooking for Archos devices (Archos 5 IT - GEN 10) ● Genymobile : 2 years - ROM cooking SPEAKERS
  • 3. 01 How to make 02 Device definition 03 Android.mk 04 One last bite AGENDA
  • 4. HOW TO MAKE source, lunch, make !
  • 5. HOW TO MAKE # source ./build/envsetup.sh # # head -n 15 build/envsetup.sh function hmm() { cat <<EOF Invoke ". build/envsetup.sh" from your shell to add the following functions to your environment: - lunch: lunch <product_name>-<build_variant> - tapas: tapas [<App1> <App2> ...] [arm|x86|mips|armv5] [eng|userdebug|user] - croot: Changes directory to the top of the tree. - m: Makes from the top of the tree. - mm: Builds all of the modules in the current directory, but not their dependencies. - mmm: Builds all of the modules in the supplied directories, but not their dependencies. - mma: Builds all of the modules in the current directory, and their dependencies. - mmma: Builds all of the modules in the supplied directories, and their dependencies. - cgrep: Greps on all local C/C++ files. - jgrep: Greps on all local Java files. - resgrep: Greps on all local res/*.xml files. - godir: Go to the directory containing a file. #
  • 6. HOW TO MAKE lunch
  • 7. HOW TO MAKE make make -j42 It’s coffee time !
  • 9. vendorsetup.sh Lunch entry point TYPE = eng | userdebug | release AndroidProducts.mk The first makefile DEVICE DEFINITION vendorsetup.sh, AndroidProduct.mk add_lunch_combo TARGETNAME-TYPE PRODUCT_MAKEFILES = TARGETNAME.mk
  • 10. DEVICE DEFINITION vendorsetup.sh, AndroidProduct.mk # tail -n1 device/lge/hammerhead/vendorsetup.sh add_lunch_combo aosp_hammerhead-userdebug # # tail -n3 device/lge/hammerhead/AndroidProducts.mk PRODUCT_MAKEFILES := $(LOCAL_DIR)/aosp_hammerhead.mk $(LOCAL_DIR)/full_hammerhead.mk
  • 11. DEVICE DEFINITION BoardConfig.mk Define your device hardware Can include other BoardConfig.mk A bunch of specific defines BoardConfig.mk
  • 12. DEVICE DEFINITION BoardConfig.mk # cat device/lge/hammerhead/BoardConfig.mk | grep -vP "(^$|^#.*$)" TARGET_CPU_ABI := armeabi-v7a TARGET_CPU_ABI2 := armeabi TARGET_CPU_SMP := true TARGET_ARCH := arm TARGET_ARCH_VARIANT := armv7-a-neon TARGET_CPU_VARIANT := krait TARGET_NO_BOOTLOADER := true BOARD_KERNEL_BASE := 0x00000000 BOARD_KERNEL_PAGESIZE := 2048 BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1 BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02900000 --tags_offset 0x02700000 MAX_EGL_CACHE_KEY_SIZE := 12*1024 MAX_EGL_CACHE_SIZE := 2048*1024 BOARD_USES_ALSA_AUDIO := true BOARD_HAVE_BLUETOOTH := true BOARD_HAVE_BLUETOOTH_BCM := true BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/lge/hammerhead/bluetooth WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WLAN_DEVICE := bcmdhd BOARD_WPA_SUPPLICANT_DRIVER := NL80211 BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcmdhd/parameters/firmware_path"
  • 13. DEVICE DEFINITION BoardConfig.mk WIFI_DRIVER_FW_PATH_AP := "/vendor/firmware/fw_bcmdhd_apsta.bin" WIFI_DRIVER_FW_PATH_STA := "/vendor/firmware/fw_bcmdhd.bin" BOARD_USES_SECURE_SERVICES := true TARGET_NO_RADIOIMAGE := true TARGET_BOARD_PLATFORM := msm8974 TARGET_BOOTLOADER_BOARD_NAME := hammerhead TARGET_BOARD_INFO_FILE := device/lge/hammerhead/board-info.txt BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := $(TARGET_BOARD_PLATFORM) TARGET_NO_RPC := true BOARD_EGL_CFG := device/lge/hammerhead/egl.cfg USE_OPENGL_RENDERER := true VSYNC_EVENT_PHASE_OFFSET_NS := 7500000 SF_VSYNC_EVENT_PHASE_OFFSET_NS := 5000000 TARGET_USES_ION := true TARGET_USERIMAGES_USE_EXT4 := true BOARD_BOOTIMAGE_PARTITION_SIZE := 23068672 BOARD_RECOVERYIMAGE_PARTITION_SIZE := 23068672 BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1073741824 BOARD_USERDATAIMAGE_PARTITION_SIZE := 13725837312 BOARD_CACHEIMAGE_PARTITION_SIZE := 734003200 BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 BOARD_FLASH_BLOCK_SIZE := 131072 BOARD_CHARGER_DISABLE_INIT_BLANK := true BOARD_CHARGER_ENABLE_SUSPEND := true TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888 TARGET_RECOVERY_UI_LIB := librecovery_ui_hammerhead
  • 14. DEVICE DEFINITION BoardConfig.mk TARGET_RECOVERY_FSTAB = device/lge/hammerhead/fstab.hammerhead TARGET_RELEASETOOLS_EXTENSIONS := device/lge/hammerhead PDK_PLATFORM_ZIP_PRODUCT_BINARIES := device/lge/hammerhead-kernel/vmlinux.bz2 BOARD_HAL_STATIC_LIBRARIES := libdumpstate.hammerhead BOARD_SEPOLICY_DIRS := device/lge/hammerhead/sepolicy BOARD_SEPOLICY_UNION := device.te app.te file_contexts HAVE_ADRENO_SOURCE:= false OVERRIDE_RS_DRIVER:= libRSDriver_adreno.so TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true TARGET_TOUCHBOOST_FREQUENCY:= 1200 -include vendor/lge/hammerhead/BoardConfigVendor.mk
  • 15. DEVICE DEFINITION device.mk Define your device software No specific naming Heavy use of inheritance device.mk
  • 16. DEVICE DEFINITION device.mk INHERIT BASE DEVICE INHERIT OVERLAY INHERIT VENDOR STUFF INHERIT PRODUCT VARIATION
  • 17. DEVICE DEFINITION device.mk Name your device PRODUCT_NAME PRODUCT_MODEL PRODUCT_DEVICE PRODUCT_MANUFACTURER PRODUCT_BRAND
  • 18. DEVICE DEFINITION device.mk Include software PRODUCT_PACKAGES PRODUCT_PACKAGES_DEBUG PRODUCT_PACKAGES_ENG PRODUCT_PACKAGES_TESTS PRODUCT_COPY_FILES
  • 19. DEVICE DEFINITION device.mk Customize PRODUCT_PROPERTY_OVERRIDES PRODUCT_DEFAULT_PROPERTY_OVERRIDES PRODUCT_RESTRICT_VENDOR_FILES PRODUCT_PACKAGE_OVERLAYS DEVICE_PACKAGE_OVERLAYS
  • 20. DEVICE DEFINITION device.mk Some leftovers PRODUCT_AAPT_CONFIG PRODUCT_AAPT_PREF_CONFIG PRODUCT_OTA_PUBLIC_KEYS PRODUCT_EXTRA_RECOVERY_KEYS PRODUCT_DEFAULT_DEV_CERTIFICATE And more in build/core/product.mk
  • 21. DEVICE DEFINITION device.mk # cat device/lge/hammerhead/device.mk | magic_summarize LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL) PRODUCT_COPY_FILES := $(LOCAL_KERNEL):kernel PRODUCT_COPY_FILES += device/lge/hammerhead/init.hammerhead.rc:root/init.hammerhead.rc device/lge/hammerhead/fstab.hammerhead:root/fstab.hammerhead device/lge/hammerhead/ueventd.hammerhead.rc:root/ueventd.hammerhead.rc # Input device files for hammerhead PRODUCT_COPY_FILES += device/lge/hammerhead/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl device/lge/hammerhead/gpio-keys.kcm:system/usr/keychars/gpio-keys.kcm [...] device/lge/hammerhead/thermal-engine-hammerhead.conf:system/etc/thermal-engine. conf PRODUCT_TAGS += dalvik.gc.type-precise # This device is xhdpi. However the platform doesn't # currently contain all of the bitmaps at xhdpi density so # we do this little trick to fall back to the hdpi version # if the xhdpi doesn't exist. PRODUCT_AAPT_CONFIG := normal hdpi xhdpi xxhdpi PRODUCT_AAPT_PREF_CONFIG := xxhdpi PRODUCT_CHARACTERISTICS := nosdcard DEVICE_PACKAGE_OVERLAYS := device/lge/hammerhead/overlay
  • 22. DEVICE DEFINITION device.mk PRODUCT_PACKAGES += gralloc.msm8974 libgenlock hwcomposer.msm8974 [...] flp.msm8974 PRODUCT_PROPERTY_OVERRIDES += ro.hwui.texture_cache_size=72 debug.qualcomm.sns.hal=w debug.qualcomm.sns.daemon=w [...] debug.qualcomm.sns.libsensor1=w PRODUCT_DEFAULT_PROPERTY_OVERRIDES += rild.libpath=/system/lib/libril-qc-qmi-1.so # Camera configuration PRODUCT_DEFAULT_PROPERTY_OVERRIDES += camera.disable_zsl_mode=1 # Input resampling configuration PRODUCT_PROPERTY_OVERRIDES += ro.input.noresample=1 # setup dalvik vm configs. $(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk) $(call inherit-product-if-exists, hardware/qcom/msm8x74/msm8x74.mk) $(call inherit-product-if-exists, vendor/qcom/gpu/msm8x74/msm8x74-gpu-vendor.mk) $(call inherit-product-if-exists, hardware/broadcom/wlan/bcmdhd/firmware/bcm4339/device-bcm.mk)
  • 23. Android.mk A piece of Android
  • 24. Android.mk Android.mk, Android.mk everywhere Android.mk, Android.mk everywhere Define a component # find ./ -name Android.mk | wc -l 2242
  • 25. Android.mk Common content Any component needs A working directory LOCAL_PATH := $(call my-dir) A clean environment include $(CLEAR_VARS) A name LOCAL_MODULE := mymodule LOCAL_PACKAGE_NAME := mypackage
  • 26. Android.mk Common content Any component needs A type include BUILD_something Usually, some source files LOCAL_SRC_FILES= files A tag LOCAL_MODULE_TAGS := tag
  • 27. Android.mk Component types Many types of components # cat build/core/config.mk [...] BUILD_HOST_STATIC_LIBRARY:= $(BUILD_SYSTEM)/host_static_library.mk BUILD_HOST_SHARED_LIBRARY:= $(BUILD_SYSTEM)/host_shared_library.mk BUILD_STATIC_LIBRARY:= $(BUILD_SYSTEM)/static_library.mk BUILD_RAW_STATIC_LIBRARY := $(BUILD_SYSTEM)/raw_static_library.mk BUILD_SHARED_LIBRARY:= $(BUILD_SYSTEM)/shared_library.mk BUILD_EXECUTABLE:= $(BUILD_SYSTEM)/executable.mk BUILD_RAW_EXECUTABLE:= $(BUILD_SYSTEM)/raw_executable.mk BUILD_HOST_EXECUTABLE:= $(BUILD_SYSTEM)/host_executable.mk BUILD_PACKAGE:= $(BUILD_SYSTEM)/package.mk BUILD_PHONY_PACKAGE:= $(BUILD_SYSTEM)/phony_package.mk BUILD_HOST_PREBUILT:= $(BUILD_SYSTEM)/host_prebuilt.mk BUILD_PREBUILT:= $(BUILD_SYSTEM)/prebuilt.mk BUILD_MULTI_PREBUILT:= $(BUILD_SYSTEM)/multi_prebuilt.mk BUILD_JAVA_LIBRARY:= $(BUILD_SYSTEM)/java_library.mk BUILD_STATIC_JAVA_LIBRARY:= $(BUILD_SYSTEM)/static_java_library.mk BUILD_HOST_JAVA_LIBRARY:= $(BUILD_SYSTEM)/host_java_library.mk BUILD_DROIDDOC:= $(BUILD_SYSTEM)/droiddoc.mk BUILD_COPY_HEADERS := $(BUILD_SYSTEM)/copy_headers.mk BUILD_NATIVE_TEST := $(BUILD_SYSTEM)/native_test.mk BUILD_HOST_NATIVE_TEST := $(BUILD_SYSTEM)/host_native_test.mk BUILD_NOTICE_FILE := $(BUILD_SYSTEM)/notice_files.mk [...]
  • 28. Android.mk Keywords (linking) Some useful keywords For linking LOCAL_SHARED_LIBRARY LOCAL_STATIC_LIBRARY LOCAL_JAVA_LIBRARY LOCAL_STATIC_JAVA_LIBRARY
  • 29. Android.mk Keywords (signing) Some useful keywords For signing LOCAL_CERTIFICATE LOCAL_PRIVILEGED_MODULE
  • 30. Android.mk Keywords (native) Some useful keywords For native code LOCAL_CFLAGS LOCAL_CPPFLAGS
  • 31. Android.mk Keywords (java) Some useful keywords For java stuff LOCAL_PROGUARD_FLAG_FILES LOCAL_PROGUARD_ENABLED LOCAL_AAPT_FLAGS
  • 32. Android.mk Keywords (dependency) Some useful keywords For dependency handling LOCAL_REQUIRED_MODULES LOCAL_PACKAGE_OVERRIDES
  • 33. Android.mk Keywords (full list) Some useful keywords And even more Full list in build/core/clear_vars.mk
  • 34. Android.mk Functions Many useful functions in build/core/definitions.mk all-java-files-under all-files-under all-makefiles-under and many more
  • 35. Android.mk packages/apps/Settings/Android.mk # cat packages/apps/Settings/Android.mk LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_JAVA_LIBRARIES := bouncycastle conscrypt telephony-common LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 android-support-v13 jsr305 LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := $(call all-java-files-under, src) src/com/android/settings/EventLogTags.logtags LOCAL_PACKAGE_NAME := Settings LOCAL_CERTIFICATE := platform LOCAL_PRIVILEGED_MODULE := true LOCAL_PROGUARD_FLAG_FILES := proguard.flags LOCAL_AAPT_FLAGS += -c zz_ZZ include $(BUILD_PACKAGE) # Use the folloing include to make our test apk. include $(call all-makefiles-under,$(LOCAL_PATH))
  • 36. One last bite There’s always more
  • 37. One last bite More makefiles More makefiles untold module makefiles CleanSpec.mk Application.mk
  • 38. One last bite Even more makefiles Even more makefiles The build system itself build/core/main.mk build/core/*.mk Base devices build/target/**
  • 39. One last bite Other tools Non-make stuff Python build/tool/releasetools/ ├── build_image.py ├── img_from_target_files └── ota_from_target_files
  • 40. One last bite Other tools Non-make stuff Java build/tools/signapk
  • 41. Thank You for your time ! If you have any question ? Rémy Gottschalk rgottschalk@genymobile.com Charles-Henry Prunier 0682079415 chprunier@genymobile.com @charly_prunier
  • 42. Copyrights The following copyright have been stripped from all the examples : # # Copyright (C) 2013 The Android Open-Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #