This article is based Android 4.2.2 from the process / The document's perspective Android Camera subsystem.
Androidcamera The overall architecture of the subsystem is divided into two parts of the client and server, which are built on the basis of the Android inter-process communication mechanism binder.
View process
[Email protected]:/# PS
USER PID PPID vsize RSS Wchan PC NAME
Media 1012 1 37484 8740 FFFFFFFF 4016bfe8 S/system/bin/mediaserver
u0_a142119 1010 162156 31244 ffffffff 4007cee4 S Com.android.camera
View Threads
[Email protected]:/# ps-t
Userpid PPID vsize RSS Wchan PC NAME
media1012 1 37484 8740 ffffffff 4016bfe8 s/system/bin/mediaserver
media1191 1012 37484 8740 c0042004 4016d108 S Audiocommand
media1192 1012 37484 8740 c0042004 4016d108 S Apmcommand
media1208 1012 37484 8740 c0042004 4016d108 S audioout_2
media1209 1012 37484 8740 C02B2FFC 4016bfe8 S binder_1
media1519 1012 37484 8740 C02B2FFC 4016bfe8 S binder_2
media2055 1012 37484 8740 C02B2FFC 4016bfe8 S binder_3
media2362 1012 37484 8740 c0042004 4016d108 S timedeventqueue
media2363 1012 37484 8740 c0042004 4016d108 S. Vorbis.decoder
media2364 1012 37484 8740 c0042004 4016d108 S omxcallbackdisp
media2365 1012 37484 8740 c0042004 4016d108 S timedeventqueue
media2366 1012 37484 8740 c0042004 4016d108 S. Vorbis.decoder
media2367 1012 37484 8740 c0042004 4016d108 S omxcallbackdisp
media2368 1012 37484 8740 00000000 4016d6a4 R camerapreviewth
media2369 1012 37484 8740 c0042004 4016d108 S cameraautofocus
u0_a142119 1010 162156 31244 ffffffff 4007cee4 S Com.android.camera
u0_a142122 2119 162156 31244 c0042004 4007d108 S GC
u0_a142124 2119 162156 31244 c0026658 4007c9c8 S Signal Catcher
u0_a142125 2119 162156 31244 c0364f54 4007cbd0 S JDWP
u0_a142126 2119 162156 31244 c0042004 4007d108 S Compiler
u0_a142127 2119 162156 31244 c0042004 4007d108 S referencequeued
u0_a142128 2119 162156 31244 c0042004 4007d108 S Finalizerdaemon
u0_a142129 2119 162156 31244 c0042004 4007d108 S finalizerwatchd
u0_a142130 2119 162156 31244 c02b2ffc 4007bfe8 S binder_1
u0_a142131 2119 162156 31244 c02b2ffc 4007bfe8 S binder_2
u0_a142134 2119 162156 31244 c0042004 4007d108 S pool-1-thread-1
u0_a142136 2119 162156 31244 c00a5004 4007cee4 S cameraholder
u0_a142152 2119 162156 31244 c02b2ffc 4007bfe8 S binder_3
u0_a142375 2119 162156 31244 c0042004 4007d108 S soundpool
u0_a142376 2119 162156 31244 c0042004 4007d108 S soundpoolthread
u0_a142377 2119 162156 31244 c0042004 4007d108 S Thread-123
List Binder Service
[Email protected]:/# Service List
63media.audio_policy: [Android.media.IAudioPolicyService]
64media.camera: [Android.hardware.ICameraService]
65media.player: [Android.media.IMediaPlayerService]
66media.audio_flinger: [Android.media.IAudioFlinger]
View process virtual address space
Media 1012 1 37484 8740 ffffffff 4016bfe8 S/system/bin/mediaserver
[Email protected]:/# cat/proc/1012/maps
401f7000-40215000r-xp 00000000 00:11 637/system/lib/libbinder.so
40215000-4021a000r--p 0001d000 00:11 637/system/lib/libbinder.so
4021a000-4021b000rw-p 00022000 00:11 637/system/lib/libbinder.so
4025a000-4025b000r-xp 00000000 00:11 524/system/lib/libhardware.so
4025b000-4025c000r--p 00000000 00:11 524/system/lib/libhardware.so
4025c000-4025d000rw-p 00001000 00:11 524/system/lib/libhardware.so
40451000-40467000r-xp 00000000 00:11 585/system/lib/libcamera_client.so
40467000-40468000---P 00000000 00:00 0
40468000-4046d000r--p 00016000 00:11 585/system/lib/libcamera_client.so
4046d000-4046e000rw-p 0001b000 00:11 585/system/lib/libcamera_client.so
40581000-40586000r-xp 00000000 00:11 636/system/lib/libhardware_legacy.so
40586000-40587000r--p 00004000 00:11 636/system/lib/libhardware_legacy.so
40587000-40588000rw-p 00005000 00:11 636/system/lib/libhardware_legacy.so
4059c000-405d4000r-xp 00000000 00:11 655/system/lib/libcameraservice.so
405d4000-405d8000r--p 00037000 00:11 655/system/lib/libcameraservice.so
405d8000-405d9000rw-p 0003b000 00:11 655/system/lib/libcameraservice.so
405d9000-405dc000r-xp 00000000 00:11 582/system/lib/libcamera_metadata.so
405dc000-405dd000r--p 00002000 00:11 582/system/lib/libcamera_metadata.so
405dd000-405de000rw-p 00003000 00:11 582/system/lib/libcamera_metadata.so
40b12000-40b1f000r-xp 00000000 00:11 569/system/lib/hw/camera.sama5d3-ek.so
40b1f000-40b20000r--p 0000c000 00:11 569/system/lib/hw/camera.sama5d3-ek.so
40b20000-40b21000rw-p 0000d000 00:11 569/system/lib/hw/camera.sama5d3-ek.so
41eb5000-41eb7000r-xp 00000000 00:11 565/system/lib/hw/gralloc.sama5d3-ek.so
41eb7000-41eb8000r--p 00001000 00:11 565/system/lib/hw/gralloc.sama5d3-ek.so
41eb8000-41eb9000rw-p 00002000 00:11 565/system/lib/hw/gralloc.sama5d3-ek.so
42264000-42426000rw-s 3f200000 00:0b 554/dev/video1
u0_a142119 1010 162156 31244 ffffffff 4007cee4 S Com.android.camera
[Email protected]:/# cat/proc/2119/maps
40130000-4014e000r-xp 00000000 00:11 637/system/lib/libbinder.so
4014e000-40153000r--p 0001d000 00:11 637/system/lib/libbinder.so
40153000-40154000rw-p 00022000 00:11 637/system/lib/libbinder.so
40154000-401e5000r-xp 00000000 00:11 598/system/lib/libandroid_runtime.so
401e5000-401e6000---P 00000000 00:00 0
401e6000-401ea000r--p 00091000 00:11 598/system/lib/libandroid_runtime.so
401ea000-401f0000rw-p 00095000 00:11 598/system/lib/libandroid_runtime.so
404e9000-404ff000r-xp 00000000 00:11 585/system/lib/libcamera_client.so
404ff000-40500000---P 00000000 00:00 0
40500000-40505000r--p 00016000 00:11 585/system/lib/libcamera_client.so
40505000-40506000rw-p 0001b000 00:11 585/system/lib/libcamera_client.so
44cfe000-44cff000r--s 003c4000 00:11 160/system/framework/framework.jar
44cff000-456f2000r--p 00000000 00:12 107/data/dalvik-cache/[email protected]@[email protected]
456f2000-457b3000rw-p 00000000 00:04 1203/dev/ashmem/dalvik-aux-structure (Deleted)
4939a000-493a2000r--s 0010c000 00:11 195/system/app/legacycamera.apk
493a2000-493ef000r--s 000bc000 00:11 195/system/app/legacycamera.apk
493ef000-493f7000r--s 0010c000 00:11 195/system/app/legacycamera.apk
493f7000-49447000r--p 00000000 00:12 485/data/dalvik-cache/[email protected]@[email protected]
49447000-49450000rw-p 00000000 00:04 3819/dev/ashmem/dalvik-aux-structure (Deleted)