customing android
play

Customing Android: Looking inside the droids belly Embedded Android - PowerPoint PPT Presentation

Customing Android: Looking inside the droids belly Embedded Android Appliances What do I mean by Appliances? appliance / pl ns/ Noun A device designed to perform a specific task, typically a domestic one. Digital Signage


  1. Customing Android: Looking inside the droids belly

  2. Embedded Android Appliances

  3. What do I mean by Appliances?

  4. ap·pli·ance / əˈ plī ə ns/ Noun A device designed to perform a specific task, typically a domestic one.

  5. Digital Signage Appliances

  6. Why Embedded Android ?

  7. Because... ★ Open Source! ★ Very rich platform & APIs ★ Huge industry & community support ★ Wide variety of devices...

  8. Customisation

  9. 3 Levels

  10. Levels 1. User 2. Root 3. Platform

  11. 1. User Level Customisation Things you can do… ★ Use the Home Intent

  12. Home sweet home

  13. <activity android:name=".MyHomeActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.HOME"/> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity>

  14. mi casa es su casa

  15. 1. User Level Customisation Things you can do… ★ Use the Home Intent ★ Use "public API" Intents (eg. Wifi config)

  16. Intent intent = new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK); startActivityForResult(intent, 1);

  17. Oops…\/

  18. Hang on a sec...

  19. What would Kirk do ?

  20. More Clichés...

  21. packages/Apps/Settings/src/com/and roid/settings/wifi/WifiSettings.java

  22. Intent intent = new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK); intent.putExtra("only_access_points", true); intent.putExtra(" extra_prefs_show_button_bar ", true); intent.putExtra(" wifi_enable_next_on_connect ", true); intent.putExtra(" extra_prefs_set_next_text ", "Finish"); startActivityForResult(intent, 1);

  23. Ta-Da!

  24. 2. Root Level Customisation No soup root for you!

  25. 2. Root Level Customisation Things you can do… ★ Call Privileged API’s (eg. Reboot Device) ★ Silent OTA app install/updates

  26. Silent?

  27. Xposed! ★ Framework for writing modules to... ★ Monkey-patch anything in the Android Java Framework code ★ Modified /system/bin/app_proces s ★ http://repo.xposed.info

  28. 3 OS-Level Customisation

  29. A Trilogy in 4 parts 1. User 2. Root 3. OS -> Android Framework 4. OS -> Kernel

  30. 3. OS - Android Customisation ★ Build Android OS yourself

  31. AOSP and Building Android ★ hundreds of git repos (>400) ★ huge amounts of disk space req'd ★ Ubuntu 12.04 + Oracle JDK ★ >15min on a very fast machine (i7 Quad-core, 8GB, SSDs, hot ccache) ★ and then you need to ‘flash’ img & test on emu/device :-(

  32. 3. OS - Android Customisation Things you can do… ★ choose which apps to build/ship ★ customise UI (eg. rm Systembar, Battery/Audio-Vol warnings) ★ choose CPU platform (eg. x86 or MIPS instead of ARM) but wait theres more…

  33. 3. OS - Android Customisation MORE Things you can do… ★ workaround bugs in hardware (eg. bad LCD EDID) ★ control the platform - use your own signing certs

  34. A tale of 2 bars (ICS) packages/SystemUI/src/com/android/systemui/statusbar/Statu sBar.java public void start() { … sb = makeStatusBarView(); AND tablet/TabletStatusBar.java public void start() { ... sb.setVisibility(View.GONE);

  35. JB & KK ? ★ Exercise for the reader… ★ Tip: GREP is your Friend

  36. 4. OS - Kernel ★ device drivers, eg. custom touchscreens, wifi cards, etc ★ specific hardware / optimisation, eg. run on RPi's !

  37. X. Boss Level - Recovery/Bootloaders! ★ CWM - Popular community recovery img ★ Fastboot - open protocol for ‘talking’ to bootloaders over usb (think “adb for bootloaders”)

  38. Lights, Camera, Action!

  39. Sensors ★ Camera, Gyro, Accel, Compass ★ Sonar, IR, Lidar, Temp

  40. Outputs ★ Lights ★ Environment control (temperature)

  41. Comms ★ USB ★ ADK ★ Bluetooth (LE) ★ Audio jack

  42. USB You might want to get rid of this...

  43. ADK "I put my thing down, flip it, and reverse it" - "Work It" (Missy Elliot)

  44. Bluetooth LE ★ Fix it! (lots of bugs in 4.3 and early 4.4’s) ★ Advertise it! (API is coming in “L” release) ★ Tone it down! (several lines on logcat output per LE event)

  45. Audio Jack ?!?!

  46. Bonus UART!

  47. But... Also don’t want this...

  48. References THE book! Also..

  49. Image Credits digital signage examples-brightsideonews read the src luke" - Coding Horror Blog, Jeff Atwood "android welcome wizard" - geeksquad.co.uk “audio jack dev board" - NXP "build lights - wikipedia" "audio volume warning" - android bug tracker "usb permissions dialog - phidgets" missy elliost cover - wikipedia nexus4-uart - hackaday

  50. Thank You!

  51. Questions? http://manichord.com github.com/maks @mklin https://plus.google.com/+MaksimLin

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend