SlideShare una empresa de Scribd logo
1 de 45
Linux
        Android



                  1
•
    • Web      Android      (?)

    •“                   Android”



• Android
• twitter : @checkela
                                    2
JAG




      3
NDK
• JNI                  • CPU
                             architecture
• NativeActivity
• OpenGL|ES            • Optimization
  (1.x,2.x)            • NEON
• OpenSL|ES
• Sensor       AndroidNDK
                            7/25

                                            4
• Android    Linux

 • Android           Linux

 •          Linux

 • Android                   ...
                                   http://www.androidproduction.com/
                                     smartphones/the-tablets-can-be-
                                   used-in-honeycomb-mounted-with-
                                               linux.html



                                                                       5
•   Linux

•   Ubuntu

•   Android

•   Android Ubuntu

•   Android

       •    ○○○

       •    ○○○

       •    ○○○

       •    ○○○

•
                     6
http://www.flickr.com/photos/katclay/3934856523/



(         )
                                                      7
Linux

• Android
 • CPU
 •          (   )

 • GUI

                    8
•   Linux

•   Ubuntu

•   Android

•   Android Ubuntu

•   Android

       •    ○○○

       •    ○○○

       •    ○○○

       •    ○○○

•
                     9
Ubuntu
•       Linux



•   Linux           + GUI +
            + ...

•           PC      Linux




                              10
•   Linux

•   Ubuntu

•   Android

•   Android Ubuntu

•   Android

       •    ○○○

       •    ○○○

       •    ○○○

       •    ○○○

•
                     11
(1/3)




        12
(2/3)




        13
(3/3)




        14
libraries
                     Application Framework

Application          Java               JNI

                                                    Linux




              Application Framework
                            Linux             API

                                                                   15
•   Linux

•   Ubuntu

•   Android

•   Android Ubuntu

•   Android

       •    ○○○

       •    ○○○

       •    ○○○

       •    ○○○

•
                     16
Android Ubuntu
      Android   Ubuntu

                2
       1
                    OK

                    PC




                         17
•   Linux

•   Ubuntu

•   Android

•   Android Ubuntu

•   Android

       •    ○○○

       •    ○○○

       •    ○○○

       •    ○○○

•
                     18
Linux

  Ubuntu




    Android(   )

    Linux          /


                       19
/
•
• Binder(IPC       )

•
•
• ApplicationFramework         (     logcat)

                     http://elinux.org/Android_Kernel_Features

                                                                 20
•   Linux

•   Ubuntu

•   Android

•   Android Ubuntu

•   Android

       •
       •    Binder

       •
       •
•
                     21
• Linux
•

          Ubuntu


          http://www.flickr.com/photos/ivanwalsh/4506526865/

                                                              22
•
    • UID:GID
    •
         SandBox            SandBox

           sa
                A                    B


                    http://www.flickr.com/photos/katmere/117444001/
                                                                 23
•   Linux

•   Ubuntu

•   Android

•   Android Ubuntu

•   Android

       •
       •    Binder

       •
       •
•
                     24
Binder
• IPC(Internal Procedure Call)
 •
    •   ls | sort -r

• AIDL(Android Interface Definition Language),
    Intent

•
                            http://www.flickr.com/photos/mrvelocipede/501749557/
                                                                                  25
Binder
SandBox               SandBox

  sa
        A                       B



                                    Intent
 Intent                Intent
 AIDL                  AIDL

             Binder


                                             26
•   Linux

•   Ubuntu

•   Android

•   Android Ubuntu

•   Android

       •
       •    Binder

       •
       •
•
                     27
• Ubuntu
 •

           ...?



                  28
(           )

•
    •
•           → CPU




                        29
wakelocks
• Sleep                                     !

 • )
 •
  (Java       )
  PowerManager pm = (PowerManager) getSystemService
  (Context.POWER_SERVICE);

  PowerManager.WakeLock wakeLock = pm.newWakeLock(
          pm.SCREEN_DIM_WAKE_LOCK, "My wakelook");

                                                      30
•   Linux

•   Ubuntu

•   Android

•   Android Ubuntu

•   Android

       •
       •    Binder

       •
       •
•
                     31
Android       Ubuntu Linux


   512MB        1GB     16GB
(Xperia acro)   +swap




                               32
(Android)

•
    • ashmem(android shared memory)
    • pmem(Physical Memory Allocator)
•
    • Out of Memory Handling
    • LowMemoryKiller
                                        33
(Android)

•
    • ashmem(android shared memory)
    • pmem(Processor Memory Allocator)
•
    • Out of Memory Handling
    • LowMemoryKiller
                                         34
•                         ?

•   Ubuntu

    •   OutOfMemory Handling


•   Android

    •   OutOfMemory Handling

    •   LowMemoryKiller

                               35
Ubuntu
•
    • OutOfMemoryHandling
    •               kill

• OOM
 •
 •                          Swap
                                   36
Android

•
    •        (Ubuntu   )

    • swap


                           37
Android       Ubuntu Linux


   512MB        1GB     16GB
(Xperia acro)   +swap




                               38
•
•

•


•   ...




          39
LowMemoryKiller
•

•
•

                  40
•                      &

    •                  >   > content provider

    •

•                  ?

    •   /init.rc


                                                41
/init.rc                  (                                             )
  # Define the oom_adj values for the classes of processes that can be
  # killed by the kernel. These are used in ActivityManagerService.
     setprop ro.FOREGROUND_APP_ADJ 0
     setprop ro.VISIBLE_APP_ADJ 1
     setprop ro.SECONDARY_SERVER_ADJ 2
     setprop ro.BACKUP_APP_ADJ 2
     setprop ro.HOME_APP_ADJ 4
     setprop ro.HIDDEN_APP_MIN_ADJ 7
     setprop ro.CONTENT_PROVIDER_ADJ 14
     setprop ro.EMPTY_APP_ADJ 15

  # Define the memory thresholds at which the above process classes will
  # be killed. These numbers are in pages (4k).
    setprop ro.FOREGROUND_APP_MEM 1536
    setprop ro.VISIBLE_APP_MEM 2048
    setprop ro.SECONDARY_SERVER_MEM 4096
    setprop ro.BACKUP_APP_MEM 4096
    setprop ro.HOME_APP_MEM 4096
    setprop ro.HIDDEN_APP_MEM 5120
    setprop ro.CONTENT_PROVIDER_MEM 5632
    setprop ro.EMPTY_APP_MEM 6144


                                                                            42
•   Linux

•   Ubuntu

•   Android

•   Android Ubuntu

•   Android

       •
       •    Binder

       •
       •
•
                     43
• PC            Android Linux



    • Android
•
    •
                                44
•



    45

Más contenido relacionado

La actualidad más candente

KiCadで雑に基板を作る チュートリアル
KiCadで雑に基板を作る チュートリアルKiCadで雑に基板を作る チュートリアル
KiCadで雑に基板を作る チュートリアル裕士 常田
 
Linux女子部 systemd徹底入門
Linux女子部 systemd徹底入門Linux女子部 systemd徹底入門
Linux女子部 systemd徹底入門Etsuji Nakai
 
0章 Linuxカーネルを読む前に最低限知っておくべきこと
0章 Linuxカーネルを読む前に最低限知っておくべきこと0章 Linuxカーネルを読む前に最低限知っておくべきこと
0章 Linuxカーネルを読む前に最低限知っておくべきことmao999
 
さわってみようTOPPERS/SSP
さわってみようTOPPERS/SSPさわってみようTOPPERS/SSP
さわってみようTOPPERS/SSPNSaitoNmiri
 
Xbyakの紹介とその周辺
Xbyakの紹介とその周辺Xbyakの紹介とその周辺
Xbyakの紹介とその周辺MITSUNARI Shigeo
 
Dockerfileを改善するためのBest Practice 2019年版
Dockerfileを改善するためのBest Practice 2019年版Dockerfileを改善するためのBest Practice 2019年版
Dockerfileを改善するためのBest Practice 2019年版Masahito Zembutsu
 
基礎から学ぶ組み込みAndroid
基礎から学ぶ組み込みAndroid基礎から学ぶ組み込みAndroid
基礎から学ぶ組み込みAndroiddemuyan
 
5分で分かるgitのrefspec
5分で分かるgitのrefspec5分で分かるgitのrefspec
5分で分かるgitのrefspecikdysfm
 
コンテナの作り方「Dockerは裏方で何をしているのか?」
コンテナの作り方「Dockerは裏方で何をしているのか?」コンテナの作り方「Dockerは裏方で何をしているのか?」
コンテナの作り方「Dockerは裏方で何をしているのか?」Masahito Zembutsu
 
PHP AST 徹底解説
PHP AST 徹底解説PHP AST 徹底解説
PHP AST 徹底解説do_aki
 
Fontconfigことはじめ
FontconfigことはじめFontconfigことはじめ
FontconfigことはじめTakao Baba
 
MongoDBが遅いときの切り分け方法
MongoDBが遅いときの切り分け方法MongoDBが遅いときの切り分け方法
MongoDBが遅いときの切り分け方法Tetsutaro Watanabe
 
BuildKitの概要と最近の機能
BuildKitの概要と最近の機能BuildKitの概要と最近の機能
BuildKitの概要と最近の機能Kohei Tokunaga
 
EthernetやCPUなどの話
EthernetやCPUなどの話EthernetやCPUなどの話
EthernetやCPUなどの話Takanori Sejima
 
トランザクションの設計と進化
トランザクションの設計と進化トランザクションの設計と進化
トランザクションの設計と進化Kumazaki Hiroki
 
暗号文のままで計算しよう - 準同型暗号入門 -
暗号文のままで計算しよう - 準同型暗号入門 -暗号文のままで計算しよう - 準同型暗号入門 -
暗号文のままで計算しよう - 準同型暗号入門 -MITSUNARI Shigeo
 

La actualidad más candente (20)

KiCadで雑に基板を作る チュートリアル
KiCadで雑に基板を作る チュートリアルKiCadで雑に基板を作る チュートリアル
KiCadで雑に基板を作る チュートリアル
 
Linux女子部 systemd徹底入門
Linux女子部 systemd徹底入門Linux女子部 systemd徹底入門
Linux女子部 systemd徹底入門
 
0章 Linuxカーネルを読む前に最低限知っておくべきこと
0章 Linuxカーネルを読む前に最低限知っておくべきこと0章 Linuxカーネルを読む前に最低限知っておくべきこと
0章 Linuxカーネルを読む前に最低限知っておくべきこと
 
さわってみようTOPPERS/SSP
さわってみようTOPPERS/SSPさわってみようTOPPERS/SSP
さわってみようTOPPERS/SSP
 
Xbyakの紹介とその周辺
Xbyakの紹介とその周辺Xbyakの紹介とその周辺
Xbyakの紹介とその周辺
 
Glibc malloc internal
Glibc malloc internalGlibc malloc internal
Glibc malloc internal
 
Dockerfileを改善するためのBest Practice 2019年版
Dockerfileを改善するためのBest Practice 2019年版Dockerfileを改善するためのBest Practice 2019年版
Dockerfileを改善するためのBest Practice 2019年版
 
基礎から学ぶ組み込みAndroid
基礎から学ぶ組み込みAndroid基礎から学ぶ組み込みAndroid
基礎から学ぶ組み込みAndroid
 
5分で分かるgitのrefspec
5分で分かるgitのrefspec5分で分かるgitのrefspec
5分で分かるgitのrefspec
 
Docker Compose 徹底解説
Docker Compose 徹底解説Docker Compose 徹底解説
Docker Compose 徹底解説
 
コンテナの作り方「Dockerは裏方で何をしているのか?」
コンテナの作り方「Dockerは裏方で何をしているのか?」コンテナの作り方「Dockerは裏方で何をしているのか?」
コンテナの作り方「Dockerは裏方で何をしているのか?」
 
PHP AST 徹底解説
PHP AST 徹底解説PHP AST 徹底解説
PHP AST 徹底解説
 
ゼロからはじめるKVM超入門
ゼロからはじめるKVM超入門ゼロからはじめるKVM超入門
ゼロからはじめるKVM超入門
 
Fontconfigことはじめ
FontconfigことはじめFontconfigことはじめ
Fontconfigことはじめ
 
MongoDBが遅いときの切り分け方法
MongoDBが遅いときの切り分け方法MongoDBが遅いときの切り分け方法
MongoDBが遅いときの切り分け方法
 
BuildKitの概要と最近の機能
BuildKitの概要と最近の機能BuildKitの概要と最近の機能
BuildKitの概要と最近の機能
 
EthernetやCPUなどの話
EthernetやCPUなどの話EthernetやCPUなどの話
EthernetやCPUなどの話
 
トランザクションの設計と進化
トランザクションの設計と進化トランザクションの設計と進化
トランザクションの設計と進化
 
プログラムを高速化する話
プログラムを高速化する話プログラムを高速化する話
プログラムを高速化する話
 
暗号文のままで計算しよう - 準同型暗号入門 -
暗号文のままで計算しよう - 準同型暗号入門 -暗号文のままで計算しよう - 準同型暗号入門 -
暗号文のままで計算しよう - 準同型暗号入門 -
 

Destacado

hbstudy# 28 SELinux HandsOn 公開版
hbstudy# 28 SELinux HandsOn 公開版hbstudy# 28 SELinux HandsOn 公開版
hbstudy# 28 SELinux HandsOn 公開版Hiroki Ishikawa
 
Chrome OS Observation
Chrome OS ObservationChrome OS Observation
Chrome OS ObservationChamp Yen
 
Play With Android
Play With AndroidPlay With Android
Play With AndroidChamp Yen
 
Develop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM BoardsDevelop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM BoardsNational Cheng Kung University
 
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsF9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsNational Cheng Kung University
 
Inter-process communication of Android
Inter-process communication of AndroidInter-process communication of Android
Inter-process communication of AndroidTetsuyuki Kobayashi
 
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明National Cheng Kung University
 

Destacado (20)

hbstudy# 28 SELinux HandsOn 公開版
hbstudy# 28 SELinux HandsOn 公開版hbstudy# 28 SELinux HandsOn 公開版
hbstudy# 28 SELinux HandsOn 公開版
 
Accelerated Android Development with Linaro
Accelerated Android Development with LinaroAccelerated Android Development with Linaro
Accelerated Android Development with Linaro
 
Chrome OS Observation
Chrome OS ObservationChrome OS Observation
Chrome OS Observation
 
Play With Android
Play With AndroidPlay With Android
Play With Android
 
Android Optimization: Myth and Reality
Android Optimization: Myth and RealityAndroid Optimization: Myth and Reality
Android Optimization: Myth and Reality
 
Develop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM BoardsDevelop Your Own Operating Systems using Cheap ARM Boards
Develop Your Own Operating Systems using Cheap ARM Boards
 
Construct an Efficient and Secure Microkernel for IoT
Construct an Efficient and Secure Microkernel for IoTConstruct an Efficient and Secure Microkernel for IoT
Construct an Efficient and Secure Microkernel for IoT
 
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsF9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
 
Xvisor: embedded and lightweight hypervisor
Xvisor: embedded and lightweight hypervisorXvisor: embedded and lightweight hypervisor
Xvisor: embedded and lightweight hypervisor
 
Inter-process communication of Android
Inter-process communication of AndroidInter-process communication of Android
Inter-process communication of Android
 
Priority Inversion on Mars
Priority Inversion on MarsPriority Inversion on Mars
Priority Inversion on Mars
 
Introduction to Android Window System
Introduction to Android Window SystemIntroduction to Android Window System
Introduction to Android Window System
 
Practice of Android Reverse Engineering
Practice of Android Reverse EngineeringPractice of Android Reverse Engineering
Practice of Android Reverse Engineering
 
Understanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual MachineUnderstanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual Machine
 
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
進階嵌入式作業系統設計與實做 (2015 年秋季 ) 課程說明
 
Design pattern
Design patternDesign pattern
Design pattern
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC Mechanism
 
Interpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratchInterpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratch
 
2016 年春季嵌入式作業系統課程說明
2016 年春季嵌入式作業系統課程說明2016 年春季嵌入式作業系統課程說明
2016 年春季嵌入式作業系統課程說明
 
Design and Concepts of Android Graphics
Design and Concepts of Android GraphicsDesign and Concepts of Android Graphics
Design and Concepts of Android Graphics
 

Similar a Linuxカーネルから紐解くAndroid

Android Hacks, Variants, Tricks and Resources ESC SV 2012
Android Hacks, Variants, Tricks and Resources ESC SV 2012Android Hacks, Variants, Tricks and Resources ESC SV 2012
Android Hacks, Variants, Tricks and Resources ESC SV 2012Opersys inc.
 
Android Variants, Hacks, Tricks and Resources presented at AnDevConII
Android Variants, Hacks, Tricks and Resources presented at AnDevConIIAndroid Variants, Hacks, Tricks and Resources presented at AnDevConII
Android Variants, Hacks, Tricks and Resources presented at AnDevConIIOpersys inc.
 
Headless Android at AnDevCon3
Headless Android at AnDevCon3Headless Android at AnDevCon3
Headless Android at AnDevCon3Opersys inc.
 
Android Operating System
Android Operating SystemAndroid Operating System
Android Operating SystemAmit Kundu
 
Android beyond the smartphone
Android beyond the smartphoneAndroid beyond the smartphone
Android beyond the smartphoneChris Simmonds
 
Apresentação Nano Server (tp5)
Apresentação Nano Server (tp5)Apresentação Nano Server (tp5)
Apresentação Nano Server (tp5)Daniel Donda - MVP
 
Dockerizing IoT Services
Dockerizing IoT ServicesDockerizing IoT Services
Dockerizing IoT Servicesmsyukor
 
The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)Chris Simmonds
 
Andriod software by sk
Andriod software by skAndriod software by sk
Andriod software by skShahrukh Miya
 
Android Variants, Hacks, Tricks and Resources
Android Variants, Hacks, Tricks and ResourcesAndroid Variants, Hacks, Tricks and Resources
Android Variants, Hacks, Tricks and ResourcesOpersys inc.
 
Containers and security
Containers and securityContainers and security
Containers and securitysriram_rajan
 
Beating Android Fragmentation
Beating Android FragmentationBeating Android Fragmentation
Beating Android FragmentationJuan Gomez
 
Introduction to Gnu/Linux
Introduction to Gnu/LinuxIntroduction to Gnu/Linux
Introduction to Gnu/LinuxRanjith Siji
 
Mobile operating systems - Application Benchmarking
Mobile operating systems - Application BenchmarkingMobile operating systems - Application Benchmarking
Mobile operating systems - Application BenchmarkingNicolas Demetriou
 

Similar a Linuxカーネルから紐解くAndroid (20)

Android Hacks, Variants, Tricks and Resources ESC SV 2012
Android Hacks, Variants, Tricks and Resources ESC SV 2012Android Hacks, Variants, Tricks and Resources ESC SV 2012
Android Hacks, Variants, Tricks and Resources ESC SV 2012
 
Android Variants, Hacks, Tricks and Resources presented at AnDevConII
Android Variants, Hacks, Tricks and Resources presented at AnDevConIIAndroid Variants, Hacks, Tricks and Resources presented at AnDevConII
Android Variants, Hacks, Tricks and Resources presented at AnDevConII
 
Headless Android at AnDevCon3
Headless Android at AnDevCon3Headless Android at AnDevCon3
Headless Android at AnDevCon3
 
Mobile operating systems
Mobile operating systemsMobile operating systems
Mobile operating systems
 
Linux I Ostala Druzina
Linux I Ostala DruzinaLinux I Ostala Druzina
Linux I Ostala Druzina
 
Android Operating System
Android Operating SystemAndroid Operating System
Android Operating System
 
Mobatsuku01
Mobatsuku01Mobatsuku01
Mobatsuku01
 
Android beyond the smartphone
Android beyond the smartphoneAndroid beyond the smartphone
Android beyond the smartphone
 
Apresentação Nano Server (tp5)
Apresentação Nano Server (tp5)Apresentação Nano Server (tp5)
Apresentação Nano Server (tp5)
 
Headless Android
Headless AndroidHeadless Android
Headless Android
 
Dockerizing IoT Services
Dockerizing IoT ServicesDockerizing IoT Services
Dockerizing IoT Services
 
The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)
 
Andriod software by sk
Andriod software by skAndriod software by sk
Andriod software by sk
 
LUG - Install Fest 2008
LUG - Install Fest 2008LUG - Install Fest 2008
LUG - Install Fest 2008
 
Lrug
LrugLrug
Lrug
 
Android Variants, Hacks, Tricks and Resources
Android Variants, Hacks, Tricks and ResourcesAndroid Variants, Hacks, Tricks and Resources
Android Variants, Hacks, Tricks and Resources
 
Containers and security
Containers and securityContainers and security
Containers and security
 
Beating Android Fragmentation
Beating Android FragmentationBeating Android Fragmentation
Beating Android Fragmentation
 
Introduction to Gnu/Linux
Introduction to Gnu/LinuxIntroduction to Gnu/Linux
Introduction to Gnu/Linux
 
Mobile operating systems - Application Benchmarking
Mobile operating systems - Application BenchmarkingMobile operating systems - Application Benchmarking
Mobile operating systems - Application Benchmarking
 

Más de demuyan

ソフトウェア開発の歴史を振り返る
ソフトウェア開発の歴史を振り返るソフトウェア開発の歴史を振り返る
ソフトウェア開発の歴史を振り返るdemuyan
 
低レイヤー入門
低レイヤー入門低レイヤー入門
低レイヤー入門demuyan
 
GDKとLLVM(横浜PF部向け)
GDKとLLVM(横浜PF部向け)GDKとLLVM(横浜PF部向け)
GDKとLLVM(横浜PF部向け)demuyan
 
組込Android本の執筆環境
組込Android本の執筆環境組込Android本の執筆環境
組込Android本の執筆環境demuyan
 
ゲーム屋的パフォーマンスチューニング
ゲーム屋的パフォーマンスチューニングゲーム屋的パフォーマンスチューニング
ゲーム屋的パフォーマンスチューニングdemuyan
 
Android&Web&Titanium
Android&Web&TitaniumAndroid&Web&Titanium
Android&Web&Titaniumdemuyan
 
Gdgd発表スライド
Gdgd発表スライドGdgd発表スライド
Gdgd発表スライドdemuyan
 
Android & BeagleBoardで組込入門
Android & BeagleBoardで組込入門Android & BeagleBoardで組込入門
Android & BeagleBoardで組込入門demuyan
 
AppBank 村井氏 講演資料
AppBank 村井氏 講演資料AppBank 村井氏 講演資料
AppBank 村井氏 講演資料demuyan
 
Androidとは。ちょっと変った視点から
Androidとは。ちょっと変った視点からAndroidとは。ちょっと変った視点から
Androidとは。ちょっと変った視点からdemuyan
 
いまさら聞けないRuby1.9
いまさら聞けないRuby1.9いまさら聞けないRuby1.9
いまさら聞けないRuby1.9demuyan
 
現在のCOM事情
現在のCOM事情現在のCOM事情
現在のCOM事情demuyan
 
Yet Another Development Language
Yet Another Development LanguageYet Another Development Language
Yet Another Development Languagedemuyan
 

Más de demuyan (13)

ソフトウェア開発の歴史を振り返る
ソフトウェア開発の歴史を振り返るソフトウェア開発の歴史を振り返る
ソフトウェア開発の歴史を振り返る
 
低レイヤー入門
低レイヤー入門低レイヤー入門
低レイヤー入門
 
GDKとLLVM(横浜PF部向け)
GDKとLLVM(横浜PF部向け)GDKとLLVM(横浜PF部向け)
GDKとLLVM(横浜PF部向け)
 
組込Android本の執筆環境
組込Android本の執筆環境組込Android本の執筆環境
組込Android本の執筆環境
 
ゲーム屋的パフォーマンスチューニング
ゲーム屋的パフォーマンスチューニングゲーム屋的パフォーマンスチューニング
ゲーム屋的パフォーマンスチューニング
 
Android&Web&Titanium
Android&Web&TitaniumAndroid&Web&Titanium
Android&Web&Titanium
 
Gdgd発表スライド
Gdgd発表スライドGdgd発表スライド
Gdgd発表スライド
 
Android & BeagleBoardで組込入門
Android & BeagleBoardで組込入門Android & BeagleBoardで組込入門
Android & BeagleBoardで組込入門
 
AppBank 村井氏 講演資料
AppBank 村井氏 講演資料AppBank 村井氏 講演資料
AppBank 村井氏 講演資料
 
Androidとは。ちょっと変った視点から
Androidとは。ちょっと変った視点からAndroidとは。ちょっと変った視点から
Androidとは。ちょっと変った視点から
 
いまさら聞けないRuby1.9
いまさら聞けないRuby1.9いまさら聞けないRuby1.9
いまさら聞けないRuby1.9
 
現在のCOM事情
現在のCOM事情現在のCOM事情
現在のCOM事情
 
Yet Another Development Language
Yet Another Development LanguageYet Another Development Language
Yet Another Development Language
 

Último

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 

Último (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

Linuxカーネルから紐解くAndroid

  • 1. Linux Android 1
  • 2. • Web Android (?) •“ Android” • Android • twitter : @checkela 2
  • 3. JAG 3
  • 4. NDK • JNI • CPU architecture • NativeActivity • OpenGL|ES • Optimization (1.x,2.x) • NEON • OpenSL|ES • Sensor AndroidNDK 7/25 4
  • 5. • Android Linux • Android Linux • Linux • Android ... http://www.androidproduction.com/ smartphones/the-tablets-can-be- used-in-honeycomb-mounted-with- linux.html 5
  • 6. Linux • Ubuntu • Android • Android Ubuntu • Android • ○○○ • ○○○ • ○○○ • ○○○ • 6
  • 8. Linux • Android • CPU • ( ) • GUI 8
  • 9. Linux • Ubuntu • Android • Android Ubuntu • Android • ○○○ • ○○○ • ○○○ • ○○○ • 9
  • 10. Ubuntu • Linux • Linux + GUI + + ... • PC Linux 10
  • 11. Linux • Ubuntu • Android • Android Ubuntu • Android • ○○○ • ○○○ • ○○○ • ○○○ • 11
  • 12. (1/3) 12
  • 13. (2/3) 13
  • 14. (3/3) 14
  • 15. libraries Application Framework Application Java JNI Linux Application Framework Linux API 15
  • 16. Linux • Ubuntu • Android • Android Ubuntu • Android • ○○○ • ○○○ • ○○○ • ○○○ • 16
  • 17. Android Ubuntu Android Ubuntu 2 1 OK PC 17
  • 18. Linux • Ubuntu • Android • Android Ubuntu • Android • ○○○ • ○○○ • ○○○ • ○○○ • 18
  • 19. Linux Ubuntu Android( ) Linux / 19
  • 20. / • • Binder(IPC ) • • • ApplicationFramework ( logcat) http://elinux.org/Android_Kernel_Features 20
  • 21. Linux • Ubuntu • Android • Android Ubuntu • Android • • Binder • • • 21
  • 22. • Linux • Ubuntu http://www.flickr.com/photos/ivanwalsh/4506526865/ 22
  • 23. • UID:GID • SandBox SandBox sa A B http://www.flickr.com/photos/katmere/117444001/ 23
  • 24. Linux • Ubuntu • Android • Android Ubuntu • Android • • Binder • • • 24
  • 25. Binder • IPC(Internal Procedure Call) • • ls | sort -r • AIDL(Android Interface Definition Language), Intent • http://www.flickr.com/photos/mrvelocipede/501749557/ 25
  • 26. Binder SandBox SandBox sa A B Intent Intent Intent AIDL AIDL Binder 26
  • 27. Linux • Ubuntu • Android • Android Ubuntu • Android • • Binder • • • 27
  • 28. • Ubuntu • ...? 28
  • 29. ( ) • • • → CPU 29
  • 30. wakelocks • Sleep ! • ) • (Java ) PowerManager pm = (PowerManager) getSystemService (Context.POWER_SERVICE); PowerManager.WakeLock wakeLock = pm.newWakeLock(         pm.SCREEN_DIM_WAKE_LOCK, "My wakelook"); 30
  • 31. Linux • Ubuntu • Android • Android Ubuntu • Android • • Binder • • • 31
  • 32. Android Ubuntu Linux 512MB 1GB 16GB (Xperia acro) +swap 32
  • 33. (Android) • • ashmem(android shared memory) • pmem(Physical Memory Allocator) • • Out of Memory Handling • LowMemoryKiller 33
  • 34. (Android) • • ashmem(android shared memory) • pmem(Processor Memory Allocator) • • Out of Memory Handling • LowMemoryKiller 34
  • 35. ? • Ubuntu • OutOfMemory Handling • Android • OutOfMemory Handling • LowMemoryKiller 35
  • 36. Ubuntu • • OutOfMemoryHandling • kill • OOM • • Swap 36
  • 37. Android • • (Ubuntu ) • swap 37
  • 38. Android Ubuntu Linux 512MB 1GB 16GB (Xperia acro) +swap 38
  • 39. • • • • ... 39
  • 41. & • > > content provider • • ? • /init.rc 41
  • 42. /init.rc ( ) # Define the oom_adj values for the classes of processes that can be # killed by the kernel. These are used in ActivityManagerService. setprop ro.FOREGROUND_APP_ADJ 0 setprop ro.VISIBLE_APP_ADJ 1 setprop ro.SECONDARY_SERVER_ADJ 2 setprop ro.BACKUP_APP_ADJ 2 setprop ro.HOME_APP_ADJ 4 setprop ro.HIDDEN_APP_MIN_ADJ 7 setprop ro.CONTENT_PROVIDER_ADJ 14 setprop ro.EMPTY_APP_ADJ 15 # Define the memory thresholds at which the above process classes will # be killed. These numbers are in pages (4k). setprop ro.FOREGROUND_APP_MEM 1536 setprop ro.VISIBLE_APP_MEM 2048 setprop ro.SECONDARY_SERVER_MEM 4096 setprop ro.BACKUP_APP_MEM 4096 setprop ro.HOME_APP_MEM 4096 setprop ro.HIDDEN_APP_MEM 5120 setprop ro.CONTENT_PROVIDER_MEM 5632 setprop ro.EMPTY_APP_MEM 6144 42
  • 43. Linux • Ubuntu • Android • Android Ubuntu • Android • • Binder • • • 43
  • 44. • PC Android Linux • Android • • 44
  • 45. 45

Notas del editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. http://groups.google.com/group/android-developers/browse_thread/thread/705cdfde2aa20ce4/dc0e0e872de9b0d2?lnk=raot\n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n