Android 9 imx8mq OTA incremental update error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Android 9 imx8mq OTA incremental update error

7,145件の閲覧回数
chyun705
Contributor II

hi,

1.I use make otapackage -j12 build a full update package , it works well.

2. when I use incremental package to update, there is a error occurs:

      Applying 21701 operations to partition "system"
      The hash of the source data on disk for this operation doesn't match the expected value. This could mean that the delta update payload was targeted for another version, or that the source partition was modified after it was installed, for example, by mounting a filesystem.
     Expected:   sha256|hex = 839ACF5296B9AB820DC822B6C09EBA896905531EB2C581093A357411F1A444A0
     Calculated: sha256|hex = 18AF8D6842A71554893F1DE65B87F2A9639FB390357C71D5383C6ED7A6051AFA

someone tells me , make otapackage will repack system.img, so I should use xxx\obj\PACKAGING\target_files_intermediates\dw8761-target_files-eng.panxf\IMAGES\system.img  replace xxx\system.img , then flash the device as base version. 

 

but when I replace system.img, use uuu flash the device, the device cannot boot again, the error is:

  4.288597]   #3: imx-audio-hdmi
[    4.292000] device-mapper: init: attempting early device configuration.
[    4.299566] device-mapper: init: adding target '0 5159992 verity 1 PARTUUID=086d1015-b508-4da4-9a28-bd2669b17f2c PARTUUID=086d1015-b508-4da4-9a28-bd2669b17f2c 4096 4096 644999 644999 sha1 8498f26cb2fd144a646330255483dd3d0218ad85 49f7d94f9f35948263f3244905675f7eeaf7d3ed 10 restart_on_corruption ignore_zero_blocks use_fec_from_device PARTUUID=086d1015-b508-4da4-9a28-bd2669b17f2c fec_roots 2 fec_blocks 650080 fec_start 650080'
[    4.339884] device-mapper: init: dm-0 is ready
[    4.355318] device-mapper: verity-fec: 179:5: FEC: recursion too deep
[    4.361795] device-mapper: verity: 179:5: metadata block 644999 is corrupted
[    4.368991] imx-sdma 302c0000.sdma: external firmware not found, using ROM firmware
[    4.369503] kvm: exiting hardware virtualization
[    4.376795] imx-sdma 30bd0000.sdma: external firmware not found, using ROM firmware
[    4.417371] reboot: Restarting system with command 'dm-verity device corrupted'

xxx\obj\PACKAGING\target_files_intermediates\dw8761-target_files-eng.panxf\IMAGES\system.img [size: 1173853kB]

xxx\system.img [1173849KB]

use xxx\system.img  flash the device is ok.

so where make otapackage -j12 build system image is different from  make -j12. how to resolve this problem?

ラベル(1)
タグ(4)
7 返答(返信)

5,475件の閲覧回数
SunHong
Contributor I

I have encountered a similar problem. Has this problem been solved? I found that after brushing the machine with uuu tools, the incremental upgrade will fail, but after a full upgrade, the incremental upgrade will succeed。

Error infomation:

1970-01-01 12:01:46.053 1714-1714/? I/update_engine: [0101/120146.052981:INFO:payload_verifier.cc(112)] Verified correct signature 1 out of 1 signatures.
1970-01-01 12:01:46.053 1714-1714/? I/update_engine: [0101/120146.053164:INFO:payload_metadata.cc(224)] Metadata hash signature matches value in Omaha response.
1970-01-01 12:01:46.083 1714-1714/? I/update_engine: [0101/120146.083752:INFO:delta_performer.cc(1405)] Detected a 'delta' payload.
1970-01-01 12:01:46.157 1714-1714/? I/update_engine: [0101/120146.157124:INFO:delta_performer.cc(400)] PartitionInfo old dtbo sha256: ewmnGDeBQqL6XnB6l8oea4LVIBUTNFmg5SrwE53olVU= size: 4194304
1970-01-01 12:01:46.157 1714-1714/? I/update_engine: [0101/120146.157329:INFO:delta_performer.cc(400)] PartitionInfo new dtbo sha256: IeAFZSDwWnHKrtGS5jpjfWQhMYmduontafbZJY6B6rg= size: 4194304
1970-01-01 12:01:46.157 1714-1714/? I/update_engine: [0101/120146.157430:INFO:delta_performer.cc(400)] PartitionInfo old boot sha256: sayNTA2ja3sxdxx0fN8kD3BGYCuXJDd+JKmZB+Sj+aQ= size: 50331648
1970-01-01 12:01:46.157 1714-1714/? I/update_engine: [0101/120146.157510:INFO:delta_performer.cc(400)] PartitionInfo new boot sha256: r13/ltIvKh5Bl2ZkYHeOQ2bpmtqpFD/XSvTIGCEEBO8= size: 50331648
1970-01-01 12:01:46.157 1714-1714/? I/update_engine: [0101/120146.157590:INFO:delta_performer.cc(400)] PartitionInfo old system sha256: oO20S96mcHAh1ynIaxYLe65tAs3VhT+alq5NzqUjqO8= size: 2411724800
1970-01-01 12:01:46.157 1714-1714/? I/update_engine: [0101/120146.157665:INFO:delta_performer.cc(400)] PartitionInfo new system sha256: JdY9yVbszxSmBwW/9/KwFOkFo6nJeg1lcvWR5O7nODg= size: 2411724800
1970-01-01 12:01:46.157 1714-1714/? I/update_engine: [0101/120146.157741:INFO:delta_performer.cc(400)] PartitionInfo old vendor sha256: LvSGuQudoexm2vi9KaTVche+g7N/rDEYrq/Ma24Eg+Y= size: 268435456
1970-01-01 12:01:46.157 1714-1714/? I/update_engine: [0101/120146.157818:INFO:delta_performer.cc(400)] PartitionInfo new vendor sha256: V7OS2M2sNFCZxGo4f6VuNrYEuxCOB06NbitW6tgbhFE= size: 268435456
1970-01-01 12:01:46.157 1714-1714/? I/update_engine: [0101/120146.157894:INFO:delta_performer.cc(400)] PartitionInfo old vbmeta sha256: lbmvlc2Z1CNuCHkIIzFRSWfims7WntPzqZ+oZ1UpDCE= size: 4096
1970-01-01 12:01:46.158 1714-1714/? I/update_engine: [0101/120146.158338:INFO:delta_performer.cc(400)] PartitionInfo new vbmeta sha256: Z/JCHCRgMaZ+GoCkFWSYIah00Hj5kapuoX9FQWQiyq8= size: 4096
1970-01-01 12:01:46.158 1714-1714/? I/update_engine: [0101/120146.158466:INFO:delta_performer.cc(400)] PartitionInfo old bootloader sha256: D+ht1qF0nPxcDtRCPVT6X6RCBGQbcNoAtXOf5BcAe08= size: 1691648
1970-01-01 12:01:46.158 1714-1714/? I/update_engine: [0101/120146.158543:INFO:delta_performer.cc(400)] PartitionInfo new bootloader sha256: DgqglpBYBzJ2w/mmG2xDGw19JeQeDZTkAH5n4dqI8I4= size: 1695744
1970-01-01 12:01:46.159 1714-1714/? I/update_engine: [0101/120146.159304:INFO:delta_performer.cc(374)] Opening /dev/block/by-name/dtbo_b partition without O_DSYNC
1970-01-01 12:01:46.160 1714-1714/? I/update_engine: [0101/120146.160505:INFO:delta_performer.cc(126)] Caching writes.
1970-01-01 12:01:46.160 1714-1714/? I/update_engine: [0101/120146.160752:INFO:delta_performer.cc(386)] Applying 5 operations to partition "dtbo"
1970-01-01 12:01:46.160 1714-1714/? I/update_engine: [0101/120146.160880:INFO:delta_performer.cc(601)] Starting to apply update payload operations
1970-01-01 12:01:46.185 1714-1714/? E/update_engine: [0101/120146.185118:ERROR:delta_performer.cc(990)] The hash of the source data on disk for this operation doesn't match the expected value. This could mean that the delta update payload was targeted for another version, or that the source partition was modified after it was installed, for example, by mounting a filesystem.
1970-01-01 12:01:46.185 1714-1714/? E/update_engine: [0101/120146.185347:ERROR:delta_performer.cc(995)] Expected: sha256|hex = F0886A2F7CCF51E6A8292127B987625E80916DF105B02E5ABE0896CFA7C5B602
1970-01-01 12:01:46.185 1714-1714/? E/update_engine: [0101/120146.185446:ERROR:delta_performer.cc(998)] Calculated: sha256|hex = 8E3978E610E3D390DDF9BF3E8436491B580D3AC47D879C56F5999ABF47D38B44
1970-01-01 12:01:46.185 1714-1714/? E/update_engine: [0101/120146.185530:ERROR:delta_performer.cc(1009)] Operation source (offset:size) in blocks: 20:1
1970-01-01 12:01:46.185 1714-1714/? E/update_engine: [0101/120146.185639:ERROR:delta_performer.cc(1191)] ValidateSourceHash(source_hash, operation, source_fd_, error) failed.
1970-01-01 12:01:46.186 1714-1714/? E/update_engine: [0101/120146.186403:ERROR:delta_performer.cc(298)] Failed to perform BROTLI_BSDIFF operation 1, which is the operation 1 in partition "dtbo"
1970-01-01 12:01:46.186 1714-1714/? E/update_engine: [0101/120146.186538:ERROR:download_action.cc(337)] Error ErrorCode::kDownloadStateInitializationError (20) in DeltaPerformer's Write method when processing the received payload -- Terminating processing
1970-01-01 12:01:46.190 1714-1714/? I/update_engine: [0101/120146.190545:INFO:delta_performer.cc(314)] Discarding 157 unused downloaded bytes
1970-01-01 12:01:46.190 1714-1714/? I/update_engine: [0101/120146.190837:INFO:multi_range_http_fetcher.cc(172)] Received transfer terminated.
1970-01-01 12:01:46.190 1714-1714/? I/update_engine: [0101/120146.190920:INFO:multi_range_http_fetcher.cc(124)] TransferEnded w/ code 200
1970-01-01 12:01:46.191 1714-1714/? I/update_engine: [0101/120146.190987:INFO:multi_range_http_fetcher.cc(126)] Terminating.

@chyun705 @shivanipatel @diegoadrian 

0 件の賞賛
返信

6,400件の閲覧回数
shivanipatel
Senior Contributor II

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.

  1. cd ${MY_ANDROID}
  2. source build/envsetup.sh
  3. lunch evk_8mq-userdebug               // Configuration for i.MX8MQ EVK
  4. make -j4
  5. 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

3,179件の閲覧回数
Lavanyavijay
Contributor II

For making the Incremental OTA package step number 5 is required. Or Shall I directly move to step 6? Is incremental OTA works after upgrading the full ota?

  1. cd ${MY_ANDROID}
  2. source build/envsetup.sh
  3. lunch evk_8mq-userdebug               // Configuration for i.MX8MQ EVK
  4. make -j4                                           // Generated binaries flashed into board
  5. make otapackage -j4                       //this will generate the full OTA package in out directory
  6. 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}
    7. Apply your changes in the source

    8. make target-files-package -j4

            //this will generate the newly 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}

     9 ./build/tools/releasetools/ota_from_target_files -i PREVIOUS-target_files.zip NEW-target_files.zip incremental_ota_update.zip

    When I try to do incremental OTA update, I am facing below error  

    update_engine: [ERROR:delta_performer.cc(431)] Unable to open ECC source partition dtbo on slot B, file /dev/block/by-name/dtbo_b: No such file or directory (2)
    06-27 01:32:41.016 0 0 E [ T514] fec: <514> error: parse_avb_image: failed to find avb hashtree descriptor
    06-27 01:32:41.024 0 0 E [ T514] fec: <514> error: fec_open: failed to parse avb image.
    06-27 01:32:41.044 514 514 E update_engine: [ERROR:delta_performer.cc(1155)] The hash of the source data on disk for this operation doesn't match the expected value. This could mean that the delta update payload was targeted for another version, or that the source partition was modified after it was installed, for example, by mounting a filesystem.
    06-27 01:32:41.058 514 514 E update_engine: [ERROR:delta_performer.cc(1160)] Expected: sha256|hex = 6702E5AEF403293AD6B39B97AC5CF13727FB9AA46849DD2AC9259707DBDA07AE
    06-27 01:32:41.071 514 514 E update_engine: [ERROR:delta_performer.cc(1163)] Calculated: sha256|hex = 5804E806365544BF83A621D4B9D929F1A733819D82DE8C474C2B58D482D00EE9
    06-27 01:32:41.084 514 514 E update_engine: [ERROR:delta_performer.cc(1174)] Operation source (offset:size) in blocks: 0:17,1023:1
    06-27 01:32:41.097 514 514 E update_engine: [ERROR:delta_performer.cc(1495)] source_fd != nullptr failed.
    06-27 01:32:41.110 514 514 E update_engine: [ERROR:delta_performer.cc(297)] Failed to perform BROTLI_BSDIFF operation 1, which is the operation 1 in partition "dtbo"
    06-27 01:32:41.123 514 514 E update_engine: [ERROR:download_action.cc(336)] Error ErrorCode::kDownloadStateInitializationError (20) in DeltaPerformer's Write method when processing the received payload -- Terminating processing
    06-27 01:32:41.137 514 514 I update_engine: [INFO:delta_performer.cc(314)] Discarding 200 unused downloaded bytes
    06-27 01:32:41.151 514 514 I update_engine: [INFO:multi_range_http_fetcher.cc(177)] Received transfer terminated.
    06-27 01:32:41.167 514 514 I update_engine: [INFO:multi_range_http_fetcher.cc(129)] TransferEnded w/ code 200
    06-27 01:32:41.181 514 514 I update_engine: [INFO:multi_range_http_fetcher.cc(131)] Terminating.
    06-27 01:32:41.205 514 514 I update_engine: [INFO:action_processor.cc(116)] ActionProcessor: finished DownloadAction with code ErrorCode::kDownloadStateInitializationError
    06-27 01:32:41.219 514 514 I update_engine: [INFO:action_processor.cc(121)] ActionProcessor: Aborting processing due to failure.
    06-27 01:32:41.232 514 514 I update_engine: [INFO:update_attempter_android.cc(522)] Processing Done.

 

Regards,

Lavanya

0 件の賞賛
返信

6,400件の閲覧回数
diegoadrian
NXP Employee
NXP Employee

Hello,

I suggest you follow section 7 of our Android_Users_Guide. There you could find all the information that we have about OTA.

Best regards,

Diego.

0 件の賞賛
返信

6,400件の閲覧回数
chyun705
Contributor II

hi, I follow, but it is wrong

6,400件の閲覧回数
diegoadrian
NXP Employee
NXP Employee

Hello,

Have you followed the following steps to apply the OTA update?

To update system from board's storage, perform the following steps:
      1. Unzip ota_update.zip or incremental_ota_update.zip (Generated on 7.1.2 and 7.1.3) to get payload.bin
          and payload_properties.txt.
      2. Push payload.bin to board's /sdcard dir: adb push payload.bin /sdcard/.
      3. Cat the content of payload_properties.txt like this:
            • FILE_HASH=0fSBbXonyTjaAzMpwTBgM9AVtlBeyOigpCCgkoOfHKY=
            • FILE_SIZE=379074366
            • METADATA_HASH=Icrs3NqoglzyppyCZouWKbo5f08IPokhlUfHDmz77WQ=
            • METADATA_SIZE=46866
      4. Input the following command on the board's console to update:
          update_engine_client --payload=file:///sdcard/payload.bin --update --
          headers="FILE_HASH=0fSBbXonyTjaAzMpwTBgM9AVtlBeyOigpCCgkoOfHKY=
          FILE_SIZE=379074366
          METADATA_HASH=Icrs3NqoglzyppyCZouWKbo5f08IPokhlUfHDmz77WQ=
          METADATA_SIZE=46866"
      5. The system will update in the background. After it finishes, it will show "Update successfully applied, waiting to
          reboot" in the logcat.

Best regards,

Diego.

0 件の賞賛
返信

6,400件の閲覧回数
chyun705
Contributor II

who konw this