Why are these processes running?

495 views
Skip to first unread message

Peter Teoh

unread,
Jun 18, 2011, 3:51:27 AM6/18/11
to andro...@googlegroups.com
This is Android-specific - not NDK, but I think this NDK community will have a better understanding to answer as it is beyond and below the Dalvik VM:

Looking at the output of "ps" immediately after executing a "reboot" command inside adb:

app_45    2254  1953  147832 19796 ffffffff afe0da64 S com.sec.android.app.samsungapps.una
app_50    2261  1953  151464 21604 ffffffff afe0da64 S com.android.email
app_51    2268  1953  147648 19032 ffffffff afe0da64 S com.android.voicedialer
app_53    2276  1953  149788 19904 ffffffff afe0da64 S com.google.android.apps.uploader
app_54    2284  1953  159920 23148 ffffffff afe0da64 S com.android.calendar
system    2297  1953  157696 19400 ffffffff afe0da64 S com.sec.android.app.factorytest
app_65    2303  1953  159984 19164 ffffffff afe0da64 S com.google.android.partnersetup
app_82    2308  1953  296516 60220 ffffffff afe0da64 S com.koushikdutta.rommanager
app_84    2317  1953  149400 19488 ffffffff afe0da64 S berserker.android.apps.sshdroid
app_0     2327  1953  168496 27388 ffffffff afe0da64 S com.google.android.apps.maps:FriendService
app_41    2332  1953  148056 19024 ffffffff afe0da64 S com.android.MtpApplication
app_38    2337  1953  150108 21492 ffffffff afe0da64 S com.cooliris.media
app_30    2346  1953  150032 20820 ffffffff afe0da64 S com.google.android.gm
app_70    2353  1953  148536 20896 ffffffff afe0da64 S com.noshufou.android.su
app_85    2358  1953  160732 24840 ffffffff afe0da64 S com.appspot.swisscodemonkeys.apps

The above is just a snapshot of the output of "ps".

Question is are all these applications really necessary to be running all the time?   Why is the "calender" application running all the time, can it be loaded into memory only upon requested and triggered by the user? Perhaps it is inherent in Android's design that these will have to be running/loaded pre-execution for performance reasons?   Then there must be some configuration panel to specify these (being loaded at bootup time)?

Tim Mensch

unread,
Jun 18, 2011, 12:16:57 PM6/18/11
to andro...@googlegroups.com
On 6/18/2011 1:51 AM, Peter Teoh wrote:
> This is Android-specific - not NDK, but I think this NDK community
> will have a better understanding to answer as it is beyond and below
> the Dalvik VM:
>
> Looking at the output of "ps" immediately after executing a "reboot"
> command inside adb:

I would guess that the NDK group isn't much better than the developer
group for this question. Each of the apps in that list has its own
reason for automatically starting up -- you mention the calendar, which
is probably always running so it can sync events and sound alarms, but I
don't know what the others might need to be doing.

For apps you've downloaded, you should talk to their creators and ask
them why they're on at start-up. For other parts of the Android
ecosystem, you might try android-porting, since folks on that list
rebuild the core and are more likely to know what the system processes do.

Tim

Dianne Hackborn

unread,
Jun 18, 2011, 2:56:07 PM6/18/11
to andro...@googlegroups.com
Also start with just learning the basics of how Android applications work.  Which is also something that regular non-NDK developers would be able to help you with (in fact I think every one of those apps you list is a regular non-NDK app).


Or heck just go to the Running Services UI in Settings to see why each of the applications are running.  Starting with Android 2.3 this also lets you see the list of all of the background cached processes.

If you want to dig in to more detail, use "adb shell dumpsys activity" to look at the state of the system.  Use "adb shell dumpsys activity -h" for help text.  And "adb shell dumpsys activity processes" for a list of all of the processes with many details on their state, including what they are running.


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.




--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

Reply all
Reply to author
Forward
0 new messages