Embedded Android

1,184 views

Published on

Embedded Android Talk @ Mobile Tec Con 2013 #mtc13

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,184
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Embedded Android

  1. 1. Dominik Helleberg | inovex GmbH Embedded Android
  2. 2. Dominik Helleberg Mobile Development Android Ingress Level 7 http://dominik-helleberg.de/+
  3. 3. Embedded Android? http://developer.android.com/design/index.html
  4. 4. https://twitter.com/Arubin/status/27808662429
  5. 5. Why?
  6. 6. http://commons.wikimedia.org/wiki/File:Helvar_Touchscreen_924.jpg
  7. 7. http://ajaishukla.blogspot.de/2009/03/visit-to-ins-shivalik-indias-newest.html
  8. 8. http://commons.wikimedia.org/wiki/File:Rh%C3%A4tische_Bahn_kaartlezer.JPG
  9. 9. Apps Java Kernel Libs HAL Init Framework / API System Services Dalvik / Runtime / Zygote
  10. 10. Tooling Libraries User Interface Developers Open Source Hardware Support Technology Architecture
  11. 11. http://e.ubmelectronics.com/2013EmbeddedStudy/index.html
  12. 12. http://e.ubmelectronics.com/2013EmbeddedStudy/index.html
  13. 13. Stock Apps Framework / API User Apps Java System Services Dalvik / Runtime / Zygote Kernel Libs HAL Init
  14. 14. Stock Apps Framework / API User Apps Java System Services Dalvik / Runtime / Zygote Kernel Libs Init https://android.googlesource.com/ HAL
  15. 15. Architecture by example - GPS Stock Apps Framework / API User Apps Java System Services Dalvik / Runtime / Zygote Kernel Libs HAL Init
  16. 16. Architecture by example - GPS Stock Apps User Apps locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE); locationManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, 0, 0, locationListener);
  17. 17. frameworks/base/location/java/android/location/ LocationManager.java Architecture by example - GPS Framework / API System Services try { mService.requestLocationUpdates(request, transport, intent, packageName); } catch (RemoteException e) { Log.e(TAG, "RemoteException", e); }
  18. 18. frameworks/base/location/java/android/location/ LocationManager.java private final ILocationManager mService; Architecture by example - GPS Framework / API System Services
  19. 19. frameworks/base/location/java/android/location/ ILocationManager.aidl Architecture by example - GPS Framework / API System Services void requestLocationUpdates( in LocationRequest request, in ILocationListener listener, in PendingIntent intent, String packageName);
  20. 20. frameworks/base/services/java/com/android/server/ LocationManagerService.java LocationProviderInterface provider = mProvidersByName.get(name); ... provider.setRequest(providerRequest, worksource); Architecture by example - GPS Framework / API System Services
  21. 21. frameworks/base/services/java/com/android/server/ location/GpsLocationProvider.java private native boolean native_start(); Architecture by example - GPS Framework / API System Services
  22. 22. hardware/libhardware/include/hardware/gps.h /** Represents the standard GPS interface. */ typedef struct { int (*init)( GpsCallbacks* callbacks ); /** Starts navigating. */ int (*start)( void ); ... Architecture by example - GPS Libs HAL Init
  23. 23. development/tools/emulator/system/gps/ gps_qemu.c device/samsung/manta/gps/gps.exynos5.so Architecture by example - GPS Libs HAL Init
  24. 24. Apps Java Kernel Libs HAL Init Framework / API System Services Dalvik / Runtime / Zygote
  25. 25. §  Freescale BSP §  7 GB Source §  Compile Time ~ 45 minutes §  „Deployment Time“ ~ 5-10 minutes §  Dependencies ususally fail at runtime §  You can change everything... Maybe you shouldn‘t ;)
  26. 26. §  Custom WiFi §  Custom Recovery §  New APIs for eINK Display §  Custom USB and Storage §  System updates §  Boot time optimization §  Battery Life Management
  27. 27. §  Custom WiFi §  Custom Recovery §  New APIs for eINK Display §  Custom USB and Storage §  System updates §  Boot time optimization §  Battery Life Management
  28. 28. New APIs for eINK Display §  300 – 900 ms refresh §  Update Modes to reduce ghosting http://commons.wikimedia.org/wiki/File:EInk_Refresh.gif http://commons.wikimedia.org/wiki/File:EInk_simplified.png
  29. 29. Custom USB and Storage Internal SD-Card Ext. SD- Card USB
  30. 30. invalidate()   externalStorage()   TolinoApp Auth | Shop | Cloud-Storage | Settings | WiFi Auth | Local Storage Java Kernel Libs HAL Init Framework / API System Services Dalvik / Runtime / Zygote
  31. 31. bootloader kernel init service manager zygote daemons boot animiation System Server Package Manager Activity Manager Power Manager ... launcher
  32. 32. bootloader kernel init service manager zygote daemons boot animiation System Server Package Manager Activity Manager Power Manager ... launcher
  33. 33. /sys/devices/system/cpu/cpuX/cpufreq/stats/time_in_state       160000  632455   400000  781   800000  8825       deepSleepTime  =      SystemClock.elapsedRealtime()  -­‐  (Σ  (all  cpu_states));   deepSleepTime  =      SystemClock.elapsedRealtime()  -­‐    SystemClock.uptimeMillis();  
  34. 34. $  adb  shell  dumpsys  batteryinfo       ....   Statistics  since  last  charge:      System  starts:  0,  currently  on  battery:  false      Time  on  battery:  4d  0h  38m  8s  373ms  (5,3%)  realtime,  5m  55s  182ms  (0,0%)  uptime      Total  run  time:  75d  13h  54m  39s  222ms  realtime,  5h  16m  0s  646ms  uptime,        Screen  on:  5m  46s  126ms  (0,1%),  Input  events:  0,  Active  phone  call:  0ms  (0,0%)      Screen  brightnesses:  dark  8s  614ms  (2,5%),  medium  5m  37s  512ms  (97,5%)      Kernel  Wake  lock  "PowerManagerService":  5s  613ms    (25  times)  realtime      Kernel  Wake  lock  "alarm":  1s  676ms    (9  times)  realtime      Kernel  Wake  lock  "android_usb":  2s  222ms    (1  times)  realtime      Kernel  Wake  lock  "power-­‐supply":  13ms    (1  times)  realtime      Kernel  Wake  lock  "KeyEvents":  93ms    (449  times)  realtime      Kernel  Wake  lock  "main":  5m  46s  194ms    (1  times)  realtime      Total  received:  0B,  Total  sent:  0B      Total  full  wakelock  time:  0ms  ,  Total  partial  waklock  time:  5s  576ms        Signal  levels:  No  activity      Signal  scanning  time:  0ms        Radio  types:  No  activity      Radio  data  uptime  when  unplugged:  0  ms      Wifi  on:  0ms  (0,0%),  Wifi  running:  0ms  (0,0%),  Bluetooth  on:  0ms  (0,0%)    
  35. 35. $  adb  shell  bugreport  >  bugreport.txt     $  java  -­‐jar  chkbugreport-­‐0.4-­‐185.jar  bugreport.txt     https://github.com/sonyxperiadev/ChkBugReport
  36. 36. http://beagleboard.org/Products/BeagleBone%20Black
  37. 37. http://www.oreilly.de/catalog/9781449308292/index.html
  38. 38. 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 http://nvidianews.nvidia.com/Releases/NVIDIA-Untethers-Gaming-With-Project- SHIELD-8ee.aspx http://www.android-user.de/Apps/Auerswald-Comfortel-3500-Das-IP-Telefon-mit- Android-2.3-im-Test
  39. 39. DANKE!

×