Android Add Project compilation.

Source: Internet
Author: User

A Product configuration file

[From the bottom up build order: Chip architecture layer, core board layer, equipment layer, product layer]

    1. Chip architecture Layer: the hardware architecture used in the product, ARM X86 and so on.

    2. Core Board Layer: Core Board configuration for hardware circuits

    3. Equipment Layer: Peripheral device configuration, keyboard, mouse, external devices and so on.

    4. Product Layer: The final system generates the required configuration, support (default) of the national language, whether the camera, sensor, etc.
      [We just need to configure the product layer.] ]

Two How to add a product to the compilation

1.vendorsetup.sh, this file is used to count all products in this baseline [model] (below with virtual product model: c123) under the source/device/c123/, create a new vendorsetup.sh, add "Add_lunch_combo c123[Product Name] ", this vendorsetup.sh file will scan the two files in device and vendor under envsetup.sh[build/]:

# Execute the contents of any vendorsetup.sh files we can find.for F in ' test-d device && find-l device-maxdept H 4-name ' vendorsetup.sh ' 2>/dev/null | Sort ' test-d vendor && find-l vendor-maxdepth 4-name ' vendorsetup.sh ' 2>/dev/null | Sort ' do echo ' including $f '. $fdoneunset F

2.ANDROIDPRODUCTS.MK, which is stored under a specific product file [device/c123/], is used to define some configuration information for the product. Generally used only to make a ' redirect ':

Product_makefiles: = $ (Local_dir)/c123.mk1212

3. In device/c123/ Under new name c123.mk[is androidproducts.mk redirect file] This file usually configures some of the file information required by the mobile phone, such as XML files such as Media,audio, GMS packages, jar introductions, product information naming, etc., you can also put some files that need to be copied into the phone Over here:

# Media_profiles and media_codecs product_copy_files + = Device/c123/media/media_profiles.xml:system/etc/media_ Profiles.xml Device/c123/media/media_codecs.xml:system/etc/media_codecs.xml ... Product_Name: = Product name [settings-about device]product_device: = device name Product_brand: = Phone brand Product_model: = product model ...

4.boardconfig.mk, the main configuration is to use what schema, adjust the partition, set the partition size and so on. Also under the device/c123/directory.

Target_arch: = arm64target_arch_variant: = Armv8-atarget_cpu_abi: = arm64-v8a ... Board_systemimage_partition_size: = partition size [Unit is bit]board_userdataimage_partition_size: = partition size [unit is bit]

The basic files are placed under the project file, the source code root directory to execute ' source build/envsetup.sh ' when the files are automatically loaded, and then ' Choosecombo ' Select the added project name, and then execute ' make ' will compile the project.
About ANDROID.MK This file is a makefile for Android to compile a single target. Basically the source code inside each apk generation and farmework Many compilations need this file.
  
Note: The source code is Android 6.0. [This article I have published in 2016-11-16 in CSDN.]

This article from the "Amos Technology Blog" blog, reproduced please contact the author!

Android Add Project compilation.

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.