AOSP ActivityManager未运行

时间:2016-10-28 20:33:40

标签: android android-source android-activitymanager

我试图将class Calc: @staticmethod def add(x,y): return x+y 7.0移植到自定义的硬件平台并运行Android背景。但是,当我尝试使用zygote启动某个应用时,会出现错误&#34;无法连接到活动管理器;系统正在运行?&#34; 。之后我做了am start <>并发现service list没有运行(我不知道为什么)。我实际上是AOSP的新手,但是如何通过键入单个shell命令来启动activity:[android.app.IActivityManager]服务? 我附上了错误消息和logcat打印。

从源代码AM尝试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

1 个答案:

答案 0 :(得分:2)

AndroidExceptionCan't connect to activity manager; is the system running?表示ActivityManagerService的运行速度不如正在运行的服务列表中反映的其他核心系统服务。

问题的原因是SystemServerStarted by zygote system_server进程就像大多数系统服务运行的主机进程一样。tries to start the services并在发生故障时死亡。

  

如何启动ActivityManagerService或哪个进程实际触发它?

您无法手动执行此操作。 SystemServer负责starting the service

  

所以我可能需要禁用DisplayManagerS和电池服务吗?

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

相关问题