1

我正在开发 OSUpdate 功能。当 OSUpdate 启动时,AOSP 将目标/下一个插槽标记为活动。因此,当更新成功时,在下次启动时,设备将从下一个插槽启动,或者我们可以说被标记为活动的插槽。目前,我陷入了这样一种情况,即在成功 OSUpdate 后突然/立即移除电池(1-2 秒),设备无法从标记的活动插槽启动。相反,它从前一个插槽引导。而如果在 OSUpdate 成功 6-7 秒后取出电池,则设备将从下一个插槽启动。

我尝试输入日志

/hardware/qcom/bootctrl/boot_control.cpp

set_active_boot_slot()查看此方法是否需要时间将下一个插槽设置为活动状态。而且我发现将目标/下一个插槽标记为活动是成功的。这不需要时间。

这是日志:

07-05 07:40:11.511 E/android.hardware.boot@1.0-impl(  636): ************ Entry setActiveBootSlot()**********
07-05 07:40:11.511 I/OSUpdateManager( 5625): update_engine onStatusUpdate status_code = 5 percentage = NaN
07-05 07:40:11.509 W/boot@1.0-servic(  636): type=1400 audit(0.0:3942): avc: denied { getattr } for path="/dev/block/mmcblk0p62" dev="tmpfs" ino=17342 scontext=u:r:hal_bootctl_default:s0 tcontext=u:object_r:dtbo_block_device_ab:s0 tclass=blk_file permissive=0
07-05 07:40:11.516 E/android.hardware.boot@1.0-impl(  636): ****** ret= 0 , ****** Exiting setActiveBootSlot()****
07-05 07:40:11.516 I/update_engine( 2947): [0705/074011.516883:INFO:boot_control_android.cc(171)] SetActiveBootSlot : isOk()= 1
07-05 07:40:11.517 I/update_engine( 2947): [0705/074011.517186:INFO:postinstall_runner_action.cc(345)] install_plan_ checking if target slot is bootable: 1
07-05 07:40:11.517 I/update_engine( 2947): [0705/074011.517949:INFO:postinstall_runner_action.cc(347)] install_plan_ and Yes target slot is bootable: 
07-05 07:40:11.518 I/update_engine( 2947): [0705/074011.518003:INFO:postinstall_runner_action.cc(368)] All post-install commands succeeded
07-05 07:40:11.519 I/update_engine( 2947): [0705/074011.519100:INFO:action_processor.cc(116)] ActionProcessor: finished last action PostinstallRunnerAction with code ErrorCode::kSuccess
07-05 07:40:11.519 I/update_engine( 2947): [0705/074011.519224:INFO:update_attempter_android.cc(456)] Processing Done.
07-05 07:40:11.519 I/update_engine( 2947): [0705/074011.519715:INFO:update_attempter_android.cc(464)] Update successfully applied, waiting to reboot.
07-05 07:40:11.520 I/OSUpdateManager( 5625): update_engine onStatusUpdate status_code = 6 percentage = 0.0
07-05 07:40:11.522 I/OSUpdateManager( 5625): update_engine onPayloadApplicationComplete error_code = 0
07-05 07:40:11.524 I/OSUpdateManager( 5625): UpdateHandler case UPDATE_SUCCESS
07-05 07:40:11.528 I/update_engine( 2947): [0705/074011.528371:INFO:metrics_reporter_android.cc(29)] uploading 1 to histogram for metric ota_update_engine_attempt_number
07-05 07:40:11.528 I/update_engine( 2947): [0705/074011.528513:INFO:metrics_reporter_android.cc(29)] uploading 0 to histogram for metric ota_update_engine_attempt_payload_type
07-05 07:40:11.528 I/update_engine( 2947): [0705/074011.528696:INFO:metrics_reporter_android.cc(29)] uploading 4 to histogram for metric ota_update_engine_attempt_duration_boottime_in_minutes
07-05 07:40:11.528 I/update_engine( 2947): [0705/074011.528761:INFO:metrics_reporter_android.cc(29)] uploading 4 to histogram for metric ota_update_engine_attempt_duration_monotonic_in_minutes
07-05 07:40:11.528 I/update_engine( 2947): [0705/074011.528826:INFO:metrics_reporter_android.cc(29)] uploading 1277 to histogram for metric ota_update_engine_attempt_payload_size_mib
07-05 07:40:11.528 I/update_engine( 2947): [0705/074011.528890:INFO:metrics_reporter_android.cc(29)] uploading 0 to histogram for metric ota_update_engine_attempt_result
07-05 07:40:11.528 I/update_engine( 2947): [0705/074011.528954:INFO:metrics_reporter_android.cc(29)] uploading 0 to histogram for metric ota_update_engine_attempt_error_code
07-05 07:40:11.529 I/update_engine( 2947): [0705/074011.529335:INFO:metrics_reporter_android.cc(29)] uploading 1339436263 to histogram for metric ota_update_engine_attempt_current_bytes_downloaded_mib
07-05 07:40:11.530 I/update_engine( 2947): [0705/074011.530710:INFO:metrics_reporter_android.cc(29)] uploading 1 to histogram for metric ota_update_engine_successful_update_attempt_count
07-05 07:40:11.530 I/update_engine( 2947): [0705/074011.530786:INFO:metrics_reporter_android.cc(29)] uploading 0 to histogram for metric ota_update_engine_successful_update_payload_type
07-05 07:40:11.530 I/update_engine( 2947): [0705/074011.530851:INFO:metrics_reporter_android.cc(29)] uploading 1277 to histogram for metric ota_update_engine_successful_update_payload_size_mib
07-05 07:40:11.530 I/update_engine( 2947): [0705/074011.530916:INFO:metrics_reporter_android.cc(29)] uploading 1277 to histogram for metric ota_update_engine_successful_update_total_bytes_downloaded_mib
07-05 07:40:11.531 I/update_engine( 2947): [0705/074011.530979:INFO:metrics_reporter_android.cc(29)] uploading 0 to histogram for metric ota_update_engine_successful_update_download_overhead_percentage
07-05 07:40:11.531 I/update_engine( 2947): [0705/074011.531044:INFO:metrics_reporter_android.cc(29)] uploading 4 to histogram for metric ota_update_engine_successful_update_total_duration_in_minutes
07-05 07:40:11.531 I/update_engine( 2947): [0705/074011.531190:INFO:metrics_reporter_android.cc(29)] uploading 0 to histogram for metric ota_update_engine_successful_update_reboot_count
07-05 07:40:11.532 I/update_engine( 2947): [0705/074011.531896:INFO:metrics_utils.cc(353)] Updated Marker = 1/1/1970 0:16:15 GMT
07-05 07:40:11.563 I/OSUpdateManager( 5625): status WAITING_FOR_REBOOT
07-05 07:40:11.576 I/OSUpdateManager( 5625): UPDATE_SUCCESS suppress_reboot = false

任何帮助将不胜感激。

4

0 回答 0