SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
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!

Contenu connexe

Tendances

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 applicationshubx
 
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 ApplicationsTom 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 pluginXavier 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 ApplicationsJarrod 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 NativeKorhan 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
 
Asynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowAsynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowJosé Paumard
 
Maven 3 Overview
Maven 3  OverviewMaven 3  Overview
Maven 3 OverviewMike Ensor
 
Mobile development in 2020
Mobile development in 2020 Mobile development in 2020
Mobile development in 2020 Bogusz Jelinski
 

Tendances (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
 

En vedette

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 ComponentsAleksandar 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
 
Android ActionBar Navigation reloaded
Android ActionBar Navigation reloadedAndroid ActionBar Navigation reloaded
Android ActionBar Navigation reloadedDominik 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 PatternsAdham 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 AndroidDominik Helleberg
 
Android Camera Architecture
Android Camera ArchitectureAndroid Camera Architecture
Android Camera ArchitecturePicker Weng
 
Android app dev company in pune
Android app dev company in puneAndroid app dev company in pune
Android app dev company in puneAshish Gujrathi
 
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
 

En vedette (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
 

Similaire à 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 2011pundiramit
 
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 RunSaiyam Pathak
 
Custom Buildpacks and Data Services
Custom Buildpacks and Data ServicesCustom Buildpacks and Data Services
Custom Buildpacks and Data ServicesTom Kranz
 
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
 
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 IoTinovex GmbH
 
sMash at May NYPHP UG
sMash at May NYPHP UGsMash at May NYPHP UG
sMash at May NYPHP UGProject Zero
 
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 RubyGemsSadayuki Furuhashi
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKJosé Paumard
 
Android 101 - Introduction to Android Development
Android 101 - Introduction to Android DevelopmentAndroid 101 - Introduction to Android Development
Android 101 - Introduction to Android DevelopmentAndy 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 environmentOrest 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
 

Similaire à 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
 

Dernier

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 

Dernier (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

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