SlideShare ist ein Scribd-Unternehmen logo
1 von 39
Downloaden Sie, um offline zu lesen
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!

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

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