Android-module Add and compile

Source: Internet
Author: User

Android5.1 Ubuntu14.04

Android system compilation relies on the. mk File

Add Google services

We don't have Google services in our own ROM.

The full Google package includes Google frames and a variety of services, and we can selectively install modules

In the Google package, there is a gms.mk file (or name) in the products directory.

GMS.MK manages each module to be installed and finds the keyword Product_packages

The product_packages is followed by the module to be installed.

Intercept section to see:

Product_packages + =     androidforwork     configupdater     googlebackuptransport     googlefeedback

It is generally stored in the device/corecompany/yourproductname/directory. mk File

Corecompany refers to chip manufacturers, such as Qualcomm, MTK

It could be device.mk or yourproductname.mk ; This file will be makefile found.

This Mk file will refer to gms.mk (or your own name).

You need to write the path to the gms.mk , which will be automatically found at compile time.

$ (call inherit-product-if-exists, vendor/google/products/intel_gms.mk)

In this example, the Google package is placed in the vendor directory

Observe the android.mk file in Vendor/google/apps/gmscore

Local_privileged_module: = True

This setting indicates that the Gmscore module is loaded into the System/priv-app

If this setting is not set, the module will be loaded into the System/app

Can be compiled in the module directory mm to see which directory will be installed

Priv-app has access to the system, and Android 4.4 has this division.

Summary:

1. Find a place to put Google bags in, such as Vendor/google

2. Select the Google service to install and modify the Gms.mk file

3. Modify the corresponding MK file in device/corecompany/yourproductname/, reference gms.mk

4. Delete the out directory, or just delete the corresponding module

5. Compiling

Add a third-party launcher

Want to add a third-party launcher to the ROM, similar to adding a Google services Module

Suppose this is a no source, only apk Launcher:ThirdLauncher.apk

MK files that can be modeled by Google Services Module Launcher MK File

Like Googlefeedback's android.mk .

If launcher requires system permissions, remember to add

Local_privileged_module: = True

Summary:

1. Find a place to put thirdlauncher.apk, such as vendor/yourcompany/thirdlauncher/

2. Prepare the Launcher MK file; Note If system permissions are required; mm compilation verification

3. Add Thirdlauncher to the corresponding MK file in device/corecompany/yourproductname/

4. Delete the corresponding module in the Out directory and re-compile it completely.

Android-module Add and compile

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.