SlideShare a Scribd company logo
Dominik Helleberg | inovex GmbH


Core Android
Dominik Helleberg
 Mobile Development
 Android
 HTML5




   http://dominik-helleberg.de/+
Core

Android
Warum?
                 Neugier
                 Verständnis
                             - Bugs
                             - Beispiele
                             - Doku
                 Anwendungen / Projekte
http://www.ouya.tv/about/
https://mediacenter.motorola.com/Image-Gallery/MOTOACTV-Golf-Edition-8c1.aspx
http://www.tolino.de
https://www.honeywellaidc.com/en-US/resources/image-library/Pages/default.aspx?
Category=7800&keywords=7800&title=7800&description=7800
Android is different…
Android is open?




https://twitter.com/Arubin/status/27808662429
Android Architektur
   Stock Apps                       User Apps


 Framework / API
                                        Java
 System Services

            Dalvik / Runtime / Zygote


  Libs                HAL                      Init

                     Kernel
Android Architektur / Source




                                                      https://android.googlesource.com/
   Stock Apps                       User Apps


 Framework / API
                                        Java
 System Services

            Dalvik / Runtime / Zygote


  Libs                HAL                      Init

                     Kernel
Get the source!
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo


$ repo init -u https://android.googlesource.com/platform/manifest


$ repo sync



Check: http://source.android.com
Sources: approx. 16 GB
Getting around AOSP
abi           docs              packages
bionic        external          pdk
bootable      frameworks        prebuilts
build         gdk               sdk
cts           hardware          system
dalvik        libcore           tools
development   libnativehelper
device        ndk
Getting around AOSP
               Stock Apps
 abi           docs
                  IMEs           packages
               Wallpapers..
 bionic        external          pdk
 bootable      frameworks        prebuilts
android core
  build
 Framework     gdk               sdk
    icons
 cts           hardware          system
 dalvik        libcore           tools
                               The....
 development   libnativehelper S D K
 device        ndk
packages
  Calendar

  Contacts

  Gallery2

  Launcher2
Framework
base/core/java/android/app/ActivityManager.java


base/core/java/android/widget/RelativeLayout.java


base/packages/SystemUI/res/*
base/core/res/res/*


base/core/java/android/os/PowerManager.java
sdk

bash_completion/adb.bash


screenshot/
Compile...
 You need:
 •  Ubuntu LTS (10.04) or Mac OS X
 •  A bunch of tools
 •  HDD space (~ 30 GB)
 •  Time (Hours - depending on your HW)
Compile...
 $ source build/envsetup.sh


 including device/generic/armv7-a-neon/vendorsetup.sh
 including device/generic/armv7-a/vendorsetup.sh
 ....
Compile...
 $ lunch
 You're building on Linux
 Lunch menu... pick a combo:
   1. full-eng
   2. full_x86-eng
   3. vbox_x86-eng
   4. full_mips-eng
   5. full_grouper-userdebug
  ...
 Which would you like? [full-eng]
zzzzzZZZZZZzzzzzz
device mappings
crespo              Samsung    Nexus S

manta               Samsung    Nexus 10

mako                LG         Nexus 4

grouper / tilapia   Asus       Nexus 7

toro / maguro       Samsung    Galaxy Nexus

wingray             Motorola   Xoom
…zzZZZzz… and run!
 $ emulator &
…zzZZZzz… and run!
Architecture by example - GPS
   Stock Apps                       User Apps


 Framework / API
                                        Java
 System Services

            Dalvik / Runtime / Zygote


  Libs                HAL                      Init

                     Kernel
Architecture by example - GPS
         Stock Apps                 User Apps


locationManager = (LocationManager) 	
     	this.getSystemService(Context.LOCATION_SERVICE);	
	
locationManager.requestLocationUpdates(	
     	LocationManager.GPS_PROVIDER, 0, 0,
     	locationListener);
Architecture by example - GPS
 frameworks/base/location/java/android/location/
 LocationManager.java

     Framework / API             System Services

	try {	
        mService.requestLocationUpdates(request,
     	     	transport, intent, packageName);	
  } catch (RemoteException e) {	
       Log.e(TAG, "RemoteException", e);	
  }
Architecture by example - GPS
frameworks/base/location/java/android/location/
LocationManager.java

     Framework / API            System Services

	
private final ILocationManager mService;
Architecture by example - GPS
    frameworks/base/location/java/android/location/
    ILocationListener.aidl

        Framework / API             System Services

	void requestLocationUpdates(	
	      	in LocationRequest request, 	
	      	in ILocationListener listener,	
	      	in PendingIntent intent, 	
	      	String packageName);
Architecture by example - GPS
 frameworks/base/services/java/com/android/server/
 LocationManagerService.java

     Framework / API            System Services

		
	LocationProviderInterface provider =
     	mProvidersByName.get(name);	
	...	
	provider.setRequest(providerRequest,
     	worksource);
Architecture by example - GPS
 frameworks/base/services/java/com/android/server/
 location/GpsLocationProvider.java

      Framework / API            System Services

		
		
	private native boolean native_start();
Architecture by example - GPS
    hardware/libhardware/include/hardware/gps.h

 	/** Represents the standard GPS interface. */	
typedef struct {	
  		
  	 int    (*init)( GpsCallbacks* callbacks );	
	
     /** Starts navigating. */	
     int   (*start)( void );	
...	
	
	        Libs             HAL               Init
Architecture by example - GPS

    development/tools/emulator/system/gps/
    gps_qemu.c


    device/samsung/manta/gps/gps.exynos5.so
		
	

         Libs          HAL            Init
What’s next? Tips + Tricks
•  Level 1:
     Check source for samples and understanding
•  Level 2:
     Compile your own emulator images
•  Level 3:
     Get a supported nexus device and burn images
•  Level 4:
     Get a development board an build android
     embedded Software
Level 1: grep
$ jgrep LocationManager

./base/core/java/android/app/ContextImpl.java:60:import android.location.ILocationManager;
./base/core/java/android/app/ContextImpl.java:61:import android.location.LocationManager;
./base/core/java/android/app/ContextImpl.java:403:           return new LocationManager(ctx, ILocationManager.Stub.asInterfa
./base/core/java/android/content/Context.java:1749: * <dd> A {@link android.location.LocationManager} for controlling location
./base/core/java/android/content/Context.java:1795: * @see android.location.LocationManager
./base/core/java/android/content/Context.java:1912: * android.location.LocationManager} for controlling location
./base/core/java/android/content/Context.java:1916: * @see android.location.LocationManager
./base/core/java/android/provider/Settings.java:3096:    * LocationManager service for testing purposes during application deve
./base/core/java/android/webkit/GeolocationService.java:23:import android.location.LocationManager;
./base/core/java/android/webkit/GeolocationService.java:39: private LocationManager mLocationManager;
./base/core/java/android/webkit/GeolocationService.java:54:    mLocationManager = (LocationManager) context.getSystemServ
./base/core/java/android/webkit/GeolocationService.java:55:    if (mLocationManager == null) {
./base/core/java/android/webkit/GeolocationService.java:118:     if (LocationManager.NETWORK_PROVIDER.equal
....
Level 1: AndroidXRef




http://androidxref.com/
Level 1: explain-plz
      @local:/Volumes/android/dalvik $ explain-plz

      Explanation for folder dalvik:
       This directory contains the Dalvik virtual machine and core class library,
       as well as related tools, libraries, and tests.

         Git project directory: dalvik
         Git fetch URL: https://android.googlesource.com/platform/dalvik

         Subfolders with explanation:
          dexdump
          dexgen
          dx
          opcode-gen
          tools/hprof-conv
          vm

https://github.com/timroes/explain-plz
Level 2: ccache
$ export USE_CCACHE=1
$ export CCACHE_DIR=/<path_of_your_choice>/.ccache
$ prebuilts/misc/linux-x86/ccache/ccache -M 50G

The suggested cache size is 50-100G.
You can watch ccache being used by doing the following:

$ watch -n1 -d prebuilts/misc/linux-x86/ccache/ccache -s




http://source.android.com/source/building.html
Level 3
Level 4




https://android-build.linaro.org/
Credits
http://www.ouya.tv/about/
https://mediacenter.motorola.com/Image-Gallery/MOTOACTV-Golf-Edition-8c1.aspx
http://www.tolino.de
https://www.honeywellaidc.com/en-US/resources/image-library/Pages/default.aspx?
Category=7800&keywords=7800&title=7800&description=7800
https://android-build.linaro.org/
http://source.android.com/source/building.html
DANKE!

More Related Content

What's hot

Android ndk
Android ndkAndroid ndk
Android ndk
Khiem-Kim Ho Xuan
 
Android reverse engineering: understanding third-party applications. OWASP EU...
Android reverse engineering: understanding third-party applications. OWASP EU...Android reverse engineering: understanding third-party applications. OWASP EU...
Android reverse engineering: understanding third-party applications. OWASP EU...
Internet Security Auditors
 
How to reverse engineer Android applications
How to reverse engineer Android applicationsHow to reverse engineer Android applications
How to reverse engineer Android applications
hubx
 
How to Add Original Library to Android NDK
How to Add Original Library to Android NDKHow to Add Original Library to Android NDK
Steelcon 2015 Reverse-Engineering Obfuscated Android Applications
Steelcon 2015 Reverse-Engineering Obfuscated Android ApplicationsSteelcon 2015 Reverse-Engineering Obfuscated Android Applications
Steelcon 2015 Reverse-Engineering Obfuscated Android Applications
Tom Keetch
 
Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)
Xavier Hallade
 
Note - Apache Maven Intro
Note - Apache Maven IntroNote - Apache Maven Intro
Note - Apache Maven Introboyw165
 
Mastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
Mastering the NDK with Android Studio 2.0 and the gradle-experimental pluginMastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
Mastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
Xavier Hallade
 
Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)
DECK36
 
How to Reverse Engineer Web Applications
How to Reverse Engineer Web ApplicationsHow to Reverse Engineer Web Applications
How to Reverse Engineer Web Applications
Jarrod Overson
 
Cross-Platform App Development with Flutter, Xamarin, React Native
Cross-Platform App Development with Flutter, Xamarin, React NativeCross-Platform App Development with Flutter, Xamarin, React Native
Cross-Platform App Development with Flutter, Xamarin, React Native
Korhan Bircan
 
Gerência de Configuração com Maven
Gerência de Configuração com MavenGerência de Configuração com Maven
Gerência de Configuração com Mavenelliando dias
 
Maven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patternsMaven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patternselliando dias
 
How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassia...
How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassia...How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassia...
How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassia...
Atlassian
 
How to Make Android Native Application
How to Make Android Native ApplicationHow to Make Android Native Application
Asynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowAsynchronous Systems with Fn Flow
Asynchronous Systems with Fn Flow
José Paumard
 
Maven 3 Overview
Maven 3  OverviewMaven 3  Overview
Maven 3 Overview
Mike Ensor
 
Mobile development in 2020
Mobile development in 2020 Mobile development in 2020
Mobile development in 2020
Bogusz Jelinski
 

What's hot (20)

Android ndk
Android ndkAndroid ndk
Android ndk
 
Android reverse engineering: understanding third-party applications. OWASP EU...
Android reverse engineering: understanding third-party applications. OWASP EU...Android reverse engineering: understanding third-party applications. OWASP EU...
Android reverse engineering: understanding third-party applications. OWASP EU...
 
How to reverse engineer Android applications
How to reverse engineer Android applicationsHow to reverse engineer Android applications
How to reverse engineer Android applications
 
How to Add Original Library to Android NDK
How to Add Original Library to Android NDKHow to Add Original Library to Android NDK
How to Add Original Library to Android NDK
 
Steelcon 2015 Reverse-Engineering Obfuscated Android Applications
Steelcon 2015 Reverse-Engineering Obfuscated Android ApplicationsSteelcon 2015 Reverse-Engineering Obfuscated Android Applications
Steelcon 2015 Reverse-Engineering Obfuscated Android Applications
 
Using Maven2
Using Maven2Using Maven2
Using Maven2
 
Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)
 
Note - Apache Maven Intro
Note - Apache Maven IntroNote - Apache Maven Intro
Note - Apache Maven Intro
 
Mastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
Mastering the NDK with Android Studio 2.0 and the gradle-experimental pluginMastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
Mastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
 
Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)
 
How to Reverse Engineer Web Applications
How to Reverse Engineer Web ApplicationsHow to Reverse Engineer Web Applications
How to Reverse Engineer Web Applications
 
Cross-Platform App Development with Flutter, Xamarin, React Native
Cross-Platform App Development with Flutter, Xamarin, React NativeCross-Platform App Development with Flutter, Xamarin, React Native
Cross-Platform App Development with Flutter, Xamarin, React Native
 
Gerência de Configuração com Maven
Gerência de Configuração com MavenGerência de Configuração com Maven
Gerência de Configuração com Maven
 
Java platform
Java platformJava platform
Java platform
 
Maven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patternsMaven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patterns
 
How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassia...
How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassia...How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassia...
How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassia...
 
How to Make Android Native Application
How to Make Android Native ApplicationHow to Make Android Native Application
How to Make Android Native Application
 
Asynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowAsynchronous Systems with Fn Flow
Asynchronous Systems with Fn Flow
 
Maven 3 Overview
Maven 3  OverviewMaven 3  Overview
Maven 3 Overview
 
Mobile development in 2020
Mobile development in 2020 Mobile development in 2020
Mobile development in 2020
 

Viewers also liked

Java Svet - Communication Between Android App Components
Java Svet - Communication Between Android App ComponentsJava Svet - Communication Between Android App Components
Java Svet - Communication Between Android App Components
Aleksandar Ilić
 
Android Ice Cream Sandwich WJAX 2011
Android Ice Cream Sandwich WJAX 2011Android Ice Cream Sandwich WJAX 2011
Android Ice Cream Sandwich WJAX 2011Dominik Helleberg
 
Supercharge your ui
Supercharge your uiSupercharge your ui
Supercharge your ui
Dominik Helleberg
 
Embedded Android
Embedded AndroidEmbedded Android
Embedded Android
Dominik Helleberg
 
Android Studio und gradle
Android Studio und gradleAndroid Studio und gradle
Android Studio und gradle
Dominik Helleberg
 
Why do we need more nerds?
Why do we need more nerds?Why do we need more nerds?
Why do we need more nerds?
Dominik Helleberg
 
Android Development Tools
Android Development ToolsAndroid Development Tools
Android Development Tools
Dominik Helleberg
 
One APK to rule them all
One APK to rule them allOne APK to rule them all
One APK to rule them all
Dominik Helleberg
 
Android ActionBar Navigation reloaded
Android ActionBar Navigation reloadedAndroid ActionBar Navigation reloaded
Android ActionBar Navigation reloaded
Dominik Helleberg
 
Android Studio vs. ADT
Android Studio vs. ADTAndroid Studio vs. ADT
Android Studio vs. ADT
Dominik Helleberg
 
Android Development Tools
Android Development ToolsAndroid Development Tools
Android Development Tools
Dominik Helleberg
 
Renderscript in Android 3.x
Renderscript in Android 3.xRenderscript in Android 3.x
Renderscript in Android 3.x
Dominik Helleberg
 
Android Effective UI: Tips, Tricks and Patterns
Android Effective UI: Tips, Tricks and PatternsAndroid Effective UI: Tips, Tricks and Patterns
Android Effective UI: Tips, Tricks and Patterns
Adham Enaya
 
Android Enterprise Integration
Android Enterprise IntegrationAndroid Enterprise Integration
Android Enterprise IntegrationDominik Helleberg
 
Rich Graphics & OpenGL mit Android
Rich Graphics & OpenGL mit AndroidRich Graphics & OpenGL mit Android
Rich Graphics & OpenGL mit Android
Dominik Helleberg
 
Android Camera Architecture
Android Camera ArchitectureAndroid Camera Architecture
Android Camera Architecture
Picker Weng
 
Android app dev company in pune
Android app dev company in puneAndroid app dev company in pune
Android app dev company in pune
Ashish Gujrathi
 
Android bluetooth
Android bluetoothAndroid bluetooth
Android bluetooth
Masahiro Hidaka
 
Camera 2.0 in Android 4.2
Camera 2.0 in Android 4.2 Camera 2.0 in Android 4.2
Camera 2.0 in Android 4.2
Balwinder Kaur
 
Clean architecture
Clean architectureClean architecture
Clean architectureandbed
 

Viewers also liked (20)

Java Svet - Communication Between Android App Components
Java Svet - Communication Between Android App ComponentsJava Svet - Communication Between Android App Components
Java Svet - Communication Between Android App Components
 
Android Ice Cream Sandwich WJAX 2011
Android Ice Cream Sandwich WJAX 2011Android Ice Cream Sandwich WJAX 2011
Android Ice Cream Sandwich WJAX 2011
 
Supercharge your ui
Supercharge your uiSupercharge your ui
Supercharge your ui
 
Embedded Android
Embedded AndroidEmbedded Android
Embedded Android
 
Android Studio und gradle
Android Studio und gradleAndroid Studio und gradle
Android Studio und gradle
 
Why do we need more nerds?
Why do we need more nerds?Why do we need more nerds?
Why do we need more nerds?
 
Android Development Tools
Android Development ToolsAndroid Development Tools
Android Development Tools
 
One APK to rule them all
One APK to rule them allOne APK to rule them all
One APK to rule them all
 
Android ActionBar Navigation reloaded
Android ActionBar Navigation reloadedAndroid ActionBar Navigation reloaded
Android ActionBar Navigation reloaded
 
Android Studio vs. ADT
Android Studio vs. ADTAndroid Studio vs. ADT
Android Studio vs. ADT
 
Android Development Tools
Android Development ToolsAndroid Development Tools
Android Development Tools
 
Renderscript in Android 3.x
Renderscript in Android 3.xRenderscript in Android 3.x
Renderscript in Android 3.x
 
Android Effective UI: Tips, Tricks and Patterns
Android Effective UI: Tips, Tricks and PatternsAndroid Effective UI: Tips, Tricks and Patterns
Android Effective UI: Tips, Tricks and Patterns
 
Android Enterprise Integration
Android Enterprise IntegrationAndroid Enterprise Integration
Android Enterprise Integration
 
Rich Graphics & OpenGL mit Android
Rich Graphics & OpenGL mit AndroidRich Graphics & OpenGL mit Android
Rich Graphics & OpenGL mit Android
 
Android Camera Architecture
Android Camera ArchitectureAndroid Camera Architecture
Android Camera Architecture
 
Android app dev company in pune
Android app dev company in puneAndroid app dev company in pune
Android app dev company in pune
 
Android bluetooth
Android bluetoothAndroid bluetooth
Android bluetooth
 
Camera 2.0 in Android 4.2
Camera 2.0 in Android 4.2 Camera 2.0 in Android 4.2
Camera 2.0 in Android 4.2
 
Clean architecture
Clean architectureClean architecture
Clean architecture
 

Similar to Core Android

eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011
pundiramit
 
Introduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud RunIntroduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud Run
Saiyam Pathak
 
Custom Buildpacks and Data Services
Custom Buildpacks and Data ServicesCustom Buildpacks and Data Services
Custom Buildpacks and Data Services
Tom Kranz
 
Getting Native with NDK
Getting Native with NDKGetting Native with NDK
Getting Native with NDK
ナム-Nam Nguyễn
 
Improve Android System Component Performance
Improve Android System Component PerformanceImprove Android System Component Performance
Improve Android System Component Performance
National Cheng Kung University
 
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
VMware Tanzu
 
Discover System Facilities inside Your Android Phone
Discover System Facilities inside Your Android Phone Discover System Facilities inside Your Android Phone
Discover System Facilities inside Your Android Phone
National Cheng Kung University
 
Understanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual MachineUnderstanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual Machine
National Cheng Kung University
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalNAVER D2
 
Android Embedded - Smart Hubs als Schaltzentrale des IoT
Android Embedded - Smart Hubs als Schaltzentrale des IoTAndroid Embedded - Smart Hubs als Schaltzentrale des IoT
Android Embedded - Smart Hubs als Schaltzentrale des IoT
inovex GmbH
 
sMash at May NYPHP UG
sMash at May NYPHP UGsMash at May NYPHP UG
sMash at May NYPHP UG
Project Zero
 
Android basics
Android basicsAndroid basics
Plugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGemsPlugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGems
Sadayuki Furuhashi
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UK
José Paumard
 
Android 101 - Introduction to Android Development
Android 101 - Introduction to Android DevelopmentAndroid 101 - Introduction to Android Development
Android 101 - Introduction to Android Development
Andy Scherzinger
 
Vagrant or docker for java dev environment
Vagrant or docker for java dev environmentVagrant or docker for java dev environment
Vagrant or docker for java dev environment
Orest Ivasiv
 
Very Early Review - Rocket(CoreOS)
Very Early Review - Rocket(CoreOS)Very Early Review - Rocket(CoreOS)
Very Early Review - Rocket(CoreOS)
충섭 김
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Enginecatherinewall
 

Similar to Core Android (20)

eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011
 
Introduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud RunIntroduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud Run
 
Android session-1-sajib
Android session-1-sajibAndroid session-1-sajib
Android session-1-sajib
 
Custom Buildpacks and Data Services
Custom Buildpacks and Data ServicesCustom Buildpacks and Data Services
Custom Buildpacks and Data Services
 
Getting Native with NDK
Getting Native with NDKGetting Native with NDK
Getting Native with NDK
 
Improve Android System Component Performance
Improve Android System Component PerformanceImprove Android System Component Performance
Improve Android System Component Performance
 
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
 
Discover System Facilities inside Your Android Phone
Discover System Facilities inside Your Android Phone Discover System Facilities inside Your Android Phone
Discover System Facilities inside Your Android Phone
 
Understanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual MachineUnderstanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual Machine
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_final
 
Android Embedded - Smart Hubs als Schaltzentrale des IoT
Android Embedded - Smart Hubs als Schaltzentrale des IoTAndroid Embedded - Smart Hubs als Schaltzentrale des IoT
Android Embedded - Smart Hubs als Schaltzentrale des IoT
 
sMash at May NYPHP UG
sMash at May NYPHP UGsMash at May NYPHP UG
sMash at May NYPHP UG
 
Android basics
Android basicsAndroid basics
Android basics
 
Plugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGemsPlugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGems
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UK
 
Android 101 - Introduction to Android Development
Android 101 - Introduction to Android DevelopmentAndroid 101 - Introduction to Android Development
Android 101 - Introduction to Android Development
 
Vagrant or docker for java dev environment
Vagrant or docker for java dev environmentVagrant or docker for java dev environment
Vagrant or docker for java dev environment
 
Very Early Review - Rocket(CoreOS)
Very Early Review - Rocket(CoreOS)Very Early Review - Rocket(CoreOS)
Very Early Review - Rocket(CoreOS)
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 

Core Android

  • 1. Dominik Helleberg | inovex GmbH Core Android
  • 2. Dominik Helleberg Mobile Development Android HTML5 http://dominik-helleberg.de/+
  • 4. Warum? Neugier Verständnis - Bugs - Beispiele - Doku Anwendungen / Projekte http://www.ouya.tv/about/ https://mediacenter.motorola.com/Image-Gallery/MOTOACTV-Golf-Edition-8c1.aspx http://www.tolino.de https://www.honeywellaidc.com/en-US/resources/image-library/Pages/default.aspx? Category=7800&keywords=7800&title=7800&description=7800
  • 7. Android Architektur Stock Apps User Apps Framework / API Java System Services Dalvik / Runtime / Zygote Libs HAL Init Kernel
  • 8. Android Architektur / Source https://android.googlesource.com/ Stock Apps User Apps Framework / API Java System Services Dalvik / Runtime / Zygote Libs HAL Init Kernel
  • 9. Get the source! $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo $ chmod a+x ~/bin/repo $ repo init -u https://android.googlesource.com/platform/manifest $ repo sync Check: http://source.android.com Sources: approx. 16 GB
  • 10. Getting around AOSP abi docs packages bionic external pdk bootable frameworks prebuilts build gdk sdk cts hardware system dalvik libcore tools development libnativehelper device ndk
  • 11. Getting around AOSP Stock Apps abi docs IMEs packages Wallpapers.. bionic external pdk bootable frameworks prebuilts android core build Framework gdk sdk icons cts hardware system dalvik libcore tools The.... development libnativehelper S D K device ndk
  • 12. packages Calendar Contacts Gallery2 Launcher2
  • 15. Compile... You need: •  Ubuntu LTS (10.04) or Mac OS X •  A bunch of tools •  HDD space (~ 30 GB) •  Time (Hours - depending on your HW)
  • 16. Compile... $ source build/envsetup.sh including device/generic/armv7-a-neon/vendorsetup.sh including device/generic/armv7-a/vendorsetup.sh ....
  • 17. Compile... $ lunch You're building on Linux Lunch menu... pick a combo: 1. full-eng 2. full_x86-eng 3. vbox_x86-eng 4. full_mips-eng 5. full_grouper-userdebug ... Which would you like? [full-eng]
  • 19. device mappings crespo Samsung Nexus S manta Samsung Nexus 10 mako LG Nexus 4 grouper / tilapia Asus Nexus 7 toro / maguro Samsung Galaxy Nexus wingray Motorola Xoom
  • 20. …zzZZZzz… and run! $ emulator &
  • 22. Architecture by example - GPS Stock Apps User Apps Framework / API Java System Services Dalvik / Runtime / Zygote Libs HAL Init Kernel
  • 23. Architecture by example - GPS Stock Apps User Apps locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE); locationManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, 0, 0, locationListener);
  • 24. Architecture by example - GPS frameworks/base/location/java/android/location/ LocationManager.java Framework / API System Services try { mService.requestLocationUpdates(request, transport, intent, packageName); } catch (RemoteException e) { Log.e(TAG, "RemoteException", e); }
  • 25. Architecture by example - GPS frameworks/base/location/java/android/location/ LocationManager.java Framework / API System Services private final ILocationManager mService;
  • 26. Architecture by example - GPS frameworks/base/location/java/android/location/ ILocationListener.aidl Framework / API System Services void requestLocationUpdates( in LocationRequest request, in ILocationListener listener, in PendingIntent intent, String packageName);
  • 27. Architecture by example - GPS frameworks/base/services/java/com/android/server/ LocationManagerService.java Framework / API System Services LocationProviderInterface provider = mProvidersByName.get(name); ... provider.setRequest(providerRequest, worksource);
  • 28. Architecture by example - GPS frameworks/base/services/java/com/android/server/ location/GpsLocationProvider.java Framework / API System Services private native boolean native_start();
  • 29. Architecture by example - GPS hardware/libhardware/include/hardware/gps.h /** Represents the standard GPS interface. */ typedef struct { int (*init)( GpsCallbacks* callbacks ); /** Starts navigating. */ int (*start)( void ); ... Libs HAL Init
  • 30. Architecture by example - GPS development/tools/emulator/system/gps/ gps_qemu.c device/samsung/manta/gps/gps.exynos5.so Libs HAL Init
  • 31. What’s next? Tips + Tricks •  Level 1: Check source for samples and understanding •  Level 2: Compile your own emulator images •  Level 3: Get a supported nexus device and burn images •  Level 4: Get a development board an build android embedded Software
  • 32. Level 1: grep $ jgrep LocationManager ./base/core/java/android/app/ContextImpl.java:60:import android.location.ILocationManager; ./base/core/java/android/app/ContextImpl.java:61:import android.location.LocationManager; ./base/core/java/android/app/ContextImpl.java:403: return new LocationManager(ctx, ILocationManager.Stub.asInterfa ./base/core/java/android/content/Context.java:1749: * <dd> A {@link android.location.LocationManager} for controlling location ./base/core/java/android/content/Context.java:1795: * @see android.location.LocationManager ./base/core/java/android/content/Context.java:1912: * android.location.LocationManager} for controlling location ./base/core/java/android/content/Context.java:1916: * @see android.location.LocationManager ./base/core/java/android/provider/Settings.java:3096: * LocationManager service for testing purposes during application deve ./base/core/java/android/webkit/GeolocationService.java:23:import android.location.LocationManager; ./base/core/java/android/webkit/GeolocationService.java:39: private LocationManager mLocationManager; ./base/core/java/android/webkit/GeolocationService.java:54: mLocationManager = (LocationManager) context.getSystemServ ./base/core/java/android/webkit/GeolocationService.java:55: if (mLocationManager == null) { ./base/core/java/android/webkit/GeolocationService.java:118: if (LocationManager.NETWORK_PROVIDER.equal ....
  • 34. Level 1: explain-plz @local:/Volumes/android/dalvik $ explain-plz Explanation for folder dalvik: This directory contains the Dalvik virtual machine and core class library, as well as related tools, libraries, and tests. Git project directory: dalvik Git fetch URL: https://android.googlesource.com/platform/dalvik Subfolders with explanation: dexdump dexgen dx opcode-gen tools/hprof-conv vm https://github.com/timroes/explain-plz
  • 35. Level 2: ccache $ export USE_CCACHE=1 $ export CCACHE_DIR=/<path_of_your_choice>/.ccache $ prebuilts/misc/linux-x86/ccache/ccache -M 50G The suggested cache size is 50-100G. You can watch ccache being used by doing the following: $ watch -n1 -d prebuilts/misc/linux-x86/ccache/ccache -s http://source.android.com/source/building.html