Android Build-Make otapackage (Overall)

Source: Internet
Author: User
Tags zipinfo

Process analysis for Android make Otapackage, based on 4.0.4_r2-1

Code Files directory: Aosp/build/core/makefile

. Phony:otapackageotapackage: $ (internal_ota_package_target)
Internal_ota_package_target: = $ (product_out)/$ (name). zip$ (Internal_ota_package_target): Key_cert_pair: = $ (DEFAULT  _key_cert_pair) $ (internal_ota_package_target): $ (built_target_files_package) $ (otatools) @echo "package OTA: [Email Protected] "$ (hide)./build/tools/releasetools/ota_from_target_files-v-P $ (host_out)-K $ ( Key_cert_pair) \ $ (built_target_files_package) [email protected]

1 lines: Is the target we need to generate, $ (product_out)/$ (name). zip. Contains the path $ (product_out) and the file name $ (name). zip

$ (product_out)


# depending on the various images guarantees that the underlying#  directories are up-to-date.$ (built_target_files_package):                  $ (Installed_bootimage_target)                   $ (INSTALLED_ Radioimage_target)                   $ (Installed_recoveryimage_target)                   $ (installed_systemimage)                   $ (Installed_userdataimage_target)                   $ (INSTALLED_ANDROID_ Info_txt_target)    &Nbsp;             $ (Built_ota_tools)                   $ (APKCERTS_ FILE)                  $ ( Host_out_executables)/fs_config                  | $ (ACP)          @echo   "package  Target files: [email protected] "        $ (hide)  rm  -rf [email protected] $ (zip_root)         $ (hide)  mkdir -p $ (dir [email protected])  $ (zip_root)          @# Components of the recovery image         $ (Hide)  mkdir -p $ (zip_root)/recovery        $ (hide)  $ ( call package_files-copy-root,                  $ (Target_recovery_root_out), $ (zip_root)/recovery/ramdisk) ifdef INSTALLED_ kernel_target        $ (hide)  $ (ACP)  $ (INSTALLED_KERNEL_ TARGET)  $ (zip_root)/recovery/kernelendififdef installed_2ndbootloader_target         $ (hide)  $ (ACP)                   $ (Installed_2ndbootloader_target)  $ (zip_root)/RECOVERY/ secondendififdef board_kernel_cmdline        $ (hide)  echo   "$ (board_kernel_cmdline)"  > $ (zip_root)/recovery/cmdlineendififdef board_kernel_base         $ (hide)  echo  "$ (board_kernel_base)"  > $ (zip_root)/recovery/baseendififdef  board_kernel_pagesize        $ (hide)  echo  "$ (board_kernel_ PAGESIZE) " > $ (zip_root)/recovery/pagesizeendif        @#  components of the boot image        $ (Hide)  mkdir -p $ (zip_root)/boot        $ (hide)  $ (call  package_files-copy-root,                  $ (Target_root_out), $ (zip_root)/boot/ramdisk) ifdef installed_kernel_target         $ (hide)  $ (ACP)  $ (installed_kernel_target)  $ (zip_root) /boot/kernelendififdef installed_2ndbootloader_target        $ ( Hide)  $ (ACP)  &Nbsp;               $ (INSTALLED_ 2ndbootloader_target)  $ (zip_root)/boot/secondendififdef board_kernel_cmdline         $ (hide)  echo  "$ (board_kernel_cmdline)"  > $ (zip_root)/boot/ cmdlineendififdef board_kernel_base        $ (hide)  echo   "$ (board_kernel_base)"  > $ (zip_root)/boot/baseendififdef board_kernel_pagesize         $ (hide)  echo  "$ (board_kernel_pagesize)"  > $ ( Zip_root)/boot/pagesizeendif        $ (hide)  $ (foreach t,$ ( Installed_radioimage_target),                     mkdir -p $ (zip_root)/radio;                      $ (ACP)  $ (t)  $ (zip_root)/RADIO/$ ( notdir $ (t));)         @# Contents of the  system image        $ (hide)  $ (call package_ files-copy-root,                  $ (Systemimage_source_dir), $ (zip_root)/system)         @#  contents of the data image        $ (Hide)  $ (call package_files-copy-root,                  $ (Target_out_data), $ (zip_root)/data)          @# Extra contents of the OTA package         $ (hide)  mkdir -p $ (zip_root)/ota/bin        $ (hide)  $ (ACP)  $ (INSTALLED_ Android_info_txt_target)  $ (zip_root)/ota/        $ (hide)  $ ( ACP)  $ (private_ota_tools)  $ (zip_root)/ota/bin/        @#  Files that do not end up in any images, but are  necessary to        @# build them.         $ (hide)  mkdir -p $ (zip_root)/meta         $ (hide)  $ (ACP)  $ (apkcerts_file)  $ (zip_root)/meta/apkcerts.txt         $ (hide)  echo  "$ (Product_ota_public_keys)"  > $ (Zip_ Root)/meta/otakeys.txt        $ (hide)  echo  "Recovery_api_ version=$ (Private_recovery_api_version) " > $ (zip_root)/meta/misc_info.txtifdef board_flash_block_size         $ (hide)  echo  "blocksize=$ (board_flash_block_size)"  >>  $ (zip_root)/meta/misc_info.txtendififdef board_bootimage_partition_size         $ (hide)  echo  "boot_size=$ (board_bootimage_partition_size)"  >> $ ( Zip_root)/meta/misc_info.txtendififdef board_recoveryimage_partition_size         $ (hide)  echo  "recovery_size=$ (board_recoveryimage_partition_size)"  >>  $ (zip_root)/meta/misc_info.txtendififdef board_systemimage_partition_size         $ (hide)  echo  "system_size=$ (board_systemimage_partition_size)"  >>  $ (zip_root)/meta/misc_info.txtendififdef board_userdataimage_partition_size         $ (HIDE)  echo  "userdata_size=$ (board_userdataimage_partition_size)"  >> $ (zip_root)/META/ misc_info.txtendif        $ (hide)  echo  "tool_extensions=$ ( tool_extensions) " >> $ (zip_root)/meta/misc_info.txtifdef mkyaffs2_extra_flags         $ (hide)  echo  "mkyaffs2_extra_flags=$ (mkyaffs2_extra_flags)"  >> $ (zip_root)/meta/misc_info.txtendififdef internal_userimages_sparse_ext_flag         $ (hide)  echo  "extfs_sparse_flag=$ (Internal_userimages_ Sparse_ext_flag) " >> $ (zip_root)/meta/misc_info.txtendif         $ (hide)  echo  "default_system_dev_certificate=$ (default_system_dev_certificate)"   >> $ (zip_root)/meta/misc_info.txtifdef product_extra_recovery_keys         $ (hide)  echo  "extra_recovery_keys=$ (Product_extra_recovery_keys)"  >> $ (zip_root)/META/misc_ info.txtendif        @# zip everything up,  preserving symlinks        $ (hide)   (cd $ (Zip_root)  && ZIP -QRY&NBSP, .... /$ (notdir [email protected])  .)         @# Run fs_config on all the  System, boot ramdisk, and recovery ramdisk files in the zip,  and save the output        $ (hide)  zipinfo  -1 [email protected] | awk  ' begin { fs= ' system/" } /^system \// {print  "system/"  $$2} '  | $ (host_out_executables)/fs_config > $ (zip_ Root)/meta/filesystem_config.txt        $ (hide)  zipinfo -1 [email protected] | awk  ' BEGIN  { fs= "boot/ramdisk/"  } /^boot\/ramdisk\// {print $$2} '  | $ (HOST_OUT_ Executables)/fs_config > $ (zip_root)/meta/boot_filesystem_config.txt         $ (hide)  zipinfo -1 [email protected] | awk  ' BEGIN  { fs= "recovery/ramdisk/"  } /^recovery\/ramdisk\// {print $$2} '  | $ ( Host_out_executables)/fs_config > $ (zip_root)/meta/recovery_filesystem_config.txt         $ (hide)   (cd $ (Zip_root)  && zip -q .. /$ (notdir [email protected])  meta/*filesystem_config.txt)


This article is from the "Android" blog, so be sure to keep this source http://rosemary.blog.51cto.com/9548014/1771546

Android Build-Make otapackage (Overall)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.