application framework internals and debugging #1 · 2011-10-18 · anatomy based on prelink &...
TRANSCRIPT
www.kandroid.org 운영자 : 양정수 (yangjeongsoo at gmail.com), 닉네임: 들풀
The Gate of the AOSP #1 : Debugging and Internals
2011. 10. 17.
Application Framework Internals and Debugging #1
8th Kandroid Conference
28th Kandroid Conference - www.kandroid.org
안드로이드와 칸드로이드에 대한 간단한 소개
2007.11. 구글 OHA 결성 및 안드로이드 SDK 발표
2007.12. kandroid.org 도메인 등록
Domain Name: KANDROID.ORG Created On: 10-Dec-2007 02:46:07 UTC Organization: OVERNAVI, INC.
㈜오버나비는 kandroid.org 운영을 위한 Paper Company: 무보수 대표이사 1명, 직원 0명
2011.4. kandroid 운영진 구성 – 들풀,인베인,이광우,소오강호
www.android.com vs. www.kandroid.org
“The passion is not speed, but Direction !” - kandroid"Speed is irrelevant if you are going in the wrong direction." - M. Gandhi
38th Kandroid Conference - www.kandroid.org
기존 Kandroid Conference에 대한 간단한 평가
1회(2008.3)
2회(2008.11)
3회(2009.3)
4회 : #1(2009.10)
4회 : #2(2009.10)
5회 : #1(2010.3)
5회 : #1(2010.3)
6회(2010.10)
7회(2011.3)
구글안드로이드와망개방
오픈 모바일플랫폼과 오픈에코시스템
Android Insight in Mobile Market
Android를둘러싼 Market Dynamics와미래
안드로이드 바인더(Binder)
Android 주요MarketDynamics와방향성 조망
안드로이드의진화:통제와 확산
안드로이드타블렛디바이스만들기
Android UI Framework
오픈 모바일플랫폼과 마켓
구글안드로이드와애플 iPhone비교분석
ARM and Linux DriverModel
Android for mobileconvergence platform
Android Security Features
Hybrid 안드로이드 어플리케이션의 현재와미래
ImplementingPush Service on Android
Binder of Borderless World
안드로이드미디어프레임워크의이해
안드로이드플랫폼 Stack및포팅 가이드
안드로이드Market & ADC II 대응전략
Linux and Android Start-up
Android Mobile Product Planning
Android HardwareFeatures
Strategy and Android
Android AR(ArgumentedReality)
The Anatomy of Nexus One
Hitchhiker’s Guide to NDK
SUN JavaVM 과 Dalvik VM 이슈
안드로이드Internals & Target Porting
Android HAL : Case Study
Android 단말 개발시의고려사항
Android Build System :Vender Example
안드로이드가개발자의미래가 되려면
Android App개발 환경구축 사례
Media Market Evolution & Android
MPCore Overview
구글안드로이드커널 이슈
안드로이드Open Source 및 상용화이슈
Using Repo(GIT) to maintain Android
Smartphone and Qualcomm Android Platform
Android Testing Technology
KT & Android – Android Development Issues
ProfilingAndroid System for the Performance
Flash Player/AIRon Android
Power Management& Battery Life
안드로이드개발자 챌린지및 New BM
Android Application Tech. Issue and Biz. Model
How to deal with Android Compatibility Issue?
Zygote Anatomy based on Prelink &Preload for Androiod Platform
Smartphone Outlook and Android MM Overview
Optimizing Android Performance with GCC
What is ChromeOS ?
Network Stack and Enhancement
Android past, present, and future
Android Window and View System
Smartphone& Android Trends
Q&A with Google
Google GMS 분석(I)
Google GMS 분석 (II)
48th Kandroid Conference - www.kandroid.org
왜 애플리케이션 프레임워크를 분석하는가?
A PPL I CAT IONS
HomeAlarmCameraBrowserIMSMS/MMSDialerAlarm
…ClockAlbumsMedia PlayerCalendarEmailVoice DialContacts
A PPL I CAT ION F RAMEWORK
ActivityManager
PackageManager
WindowManager
TelephonyManager
ContentProvider
ResourceManager
ViewSystem
LocationManager
NotificationManager
…
L IBRAR I E S
Surface Manager
A NDRO ID RUNT IME
Dalvik Virtual Machine
Core Libraries
HARDWARE ABSTRACT ION LAYER
Graphics Audio Camera Bluetooth GPS Radio(RIL) WiFi …
L INUX K ERNEL
Display Driver Camera Driver Bluetooth Driver Shared MemoryDriver
Binder (IPC)Driver
USB Driver Keypad Driver WiFi Driver AudioDriver
PowerManagement
OpenGL|ES
SGL
Media Framework
FreeType
SSL
SQLite
WebKit
Libc
A PPL I CAT IONS
HomeHomeAlarmAlarmCameraCameraBrowserBrowserIMIMSMS/MMSSMS/MMSDialerDialerAlarmAlarm
……ClockClockAlbumsAlbumsMedia PlayerMedia PlayerCalendarCalendarEmailEmailVoice DialVoice DialContactsContacts
A PPL I CAT ION F RAMEWORK
ActivityManagerActivityManager
PackageManagerPackageManager
WindowManagerWindowManager
TelephonyManager
TelephonyManager
ContentProviderContentProvider
ResourceManagerResourceManager
ViewSystemView
System
LocationManagerLocationManager
NotificationManager
NotificationManager
……
L IBRAR I E S
Surface ManagerSurface Manager
A NDRO ID RUNT IME
Dalvik Virtual MachineDalvik Virtual Machine
Core LibrariesCore Libraries
HARDWARE ABSTRACT ION LAYER
GraphicsGraphics AudioAudio CameraCamera BluetoothBluetooth GPSGPS Radio(RIL)Radio(RIL) WiFiWiFi ……
L INUX K ERNEL
Display DriverDisplay Driver Camera DriverCamera Driver Bluetooth DriverBluetooth Driver Shared MemoryDriver
Shared MemoryDriver
Binder (IPC)Driver
Binder (IPC)Driver
USB DriverUSB Driver Keypad DriverKeypad Driver WiFi DriverWiFi Driver AudioDriverAudioDriver
PowerManagement
PowerManagement
OpenGL|ESOpenGL|ES
SGLSGL
Media FrameworkMedia Framework
FreeTypeFreeType
SSLSSL
SQLiteSQLite
WebKitWebKit
LibcLibc
The Higher Level
The Lower Level
58th Kandroid Conference - www.kandroid.org
User application Process
ActivityThread
Activity • onCreate()• onStart()• onResume()• onPause()• onStop()• onDestory()• onRestart()
왜 애플리케이션 프레임워크를 분석하는가?
Looper
MessageQueue
Service• onCreate()• onStartCommand()• onBind()• onUnbind()• onDesstory()
BroadcastReceiver• onReceive()
ContentProvider• onCreate()
View• onMeasure()• onLayout()• onDraw()
H
handleMessage()
ViewRoot
handleMessage()
Custom구현
main()
Process와 Thread의경계선을 넘고 있음
Process와 Thread의경계선을 넘고 있음
68th Kandroid Conference - www.kandroid.org
기초지식 정리 : Binder IPC 메커니즘
1회(2008.3)
2회(2008.11)
3회(2009.3)
4회 : #1(2009.10)
4회 : #2(2009.10)
5회 : #1(2010.3)
5회 : #1(2010.3)
6회(2010.10)
7회(2011.3)
구글안드로이드와망개방
오픈 모바일플랫폼과 오픈에코시스템
Android Insight in Mobile Market
Android를둘러싼 Market Dynamics와미래
안드로이드 바인더(Binder)
Android 주요MarketDynamics와방향성 조망
안드로이드의진화:통제와 확산
안드로이드타블렛디바이스만들기
Android UI Framework
오픈 모바일플랫폼과 마켓
구글안드로이드와애플 iPhone비교분석
ARM and Linux DriverModel
Android for mobileconvergence platform
Android Security Features
Hybrid 안드로이드 어플리케이션의 현재와미래
ImplementingPush Service on Android
Binder of Borderless World
안드로이드미디어프레임워크의이해
안드로이드플랫폼 Stack및포팅 가이드
안드로이드Market & ADC II 대응전략
Linux and Android Start-up
Android Mobile Product Planning
Android HardwareFeatures
Strategy and Android
Android AR(ArgumentedReality)
The Anatomy of Nexus One
Hitchhiker’s Guide to NDK
SUN JavaVM 과 Dalvik VM 이슈
안드로이드Internals & Target Porting
Android HAL : Case Study
Android 단말 개발시의고려사항
Android Build System :Vender Example
안드로이드가개발자의미래가 되려면
Android App개발 환경구축 사례
Media Market Evolution & Android
MPCore Overview
구글안드로이드커널 이슈
안드로이드Open Source 및 상용화이슈
Using Repo(GIT) to maintain Android
Smartphone and Qualcomm Android Platform
Android Testing Technology
KT & Android – Android Development Issues
ProfilingAndroid System for the Performance
Flash Player/AIRon Android
Power Management& Battery Life
안드로이드개발자 챌린지및 New BM
Android Application Tech. Issue and Biz. Model
How to deal with Android Compatibility Issue?
Zygote Anatomy based on Prelink &Preload for Androiod Platform
Smartphone Outlook and Android MM Overview
Optimizing Android Performance with GCC
What is ChromeOS ?
Network Stack and Enhancement
Android past, present, and future
Android Window and View System
Smartphone& Android Trends
Q&A with Google
Google GMS 분석(I)
Google GMS 분석 (II)
1
2
3
기존 Kandroid Conference에서 다루었던 내용
1. Open Binder에 대한 설명2. Binder Kernel Driver Protocol 설명3. Binder Performance와 Security에 대한 설명
Binder와 관련된 중요한 주제
1. 왜 안드로이드는 기존의 표준 Linux IPC가 아닌Custom IPC 설비인 Binder를 사용하는가 ?
2. Binder IPC 설비란 무엇이며, 어떻게 사용되고 있는가 ?
78th Kandroid Conference - www.kandroid.org
기초지식 정리 : 메모리 모델
1회(2008.3)
2회(2008.11)
3회(2009.3)
4회 : #1(2009.10)
4회 : #2(2009.10)
5회 : #1(2010.3)
5회 : #1(2010.3)
6회(2010.10)
7회(2011.3)
Android past, present, and future
Android Window and View System
Smartphone& Android Trends
Q&A with Google
Google GMS 분석(I)
Google GMS 분석 (II)
구글안드로이드와망개방
오픈 모바일플랫폼과 오픈에코시스템
Android Insight in Mobile Market
Android를둘러싼 Market Dynamics와미래
안드로이드 바인더(Binder)
Android 주요MarketDynamics와방향성 조망
안드로이드의진화:통제와 확산
안드로이드타블렛디바이스만들기
Android UI Framework
오픈 모바일플랫폼과 마켓
구글안드로이드와애플 iPhone비교분석
ARM and Linux DriverModel
Android for mobileconvergence platform
Android Security Features
Hybrid 안드로이드 어플리케이션의 현재와미래
ImplementingPush Service on Android
Binder of Borderless World
안드로이드미디어프레임워크의이해
안드로이드플랫폼 Stack및포팅 가이드
안드로이드Market & ADC II 대응전략
Linux and Android Start-up
Android Mobile Product Planning
Android HardwareFeatures
Strategy and Android
Android AR(ArgumentedReality)
The Anatomy of Nexus One
Hitchhiker’s Guide to NDK
SUN JavaVM 과 Dalvik VM 이슈
안드로이드Internals & Target Porting
Android HAL : Case Study
Android 단말 개발시의고려사항
Android Build System :Vender Example
안드로이드가개발자의미래가 되려면
Android App개발 환경구축 사례
Media Market Evolution & Android
MPCore Overview
구글안드로이드커널 이슈
안드로이드Open Source 및 상용화이슈
Using Repo(GIT) to maintain Android
Smartphone and Qualcomm Android Platform
Android Testing Technology
KT & Android – Android Development Issues
ProfilingAndroid System for the Performance
Flash Player/AIRon Android
Power Management& Battery Life
안드로이드개발자 챌린지및 New BM
Android Application Tech. Issue and Biz. Model
How to deal with Android Compatibility Issue?
Zygote Anatomy based on Prelink &Preload for Androiod Platform
Smartphone Outlook and Android MM Overview
Optimizing Android Performance with GCC
What is ChromeOS ?
Network Stack and Enhancement
1
3 4
2
기존 Kandroid Conference에서 다루었던 내용
1. Register 기반의 Dalvik VM과 JIT 도입 가능성2. 리눅스 커널의 Low Memory Killer 설명3. 안드로이드의 Zygote와 Preload & Prelink 기술 설명함4. Chrome OS에서도 Zygote 개념이 사용됨
안드로이드의 Memory Model과 관련된 중요한 주제
1. 안드로이드는 표준 OOM Killer와 Shared Memory에Custom LowMemoryKiller, Ashmem, PMem을 추가했는가?
2. 이들 각각에 대한 정확한 정의는?3. Dalvik VM의 Memory 사용, Heap 제약, GC 정책은?4. Native Memory와 관련된 몇가지 이슈들 및 변화?
88th Kandroid Conference - www.kandroid.org
기초지식 정리 : Process와 Thread 모델
1회(2008.3)
2회(2008.11)
3회(2009.3)
4회 : #1(2009.10)
4회 : #2(2009.10)
5회 : #1(2010.3)
5회 : #1(2010.3)
6회(2010.10)
7회(2011.3)
구글안드로이드와망개방
오픈 모바일플랫폼과 오픈에코시스템
Android Insight in Mobile Market
Android를둘러싼 Market Dynamics와미래
안드로이드 바인더(Binder)
Android 주요MarketDynamics와방향성 조망
안드로이드의진화:통제와 확산
안드로이드타블렛디바이스만들기
Android UI Framework
오픈 모바일플랫폼과 마켓
구글안드로이드와애플 iPhone비교분석
ARM and Linux DriverModel
Android for mobileconvergence platform
Android Security Features
Hybrid 안드로이드 어플리케이션의 현재와미래
ImplementingPush Service on Android
Binder of Borderless World
안드로이드미디어프레임워크의이해
안드로이드플랫폼 Stack및포팅 가이드
안드로이드Market & ADC II 대응전략
Linux and Android Start-up
Android Mobile Product Planning
Android HardwareFeatures
Strategy and Android
Android AR(ArgumentedReality)
The Anatomy of Nexus One
Hitchhiker’s Guide to NDK
SUN JavaVM 과 Dalvik VM 이슈
안드로이드Internals & Target Porting
Android HAL : Case Study
Android 단말 개발시의고려사항
Android Build System :Vender Example
안드로이드가개발자의미래가 되려면
Android App개발 환경구축 사례
Media Market Evolution & Android
MPCore Overview
구글안드로이드커널 이슈
안드로이드Open Source 및 상용화이슈
Using Repo(GIT) to maintain Android
Smartphone and Qualcomm Android Platform
Android Testing Technology
KT & Android – Android Development Issues
ProfilingAndroid System for the Performance
Flash Player/AIRon Android
Power Management& Battery Life
안드로이드개발자 챌린지및 New BM
Android Application Tech. Issue and Biz. Model
How to deal with Android Compatibility Issue?
Zygote Anatomy based on Prelink &Preload for Androiod Platform
Smartphone Outlook and Android MM Overview
Optimizing Android Performance with GCC
What is ChromeOS ?
Network Stack and Enhancement
Android past, present, and future
Android Window and View System
Smartphone& Android Trends
Q&A with Google
Google GMS 분석(I)
Google GMS 분석 (II)
2
기존 Kandroid Conference에서 다루었던 내용
1. 프로세스의 생성과 Zygote의 역할2. Binder RPC 설명시 Thread Migration 언급
Thread와 관련된 중요한 주제
1. Thread, Thread Local Storage란 무엇인가?2. Binder IPC Thread Pool과 Thread Migration이란?3. 안드로이드의 1 Process : 1 Thread 모델이란 무엇인가?4. NDK r5에서 도입된 NativeActivity에와 관련해서
threaded native app란 무엇인가?
1
98th Kandroid Conference - www.kandroid.org
기초지식 정리 : Event and Message Loop
1회(2008.3)
2회(2008.11)
3회(2009.3)
4회 : #1(2009.10)
4회 : #2(2009.10)
5회 : #1(2010.3)
5회 : #1(2010.3)
6회(2010.10)
7회(2011.3)
구글안드로이드와망개방
오픈 모바일플랫폼과 오픈에코시스템
Android Insight in Mobile Market
Android를둘러싼 Market Dynamics와미래
안드로이드 바인더(Binder)
Android 주요MarketDynamics와방향성 조망
안드로이드의진화:통제와 확산
안드로이드타블렛디바이스만들기
Android UI Framework
오픈 모바일플랫폼과 마켓
구글안드로이드와애플 iPhone비교분석
ARM and Linux DriverModel
Android for mobileconvergence platform
Android Security Features
Hybrid 안드로이드 어플리케이션의 현재와미래
ImplementingPush Service on Android
Binder of Borderless World
안드로이드미디어프레임워크의이해
안드로이드플랫폼 Stack및포팅 가이드
안드로이드Market & ADC II 대응전략
Linux and Android Start-up
Android Mobile Product Planning
Android HardwareFeatures
Strategy and Android
Android AR(ArgumentedReality)
The Anatomy of Nexus One
Hitchhiker’s Guide to NDK
SUN JavaVM 과 Dalvik VM 이슈
안드로이드Internals & Target Porting
Android HAL : Case Study
Android 단말 개발시의고려사항
Android Build System :Vender Example
안드로이드가개발자의미래가 되려면
Android App개발 환경구축 사례
Media Market Evolution & Android
MPCore Overview
구글안드로이드커널 이슈
안드로이드Open Source 및 상용화이슈
Using Repo(GIT) to maintain Android
Smartphone and Qualcomm Android Platform
Android Testing Technology
KT & Android – Android Development Issues
ProfilingAndroid System for the Performance
Flash Player/AIRon Android
Power Management& Battery Life
안드로이드개발자 챌린지및 New BM
Android Application Tech. Issue and Biz. Model
How to deal with Android Compatibility Issue?
Zygote Anatomy based on Prelink &Preload for Androiod Platform
Smartphone Outlook and Android MM Overview
Optimizing Android Performance with GCC
What is ChromeOS ?
Network Stack and Enhancement
Android past, present, and future
Android Window and View System
Smartphone& Android Trends
Q&A with Google
Google GMS 분석(I)
Google GMS 분석 (II)
1
기존 Kandroid Conference에서 다루었던 내용
1. 안드로이드 GUI 시스템의 구조를 다루고자 했으나GUI 핵심인 main loop를 언급하지 못한 한계가 있음
Event and Message Loop와 관련된 중요한 주제
1. Blocking vs. Non Blocking IO란 무엇인가?2. Multiplexed I/O 란 무엇인가?3. 안드로이드는 GUI 시스템의 핵심인 main loop를 어떻게 구현하고 있는가?4. NDK r5에서 도입된 NativeActivity를 위해 만들어진 ALooper란 무엇인가?
108th Kandroid Conference - www.kandroid.org
애플리케이션 프레임워크이란 무엇인가?
Application Framework에 대한 몇가지 정의들
• Application framework enabling reuse and replacement of components- www.android.com
• Application framework, a software framework used to implement the standard structure of an application for a specific operating system.
- wikipedia
“표준화된 구조의 애플리케이션을 구현하기 위해사용되는 소프트웨어적인 틀.”
안드로이드 애플리케이션 프레임워크를 명확히 하기 위한 몇가지 질문.
• 안드로이드는 왜 그러한 표준화된 틀을 제공하는가?• 안드로이드가 애플리케이션 개발자에게 제공하는 표준화된 틀은 무엇인가?• 이러한 표준화된 틀에서 개발자가 얻게되는 장점과 단점, 제약사항은 무엇인가?• 우리는 이 표준화된 틀의 개선에 참여, 개선을 주도,
또는 더 나아가 그 틀을 대체할 수 있는 무언가를 만들 수 있는가?
118th Kandroid Conference - www.kandroid.org
User application Process
ActivityThread
HelloAndroid
.apk
HelloAndroid
.apk
Activity • onCreate()• onStart()• onResume()• onPause()• onStop()• onDestory()• onRestart()
Looper
MessageQueue
Service• onCreate()• onStartCommand()• onBind()• onUnbind()• onDesstory()
BroadcastReceiver• onReceive()
ContentProvider• onCreate()
View• onMeasure()• onLayout()• onDraw()
H
handleMessage()
ViewRoot
handleMessage()
Custom구현
main()
Process와 Thread의경계선을 넘고 있음
Process와 Thread의경계선을 넘고 있음
왜 애플리케이션 프레임워크가 중요한가?
128th Kandroid Conference - www.kandroid.org
A PPL I CAT IONS
HelloAndroid.apk ( AndroidManifest.xml , Components, Libs, Resources, Signature )
A PPL I CAT ION F RAMEWORK
ActivityManagerActivityManager
PackageManagerPackageManager
WindowManagerWindowManager
TelephonyManager
TelephonyManager
ContentProviderContentProvider
ResourceManagerResourceManager
ViewSystemView
System
LocationManagerLocationManager
NotificationManager
NotificationManager
……
L IBRAR I E S
Surface ManagerSurface Manager
A NDRO ID RUNT IME
Dalvik Virtual MachineDalvik Virtual Machine
Core LibrariesCore Libraries
HARDWARE ABSTRACT ION LAYER
GraphicsGraphics AudioAudio CameraCamera BluetoothBluetooth GPSGPS Radio(RIL)Radio(RIL) WiFiWiFi ……
L INUX K ERNEL
Display DriverDisplay Driver Camera DriverCamera Driver Bluetooth DriverBluetooth Driver Shared MemoryDriver
Shared MemoryDriver
Binder (IPC)Driver
Binder (IPC)Driver
USB DriverUSB Driver Keypad DriverKeypad Driver WiFi DriverWiFi Driver AudioDriverAudioDriver
PowerManagement
PowerManagement
OpenGL|ESOpenGL|ES
SGLSGL
Media FrameworkMedia Framework
FreeTypeFreeType
SSLSSL
SQLiteSQLite
WebKitWebKit
LibcLibc
다음페이지계속
애플리케이션 프레임워크 정의 : 플랫폼 스택 관점
138th Kandroid Conference - www.kandroid.org
A PPL I CAT IONS
ActivityThread
A PPL I CAT ION F RAMEWORK
ActivityManagerActivityManager
PackageManagerPackageManager
WindowManagerWindowManager
TelephonyManager
ContentProviderContentProvider
ResourceManagerResourceManager
ViewSystemView
System
LocationManagerLocationManager
NotificationManager
NotificationManager
……
L INUX K ERNEL
Display DriverDisplay Driver
Camera DriverCamera Driver
Bluetooth DriverBluetooth Driver
Shared MemoryDriver
Shared MemoryDriver
Binder (IPC)Driver
Binder (IPC)Driver
USB DriverUSB Driver
Keypad DriverKeypad Driver
WiFi DriverWiFi DriverAudioDriverAudioDriver
PowerManagement
PowerManagement
L I BRAR I E S
Surface ManagerSurface Manager
RUNTIME
Dalvik Virtual Machine
Dalvik Virtual Machine
Core LibrariesCore Libraries
HAL GraphicsGraphics AudioAudio
CameraCamera BluetoothBluetooth GPSGPS Radio(RIL)Radio(RIL)
WiFiWiFi
……
OpenGL|ESOpenGL|ES
SGLSGL
Media Framework
Media Framework
FreeTypeFreeType
SSLSSL
SQLiteSQLite
WebKitWebKit
LibcLibc
L I BRAR I E S
Surface Manager
RUNTIME
Dalvik Virtual Machine
Dalvik Virtual Machine
Core LibrariesCore Libraries
HAL GraphicsGraphics AudioAudio
CameraCamera BluetoothBluetooth GPSGPS Radio(RIL)Radio(RIL)
WiFiWiFi
……
OpenGL|ESOpenGL|ES
SGLSGL
Media Framework
FreeTypeFreeType
SSLSSL
SQLiteSQLite
WebKitWebKit
LibcLibc
HelloAndroidHelloAndroid
Activity
Looper
MessageQueue
Service
Receiver
Provider
View
Hg ()
HandleMessage()
ViewRootg ()
HandleMessage()
main()Custom
구현
다음페이지계속
애플리케이션 프레임워크 정의 : 프로세스 관점
148th Kandroid Conference - www.kandroid.org
A PPL I CAT IONS
ActivityThread
system_server
ActivityManagerActivityManager
……
SurfaceFlingerSurfaceFlinger
SensorServiceSensorService
L INUX K ERNEL
Display DriverDisplay Driver
Camera DriverCamera Driver
Bluetooth DriverBluetooth Driver
Shared MemoryDriver
Shared MemoryDriver
Binder (IPC)Driver
Binder (IPC)Driver
USB DriverUSB Driver
Keypad DriverKeypad Driver
WiFi DriverWiFi DriverAudioDriverAudioDriver
PowerManagement
PowerManagement
L I BRAR I E S
Surface ManagerSurface Manager
RUNTIME
Dalvik Virtual Machine
Dalvik Virtual Machine
Core LibrariesCore Libraries
HAL GraphicsGraphics AudioAudio
CameraCamera BluetoothBluetooth GPSGPS Radio(RIL)Radio(RIL)
WiFiWiFi
……
OpenGL|ESOpenGL|ES
SGLSGL
Media Framework
Media Framework
FreeTypeFreeType
SSLSSL
SQLiteSQLite
WebKitWebKit
LibcLibcL I BRAR I E S
HAL
HelloAndroidHelloAndroid
Activity
Looper
MessageQueue
Service
Receiver
Provider
View
Hg ()
HandleMessage()
ViewRootg ()
HandleMessage()
main()Custom
구현
com.adroid.phone
TelephonyManager
TelephonyManager
L I BRAR I E S
RUNTIME
DVMDVM
CoreLib.CoreLib.
HAL
mediaserver
AudioFlingerAudioFlinger
MediaPlayerMediaPlayer
AudioPolicyAudioPolicy
CameraCamera
L I BRAR I E S
HAL GraphicsGraphics
……
SQLiteSQLite
WebKitWebKit
LibcLibc
SGLSGL
……
SQLiteSQLite
WebKitWebKit
LibcLibc
SGLSGL
……
RUNTIME
DVMDVM
CoreLib.CoreLib.
SQLiteSQLite
WebKitWebKit
LibcLibc
SGLSGL
……
GraphicsGraphics
……
GraphicsGraphics
……
다음페이지계속
애플리케이션 프레임워크 정의 : 프로세스 상세 관점
158th Kandroid Conference - www.kandroid.org
ActivityThreadbinderservice
ActivityManagerService
ActivityManagerService
……
LINUX KERNEL
Shared MemoryDriver
Shared MemoryDriver Binder (IPC) DriverBinder (IPC) Driver
L I BRAR I E S
RUNTIME
Dalvik Virtual Machine
Dalvik Virtual Machine
Core LibrariesCore Libraries
LIBRARIES
HelloAndroidHelloAndroid
Activity
Looper
MessageQueue
Service
Receiver
Provider
View
Hg ()
HandleMessage()
ViewRootg ()
HandleMessage()
main()Custom
구현
binderservice
TelephonyService
TelephonyService
RUNTIME
LIBRARIES
RUNTIME
LIBRARIES
WindowManagerService
WindowManagerService
binderservice
AudioFlingerAudioFlinger
……
binderservice
SurfaceFlingerService
SurfaceFlingerService
……
com.android.phone
system_server
mediaserver
servicemanager
LIBRARIES
binderservice
BinderContextManager
BinderContextManager
User Application Process( e x , o r g . k and ro i d . h e l l o and ro i d )
0x0:3:name:address0x0:3:name:handle
PermissionUnique Namename:handle
1
2
3
4
다음페이지계속
5
애플리케이션 프레임워크 정의 : IPC(Binder IPC) 관점
168th Kandroid Conference - www.kandroid.org
ActivityThreadBinder Service
ActivityManagerService
ActivityManagerService
LINUX KERNEL
Shared MemoryDriver
Shared MemoryDriver Binder (IPC) DriverBinder (IPC) Driver
L I BRAR I E S
RUNTIME
Dalvik Virtual Machine
Dalvik Virtual Machine
Core LibrariesCore Libraries
HelloAndroidHelloAndroid
Activity
Looper
MessageQueue
Service
Receiver
Provider
View
Hg ()
HandleMessage()
ViewRootg ()
HandleMessage()
main()Custom
구현
LIBRARIES
system_serverservicemanager
LIBRARIES
binderservice
BinderContextManager
BinderContextManager
User Application Process( e x , o r g . k and ro i d . h e l l o and ro i d )
PermissionUnique Nameactivity:0x1
4 RUNTIME
Dalvik Virtual Machine
Dalvik Virtual Machine
Core LibrariesCore Libraries
1
0x0:3:activity:0x…0x0:3:activity:0x1 2
35
0x0:1:activity 0x0:1:activity
6
7
8
9
10
activity:0x1
0x0000a000
애플리케이션 프레임워크 정의 : IPC(Binder IPC) 관점
178th Kandroid Conference - www.kandroid.org
ActivityThreadBinder Service
LINUX KERNEL
Shared MemoryDriver
Shared MemoryDriver Binder (IPC) DriverBinder (IPC) Driver
L I BRAR I E S
RUNTIME
Dalvik Virtual Machine
Dalvik Virtual Machine
Core LibrariesCore Libraries
HelloAndroidHelloAndroid
Activity
Looper
MessageQueue
Service
Receiver
Provider
View
Hg ()
HandleMessage()
ViewRootg ()
HandleMessage()
main()Custom
구현
LIBRARIES
system_serverservicemanager
LIBRARIES
binderservice
BinderContextManager
BinderContextManager
User Application Process( e x , o r g . k and ro i d . h e l l o and ro i d )
PermissionUnique Nameactivity:0x1
RUNTIME
Dalvik Virtual Machine
Dalvik Virtual Machine
Core LibrariesCore Libraries
activity:0x1
ActivityManagerService
ActivityManagerService
IActivityManager3 : startActivity…
IActivityManager3 : startActivity…
0x1:3:[parcel]
0x0000a000
BinderThreadPool
0x0000a000:3:[parcel]
BT #1
…
[parcel]
1
1
3
4다음페이지
계속?
애플리케이션 프레임워크 정의 : IPC(Binder IPC) 관점
188th Kandroid Conference - www.kandroid.org
ActivityThreadBinder Service
LINUX KERNEL
Shared MemoryDriver
Shared MemoryDriver Binder (IPC) DriverBinder (IPC) Driver
L I BRAR I E S
RUNTIME
Dalvik Virtual Machine
Dalvik Virtual Machine
Core LibrariesCore Libraries
HelloAndroidHelloAndroid
Activity
Looper
MessageQueue
Service
Receiver
Provider
View
Hg ()
HandleMessage()
ViewRootg ()
HandleMessage()
main()Custom
구현
LIBRARIES
system_serverservicemanager
LIBRARIES
binderservice
BinderContextManager
BinderContextManager
User Application Process( e x , o r g . k and ro i d . h e l l o and ro i d )
PermissionUnique Nameactivity:0x1
RUNTIME
Dalvik Virtual Machine
Dalvik Virtual Machine
Core LibrariesCore Libraries
activity:0x1
ActivityManagerService
ActivityManagerService
IActivityManager3 : startActivity…
IActivityManager3 : startActivity…
0x1:3:[parcel]
0x0000a000
BinderThreadPool
0x0000a000:3:[parcel]
BT #1
…
[parcel]
1
1
3
4
애플리케이션 프레임워크 정의 : IPC(Binder IPC) 관점
198th Kandroid Conference - www.kandroid.org
mediaserver
com.android.phonesystem_server
/dev/binder
daemons
• adbd• dspcrashd• akmd• keystore• installd• dbus-deamon• rild• debuggerd• netd• vold• Ueventd
2
6
5
7
안드로이드 구동 절차 : 프로세스 기반 (CLI : ps)
L INUX K ERNEL Binder IPC DriverBinder IPC Driver
zygote
4
Binder Service• ActivityManager• ….. ….. ….. …..
Binder Service• ActivityManager• ….. ….. ….. …..
Binder Service• Telephony
Service
Binder Service• Telephony
Service
Binder Service• SensorService• SurfaceFilnger
Binder Service• SensorService• SurfaceFilnger
Binder Service• AudioFlinger• MediaPlayer• AudioPolicy• Camera
Binder Service• AudioFlinger• MediaPlayer• AudioPolicy• Camera
servicemanager
3
BinderService• Binder
ContextManager
BinderService• Binder
ContextManager
A N D R O I D R U N T I M E
A N D R O I DR U N T I M E
1
init
208th Kandroid Conference - www.kandroid.org
L I BRAR I E S
Bionic libcBionic libc
main()
A NDRO ID RUNT IME
Dalvik Virtual MachineDalvik Virtual Machine
Core Libraries (resouces)Core Libraries (resouces)
JNI EnvJNI Env
Internal Library(Zygote …)
Internal Library(Zygote …)
LinkerLinker
……
app_processapp_process zygotezygote
Socket
SelectLoopMode
A NDRO ID RUNT IME
Dalvik Virtual MachineDalvik Virtual Machine
Core Libraries (resouces)Core Libraries (resouces)
JNI EnvJNI Env
Internal Library(SystemServer)Internal Library(SystemServer)
jdwp
Compiler
BT #1
BT #N
SignalCatcher
ServerThread
Looper
MessageQueue
Binder Service• Sensor
Service• Surface
Filnger
Binder Service• Sensor
Service• Surface
Filnger
Binder Service• Activity
Manager• ….. ….. …..
Binder Service• Activity
Manager• ….. ….. …..
forksystem_sever
forksystem_sever
안드로이드 프로세스 내부 : zygote와 system_server
218th Kandroid Conference - www.kandroid.org
L I BRAR I E S
Bionic libcBionic libc
A NDRO ID RUNT IME
Dalvik Virtual MachineDalvik Virtual Machine
Core Libraries (resouces)Core Libraries (resouces)
JNI EnvJNI Env
Internal Library(Zygote …)
Internal Library(Zygote …)
LinkerLinker
……
zygotezygote
SocketSelect
LoopMode
A NDRO ID RUNT IME
Dalvik Virtual MachineDalvik Virtual Machine
Core Libraries (resouces)Core Libraries (resouces)
JNI EnvJNI Env
Internal Library(ActivityThread)Internal Library(ActivityThread)
jdwp
Compiler
BT #1
BT #N
SignalCatcher
ActivityThread
Looper
MessageQueue
forkUser app.Process
forkUser app.Process
H
ViewRoot
안드로이드 프로세스 내부 : zygote와 user app. process
228th Kandroid Conference - www.kandroid.org
A NDRO ID RUNT IME
Dalvik Virtual MachineDalvik Virtual Machine
Core Libraries (resouces)Core Libraries (resouces)
Internal Library(ActivityThread)Internal Library(ActivityThread)
jdwp
Compiler
BT #1
BT #N
SignalCatcher
ActivityThread
Looper
MessageQueue
H
ViewRoot
A NDRO ID RUNT IME
Dalvik Virtual MachineDalvik Virtual Machine
Core Libraries (resouces)Core Libraries (resouces)
Internal Library(SystemServer)Internal Library(SystemServer)
jdwp
Compiler
BT #1
BT #N
SignalCatcher
ServerThread
Looper
MessageQueue
Binder Service• Sensor
Service• Surface
Filnger
Binder Service• Sensor
Service• Surface
Filnger
Binder Service
• ActivityManager
• ….. ….. …..
Binder Service
• ActivityManager
• ….. ….. …..
ActivityManagerActivityManager
attach
system_serversystem_server User App. ProcessUser App. Process
다음페이지계속
안드로이드 프로세스 내부 : system_server 와 user app. process
238th Kandroid Conference - www.kandroid.org
User application Process
ActivityThread
Looper
MessageQueue
HApplicationThreadApplicationThread
system_server
ActivityManagerService
ActivityManagerService
IActivityManager
IActivityManager.attachApplication( )
IApplicationThread
IApplicationThread.bindApplication()
IApplicationThread.scheduleLaunchActivity()
Zygote
IActivityManager.startActivity()
1
2 fork request
3 fork
5
6
7
8
9
sendMessage()
handleMessage()
&addrhandle
10
4
LAUNCH_ACTIVITY
안드로이드 프로세스 내부 : system_server 와 user app. process
248th Kandroid Conference - www.kandroid.org
User application Process
ActivityThread
HelloAndroid
.apk
HelloAndroid
.apk
Activity • onCreate()• onStart()• onResume()• onPause()• onStop()• onDestory()• onRestart()
Looper
MessageQueue
Service• onCreate()• onStartCommand()• onBind()• onUnbind()• onDesstory()
BroadcastReceiver• onReceive()
ContentProvider• onCreate()
View• onMeasure()• onLayout()• onDraw()
H
handleMessage()
ViewRoot
handleMessage()
sendMessage()
sendMessage()
ApplicationThread
Binder IPCThread Pool
BT #1
BT #N
Custom구현
다음페이지계속
안드로이드 프로세스 내부 : User App. Process 상세구조
258th Kandroid Conference - www.kandroid.org
User application Process
ActivityThread Hello
Android.apk
HelloAndroid
.apk
Activity • onCreate()• onStart()• onResume()• onPause()• onStop()• onDestory()• onRestart()
Looper
MessageQueue
View• onMeasure()• onLayout()• onDraw()
H
handleMessage()
ViewRoot
handleMessage()
sendMessage()
sendMessage()
ApplicationThread
Binder IPCThread Pool
BT #1
BT #N
Custom구현
Thread
YourCode
Runnable
Post(Runnable)
1
2
3
4
5
애플리케이션 제약사항 #1 : MainLooper를 멈추게 하지 말 것
268th Kandroid Conference - www.kandroid.org
User application Process
ActivityThread Hello
Android.apk
HelloAndroid
.apk
Looper
MessageQueue
H
handleMessage()
ViewRoot
handleMessage()
sendMessage()
sendMessage()
ApplicationThread
Binder IPCThread Pool
BT #1
BT #NBT #N
Custom구현
new Iservice.stub {
procudure_A( ) {
// ….}
}
new Iservice.stub {
procudure_A( ) {
// ….}
}
Service• onCreate()• onStartCommand()• onBind()• onUnbind()• onDesstory()
애플리케이션 제약사항 #2 : 쓰레드간 Conext 전환에 주의
278th Kandroid Conference - www.kandroid.org
애플리케이션 프레임워크 디버깅 : 디버깅전에 알아야 할 사항
1. Android Runtime 내의 Core Libraries란 무엇인가?2. SDK의 android.jar란 무엇인가?3. Device내의 /system/framework/ 디렉토리에 있는 jar 파일은 무엇인가?
A NDRO ID RUNT IME
Dalvik Virtual Machine
Dalvik Virtual Machine
Core LibrariesCore Libraries
1
2
3
288th Kandroid Conference - www.kandroid.org
L I BRAR I E S
Bionic libcBionic libc
main()
A NDRO ID RUNT IME
Dalvik Virtual MachineDalvik Virtual Machine
Core Libraries (resouces)Core Libraries (resouces)
JNI EnvJNI Env
Internal Library(Zygote …)
Internal Library(Zygote …)
LinkerLinker
……
app_processapp_process zygotezygote
SelectLoopMode
fork• system_sever• User App. Process
fork• system_sever• User App. Process
com.android.internal.os.ZygoteInit.java
public static void main(String argv[]) {
1: registerZygoteSocket();2: preloadClasses();
// preloaded-classes
preloadResources();
if (argv[1].equals("true")) {3: startSystemServer();
}
4: runSelectLoopMode();
}
Socket
1
2
3
4
애플리케이션 프레임워크 디버깅 : 고려사항 #1 - Core Libraries
/system/framework
• framework.jar• core.jar• bouncycastle.jar• ext.jar• android.policy.jar
298th Kandroid Conference - www.kandroid.org
애플리케이션 프레임워크 디버깅 : 고려사항 #2 - android.jar
관련된 AOSP 디렉토리
• /build/tools/droiddoc
DroidDoc.java• Java 코드내의
@hide, @pending 영역 숨김
Stubs.java• Dummy Java 파일 생성
• /build/tools/apicheck• /external/clearsilver
308th Kandroid Conference - www.kandroid.org
애플리케이션 프레임워크 디버깅 : 고려사항 #3 – /system/framework
dex 파일 분류
• android.policy.jar• bouncycastle.jar• core.jar• ext.jar• framework.jar
zygote에 의해preload되는라이브러리android.jar는이것의 부분집합임.
framework-res.apk zygote에 의해preload되는 리소스
• services.jar system_server 프로세스 생성을 위해zygote가 fork된 이후적재되는 라이브러리
android.test.runner.jarcom.android.location.provider.jarcore-junit.jar / javax.obex.jarsqlite-jdbc.jar
zygote에 의해 preload 되지 않은 라이브러리들
ime.jar / input.jar / bmgr.jarmonkey.jar / pm.jar / svc.jar / am.jar
/system/bin/ 디렉토리의shell script들을 위한라이브러리- input, bmgr, monkey, - pm, svc, am
ANDROID RUNTIME
Dalvik Virtual MachineDalvik Virtual Machine
Core Libraries
android.policy.jarandroid.policy.jar
core.jarcore.jar
ext.jarext.jar
framework.jarframework.jar
bouncycastle.jarbouncycastle.jar
service.jarservice.jar
318th Kandroid Conference - www.kandroid.org
애플리케이션 프레임워크 디버깅 : JDWP 개요
adb adb server adbd
DDMSJDWPDebugger
Dalvik Virtual Machine
Dalvik Virtual Machine
JDWPthread
Compiler
SignalCatcher
JNI EnvJNI Envjdwp
service
adb forward tcp:<hostport> jdwp:<pid>
The Dalvik VM (Virtual Machine) supports the JDWP(Java Debug Wire Protocol) protocol to allow debuggers to attach to a VM
328th Kandroid Conference - www.kandroid.org
애플리케이션 프레임워크 디버깅 : User App. Process
338th Kandroid Conference - www.kandroid.org
A NDRO ID RUNT IME
Dalvik Virtual MachineDalvik Virtual Machine
framework.jar(Zygote->ActivityThread)
framework.jar(Zygote->ActivityThread)
jdwpCompiler
SignalCatcher
User App. ProcessUser App. Process
ActivityThread HelloAndroidHelloAndroid
Activity
Looper
MessageQueue
Service
Receiver
Provider
View
Hg ()
HandleMessage()
ViewRootg ()
HandleMessage()
Custom구현
ApplicationThread
Binder IPCThread Pool
BT #1
BT #NJNI EnvJNI Env
core.jarcore.jar
ext.jarext.jar
android.policy.jarandroid.policy.jar
bouncycastle.jarbouncycastle.jar
애플리케이션 프레임워크 디버깅 : User App. Process
348th Kandroid Conference - www.kandroid.org
./frameworks/base/core/java/android/app/ActivityThread.java
3602 try {3603 mgr.attachApplication(mAppThread);3604 } catch (RemoteException ex) {3605 }3606 } else {
3607 // Don't set application object here -- if the system crashes,3608 // we can't display an alert, we just want to die die die.
3609 // android.ddm.DdmHandleAppName.setAppName("system_process");3610 android.ddm.DdmHandleAppName.setAppName("org.kandroid.systemserver");
3611 try {3612 mInstrumentation = new Instrumentation();3613 ContextImpl context = new ContextImpl();3614 context.init(getSystemContext().mPackageInfo, null, this);3615 Application app = Instrumentation.newApplication(Application.class, context);3616 mAllApplications.add(app);3617 mInitialApplication = app;3618 app.onCreate();3619 } catch (Exception e) {3620 throw new RuntimeException(3621 "Unable to instantiate Application():" + e.toString(), e);3622 }3623 }
애플리케이션 프레임워크 디버깅 : system_server
358th Kandroid Conference - www.kandroid.org
애플리케이션 프레임워크 디버깅 : system_server
368th Kandroid Conference - www.kandroid.org
애플리케이션 프레임워크 디버깅 : system_server
ServerThread
Looper
MessageQueue
Binder Service• Activity
Manager- startActivity()
• ….. ….. …..
Binder Service• Activity
Manager- startActivity()
• ….. ….. …..
A NDRO ID RUNT IME
Dalvik Virtual MachineDalvik Virtual Machine
jdwpCompiler
SignalCatcher
Binder IPCThread Pool
BT #1
BT #N
JNI EnvJNI Env
Zygote framework.jarZygote framework.jar
core.jarcore.jar
ext.jarext.jar
android.policy.jarandroid.policy.jar
bouncycastle.jarbouncycastle.jar
SystemServerservices.jar
SystemServerservices.jar
Binder Service• Sensor
Service• Surface
Filnger
Binder Service• Sensor
Service• Surface
Filnger
378th Kandroid Conference - www.kandroid.org
애플리케이션 프레임워크 디버깅 : system_server
388th Kandroid Conference - www.kandroid.org
ActivityThread
Binder Service
LINUX KERNEL
Shared MemoryDriver
Shared MemoryDriver Binder (IPC) DriverBinder (IPC) Driver
L I BRAR I E S
RUNTIME
Dalvik Virtual Machine
Dalvik Virtual Machine
Core LibrariesCore Libraries
HelloAndroidHelloAndroid
Activity
Looper
MessageQueue
Service
Receiver
Provider
View
Hg ()
HandleMessage()
ViewRootg ()
HandleMessage()
main()Custom
구현
LIBRARIES
system_serverservicemanager
LIBRARIES
binderservice
BinderContextManager
BinderContextManager
User Application Process( e x , o r g . k and ro i d . h e l l o and ro i d )
PermissionUnique Nameactivity:0x1
RUNTIME
Dalvik Virtual Machine
Dalvik Virtual Machine
Core LibrariesCore Librariesactivity:0x1
ActivityManagerService
ActivityManagerService
IActivityManager3 : startActivity…
IActivityManager3 : startActivity…
0x1:3:[parcel]
0x0000a000
BinderThreadPool
0x0000a000:3:[parcel]
BT #1
…
[parcel]
1
1
3
4
애플리케이션프레임워크 디버깅
system_server
398th Kandroid Conference - www.kandroid.org
Binder에 대한 정의는? Small Custom Kernel Driver 와 Binder C++ Library
Binder IPC를 사용하는 이유? Thread Migration
Binder IPC를 상세하게 이해하기 위한 좋은 방법은? Binder 관련 모듈 분리
기존 Kandroid Conference에서 다루었던 내용
1. Open Binder에 대한 설명2. Binder Kernel Driver Protocol 설명3. Binder Performance와 Security에 대한 설명
Binder와 관련된 중요한 주제
1. 왜 안드로이드는 기존의 표준 Linux IPC가 아닌Custom IPC 설비인 Binder를 사용하는가 ?
2. Binder IPC 설비란 무엇이며, 어떻게 사용되고 있는가 ?
결론 : Binder IPC 메커니즘
408th Kandroid Conference - www.kandroid.org
결론 : 메모리 모델
Low Memory Killer, Ashmem, Pmem 정의 및 사용하는 이유? Ashmem
• 파일 기반의 공유 메모리 매핑 (anonymous memory와 유사)
• Binder를 통해서만 매핑 공유
• 가상 메모리 부족시 제거
안드로이드에서 메모리 제약은? CTS에서 VM의 Heap에 대한 제약 정의.
Native Memory 관련 최근 변화는 ? Dalvik GC에서 Native Bitmap Heap 관리.
기존 Kandroid Conference에서 다루었던 내용
1. Register 기반의 Dalvik VM과 JIT 도입 가능성2. 리눅스 커널의 Low Memory Killer 설명3. 안드로이드의 Zygote와 Preload & Prelink 기술 설명함4. Chrome OS에서도 Zygote 개념이 사용됨
안드로이드의 Memory Model과 관련된 중요한 주제
1. 안드로이드는 표준 OOM Killer와 Shared Memory에Custom LowMemoryKiller, Ashmem, PMem을 추가했는가?
2. 이들 각각에 대한 정확한 정의는?3. Dalvik VM의 Memory 사용, Heap 제약, GC 정책은?4. Native Memory와 관련된 몇가지 이슈들 및 변화?
418th Kandroid Conference - www.kandroid.org
결론 : Process와 Thread 모델
Process, Thread, Thread Local Storage에 대한 정의 :
• pthread_key_create / pthread_key_delete
• pthread_setspecific / pthread_getspecific
1 Process, 1 Thread 모델의 목적? GUI 전용 메인 이벤트 루프
IPC Thread Pool과 Thread Migration에 대한 정의 :
• Client Thread -> Binder Driver -> IPCThreadState -> bt #n 생성
• Recurson Back : Server Thread -> Client Thread
NDK의 threaded native app 사용목적? : 메인 이벤트 루프의 안정성
기존 Kandroid Conference에서 다루었던 내용1. 프로세스의 생성과 Zygote의 역할 / 2. Binder RPC 설명시 Thread Migration 언급
Thread와 관련된 중요한 주제
1. Thread, Thread Local Storage란 무엇인가?2. Binder IPC Thread Pool과 Thread Migration이란?3. 안드로이드의 1 Process : 1 Thread 모델이란 무엇인가?4. NDK r5에서 도입된 NativeActivity에와 관련해서 threaded native app란 무엇인가?
428th Kandroid Conference - www.kandroid.org
결론 : Event and Message Loop
select, poll, epoll, Loopper, ALooper의 정의 및 사용목적, 사용형태는?
• select vs. poll 의 장단점 : 성능 및 유연성간의 TradeOff.
• apoll : 실제 모니터링과 모니터링 등록의 분리를 통해 위의 문제 해결.
• Native Looper인 ALooper에서 epoll을 사용.
• Main Event Looper는 Java 기반이지만 Native Looper와 연동됨
기존 Kandroid Conference에서 다루었던 내용
1. 안드로이드 GUI 시스템의 구조를 다루고자 했으나GUI 핵심인 main loop를 언급하지 못한 한계가 있음
Event and Message Loop와 관련된 중요한 주제
1. Blocking vs. Non Blocking IO란 무엇인가?2. Multiplexed I/O 란 무엇인가?3. 안드로이드는 GUI 시스템의 핵심인 main loop를 어떻게 구현하고 있는가?4. NDK r5에서 도입된 NativeActivity를 위해 만들어진 ALooper란 무엇인가?
438th Kandroid Conference - www.kandroid.org
제9회 kandroid Conference : “The Gate of the AOSP #2”
일시 : 2011년 3월22일(목)~3월23일(금)장소 : 강남역 과학기술회관
Application Framework Internals and Debugging #2
- 안드로이드 플랫폼의 메모리 구조에 대한 상세 분석- Dalvik 내부 구조 및 메모리 관리구조- HAL(Hardware Abstraction Layer) 전체 개요 및 내부 구조
(RIL, Graphics, Camera, Bluetooth, Audio, GPS, WiFi …)- Emulator와 Simulator 관련 기술
발표 예정 주제 중, 위의 주제와 밀접한 연관을 갖을 내용
- Toolchain, Prelink & Preload, 안드로이드 적용기술(apriori,soslim,linker)- System Library 분석 및 Binder C++ Library
결론 : Application Framework Internals and Debugging #2
448th Kandroid Conference - www.kandroid.org
제안 : kandroid s/w membership
취지 : 가르침과 배움의 공존의 필요성활동 : 입문자들과 전문직 종사자들간의 대화의 장목적 : s/w 기술에 대한 포괄적 커리큘럼의 완성실행 : 일단 4년정도 실행을 통해 검증한 후, 향후 발전 방향을 고민할 생각입니다.
참여방법 :1. Membership 인력 추천 (대학 1학년 정도면 좋을 듯 합니다.)2. Membership 인력 교육 및 활동 지원3. Membership 교육 커리큘럼 및 내용 제안.
참여자격 : 제한 없습니다. 혜택 : 없습니다.
우리가 하고자 하는 membership은 삼성 s/w 멤버쉽같은 거창한 것은 아닙니다.그렇다고 해서 자유로운 스터디 모임같은 멤버쉽도 아닙니다.
우리가 하고자 하는 멤버쉽은 git와 같은 멤버쉽입니다.
오픈되어 있지만, 질서와 권력이 있는 멤버쉽을 만들고자 합니다.
8th Kandroid Conference
www.kandroid.org
Q & A