Android 启动调试:Init 在 OnBootPhase_XXX 循环中结束(Qemu/虚拟平台上的 Android-13)

问题描述 投票:0回答:1

我是 Android 启动的新手,内核启动似乎成功,我们到达控制台提示符,但除此之外,logcat 没有揭示可能阻碍 Android-13 启动的原因。

在软件方面,我们有一个设置可以为我们特定的午餐菜单和设备规格(基于 arm64)成功构建 Android-12。对于 Android-13,我们使用了相同的设置并指向以下源代码分支。

ANDROID_BRANCH=android-13.0.0_r18 KERNEL_BRANCH=common-android13-5.10-2022-12

控制台跟踪在 OnBootPhase_XXX 循环中结束,该循环不断递增,并重复类似的输出。跟踪中似乎没有什么明显的突出,例如致命错误

01-17 12:43:14.120  2587  2587 I SystemServiceManager: Starting phase 500
01-17 12:43:14.122  2587  2587 D SystemServerTiming: OnBootPhase_500
01-17 12:43:14.124  2587  2587 D SystemServerTiming: OnBootPhase_500_com.android.server.security.FileIntegrityService
01-17 12:43:14.125  2587  2587 V SystemServerTiming: OnBootPhase_500_com.android.server.security.FileIntegrityService took to complete: 0ms
01-17 12:43:14.127  2587  2587 D SystemServerTiming: OnBootPhase_500_com.android.server.pm.Installer
01-17 12:43:14.129  2587  2587 V SystemServerTiming: OnBootPhase_500_com.android.server.pm.Installer took to complete: 0ms
01-17 12:43:14.130  2587  2587 D SystemServerTiming: OnBootPhase_500_com.android.server.os.DeviceIdentifiersPolicyService
01-17 12:43:14.132  2587  2587 V SystemServerTiming: OnBootPhase_500_com.android.server.os.DeviceIdentifiersPolicyService took to complete: 0ms
01-17 12:43:14.134  2587  2587 D SystemServerTiming: OnBootPhase_500_com.android.server.uri.UriGrantsManagerService$Lifecycle
01-17 12:43:14.161  2587  2587 V SystemServerTiming: OnBootPhase_500_com.android.server.uri.UriGrantsManagerService$Lifecycle took to complete: 26ms
01-17 12:43:14.163  2587  2587 D SystemServerTiming: OnBootPhase_500_com.android.server.powerstats.PowerStatsService
01-17 12:43:14.172  2587  2587 E StatsPullAtomCallbackImpl: Failed to start PowerStatsService statsd pullers

最后,跟踪中的以下行给出了它已经放弃的提示。

01-17 12:44:30.645  2160  2791 I keystore2: keystore2::watchdog: Watchdog thread idle -> terminating. Have a great day.

使用控制台/Logcat 跟踪输出调试 Android Init-Loop 的通常过程是什么?

既然我们可以重建软件堆栈,那么在代码中添加跟踪以缩小问题范围的最佳位置是什么?

当我们直接从 android 源代码分支 android-13.0.0_r18 和内核分支 common-android13-5.10-2022-12 获取源代码时,我们是否会遗漏错误修复或补丁?

Android-12 和 Android-13 之间是否存在根本差异,可能需要更新设备规格? 我比较了 12 和 13 之间的 google/cuttlefish 设备规格,但没有发现任何东西。

非常感谢任何意见/建议

qemu android-debug android-13 android-debugging fvp
1个回答
0
投票

我实际上是通过谷歌遇到的,因为我面临着类似的情况。我的系统仅进入 OnBootPhase_200 并挂起。我实际上正在使用 Android-12 运行基于 Arm64 的 SoC。我可以在一台设备上启动这个系统,但在另一台具有非常相似规格的设备上完全相同的图像被卡住了。我目前的想法是它可能与内核相关,因为设备之间的内核并不完全相同。

如果您对此有任何成功,我将非常感谢您提供有关如何调试问题的任何提示!

© www.soinside.com 2019 - 2024. All rights reserved.