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

ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!Mr. Vengineer
 
Dockerを支える技術
Dockerを支える技術Dockerを支える技術
Dockerを支える技術Etsuji Nakai
 
3種類のTEE比較(Intel SGX, ARM TrustZone, RISC-V Keystone)
3種類のTEE比較(Intel SGX, ARM TrustZone, RISC-V Keystone)3種類のTEE比較(Intel SGX, ARM TrustZone, RISC-V Keystone)
3種類のTEE比較(Intel SGX, ARM TrustZone, RISC-V Keystone)Kuniyasu Suzaki
 
スマホゲームのチート手法とその対策 [DeNA TechCon 2019]
スマホゲームのチート手法とその対策 [DeNA TechCon 2019]スマホゲームのチート手法とその対策 [DeNA TechCon 2019]
スマホゲームのチート手法とその対策 [DeNA TechCon 2019]DeNA
 
ELFの動的リンク
ELFの動的リンクELFの動的リンク
ELFの動的リンク7shi
 
UEFIによるELFバイナリの起動
UEFIによるELFバイナリの起動UEFIによるELFバイナリの起動
UEFIによるELFバイナリの起動uchan_nos
 
Android組込み開発基礎コース Armadillo-440編
Android組込み開発基礎コース Armadillo-440編Android組込み開発基礎コース Armadillo-440編
Android組込み開発基礎コース Armadillo-440編OESF Education
 
Redmine にいろいろ埋め込んでみた
Redmine にいろいろ埋め込んでみたRedmine にいろいろ埋め込んでみた
Redmine にいろいろ埋め込んでみたKohei Nakamura
 
initとプロセス再起動
initとプロセス再起動initとプロセス再起動
initとプロセス再起動Takashi Takizawa
 
Dockerfile を書くためのベストプラクティス解説編
Dockerfile を書くためのベストプラクティス解説編Dockerfile を書くためのベストプラクティス解説編
Dockerfile を書くためのベストプラクティス解説編Masahito Zembutsu
 
リアルタイムOSの必要性とTOPPERS/SSPの紹介
リアルタイムOSの必要性とTOPPERS/SSPの紹介リアルタイムOSの必要性とTOPPERS/SSPの紹介
リアルタイムOSの必要性とTOPPERS/SSPの紹介NSaitoNmiri
 
0章 Linuxカーネルを読む前に最低限知っておくべきこと
0章 Linuxカーネルを読む前に最低限知っておくべきこと0章 Linuxカーネルを読む前に最低限知っておくべきこと
0章 Linuxカーネルを読む前に最低限知っておくべきことmao999
 
Android組み込み開発テキスト pandaboard es編
Android組み込み開発テキスト pandaboard es編Android組み込み開発テキスト pandaboard es編
Android組み込み開発テキスト pandaboard es編OESF Education
 
jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界
jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界
jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界Y Watanabe
 
Dockerからcontainerdへの移行
Dockerからcontainerdへの移行Dockerからcontainerdへの移行
Dockerからcontainerdへの移行Kohei Tokunaga
 
オンラインゲームの仕組みと工夫
オンラインゲームの仕組みと工夫オンラインゲームの仕組みと工夫
オンラインゲームの仕組みと工夫Yuta Imai
 
ネットワークOS野郎 ~ インフラ野郎Night 20160414
ネットワークOS野郎 ~ インフラ野郎Night 20160414ネットワークOS野郎 ~ インフラ野郎Night 20160414
ネットワークOS野郎 ~ インフラ野郎Night 20160414Kentaro Ebisawa
 

La actualidad más candente (20)

ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!
 
Dockerを支える技術
Dockerを支える技術Dockerを支える技術
Dockerを支える技術
 
OS入門
OS入門OS入門
OS入門
 
3種類のTEE比較(Intel SGX, ARM TrustZone, RISC-V Keystone)
3種類のTEE比較(Intel SGX, ARM TrustZone, RISC-V Keystone)3種類のTEE比較(Intel SGX, ARM TrustZone, RISC-V Keystone)
3種類のTEE比較(Intel SGX, ARM TrustZone, RISC-V Keystone)
 
スマホゲームのチート手法とその対策 [DeNA TechCon 2019]
スマホゲームのチート手法とその対策 [DeNA TechCon 2019]スマホゲームのチート手法とその対策 [DeNA TechCon 2019]
スマホゲームのチート手法とその対策 [DeNA TechCon 2019]
 
レシピの作り方入門
レシピの作り方入門レシピの作り方入門
レシピの作り方入門
 
ELFの動的リンク
ELFの動的リンクELFの動的リンク
ELFの動的リンク
 
UEFIによるELFバイナリの起動
UEFIによるELFバイナリの起動UEFIによるELFバイナリの起動
UEFIによるELFバイナリの起動
 
Android組込み開発基礎コース Armadillo-440編
Android組込み開発基礎コース Armadillo-440編Android組込み開発基礎コース Armadillo-440編
Android組込み開発基礎コース Armadillo-440編
 
Redmine にいろいろ埋め込んでみた
Redmine にいろいろ埋め込んでみたRedmine にいろいろ埋め込んでみた
Redmine にいろいろ埋め込んでみた
 
initとプロセス再起動
initとプロセス再起動initとプロセス再起動
initとプロセス再起動
 
Dockerfile を書くためのベストプラクティス解説編
Dockerfile を書くためのベストプラクティス解説編Dockerfile を書くためのベストプラクティス解説編
Dockerfile を書くためのベストプラクティス解説編
 
リアルタイムOSの必要性とTOPPERS/SSPの紹介
リアルタイムOSの必要性とTOPPERS/SSPの紹介リアルタイムOSの必要性とTOPPERS/SSPの紹介
リアルタイムOSの必要性とTOPPERS/SSPの紹介
 
0章 Linuxカーネルを読む前に最低限知っておくべきこと
0章 Linuxカーネルを読む前に最低限知っておくべきこと0章 Linuxカーネルを読む前に最低限知っておくべきこと
0章 Linuxカーネルを読む前に最低限知っておくべきこと
 
Android組み込み開発テキスト pandaboard es編
Android組み込み開発テキスト pandaboard es編Android組み込み開発テキスト pandaboard es編
Android組み込み開発テキスト pandaboard es編
 
jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界
jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界
jooqってなんて読むの? から始めるO/RマッパーとSpringBootの世界
 
Dockerからcontainerdへの移行
Dockerからcontainerdへの移行Dockerからcontainerdへの移行
Dockerからcontainerdへの移行
 
Docker Tokyo
Docker TokyoDocker Tokyo
Docker Tokyo
 
オンラインゲームの仕組みと工夫
オンラインゲームの仕組みと工夫オンラインゲームの仕組みと工夫
オンラインゲームの仕組みと工夫
 
ネットワークOS野郎 ~ インフラ野郎Night 20160414
ネットワークOS野郎 ~ インフラ野郎Night 20160414ネットワークOS野郎 ~ インフラ野郎Night 20160414
ネットワークOS野郎 ~ インフラ野郎Night 20160414
 

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

Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 

Último (20)

Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 

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