Correct OTA sequence fixing "Expected: sha256|hex" error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Correct OTA sequence fixing "Expected: sha256|hex" error

Correct OTA sequence fixing "Expected: sha256|hex" error

Following OTA in Android User Guide would have HASH verification error:

update_engine: [0913/085233.421711:ERROR:delta_performer.cc(1140)]
Expected: sha256|hex = 685B998E4308F20FEA83D97E60222121FFE27983F013AED5C203709E139AE9DB
update_engine: [0913/085233.421760:ERROR:delta_performer.cc(1143)]
Calculated: sha256|hex = B1025634138BF2B5378196E364350E1E5FCA126DEE0990A592290CEBFADC3F8B



The OTA process that produced the error:

* After compiling the images according to the user guide, burn the images in the /out directory into the board
* Then build the first target file according to 7.1.1 Building target files, such as PREVIOUS-target_files.zip
* Modify part of the code to build the second target file, such as NEW-target_files.zip:
* Make a differential upgrade package and perform differential OTA

The root cause of the error caused by the above steps: Differential OTA requires that the onboard system.img must be the system.img generated when the target files are created for the first time. Only in this way can the correct hash value be calculated. When we execute the following command to make target files

make target-files-package -j4


Will repackage a copy of system.img in the /out directory and this system.img does not meet the requirements. The system.img used by the differential package must be system.img in out/target/product/evk_8mm/obj/PACKAGING/systemimage_intermediates/. Therefore, the system.img we burned in the first step did not meet the requirements, resulting in hash verification errors.

Solution 1: After the first step of programming, do a full update. When using the make otapackage -j4 command, a target_files.zip file will also be generated, which we will regard as PREVIOUS-target_files.zip. Modify part of the code and make NEW-target_files.zip. Finally, the differential upgrade can be successful.

Solution 2: After finishing the first target_files.zip, copy the system.img in out/target/product/evk_8mm/obj/PACKAGING/systemimage_intermediates/ to the out/target/product/evk_8mm directory, and then use uuu Perform programming. After burning and writing, make the second target_files.zip, and finally you can upgrade by differential.

No ratings
Version history
Last update:
‎11-23-2021 12:46 AM
Updated by: