【Android编译】各个模块编译方法

 

一、如何编译出vendor.img

1. 首先找到产品对应BoardConfig.mk

  路径:LINUX/android/

    device/项目/产品/BoardConfig.mk

2. 修改BoardConfig.mk

  设置下面代码中的ENABLE_VENDOR_IMAGEtrue。

#Enable split vendor image

ENABLE_VENDOR_IMAGE := true
#ENABLE_VENDOR_IMAGE := false

ifeq ($(ENABLE_VENDOR_IMAGE), true)
BOARD_VENDORIMAGE_PARTITION_SIZE := 838860800
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
TARGET_COPY_OUT_VENDOR := vendor
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
endif

3. 编译

  make vendorimage -j4

 

二、如何编译packages/apps/Settings并进行push

  1)进入packages/apps/Settings   执行mm;

  2)执行

    adb root;

    adb disable-verity;

    adb remount;

    adb push out/target/product/***/system/priv-app/Settings/Settings.apk system/priv-app/Settings/ 

 

三、如何编译frameworks/base/packages/SettingsLib

1. 修改frameworks/base/packages/SettingsLib/Android.mk

  屏蔽Android.mk里面的最后一行,如下

    # For the test package.
    #include $(call all-makefiles-under, $(LOCAL_PATH))

2. 编译

  source ./build/envsetup.sh

  lunch ***

  进入frameworks/base/packages/SettingsLib目录下

  执行mm

3. 【注意】 

  frameworks/base/packages/SettingsLib下的修改如何编译后进行push到手机?

  解决方案:

  1)进入packages/apps/Settings   执行mm;

  2)执行

    adb root;

    adb disable-verity;

    adb remount;

    adb push out/target/product/***/system/priv-app/Settings/Settings.apk system/priv-app/Settings/ 

  3)如果

    有lib文件生成,则也要进行adb push操作。

 

四、编译boot.img

    make bootimage

五、编译package/app/Nfc

             make NfcNci

posted @ 2019-03-07 10:37  演武_zhuwei  阅读(3310)  评论(0编辑  收藏  举报