AOSP ActivityManager未运行 [英] AOSP ActivityManager not running
问题描述
我正在尝试将Android
7.0移植到自定义的HW平台中,并具有zygote
的运行后台.但是,当我尝试使用am start <>
启动应用程序时,出现错误无法连接到活动管理器;系统正在运行吗?" .之后,我做了service list
并发现activity:[android.app.IActivityManager]
没有运行(我不知道为什么).我实际上是AOSP的新手,但是如何通过键入单个shell命令来启动AM
服务?
我已附上错误消息和logcat打印.
I'm trying to port Android
7.0 into a customized HW platform and have zygote
running background. But when I tried to start an app by using am start <>
, it gives error "Can't connect to activity manager; is system running?". After that I did service list
and found out that the activity:[android.app.IActivityManager]
is not running (I don't know why). I'm actually kinda new to AOSP, but how could I start the AM
service by typing a single shell command?
I have attached the error message and logcat prints.
ActivityManagerNative
从源代码尝试到ActivityManagerService
的getDefault()
,这是不可用的,那么如何启动ActivityManagerService
或哪个进程实际触发了它?
From the source code the ActivityManagerNative
tries to getDefault()
of ActivityManagerService
, which is not available, so how to start ActivityManagerService
or which process actually trigger it?
推荐答案
AndroidException: Can't connect to activity manager; is the system running?
means ActivityManagerService
is not running as well as other core system services as reflected in the list of running services.
问题的原因是SystemServer
. 由system_server
进程的作用类似于运行大多数系统服务的主机进程.它
The cause of the problem is SystemServer
. Started by zygote
the system_server
process acts like a host process for most of the system services to run in. It tries to start the services and dies in case of failure.
如何启动
ActivityManagerService
或哪个进程实际触发了它?
How to start
ActivityManagerService
or which process actually trigger it?
You can't do it manually. SystemServer
is responsible for starting the service.
那么也许我需要同时禁用DisplayManagerS和电池服务?
So maybe I need to disable both DisplayManagerS and Battery Service?
尽管您可以通过修改ro.factorytest
和ro.headless
系统属性来影响SystemServer
的启动行为,但要禁用这些特定服务,您应该通过注释掉相应的代码行来手动编辑SystemServer.java
Despite the fact that you can effect the startup behavior of SystemServer
by modifying the ro.factorytest
and ro.headless
system properties, for disabling these particular services you should edit SystemServer.java
manually by commenting out the corresponding lines of code.
这篇关于AOSP ActivityManager未运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!