16
Nanik Tolaram [email protected] AOSP Workshop AOSP Workshop Sydney Devfest 7th November 2015

Sydney Devfest 2015 AOSP Workshop

Embed Size (px)

Citation preview

Page 1: Sydney Devfest 2015 AOSP Workshop

Nanik [email protected]

AOSP WorkshopAOSP Workshop

Sydney Devfest7th November 2015

Page 2: Sydney Devfest 2015 AOSP Workshop

• Senior Android Platform Engineer- Senior Android Platform Engineer- BlocksGlobal.comBlocksGlobal.com

• ScreenerOS – http://screener.digital ScreenerOS – http://screener.digital

• Lumen Health – Lumen Health – http://lumenhealth.co (pilot) (pilot)

• Android writer for magazine.odroid.comAndroid writer for magazine.odroid.com

• AOSP Contributor (when time permits)AOSP Contributor (when time permits)

About MeAbout Me

Page 3: Sydney Devfest 2015 AOSP Workshop

• Android Open Source ProjectAndroid Open Source Project

• Powers BILLIONS of Android devices !Powers BILLIONS of Android devices !

• Who uses it ? What does it contains ? Why you Who uses it ? What does it contains ? Why you want to know ?want to know ?

• Future OpportunityFuture Opportunity

• Source – android.googlesource.comSource – android.googlesource.com

AOSPAOSP

Page 4: Sydney Devfest 2015 AOSP Workshop

Android StackAndroid Stack

Page 5: Sydney Devfest 2015 AOSP Workshop

Linux KernelLinux Kernel• Most are pre-4.x kernelMost are pre-4.x kernel

• “ “Android”-ify KernelAndroid”-ify Kernel

• Few vendors provide updated kernelFew vendors provide updated kernel

• Maintained by open source communityMaintained by open source community

Page 6: Sydney Devfest 2015 AOSP Workshop

Framework + LibraryFramework + Library• Between application and kernelBetween application and kernel

• Android SDK lives hereAndroid SDK lives here

• C,C++ and Java universeC,C++ and Java universe

• Frequent update (security and bug fixes)Frequent update (security and bug fixes)

• Dalvik/ART is hereDalvik/ART is here

Page 7: Sydney Devfest 2015 AOSP Workshop

ApplicationsApplications• Standard bundled appsStandard bundled apps

• Production ready Production ready

• Extend to create your own appExtend to create your own app

• Not IDE friendlyNot IDE friendly

Page 8: Sydney Devfest 2015 AOSP Workshop

Vendor DriverVendor Driver• Binary filesBinary files

• Heavily reliance on hardware vendorHeavily reliance on hardware vendor

• No update == No future Android supportNo update == No future Android support

• Android specific driversAndroid specific drivers

Page 9: Sydney Devfest 2015 AOSP Workshop

• Intel i5 or i7 Intel i5 or i7

• 16GB RAM (minimum)16GB RAM (minimum)

• SSD drive (highly recommended)SSD drive (highly recommended)

• Min 50GB free spaceMin 50GB free space

• 64-bit Linux OS (highly recommended)64-bit Linux OS (highly recommended)

Build SystemBuild System

Page 10: Sydney Devfest 2015 AOSP Workshop

How Big ?How Big ?

(*) size not includes .repo/, out/, .git/ directories(*) size not includes .repo/, out/, .git/ directories(+) size does not include out/, prebuilts/, device/, development/, docs/, ndk/, pdk/, vendor/, tools/, developers/, (+) size does not include out/, prebuilts/, device/, development/, docs/, ndk/, pdk/, vendor/, tools/, developers/, sdk/, hardware/, dalvik/, .repo/, .git/, kernel/sdk/, hardware/, dalvik/, .repo/, .git/, kernel/

Page 11: Sydney Devfest 2015 AOSP Workshop

Nexus DevicesNexus Devices• Straight build from AOSPStraight build from AOSP

• Extra driver download Extra driver download

• Maintained by GoogleMaintained by Google

• Custom Android from communityCustom Android from community

• Always up-to-dateAlways up-to-date

Page 12: Sydney Devfest 2015 AOSP Workshop

PartitionsPartitions• Android device Android device ISIS a “computer” a “computer”

• Partitions - /system, /data, /cache, /recoveryPartitions - /system, /data, /cache, /recovery

• Flashing = Writing to partitionFlashing = Writing to partition

• Fastboot – gateway to flashing (maintained by Fastboot – gateway to flashing (maintained by vendor)vendor)

Page 13: Sydney Devfest 2015 AOSP Workshop

BootloaderBootloader• Majority are custom u-boot Majority are custom u-boot

• Factory locked (need to unlock)Factory locked (need to unlock)

• Security first line of defenceSecurity first line of defence

• Updated along with radio (GSM)Updated along with radio (GSM)

Page 14: Sydney Devfest 2015 AOSP Workshop

ImagesImages• system.img → /system partition (core Android system.img → /system partition (core Android framework)framework)

• boot.img → init/ramdisk + kernelboot.img → init/ramdisk + kernel

• recovery.img → /recovery partitionrecovery.img → /recovery partition

• userdata.img → /data partitionuserdata.img → /data partition

• cache.img → /cache partitioncache.img → /cache partition

Page 15: Sydney Devfest 2015 AOSP Workshop

WorkshopWorkshop• Setup machine / VMSetup machine / VM

• Checkout code (android-6.0.0_r1)Checkout code (android-6.0.0_r1)

Hardware Drivers -Hardware Drivers - developers.google.com/android/nexus/driversdevelopers.google.com/android/nexus/drivers

Build (1-2 hours)Build (1-2 hours)

Flash to your device Flash to your device

Page 16: Sydney Devfest 2015 AOSP Workshop

Source DivingSource Diving

android-6.0.0_r26