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.
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?
service list
doesn't show the current state of a service as oppose todumpsys <servicename>
. Does it outputactivity:[android.app.IActivityManager]
oractivity:[]
or anything else? How do you know it's not running? The commands to control services are:start <servicename>
andstop <servicename>
. – CommunityActivity
are you trying to start? Is it your app'sActivity
or one of the system app's? – Communityactivity
, so the command would bestart activity
. Note that not all services work as expected (or work at all) withstart
/stop
. – Community