gpt4 book ai didi

android - AOSP ActivityManager 未运行

转载 作者:太空狗 更新时间:2023-10-29 13:11:23 24 4
gpt4 key购买 nike

我正在尝试移植 Android 7.0 进入定制的硬件平台并拥有zygote运行背景。但是当我尝试使用 am start <> 启动应用程序时,它给出错误“无法连接到 Activity 管理器;系统正在运行吗?”。之后我做了 service list并发现 activity:[android.app.IActivityManager]没有运行(我不知道为什么)。我实际上是 AOSP 的新手,但我如何启动 AM通过键入单个 shell 命令来提供服务?我已附上错误消息和 logcat 打印。

来自源代码ActivityManagerNative尝试 getDefault()ActivityManagerService ,这是不可用的,那么如何开始 ActivityManagerService或者哪个进程实际触发了它?

am start error log and logcat prints

enter image description here

enter image description here enter image description here

enter image description here

最佳答案

AndroidException : 无法连接到 Activity 管理器;系统在运行吗? 表示 ActivityManagerService 没有像正在运行的服务列表中反射(reflect)的其他核心系统服务一样运行。

问题的原因是 SystemServerStarted by zygote system_server 进程充当大多数系统服务运行的主机进程。它 tries to start the services并在失败的情况下死亡。

How to start ActivityManagerService or which process actually trigger it?

您不能手动完成。 SystemServer负责starting the service .

So maybe I need to disable both DisplayManagerS and Battery Service?

尽管您可以通过修改 ro.factorytestro.headless 系统属性来影响 SystemServer 的启动行为,但对于要禁用这些特定服务,您应该通过注释掉相应的代码行来手动编辑 SystemServer.java

关于android - AOSP ActivityManager 未运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40312842/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com