OTA android update for i.MX8MM board

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

OTA android update for i.MX8MM board

726 Views
shreehari_hm
Contributor I

i successfully built OTA android update package for i.mx8mm platform , it genarated ota_update.zip which contains payload.bin and payload properties.txt 

here we tried to update the system through boards storage 

i followed the steps given in android_user's_guide as below

To update system from board's storage, perform the following steps:
1. Unzip full-ota.zip or incremental-ota.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:
su
update_engine_client --payload=file:///sdcard/payload.bin --update --

headers="FILE_HASH=0fSBbXonyTjaAzMpwTBgM9AVtlBeyOigpCCgkoOfHKY=
FILE_SIZE=379074366
METADATA_HASH=Icrs3NqoglzyppyCZouWKbo5f08IPokhlUfHDmz77WQ=
METADATA_SIZE=46866"

After executing following command , i am getting following log errors

earch "update_engine" (96 hits in 1 file of 1 searched)
C:\Users\nxf91680\Desktop\i.mx_8mm\evk_8mm-ota-eng.nxf91680\log1.txt (96 hits)
Line 23593: 09-27 10:13:55.335 514 514 W update_engine: [WARNING:update_attempter_android.cc(211)] Unable to decode base64 file hash: SXPLOS/aOaVxtLtTSXUqzJ+I/b4H8A9Q0rUCUh9BZFw=FILE_SIZE=548703612METADATA_HASH=gto492uo5boT4JpdIgbMZi9ynaO8YYw+VJEBCrmUVoc=METADATA_SIZE=42769
Line 23594: 09-27 10:13:55.357 514 514 I update_engine: [INFO:update_attempter_android.cc(282)] Using this install plan:
Line 23595: 09-27 10:13:55.372 514 514 I update_engine: [INFO:install_plan.cc(79)] InstallPlan:
Line 23596: 09-27 10:13:55.372 514 514 I update_engine: type: new_update
Line 23597: 09-27 10:13:55.372 514 514 I update_engine: version:
Line 23598: 09-27 10:13:55.372 514 514 I update_engine: source_slot: A
Line 23599: 09-27 10:13:55.372 514 514 I update_engine: target_slot: B
Line 23600: 09-27 10:13:55.372 514 514 I update_engine: initial url: file:///sdcard/payload.bin
Line 23601: 09-27 10:13:55.372 514 514 I update_engine: hash_checks_mandatory: true
Line 23602: 09-27 10:13:55.372 514 514 I update_engine: powerwash_required: false
Line 23603: 09-27 10:13:55.372 514 514 I update_engine: switch_slot_on_reboot: true
Line 23604: 09-27 10:13:55.372 514 514 I update_engine: run_post_install: true
Line 23605: 09-27 10:13:55.372 514 514 I update_engine: is_rollback: false
Line 23606: 09-27 10:13:55.372 514 514 I update_engine: rollback_data_save_requested: false
Line 23607: 09-27 10:13:55.372 514 514 I update_engine: write_verity: true
Line 23608: 09-27 10:13:55.372 514 514 I update_engine: Payload: 0
Line 23609: 09-27 10:13:55.372 514 514 I update_engine: urls: ()
Line 23610: 09-27 10:13:55.372 514 514 I update_engine: size: 0
Line 23611: 09-27 10:13:55.372 514 514 I update_engine: metadata_size: 0
Line 23612: 09-27 10:13:55.372 514 514 I update_engine: metadata_signature:
Line 23613: 09-27 10:13:55.372 514 514 I update_engine: hash:
Line 23614: 09-27 10:13:55.372 514 514 I update_engine: type: unknown
Line 23615: 09-27 10:13:55.372 514 514 I update_engine: fingerprint:
Line 23616: 09-27 10:13:55.372 514 514 I update_engine: app_id:
Line 23617: 09-27 10:13:55.372 514 514 I update_engine: already_applied: false
Line 23618: 09-27 10:13:55.386 514 514 I update_engine: [INFO:postinstall_runner_action.cc(67)] postinstall mount point: /postinstall
Line 23619: 09-27 10:13:55.401 514 514 I update_engine: [INFO:metrics_utils.cc(318)] Number of Reboots during current update attempt = 0
Line 23620: 09-27 10:13:55.418 514 514 I update_engine: [INFO:metrics_utils.cc(326)] Payload Attempt Number = 1
Line 23621: 09-27 10:13:55.434 514 514 I update_engine: [INFO:metrics_utils.cc(343)] Update Monotonic Timestamp Start = 1/1/1970 2:03:16 GMT
Line 23622: 09-27 10:13:55.454 514 514 I update_engine: [INFO:metrics_utils.cc(352)] Update Boot Timestamp Start = 1/1/1970 2:03:16 GMT
Line 23625: 09-27 10:13:55.468 514 514 I update_engine: [INFO:update_attempter_android.cc(680)] Scheduling an action processor start.
Line 23626: 09-27 10:13:55.483 514 514 I update_engine: [INFO:action_processor.cc(51)] ActionProcessor: starting UpdateBootFlagsAction
Line 23627: 09-27 10:13:55.499 514 514 I update_engine: [INFO:update_boot_flags_action.cc(36)] Already updated boot flags. Skipping.
Line 23628: 09-27 10:13:55.509 514 514 I update_engine: [INFO:action_processor.cc(116)] ActionProcessor: finished UpdateBootFlagsAction with code ErrorCode::kSuccess
Line 23629: 09-27 10:13:55.525 514 514 I update_engine: [INFO:action_processor.cc(143)] ActionProcessor: starting CleanupPreviousUpdateAction
Line 23630: 09-27 10:13:55.539 514 514 I update_engine: [INFO:cleanup_previous_update_action.cc(149)] Starting/resuming CleanupPreviousUpdateAction
Line 23631: 09-27 10:13:55.558 514 514 I update_engine: [INFO:cleanup_previous_update_action.cc(189)] Boot completed, waiting on markBootSuccessful()
Line 23632: 09-27 10:13:55.576 514 514 I update_engine: EnsureMetadataMounted does nothing in Android mode.
Line 23633: 09-27 10:13:55.592 514 514 I update_engine: Read merge statistics file failed: No such file or directory
Line 23634: 09-27 10:13:55.623 514 514 I update_engine: [INFO:cleanup_previous_update_action.cc(261)] Waiting for any previous merge request to complete. This can take up to several minutes.
Line 23635: 09-27 10:13:55.639 514 514 I update_engine: CheckMergeState for snapshots returned: 0
Line 23636: 09-27 10:13:55.653 514 514 I update_engine: ProcessUpdateState handling state: 0
Line 23637: 09-27 10:13:55.674 514 514 I update_engine: [INFO:cleanup_previous_update_action.cc(287)] Can't find any snapshot to merge.
Line 23638: 09-27 10:13:55.691 514 514 I update_engine: [INFO:cleanup_previous_update_action.cc(130)] Stopping/suspending/completing CleanupPreviousUpdateAction
Line 23639: 09-27 10:13:55.722 514 514 I update_engine: [INFO:cleanup_previous_update_action.cc(469)] Not reporting merge stats because state is None
Line 23640: 09-27 10:13:55.739 514 514 I update_engine: [INFO:cleanup_previous_update_action.cc(130)] Stopping/suspending/completing CleanupPreviousUpdateAction
Line 23641: 09-27 10:13:55.754 514 514 I update_engine: [INFO:action_processor.cc(116)] ActionProcessor: finished CleanupPreviousUpdateAction with code ErrorCode::kSuccess
Line 23642: 09-27 10:13:55.767 514 514 I update_engine: [INFO:action_processor.cc(143)] ActionProcessor: starting InstallPlanAction
Line 23643: 09-27 10:13:55.783 514 514 I update_engine: [INFO:action_processor.cc(116)] ActionProcessor: finished InstallPlanAction with code ErrorCode::kSuccess
Line 23644: 09-27 10:13:55.798 514 514 I update_engine: [INFO:action_processor.cc(143)] ActionProcessor: starting DownloadAction
Line 23645: 09-27 10:13:55.813 514 514 I update_engine: [INFO:install_plan.cc(79)] InstallPlan:
Line 23646: 09-27 10:13:55.813 514 514 I update_engine: type: new_update
Line 23647: 09-27 10:13:55.813 514 514 I update_engine: version:
Line 23648: 09-27 10:13:55.813 514 514 I update_engine: source_slot: A
Line 23649: 09-27 10:13:55.813 514 514 I update_engine: target_slot: B
Line 23650: 09-27 10:13:55.813 514 514 I update_engine: initial url: file:///sdcard/payload.bin
Line 23651: 09-27 10:13:55.813 514 514 I update_engine: hash_checks_mandatory: true
Line 23652: 09-27 10:13:55.813 514 514 I update_engine: powerwash_required: false
Line 23653: 09-27 10:13:55.813 514 514 I update_engine: switch_slot_on_reboot: true
Line 23654: 09-27 10:13:55.813 514 514 I update_engine: run_post_install: true
Line 23655: 09-27 10:13:55.813 514 514 I update_engine: is_rollback: false
Line 23656: 09-27 10:13:55.813 514 514 I update_engine: rollback_data_save_requested: false
Line 23657: 09-27 10:13:55.813 514 514 I update_engine: write_verity: true
Line 23658: 09-27 10:13:55.813 514 514 I update_engine: Payload: 0
Line 23659: 09-27 10:13:55.813 514 514 I update_engine: urls: ()
Line 23660: 09-27 10:13:55.813 514 514 I update_engine: size: 0
Line 23661: 09-27 10:13:55.813 514 514 I update_engine: metadata_size: 0
Line 23662: 09-27 10:13:55.813 514 514 I update_engine: metadata_signature:
Line 23663: 09-27 10:13:55.813 514 514 I update_engine: hash:
Line 23664: 09-27 10:13:55.813 514 514 I update_engine: type: unknown
Line 23665: 09-27 10:13:55.813 514 514 I update_engine: fingerprint:
Line 23666: 09-27 10:13:55.813 514 514 I update_engine: app_id:
Line 23667: 09-27 10:13:55.813 514 514 I update_engine: already_applied: false
Line 23668: 09-27 10:13:55.826 514 514 I update_engine: [INFO:download_action.cc(84)] Marking new slot as unbootable
Line 23669: 09-27 10:13:55.846 514 514 I update_engine: [INFO:multi_range_http_fetcher.cc(45)] starting first transfer
Line 23670: 09-27 10:13:55.867 514 514 I update_engine: [INFO:multi_range_http_fetcher.cc(74)] starting transfer of range 0+?
Line 23671: 09-27 10:13:55.881 514 514 I update_engine: [INFO:multi_range_http_fetcher.cc(172)] Received transfer complete.
Line 23672: 09-27 10:13:55.898 514 514 I update_engine: [INFO:multi_range_http_fetcher.cc(129)] TransferEnded w/ code 200
Line 23673: 09-27 10:13:55.876 514 514 I update_engine: type=1400 audit(0.0:967): avc: denied { dac_read_search } for capability=2 scontext=u:r:update_engine:s0 tcontext=u:r:update_engine:s0 tclass=capability permissive=1
Line 23674: 09-27 10:13:55.912 514 514 I update_engine: [INFO:multi_range_http_fetcher.cc(163)] Done w/ all transfers
Line 23675: 09-27 10:13:55.876 514 514 I update_engine: type=1400 audit(0.0:968): avc: denied { search } for name="/" dev="fuse" ino=40721 scontext=u:r:update_engine:s0 tcontext=u:object_r:fuse:s0 tclass=dir permissive=1
Line 23676: 09-27 10:13:55.927 514 514 E update_engine: [ERROR:delta_performer.cc(1281)] VerifyPayload failure: payload_hash_calculator_.raw_hash() == update_check_response_hash
Line 23677: 09-27 10:13:55.876 514 514 I update_engine: type=1400 audit(0.0:969): avc: denied { read } for name="payload.bin" dev="fuse" ino=40756 scontext=u:r:update_engine:s0 tcontext=u:object_r:fuse:s0 tclass=file permissive=1
Line 23678: 09-27 10:13:55.940 514 514 E update_engine: [ERROR:download_action.cc(260)] Download of file:///sdcard/payload.bin failed due to payload verification error.
Line 23679: 09-27 10:13:55.956 514 514 I update_engine: [INFO:action_processor.cc(116)] ActionProcessor: finished DownloadAction with code ErrorCode::kPayloadHashMismatchError
Line 23680: 09-27 10:13:55.876 514 514 I update_engine: type=1400 audit(0.0:970): avc: denied { open } for path="/storage/emulated/0/payload.bin" dev="fuse" ino=40756 scontext=u:r:update_engine:s0 tcontext=u:object_r:fuse:s0 tclass=file permissive=1
Line 23683: 09-27 10:13:55.969 514 514 I update_engine: [INFO:action_processor.cc(121)] ActionProcessor: Aborting processing due to failure.
Line 23684: 09-27 10:13:55.876 514 514 I update_engine: type=1400 audit(0.0:971): avc: denied { getattr } for path="/storage/emulated/0/payload.bin" dev="fuse" ino=40756 scontext=u:r:update_engine:s0 tcontext=u:object_r:fuse:s0 tclass=file permissive=1
Line 23685: 09-27 10:13:55.990 514 514 I update_engine: [INFO:update_attempter_android.cc(546)] Processing Done.
Line 23686: 09-27 10:13:56.005 514 514 I update_engine: [INFO:update_attempter_android.cc(694)] Terminating cleanup previous update.

0 Kudos
2 Replies

709 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

You can try to add '\' in the end of each command line:

update_engine_client --payload=file:///sdcard/payload.bin --update -- \
headers="FILE_HASH=0fSBbXonyTjaAzMpwTBgM9AVtlBeyOigpCCgkoOfHKY= \
FILE_SIZE=379074366 \
METADATA_HASH=Icrs3NqoglzyppyCZouWKbo5f08IPokhlUfHDmz77WQ= \
METADATA_SIZE=46866"

0 Kudos

704 Views
shreehari_hm
Contributor I
yes i tried with this also but still facing the same issue , and also getting this error in UART log
[ 619.937264][ T245] type=1400 audit(1664266732.216:62): avc: denied { dac_read_search } for comm="update_engine" capability=2 scontext=u:r:update_engine:s0 tcontext=u:r:update_engine:s0 tclass=capability permissive=1
[ 619.956808][ T245] type=1400 audit(1664266732.216:63): avc: denied { search } for comm="update_engine" name="/" dev="fuse" ino=40721 scontext=u:r:update_engine:s0 tcontext=u:object_r:fuse:s0 tclass=dir permissive=1
[ 619.976275][ T245] type=1400 audit(1664266732.216:64): avc: denied { read } for comm="update_engine" name="payload.bin" dev="fuse" ino=40756 scontext=u:r:update_engine:s0 tcontext=u:object_r:fuse:s0 tclass=file permissive=1
[ 619.996600][ T245] type=1400 audit(1664266732.220:65): avc: denied { open } for comm="update_engine" path="/storage/emulated/0/payload.bin" dev="fuse" ino=40756 scontext=u:r:update_engine:s0 tcontext=u:object_r:fuse:s0 tclass=file permissive=1
[ 620.018583][ T245] type=1400 audit(1664266732.220:66): avc: denied { getattr } for comm="update_engine" path="/storage/emulated/0/payload.bin" dev="fuse" ino=40756 scontext=u:r:update_engine:s0 tcontext=u:object_r:fuse:s0 tclass=file permissive=1
0 Kudos