You can see the following threads with Eclipse DDMS:
Signal catcher
Heap Worker
Main thread
Binder Thread #1
Binder Thread #2
So what are all these threads for?
In the Android system, both the Java and C++/C layers can create threads. However, the threads created by the Java layer are ultimately implemented by the C++/C layer.Use the Ddms tool to view the thread information contained in the virtual machine instance process (except the zygote itself and the process created by native code, such as Vold). such as thread name, ID number, status, user time, and system time.
You can see that the general one virtual machine instance process contains the following 7 generic threads, the following roughly describe the role of these threads and the creation process.
1. Main
This is the main thread. Details of the process are described in detail.
2. Heapworker
An asynchronous worker thread that handles heap operations that need to be done in a separate thread to avoid synchronization problems. Its source code is in the Dalvik/vm/alloc/heapworker.* section.
3. Signal Catcher
This thread is used to capture the Linux signal and do some post-processing. For example, when a sigquit (ctrl-\) signal arrives, the thread suspends the virtual machine and prints the status information of all threads to log. Its source code is in the Dalvik/vm/signalcatcher.* section.
4. JDWP
This thread is used to implement the Java Debug Wire protocol. If the command-line debugger has a parameter of "Suspend=y", the virtual machine is paused. This estimate is related to debugging tools such as Eclipse Debugging and Ddms. Its source code is in the dalvik/vm/jdwp/* section.
5. Stdio Converter
This thread reads information from standard output and standard error output and converts them to log information. Its source code is in the Dalvik/vm/stdioconverter.* section.
6. Compiler
The Android ' s JIT is independent of the target platform's parts. Its source code in the dalvik/vm/compiler/compiler.* and dalvik/vm/interp/jit.* and other parts.
7. Binder Thread #%d
The thread that is used to communicate using binder. Its source code in frameworks/base/libs/binder/* and other parts.
The following threads belong to the System_server and application proprietary threads, depending on the specific application requirements.
8. System_server Proprietary
Android.server.ServerThread
Activitymanager
Processstats
Packagemanager
Fileobserver
Accountmanagerservice
Synchandlerthread
Ueventobserver
Powermanagerservice
Alarmmanager
WindowManager
Inputdevicereader
Windowmanagerpolicy
Inputdispatcher
Connectivitythread
Wifiservice
Wifiwatchdogthread
Locationmanagerservice
Audioservice
Gpseventthread
Gpsnetworkthread
Android.hardware.sensormanager$sensorthread
Watchdog
Wallpaper
Com.android.server.MountListener
9. Misc
Other parts of the thread are provided by the Java Layer API, thread, and so on.