Android compiles each img command separately

make aboot #single compilation abl

compile kernel image

$ make kernel -j12 #The second compilation can use ninja kernel -j12
$ make bootimage -j12 #The second compilation can use ninja bootimage -j12
$ make dtboimage -j12 #The second compilation can use ninja dtboimage -j12

Note: During the compilation process of the new computer, it will prompt that some modules/libraries are missing, and you need to install the relevant modules/libraries according to the error prompt# Compile successfully and generate the following image

out/target/product/vangogh/boot.img
out/target/product/vangogh/dtbo.img

dtbo.img is the image modified by the mobile phone manufacturer, dtb.img is the original device tree image of Google, dtbo.img and dtb.img are in an overlay relationship, and the device tree information of the two will be merged when the phone starts (dtbo.img in dtb.img img unmodified part + modified part in dtbo.img relative to dtb.img)

compile vbmeta image

$ make vbmetaimage -j12 #The second compilation can use ninja vbmetaimage -j12

The compilation successfully generates the following image out/target/product/vangogh/vbmeta.img

vbmeta.img is used for security verification, the bootloader verifies the signature of vbmeta, and then uses the key and hash value of vbmeta to verify images such as dtbo, boo, system, and vendor.

Android Verified Boot (Verified Boot) is the process of ensuring the integrity of the software that the end user runs on the device. It usually starts with a read-only portion of the device's firmware, which loads the code and cryptographically verifies that the code is authentic. and no known security flaws before executing the code.

AVB is an implementation of Verified Boot, and the central data structure used in AVB is the VBMeta structure

Compile vendor image

$ make vendorimage -j12 #The second compilation can use ninja vendorimage -j12
to compile and successfully generate the following image: out/target/product/vangogh/vendor.img

compile system image

$ source build/envsetup.sh
$ lunch qssi-userdebug
$ make systemimage -j12 # Compile and generate system.img
$ make systemimage -j4 showcommands # Compile and generate system.img, and display compilation commands at the same time

Compile successfully to generate the following image:
after out/target/product/qssi/system.img, the traditional fastboot mode cannot flash and modify the image, you need to enter the fastbootd mode
or use services.jar, framework.jar and framework-res.apk three important Push the file to the phone /system/framework/path

edit userdata image

$ make userdataimage -j4

userdata.img is the storage of user data in the Android system. It is mounted to the /data/ directory by the init process by parsing the init.rc file. There is no file in it by default.

compile super image

$ source build/envsetup.sh
$ lunch
$ ./build.sh dist merge_only -j**

#If the above command does not take effect, use the following command
$ make supernod
#or
$ make superimage-nodeps

Compile vendor_boot.img

$ source build/envsetup.sh
$ lunch
$ make vendorbootimage

See more
https://blog.csdn.net/q921374795/article/details/88558271

Guess you like

Origin blog.csdn.net/weixin_40557160/article/details/128904229