【Android編譯】各個模塊編譯方法

 

1、如何編譯出vendor.imgandroid

1. 首先找到產品對應BoardConfig.mkapp

  路徑:LINUX/android/
ui

    device/項目/產品/BoardConfig.mkspa

2. 修改BoardConfig.mkblog

  設置下面代碼中的ENABLE_VENDOR_IMAGEtrue。ci

#Enable split vendor imagerem

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
endifget

3. 編譯產品

  make vendorimage -j4it

 

2、如何編譯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/ 

 

3、如何編譯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操做。

 

4、編譯boot.img

    make bootimage

5、編譯package/app/Nfc

             make NfcNci

相關文章
相關標籤/搜索