Hi, chen yy
The reason for this issue is that the system.img of OTA package is not consistent/same with the system.img of the out directory because "make otapackage" will repackage the system.img from the out directory.
Please verify the md5sum of both the system.img reside at "out/target/product/evk_8mq/obj/PACKAGING/systemimage_intermediates/" and "out/target/product/evk_8mq" are same.
For making the full OTA package, you first need to compile the AOSP i.e. you need to run the commands as per below sequence.
- cd ${MY_ANDROID}
- source build/envsetup.sh
- lunch evk_8mq-userdebug // Configuration for i.MX8MQ EVK
- make -j4
- make otapackage -j4 //this will generate the full OTA package in out directory
And for making incremental OTA, please follow below-mentioned steps.
1. make target-files-package -j4
//this will generate the previously changed target file in "{MY_ANDROID}/out/target/product/evk_8mq/obj/PACKAGING/target_files_intermediates/" directory
Copy the PREVIOUS-target_files.zip to ${MY_ANDROID}
2. Apply your changes in the source
3. make target-files-package -j4
//this will generate the previously changed target file in "{MY_ANDROID}/out/target/product/evk_8mq/obj/PACKAGING/target_files_intermediates/" directory
Copy the NEW-target_files.zip to ${MY_ANDROID}
4. ./build/tools/releasetools/ota_from_target_files -i PREVIOUS-target_files.zip NEW-target_files.zip incremental_ota_update.zip
To apply the incremental OTA please follow the steps given in Section 7.1.3 of Android User Guide attached here.
I have tested the above steps on i.MX8MQ EVK with Android version 9.0.0.1.0.0 and able to apply the full OTA and incremental OTA successfully.
Let us know if you still face the issue with above steps.
Regards,
Shivani