Package APK, so, and other files to system. IMG.

Source: Internet
Author: User

The packaging mentioned in this Article refers to packaging the files you need into system. IMG after compiling with make-J8 in aosp.
Here are two more cases. The first one is that APK and so are provided by a third party and have been compiled, as long as they are packaged into system. IMG; the second type is the source code of APK and so, which must be compiled in aosp.

In the first case, you can modify product_copy_files in device. mk. Here, you can use device/Ti/panda in android4.0 to modify it.

1. add your own folder in device/Ti/panda and copy the files to be packaged to the folder:

root@xxx:/mnt/ics-android/ics-src/device/ti/panda# ls my/*my/app:my.apkmy/bin:my.shmy/fonts:my/lib:libmy.so

Here, a folder my is added under device/Ti/panda, and app, bin, fonts, and Lib are added under my, corresponds to the directory under out/target/product/panda/system, in device. the last increase of MK:

PRODUCT_COPY_FILES += \device/ti/panda/my/app/my.apk:system/app/my.apk \device/ti/panda/my/bin/my.sh:system/bin/my.sh \device/ti/panda/my/lib/libmy.so:system/lib/libmy.so

In the second case, you also need to modify device. mk to add the file to be packaged to the variable product_packages:

PRODUCT_PACKAGES += \    libmy \    my

Note that the name must be the same as the name of the generated file in Android. mk of the module. For example
Local_module: = libmy
Or
Local_package_name: = My

In addition, the value of local_module_tags in Android. mk of the module must be optional.
Local_module_tags: = optional

There are multiple specified packaging files in the aosp build directory. For details, refer:

root@xxx:/ics-android/ics-src/build# grep PRODUCT_PACKAGES * -rncore/main.mk:614:                       $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES))core/Makefile:315:      $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES) \core/product.mk:68:    PRODUCT_PACKAGES \core/base_rules.mk:93:    $(warning *    into the PRODUCT_PACKAGES section of product)core/base_rules.mk:99:    $(warning * PRODUCT_PACKAGES section of)target/product/large_emu_hw.mk:22:PRODUCT_PACKAGES := \target/product/sdk.mk:20:PRODUCT_PACKAGES := \target/product/sdk.mk:71:PRODUCT_PACKAGES += \target/product/sdk.mk:91:PRODUCT_PACKAGES += \target/product/sdk.mk:132:PRODUCT_PACKAGES += \target/product/core.mk:25:PRODUCT_PACKAGES := \target/product/core.mk:111:    PRODUCT_PACKAGES += \target/product/full_x86.mk:29:PRODUCT_PACKAGES := \target/product/full_x86.mk:36:PRODUCT_PACKAGES += \target/product/full.mk:22:PRODUCT_PACKAGES := \target/product/generic_no_telephony.mk:22:PRODUCT_PACKAGES := \target/product/generic_no_telephony.mk:48:PRODUCT_PACKAGES += \target/product/generic_no_telephony.mk:51:PRODUCT_PACKAGES += \target/product/generic_no_telephony.mk:57:PRODUCT_PACKAGES += \target/product/telephony.mk:20:PRODUCT_PACKAGES := \target/product/full_base_telephony.mk:22:PRODUCT_PACKAGES := \target/product/full_base.mk:22:PRODUCT_PACKAGES := \target/board/generic/device.mk:29:PRODUCT_PACKAGES := \

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.