2017( 제 10 회 ) 한국소프트웨어아키텍트대회 2017. 7. 20. 티온소프트김수현 shkim.hi@gmail.com
목차 1 Android OS Layer Architecture 2 Android Technical Architecture 3 Android Multimedia Architecture 2
Android OS Layer Architecture 안드로이드 OS 버전 버전이름 API 레벨리눅스커널 버전이름 API 레벨리눅스커널 1.5 컵케이크 (Cupcake) 3 2.6.27 1.6 도넛(Donut) 4 2.6.29 4.0 아이스크림샌드위치 (Icecream Sandwitch) 4.1 젤리빈(Jellybean) 14, 15(4.0.4) 3.0.1 16, 17, 3.0.31 18(4.3.1) 3.4 2.0 에클레어 (Éclair) 5, 6, 7(2.1) 2.6.29 4.4 킷캣 (Kitkat) 19 3.4 2.2 프로요 (Froyo) 8 2.6.32 5.0 롤리팝 (Lollipop) 21, 22(5.1.1) 3.4 2.3 진저브레드 (Gingerbread) 9, 10(2.3.7) 2.6.35 6.0 마시멜로 (Marshmallow) 23 3.10.83 3.0 허니콤 (Honeycomb) 11,12,13(3.2.6) 2.6.36 7.0 누가 (Nougat) 24, 25 4.7.2 3
Android OS Layer Architecture 안드로이드 OS 버전과시장점유율 (2017.5.2 수집 ) 출처 : developer.android.com 4
Android OS Layer Architecture 출처 : developer.android.com 5
Android OS Layer Architecture ART(Dalvik) VM 출처 : developer.android.com 6
Android OS Layer Architecture Real Target OS = AOSP+ Linux Kernel + HAL+ GMS(Compatibility Program) 출처 : www.kandroid.org 7
목차 1 Android OS Layer Architecture 2 Android Technical Architecture 3 Android Multimedia Architecture 8
Android Technical Architecture Native 출처 : developer.android.com 9
Android Technical Architecture Android App. (JAVA) Binder App. Framework (JAVA) Java System Services Native Framework (C/C++) HAL Binder Android (Linux) Kernel Ashmem Logger ART Virtual Machine JNI Native System Services Native Libraries 10
Android Technical Architecture Android Application Framework - API 기반인터페이스제공 Activity Manager View System Window Manager Package Manager Power Manager Telephony Manager -Android 애플리케이션의Life Cycle 을관리 - 표준 widget 담당 - 모든응용프로그램과관련된화면담당 - 시스템에서동작중인응용프로그램들의정보담당 -Android 애플리케이션과프레임웍단의저전력제어 -Telephony 관련Android 애플리케이션들에게모뎀서비스제공및모뎀제어. 11
Android Technical Architecture Android Application Framework Application 핵심 Components 제공 Android Application Architecture 출처 : http://androidhuman.com/244 출처 : debveloper.android.com 12
Android Technical Architecture Android Application Framework Binder 기반시스템서비스제공 출처 : www.kandroid.org 13
Android Technical Architecture Android Application Framework Binder 기반시스템서비스제공 getservice() addservice() Use Services ServiceManager (ContextManager) ServiceProvider (System Services) ServiceUsers (Applications) Binder (/dev/binder) 14
Android Technical Architecture Android Application Framework Proxy/Stub 패턴의 Binder IPC 구조 23 출처 : Douglas C. Schmidt 15
Android Technical Architecture Client obj_aa = getsystemservice(aa); obj_aa.a(); interface IAA { int a(); float b (); obj_aa.b(); Application.java } IAA.aidl IAA.Stub.Proxy a() {mremote.transact (code, data, reply)} Bider IPC 메시지 RPC code Service class AA { int aa(); float bb(); int cc(); int dd(); } AA.java IAA.Stub ontransact() {****} Service Layer RPC Layer 안드로이드바인더계층구조native tranasct(); BinderProxy.java transact() { + handle, transact() } BpBinder.cpp IPCThreadState.cpp RPC data Binder Handle Binder Protocol Binder.java exectransact() { ontransact() } JavaBBinder.cpp ontransact() { exectransact() } BBinder.cpp transact() { ontransact() } IPC Layer transact(+protiocol); talkwithdriver(){ ioctl() } Binder Driver (/dev/binder) IPCThreadState.cpp talkwithdriver(){ ioctl() }; execcommand() { transact() } 16
Android Technical Architecture Android Runtime ART(Dalvik) Virtual Machine - 임베디드환경에최적화된독자적인가상머신 - 애플리케이션의호환성과실행일관성을제공 - 최적화된포맷 (.dex) 과Dalvik 바이트코드실행 - 다양한가상머신프로세스들을지원 - 최적화된바이트코드인터프리터기반 - 실행시메모리를효율적으로사용 Core Libraries - 단순하고익숙한개발플랫폼을제공하는Java 언어를위한Core API들을포함 -Data Structure, Utility, File Access, Network Access, Graphics 등이포함 -Apache Harmony Open Source Java SE 17
Android Technical Architecture ART Runtime & JNI(Java Native Interface) 안드로이드애플리케이션패키지 (.apk) (JNI) 출처 : Distributedand Cloud Computing Lab., Sogang University 18
Android Technical Architecture Android Native Libraries Bionic Libc - 임베디드에서사용을위해최적화된libc -BSD 라이선스를따름 Native Services - AudioFlinger - SurfaceFlinger - MediaPlayer -Camera -Radio OpenGL/ES EGL - 모든응용프로그램과관련된화면담당 SQLite -Android 내장데이터베이스엔진 - 오픈소스엔진 WebKit/ Chrome -Android 웹브라우저엔진 - 오픈소스엔진 External Native Libraries - bison,clang -Media Fw -libgsm -libdrm -smali. 19
Android Technical Architecture HAL (Hardware Abstraction Layer) HAL Libraries -Android 가요구하는H/W 에대한driver 추상화layer -Android 가정의한API 에맞게구현하여야동작함 -Low level 커널드라이버와안드로이드interface 간중간단에위치 - 개발자가구현하기쉽게통일된APIs 로구성 - 모든제조사가자신의component 를안드로이드플랫폼에넣을수있게구성됨 20
Android Technical Architecture Android Kernel (Linux Kernel) Kernel Key Functions - 프로세스관리 - 메모리관리 - 파일시스템관리 - 디바이스관리 - 네트웍관리 Binder IPC -Android 애플리케이션프로세스간통신제어와응용들에게시스템서비스제공을위한기능 Ashmen IPC -Android 애플리케이션의공유메모리제어를위한기능 WakeLock -Android 애플리케이션저전력제어를위한기능 Low Memory Killer - 시스템메모리부족시 Android 애플레케이션제어기능 Logger -Android 애플리케이션및시스템로그제어를위한기능. 21
목차 1 Android OS Layer Architecture 2 Android Technical Architecture 3 Android Multimedia Architecture 22
Android Multimedia Architecture 출처 : Chin-Feng Lai, Assistant Professor, institute of CSIE, National Ilan University, MMN Lab. 23
Android Multimedia Architecture 출처 : Chin-Feng Lai, Assistant Professor, institute of CSIE, National Ilan University, MMN Lab. 24
Android Multimedia Architecture Main Linux Audio Driver 출처 : Chin-Feng Lai, Assistant Professor, institute of CSIE, National Ilan University, MMN Lab. 25
안드로이드가그리는방식방식Android Multimedia Architecture 출처 : www.kandroid.org 26 그리는안드로이드가
2017( 제 10 회 ) 한국소프트웨어아키텍트대회 2017. 7. 20. 티온소프트김수현 shkim.hi@gmail.com