Slide 1

Slide 1 text

To err is human and to blame it on a computer is even more so. -­  Robert  Orben  

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

Shrayas  

Slide 4

Slide 4 text

Shrayas   Research  Engineer   1  1  1  1  0  0  0  0  1  1  1  1                                                                                                                                0  1  0  1  0  1  0  1  0  1  0  1  1  1  0  0  1    

Slide 5

Slide 5 text

Shrayas   Research  Engineer   1  1  1  1  0  0  0  0  1  1  1  1                                                                                                                                0  1  0  1  0  1  0  1  0  1  0  1  1  1  0  0  1    

Slide 6

Slide 6 text

Slide 7

Slide 7 text

2 Rules

Slide 8

Slide 8 text

sir  

Slide 9

Slide 9 text

sir  

Slide 10

Slide 10 text

Q   ?   ?   ?   ?   ?   ?  

Slide 11

Slide 11 text

Q   ?   ?   ?   ?   ?   ?  

Slide 12

Slide 12 text

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

WE ARE GOINGZ TO HATEZ U

Slide 19

Slide 19 text

ANDROID WE ARE GOINGZ TO LOU U

Slide 20

Slide 20 text

Agenda     What is Android   History   Layers   Native Applications

Slide 21

Slide 21 text

WHAT? Is  that  green  cute  thing?  

Slide 22

Slide 22 text

Yes   No   OS  Opera9ng   System  

Slide 23

Slide 23 text

Yes   OS  Opera9ng   System   “Yes  ,  android  IS  an  OS”  

Slide 24

Slide 24 text

No   OS  Opera9ng   System   “No  No,  its  something  else”  

Slide 25

Slide 25 text

No   “Android  isn’t  an  opera

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

Software Stack

Slide 28

Slide 28 text

{ Software Stack linux based kernel

Slide 29

Slide 29 text

Middleware Key applications Operating System { Software Stack linux based kernel

Slide 30

Slide 30 text

Middleware Key applications Operating System { Software Stack linux based kernel

Slide 31

Slide 31 text

Android “Android  isn’t  just  an  opera

Slide 32

Slide 32 text

Open Source developer developer developer developer tester tester

Slide 33

Slide 33 text

developer? Android

Slide 34

Slide 34 text

http://developer.android.com/sdk/index.html

Slide 35

Slide 35 text

SDK

Slide 36

Slide 36 text

SDK •  Java •  Brains :)

Slide 37

Slide 37 text

SDK •  Java •  Brains :) http://developer.android.com/guide/basics/what-is-android.html

Slide 38

Slide 38 text

Slide 39

Slide 39 text

HISTORY .. WHOSE? MY STORY?

Slide 40

Slide 40 text

2005 2003

Slide 41

Slide 41 text

2003 2005 October     @Palo  Alto,  California  

Slide 42

Slide 42 text

2003 2005 October     @Palo  Alto,  California   Android, Inc. Was founded

Slide 43

Slide 43 text

2003 2005 October     @Palo  Alto,  California   Android, Inc. Was founded

Slide 44

Slide 44 text

2003 2005 October     @Palo  Alto,  California   Android, Inc. Was founded

Slide 45

Slide 45 text

2003 2005 October     @Palo  Alto,  California   Android, Inc. Was founded

Slide 46

Slide 46 text

2003 2005 October     @Palo  Alto,  California   Android, Inc. Was founded CHRIS WHITE

Slide 47

Slide 47 text

2003 2005 October     @Palo  Alto,  California   Android, Inc. Was founded “..smarter mobile devices that are more aware of its owner's location and preferences." CHRIS WHITE

Slide 48

Slide 48 text

2005 2003 August  

Slide 49

Slide 49 text

2005 2003 August   Google acquires Android, Inc.

Slide 50

Slide 50 text

2005 2003 August   Google acquires Android, Inc. CW

Slide 51

Slide 51 text

2005 2003 August   Google acquires Android, Inc. CW “..Google was planning to enter the mobile phone market with this move.

Slide 52

Slide 52 text

Late 2007 2006 -­‐  Early  2007  

Slide 53

Slide 53 text

Late 2007 2006 -­‐  Early  2007   Focus was purely development.

Slide 54

Slide 54 text

Late 2007 2006 -­‐  Early  2007   Focus was purely development. Based on the linux kernel

Slide 55

Slide 55 text

Late 2007 2006 -­‐  Early  2007   Focus was purely development. Based on the linux kernel Rumors of a handset

Slide 56

Slide 56 text

2006 Late 2007

Slide 57

Slide 57 text

2006 Late 2007 Open Handset Alliance formed

Slide 58

Slide 58 text

2006 Late 2007 Open Handset Alliance formed

Slide 59

Slide 59 text

2006 Late 2007 Open Handset Alliance formed “…to develop open standards for mobile devices”

Slide 60

Slide 60 text

Version History 1.0   1.1   1.5   1.6   2.0  /  2.1   2.2   2.3   3.x   4.0?  

Slide 61

Slide 61 text

Version History 1.0   1.1   1.5   1.6   2.0  /  2.1   2.2   2.3   3.x   4.0?   1.0 September  23rd  2008  

Slide 62

Slide 62 text

Version History 1.0   1.1   1.5   1.6   2.0  /  2.1   2.2   2.3   3.x   4.0?   1.1 February  9th  2009  

Slide 63

Slide 63 text

Version History 1.0   1.1   1.5   1.6   2.0  /  2.1   2.2   2.3   3.x   4.0?   1.5 30th  April  2009  

Slide 64

Slide 64 text

Version History 1.0   1.1   1.5   1.6   2.0  /  2.1   2.2   2.3   3.x   4.0?   1.6 15th  September  2009  

Slide 65

Slide 65 text

Version History 1.0   1.1   1.5   1.6   2.0  /  2.1   2.2   2.3   3.x   4.0?   2.1 26th  October  2009  

Slide 66

Slide 66 text

Version History 1.0   1.1   1.5   1.6   2.0  /  2.1   2.2   2.3   3.x   4.0?   2.2 20th  May  2010  

Slide 67

Slide 67 text

Version History 1.0   1.1   1.5   1.6   2.0  /  2.1   2.2   2.3   3.x   4.0?   2.3 6th  December  2010  

Slide 68

Slide 68 text

Version History 1.0   1.1   1.5   1.6   2.0  /  2.1   2.2   2.3   3.x   4.0?   3.x 22nd  February  2011  

Slide 69

Slide 69 text

Version History 1.0   1.1   1.5   1.6   2.0  /  2.1   2.2   2.3   3.x   4.0?   4.0 Q4  2011  

Slide 70

Slide 70 text

Slide 71

Slide 71 text

WE DEMAND LAYERS!

Slide 72

Slide 72 text

The Android open-source software stack , based on the linux kernel consists of Java applications running on a Java-based object-oriented application framework on top of Java core libraries running on a Dalvik virtual machine featuring JIT compilation. Libraries written in C include the surface manager, OpenCore media framework, SQLite relational database management System, OpenGL ES graphics API, WebKit layout engine and the like. Layers  

Slide 73

Slide 73 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   } Software Stack

Slide 74

Slide 74 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   } Software Stack

Slide 75

Slide 75 text

Linux Kernel Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel  

Slide 76

Slide 76 text

Linux Kernel 2.6   Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel  

Slide 77

Slide 77 text

Linux Kernel Security memory management process management network stack driver model. 2.6   Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel  

Slide 78

Slide 78 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   } Software Stack

Slide 79

Slide 79 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   Middleware

Slide 80

Slide 80 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   Middleware Libraries   C   C++   Exposed through android app framework

Slide 81

Slide 81 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   Middleware Libraries   Android  Run9me   C   C++   Exposed through android app framework Dalvik  Virtual  Machine   JIT   The set of core libraries providing most functionality

Slide 82

Slide 82 text

Dalvik Virtual Machine -­‐  Dan  Bornstein  

Slide 83

Slide 83 text

Dalvik Virtual Machine -­‐  Dan  Bornstein  

Slide 84

Slide 84 text

Dalvik Virtual Machine -­‐  Dan  Bornstein   .dex  

Slide 85

Slide 85 text

Dalvik Virtual Machine -­‐  Dan  Bornstein   .dex   Memory   Processing  Speed  

Slide 86

Slide 86 text

Dalvik Virtual Machine -­‐  Dan  Bornstein   .dex   Memory   Processing  Speed   Java  VM   Dalvik  VM   Encode,  Execute  

Slide 87

Slide 87 text

Dalvik Virtual Machine -­‐  Dan  Bornstein   .dex   Memory   Processing  Speed   Java  VM   Stack  based  architecture   Dalvik  VM   Register  based  architecture  

Slide 88

Slide 88 text

Dalvik Virtual Machine -­‐  Dan  Bornstein   .dex   Memory   Processing  Speed   Java  VM   Stack  based  architecture   Dalvik  VM   Register  based  architecture   Pop  ,  Encode  ,  execute  

Slide 89

Slide 89 text

Dalvik Virtual Machine -­‐  Dan  Bornstein   .dex   Memory   Processing  Speed   Java  VM   Stack  based  architecture   Dalvik  VM   Register  based  architecture   Encode,  Execute  

Slide 90

Slide 90 text

Dalvik Virtual Machine -­‐  Dan  Bornstein   .dex   Memory   Processing  Speed   Java  VM   Stack  based  architecture   Dalvik  VM   Register  based  architecture   Pop  ,  Encode  ,  execute   Encode,  Execute  

Slide 91

Slide 91 text

Dalvik Virtual Machine -­‐  Dan  Bornstein   .dex   Memory   Processing  Speed   Java  VM   Stack  based  architecture   Dalvik  VM   Register  based  architecture   Pop  ,  Encode  ,  execute   Encode,  Execute   DX  

Slide 92

Slide 92 text

Dalvik Virtual Machine -­‐  Dan  Bornstein   .dex   Memory   Processing  Speed   Java  VM   Stack  based  architecture   Dalvik  VM   Register  based  architecture   Pop  ,  Encode  ,  execute   Encode,  Execute   DX   .class   .class   .class   .class  

Slide 93

Slide 93 text

Dalvik Virtual Machine -­‐  Dan  Bornstein   .dex   Memory   Processing  Speed   Java  VM   Stack  based  architecture   Dalvik  VM   Register  based  architecture   Pop  ,  Encode  ,  execute   Encode,  Execute   DX   .class   .class   .class   .class  

Slide 94

Slide 94 text

Dalvik Virtual Machine -­‐  Dan  Bornstein   .dex   Memory   Processing  Speed   Java  VM   Stack  based  architecture   Dalvik  VM   Register  based  architecture   Pop  ,  Encode  ,  execute   Encode,  Execute   DX   .class   .class   .class   .class   DEX  File  

Slide 95

Slide 95 text

Dalvik Virtual Machine -­‐  Dan  Bornstein   .dex   Memory   Processing  Speed   Java  VM   Stack  based  architecture   Dalvik  VM   Register  based  architecture   Pop  ,  Encode  ,  execute   Encode,  Execute   DX   .class   .class   .class   .class   DEX  File   .class   .class   .class   Java  bytecode  (dalvik)   Other  Resources  

Slide 96

Slide 96 text

JIT   Just In Time “Method to improve the runtime performance of computer programs.”

Slide 97

Slide 97 text

JIT   Just In Time “Method to improve the runtime performance of computer programs.” Modes of Runtime Operation

Slide 98

Slide 98 text

JIT   Just In Time “Method to improve the runtime performance of computer programs.” Interpreter   Compilers  

Slide 99

Slide 99 text

JIT   Just In Time “Method to improve the runtime performance of computer programs.” Interpreter   Compilers   Translated  from  a  high-­‐level     language  to  a  machine  code     con9nuously     during  every  execu9on  

Slide 100

Slide 100 text

JIT   Just In Time “Method to improve the runtime performance of computer programs.” Interpreter   Compilers   Compiled  code  is  translated     Into  machine  code  before   Execu9on  and  it  requires   this  transala9on  only  once  

Slide 101

Slide 101 text

JIT   Just In Time “Method to improve the runtime performance of computer programs.” Interpreter   Compilers   Translated  from  a  high-­‐level     language  to  a  machine  code     con9nuously     during  every  execu9on   Compiled  code  is  translated     Into  machine  code  before   Execu9on  and  it  requires   this  transala9on  only  once  

Slide 102

Slide 102 text

JIT   Just In Time “Method to improve the runtime performance of computer programs.” Interpreter   Compilers   Translated  from  a  high-­‐level     language  to  a  machine  code     con9nuously     during  every  execu9on   Compiled  code  is  translated     Into  machine  code  before   Execu9on  and  it  requires   this  transala9on  only  once  

Slide 103

Slide 103 text

JIT   Just In Time “Method to improve the runtime performance of computer programs.” Interpreter   Compilers   “A hybrid approach, with translation occurring continuously, as with interpreters, but with caching of translated code to minimize performance degradation."

Slide 104

Slide 104 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   Middleware Libraries   Android  Run9me   C   C++   Exposed through android app framework Dalvik  Virtual  Machine   JIT   The set of core libraries providing most functionality

Slide 105

Slide 105 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   } Software Stack

Slide 106

Slide 106 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   Operating System

Slide 107

Slide 107 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   Operating System Open   Plaborm  

Slide 108

Slide 108 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   Operating System Open   Plaborm   Rich & Innovative Applications Advantage of device H/W , Location info, BG services, etc Full access to same API’s used by core applications Reusability of components

Slide 109

Slide 109 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   Operating System Open   Plaborm   Rich & Innovative Applications Advantage of device H/W , Location info, BG services, etc Full access to same API’s used by core applications Reusability of components Views  

Slide 110

Slide 110 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   Operating System Open   Plaborm   Rich & Innovative Applications Advantage of device H/W , Location info, BG services, etc Full access to same API’s used by core applications Reusability of components Views   Content  providers  

Slide 111

Slide 111 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   Operating System Open   Plaborm   Rich & Innovative Applications Advantage of device H/W , Location info, BG services, etc Full access to same API’s used by core applications Reusability of components Views   Content  providers   Resource  Manager  

Slide 112

Slide 112 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   Operating System Open   Plaborm   Rich & Innovative Applications Advantage of device H/W , Location info, BG services, etc Full access to same API’s used by core applications Reusability of components Views   Content  providers   Resource  Manager   No9fica9on  Manager  

Slide 113

Slide 113 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   Operating System Open   Plaborm   Rich & Innovative Applications Advantage of device H/W , Location info, BG services, etc Full access to same API’s used by core applications Reusability of components Views   Content  providers   Resource  Manager   Ac9vity  Manager   No9fica9on  Manager  

Slide 114

Slide 114 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   } Software Stack

Slide 115

Slide 115 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   Key Applications Core Applications Java  

Slide 116

Slide 116 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   Key Applications Core Applications Java  

Slide 117

Slide 117 text

Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel   } Software Stack

Slide 118

Slide 118 text

The Android open-source software stack is based on the linux kernel and consists of Java applications running on a Java-based object-oriented application framework sitting on top of core libraries written in C . In Addition , the runtime consists of a Dalvik virtual machine featuring JIT compilation Layers  

Slide 119

Slide 119 text

The Android open-source software stack is based on the linux kernel and consists of Java applications running on a Java-based object-oriented application framework sitting on top of core libraries written in C . In Addition , the runtime consists of a Dalvik virtual machine featuring JIT compilation Layers   Android   Key  Applica9ons   Opera9ng  System   Middleware   Linux  Kernel  

Slide 120

Slide 120 text

The Android open-source software stack is based on the linux kernel and consists of Java applications running on a Java-based object-oriented application framework sitting on top of core libraries written in C . In Addition , the runtime consists of a Dalvik virtual machine featuring JIT compilation Layers   2.6  

Slide 121

Slide 121 text

The Android open-source software stack is based on the linux kernel and consists of Java applications running on a Java-based object-oriented application framework sitting on top of core libraries written in C . In Addition , the runtime consists of a Dalvik virtual machine featuring JIT compilation Layers  

Slide 122

Slide 122 text

The Android open-source software stack is based on the linux kernel and consists of Java applications running on a Java-based object-oriented application framework sitting on top of core libraries written in C . In Addition , the runtime consists of a Dalvik virtual machine featuring JIT compilation Layers  

Slide 123

Slide 123 text

The Android open-source software stack is based on the linux kernel and consists of Java applications running on a Java-based object-oriented application framework sitting on top of core libraries written in C . In Addition , the runtime consists of a Dalvik virtual machine featuring JIT compilation Layers  

Slide 124

Slide 124 text

The Android open-source software stack is based on the linux kernel and consists of Java applications running on a Java-based object-oriented application framework sitting on top of core libraries written in C . In Addition , the runtime consists of a Dalvik virtual machine featuring JIT compilation Layers   .dex  

Slide 125

Slide 125 text

The Android open-source software stack is based on the linux kernel and consists of Java applications running on a Java-based object-oriented application framework sitting on top of core libraries written in C . In Addition , the runtime consists of a Dalvik virtual machine featuring JIT compilation Layers   .dexJIT  

Slide 126

Slide 126 text

Slide 127

Slide 127 text

Native Applications

Slide 128

Slide 128 text

Java

Slide 129

Slide 129 text

Java Android SDK

Slide 130

Slide 130 text

Java Android SDK Android PacKage

Slide 131

Slide 131 text

Java Android SDK Android PacKage APK

Slide 132

Slide 132 text

#include Void main() { printf(“Angry Birds”); } .apk

Slide 133

Slide 133 text

APK

Slide 134

Slide 134 text

DIE PIGZ ! DIE!

Slide 135

Slide 135 text

No content

Slide 136

Slide 136 text

No content

Slide 137

Slide 137 text

Each Application is a User

Slide 138

Slide 138 text

Each Application is a User Unique linux user ID Chmod 777

Slide 139

Slide 139 text

Each Application is a User Unique linux user ID Chmod 777 Each Process has its own VM

Slide 140

Slide 140 text

Each Application is a User Unique linux user ID Chmod 777 Each Process has its own VM Isolation

Slide 141

Slide 141 text

Each Application is a User Unique linux user ID Chmod 777 Each Process has its own VM Isolation “Principle of least privilege”

Slide 142

Slide 142 text

Each Application is a User Unique linux user ID Chmod 777 Each Process has its own VM Isolation “Principle of least privilege” Each  applica

Slide 143

Slide 143 text

Application Components

Slide 144

Slide 144 text

Activities Services Content Providers Broadcast Receivers Intents

Slide 145

Slide 145 text

Activities Services Content Providers Broadcast Receivers Intents 5

Slide 146

Slide 146 text

Activities Services Content Providers Broadcast Receivers Intents 5

Slide 147

Slide 147 text

Activities Single  smallest  independent  en9ty   A single screen with A User Interface

Slide 148

Slide 148 text

Services Never  underes9mate  the  quiet  guy  in  the  class   Runs in the BG performing long-running Operations No UI

Slide 149

Slide 149 text

Filesystem, SQLite Content Providers Don’t  we  all  love  the  mail  man?  :)   Manages a shared set of application data Content provider sets permissions

Slide 150

Slide 150 text

Screen off, Batt low, Data DL Broadcast Receivers Because  lets  face  it  ,  the  familiar  IPL  sound  broadcasted  makes  us  ROAR!   Responds to system wide broadcasts Apps can also broadcast Notification

Slide 151

Slide 151 text

K   Intents We  NEED  to  know!   Activities Services Broadcast Recievers +   +   KILLER

Slide 152

Slide 152 text

No content

Slide 153

Slide 153 text

myapp.apk

Slide 154

Slide 154 text

https://market.android.com/publish/signup $25.00 One  9me  registera9on  fee  

Slide 155

Slide 155 text

WE R GREEDY ! Your Application here :)

Slide 156

Slide 156 text

“Stay Hungry , Stay Foolish”

Slide 157

Slide 157 text

No content