Hand-in-hand instructions for in-depth customization of tiny4412 android 5.0 System

Posted by dsainteclaire on Sun, 07 Jul 2019 03:57:20 +0200

To pre-install files, first of all, we need to understand the Android source code device project. Opening this directory, we can see that the directory manufacturer will make some modifications for different development boards:


In this directory, we can see the information customized by different manufacturers. Our development board is provided by Friendship Wall. Then we just need to go into friend-arm directory, enter this directory, see tiny4412, we switch to see:


To preset related documents, a previous article specifically talked about how to preset, usually in device.mk, but different platforms, vendors will integrate into other places:

The article is as follows. We will refer to this article for preset.

http://blog.csdn.net/morixinguan/article/details/70170641

Let's turn on the current device.mk and see:

$(call inherit-product, device/friendly-arm/tiny4412/device_base.mk)
$(call inherit-product-if-exists, hardware/samsung_slsi/exynos4/exynos4.mk)

# See comment at the top of this file. This is where the other
# half of the device-specific product definition file takes care
# of the aspects that require proprietary drivers that aren't
# commonly available
$(call inherit-product-if-exists, vendor/friendly-arm/tiny4412/device-tiny4412.mk)
We see that this script contains vendor/friendly-arm/tiny4412/device-tiny4412.mk.

So we switch to the Android source directory, find the file, and open it:

VENDOR_PATH := vendor/friendly-arm/tiny4412

# Mali
PRODUCT_PACKAGES += \
        libEGL_mali \
        libGLESv1_CM_mali \
        libGLESv2_mali \
        libMali \
        libUMP

# gralloc, ion
PRODUCT_PACKAGES += \
        libsecion \
        gralloc.tiny4412

# hwcomposer
PRODUCT_PACKAGES += \
        hwcomposer.exynos4

# HDMI
PRODUCT_PACKAGES += \
        libTVOut \
        libhdmiclient \
        sechdmiservice

# Misc other modules
PRODUCT_PACKAGES += \
        libnetcmdiface

# Prebuilts
PRODUCT_PACKAGES += \
        prebuilt.firmware \
       prebuilt.kmodules \
        prebuilt.busybox \
        prebuilt.gapps \
        prebuilt.faapps

# FriendlyARM Support
PRODUCT_COPY_FILES += \
        $(VENDOR_PATH)/proprietary/fa_codec_ctrl:system/vendor/bin/fa_codec_ctrl \
        $(VENDOR_PATH)/proprietary/sensors.tiny4412.so:system/lib/hw/sensors.tiny4412.so \
        $(VENDOR_PATH)/bootanimation/bootanimation.zip:system/media/bootanimation.zip

ifeq ($(BOARD_USES_PWMLIGHTS),false)
PRODUCT_COPY_FILES += \
        $(VENDOR_PATH)/proprietary/lights.tiny4412.so:system/lib/hw/lights.tiny4412.so
endif

PRODUCT_PROPERTY_OVERRIDES += \
        net.eth0.startonboot=1

-include $(VENDOR_PATH)/wifi/config/config.mk
With the previous experience, we know that the predicted files need to be added to the PRODUCT_COPY_FILES above, so we can pre-set the files related to the boot animation:

For example, the line I added above: $(VENDOR_PATH)/bootanimation/bootanimation.zip:system/media/bootanimation.zip

The file bootanimation.zip was added by me, and the bootanimation directory was created under the vendor/friendly-arm/tiny4412 / directory. The above $(VENDOR_PATH) is an environment variable, representing the current path.

Once added, recompile the Android system. These preset files will be packaged in the out directory of the automatic copy, usually in the system.img.

Later, if you want to preset files to the development board, you can preset them here.


Topics: Android