SlideShare una empresa de Scribd logo
1 de 52
Hacktime for ADK
SeongJae Park <sj38.park@gmail.com>
Great to meet you
SeongJae Park <sj38.park@gmail.com>
A member of GDG Suwon
Newbie to Arduino
Let's enjoy hacking
Just do it - 1:Let's hack Arduino
Download and install IDE, Arduino 1.0
If Mac, install FTDI USB driver(Link)
Just do it - 1:How to hack Arduino
Let's blink led on Arduino board
Just do it - 1:How to hack Arduino
Let's blink led on breadboard
Just do it - 1:How to hack Arduino
Let's blink led on breadboard
Just do it - 1:How to hack Arduino
5V
Ground 300 Ohm
LED
Ground
300 Ohm
5V
Background & Concepts
Android accessories
Background & Concepts
Android accessories
Background & Concepts
● No standard protocol / API
● Only selected devices
● Only selected developers
● Android Open Accessory(AOA) support
○ From 3.1, Back-ported to 2.3.4
○ USB api
○ AOA protocol
○ ADK
Background & Concepts
● Android Open Accessory(AOA) support
○ Standard
○ Any developer can develop
○ Works on every AOA supporting Android device
Background & Concepts
● AOA 2.0 protocol & ADK 2012
○ Announced from Google IO 2012
○ Connection via Bluetooth
○ Audio output
○ HID accessory support
○ From JellyBean(4.1)
Background & Concepts
AOA support structure overview
AOA protocol USB api
Application
AOA protocol
Is in accessory mode?
(show vendor id, product id)
Support AOA?
(GET_PROTOCOL)
Start accessory mode
(ACCESSORY_START)
Establish connection
Bad
ending
:'(
YES
NO
YES
NO
USB API
App can communicate with USB devices
● Host mode
○ From 3.1
● Accessory mode
○ Back ported to 2.3.4(Google APIs add-on library)
USB API
● Notify connected device using intent
● Can enumerates connected devices
● Request permission to user
● Can interact using I/O Stream like file
ADK - components
● Sample USB api using application(DemoKit)
● Sample sketch for ADK using AOA(demokit)
● AOA protocol implementation library
● Arduino-USB control library
● ADK H/W design
ADK - impl of AOA protocol
AndroidAccessory class
ADK - impl of AOA protocol
isConnected : start point
ADK - impl of AOA protocol
Is in accessory mode?
ADK - impl of AOA protocol
Do you support AOA?
ADK - impl of AOA protocol
I am...; Start accessory mode.
Establish connection
Find end points, set configuration 1
ADK - impl of AOA protocol
End points usage
Sample sketch using ADK
adkminihack
Sample sketch using ADK
New AndroidAccessory
Sample sketch using ADK
init and power on
Sample sketch using ADK
Connect, listen, echo
Sample app using USB api
ADKMiniHack
Sample app using USB api
Feature, Library, Intent filter
Sample app using USB api
accessory_filter.xml
Sample app using USB api
● "com.android.future.usb" for gingerbread
● "android.hardware.usb" for only 3.1 or upper
Sample app using USB api
Get UsbManager and Enumerate accessories
Request Permission
Sample app using USB api
Open accessory
Sample app using USB api
File-like interface
Sample app using USB api
Listening, too.
Sample app using USB api
Clean up when accessory detached.
Sample source codes
● Downloadable from github
Just do it - 2. Let's make simple AOA
Just do it - 2. Let's make simple AOA
ADK Install
● Download ADK and extract
Just do it - 2. Let's make simple AOA
ADK Install
On Windows:
1. Copy the arduino_libs/AndroidAccessory and
arduino_libs/USB_Host_Shield directories (the
complete directories, not just the files within) to the
<arduino_installation_root>/libraries/
directory.
Just do it - 2. Let's make simple AOA
ADK Install
On Mac:
1. Create, if it does not already exist, an Arduino directory
inside your user account's Documents directory, and
within that, a libraries directory.
2. Copy the arduino_libs/AndroidAccessory and
arduino_libs/USB_Host_Shield directories (the
complete directories, not just the files within) to your
Documents/Arduino/libraries/ directory.
Just do it - 2. Let's make simple AOA
ADK Install
On Linux (Ubuntu):
1. Copy the firmware/arduino_libs/AndroidAccessory
and
firmware/arduino_libs/USB_Host_Shielddirectories
(the complete directories, not just the files within) to
the<arduino_installation_root>/libraries/
directory.
2. Install the avr-libc library by entering sudo apt-get
install avr-libc from a shell prompt.
Just do it - 2. Let's make simple AOA
To debug Arduino
1. Serial.begin(<baud-rate>)
2. Serial.println("This is debug message.")
Just do it - 2. Let's make simple AOA
To debug Android device without USB
1. $ adb tcpip 5555
2. $ adb connect <device-ip>:5555
3. $ adb logcat
4. $ adb usb
But, looks doesn't works well...
Just do it - 2. Let's make simple AOA
● For IP Confirm,
○ Wifi settings > Option menu > Advanced
Just do it - 2. Let's make simple AOA
● example code
○ example/ADKMiniHack
■ Change project build target to Google APIs 10
○ example/Sketch
Just do it - 2. Let's make simple AOA
● OSCOKIRQ failed to assert
○ Problem occurs from ADK USB library's Max3421e.
○ Below is workaround for this from discussion
Let the hacking begin
: Suggested misson
● Clavier that Input from phone screen, Output
to Arduino
○ Turn on/off LED for each keys
○ Blink RGB led for each keys
○ Turn off when it's too dark(night)
○ Make tones higher with analog dialer
Let the hacking begin
: Sample
This work by SeongJae Park is licensed under the
Creative Commons Attribution-ShareAlike 3.0 Unported
License. To view a copy of this license, visit http:
//creativecommons.org/licenses/by-sa/3.0/.

Más contenido relacionado

La actualidad más candente

I/O 2011 報告会 ADKで遊んでみた
I/O 2011 報告会 ADKで遊んでみたI/O 2011 報告会 ADKで遊んでみた
I/O 2011 報告会 ADKで遊んでみたMakoto Yamazaki
 
Controlling an Arduino with Android
Controlling an Arduino with AndroidControlling an Arduino with Android
Controlling an Arduino with AndroidA. Hernandez
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino동호 손
 
Connecting Arduino and Android
Connecting Arduino and AndroidConnecting Arduino and Android
Connecting Arduino and AndroidMichał Tuszyński
 
IoTino - Arduino for Internet of Things
IoTino - Arduino for Internet of ThingsIoTino - Arduino for Internet of Things
IoTino - Arduino for Internet of ThingsAbiro AB
 
Arduino Programming Software Development
Arduino Programming Software DevelopmentArduino Programming Software Development
Arduino Programming Software DevelopmentSanjay Kumar
 
Introduction to Internet of Things Hardware
Introduction to Internet of Things HardwareIntroduction to Internet of Things Hardware
Introduction to Internet of Things HardwareDaniel Eichhorn
 
Introducing the Arduino
Introducing the ArduinoIntroducing the Arduino
Introducing the ArduinoCharles A B Jr
 
Developing a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT EditionDeveloping a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT EditionIntel® Software
 
lesson1 - Getting Started with ESP8266
lesson1 -  Getting Started with ESP8266lesson1 -  Getting Started with ESP8266
lesson1 - Getting Started with ESP8266Elaf A.Saeed
 
MicroEJ OS for IoT devices
MicroEJ OS for IoT devicesMicroEJ OS for IoT devices
MicroEJ OS for IoT devicescharlotte75009
 
Edje Project: The Software Foundation for IoT Devices
Edje Project: The Software Foundation for IoT DevicesEdje Project: The Software Foundation for IoT Devices
Edje Project: The Software Foundation for IoT DevicesMicroEJ
 
My arduino presentation
My arduino presentationMy arduino presentation
My arduino presentationSham Arsenal
 
Internet of things and arduino
Internet of things and arduinoInternet of things and arduino
Internet of things and arduinoChristophe Marchal
 

La actualidad más candente (20)

I/O 2011 報告会 ADKで遊んでみた
I/O 2011 報告会 ADKで遊んでみたI/O 2011 報告会 ADKで遊んでみた
I/O 2011 報告会 ADKで遊んでみた
 
Controlling an Arduino with Android
Controlling an Arduino with AndroidControlling an Arduino with Android
Controlling an Arduino with Android
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Connecting Arduino and Android
Connecting Arduino and AndroidConnecting Arduino and Android
Connecting Arduino and Android
 
IoTino - Arduino for Internet of Things
IoTino - Arduino for Internet of ThingsIoTino - Arduino for Internet of Things
IoTino - Arduino for Internet of Things
 
Arduino day
Arduino dayArduino day
Arduino day
 
Report
ReportReport
Report
 
Arduino
ArduinoArduino
Arduino
 
Arduino Programming Software Development
Arduino Programming Software DevelopmentArduino Programming Software Development
Arduino Programming Software Development
 
Android meets Arduino
Android meets ArduinoAndroid meets Arduino
Android meets Arduino
 
Arduino
ArduinoArduino
Arduino
 
Introduction to Internet of Things Hardware
Introduction to Internet of Things HardwareIntroduction to Internet of Things Hardware
Introduction to Internet of Things Hardware
 
Introducing the Arduino
Introducing the ArduinoIntroducing the Arduino
Introducing the Arduino
 
Developing a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT EditionDeveloping a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT Edition
 
lesson1 - Getting Started with ESP8266
lesson1 -  Getting Started with ESP8266lesson1 -  Getting Started with ESP8266
lesson1 - Getting Started with ESP8266
 
MicroEJ OS for IoT devices
MicroEJ OS for IoT devicesMicroEJ OS for IoT devices
MicroEJ OS for IoT devices
 
Edje Project: The Software Foundation for IoT Devices
Edje Project: The Software Foundation for IoT DevicesEdje Project: The Software Foundation for IoT Devices
Edje Project: The Software Foundation for IoT Devices
 
Introduction of Arduino Uno
Introduction of Arduino UnoIntroduction of Arduino Uno
Introduction of Arduino Uno
 
My arduino presentation
My arduino presentationMy arduino presentation
My arduino presentation
 
Internet of things and arduino
Internet of things and arduinoInternet of things and arduino
Internet of things and arduino
 

Similar a Hacktime for adk

From Arduino to ADK
From Arduino to ADKFrom Arduino to ADK
From Arduino to ADKCoLab Athens
 
Arduino Development For Beginners
Arduino Development For BeginnersArduino Development For Beginners
Arduino Development For BeginnersFTS seminar
 
pcDuino Presentation at SparkFun
pcDuino Presentation at SparkFunpcDuino Presentation at SparkFun
pcDuino Presentation at SparkFunJingfeng Liu
 
Smartphone++
Smartphone++Smartphone++
Smartphone++mharkus
 
Up and running with Arduino
Up and running with Arduino Up and running with Arduino
Up and running with Arduino KUET
 
Arduino : how to get started
Arduino : how to get startedArduino : how to get started
Arduino : how to get started동호 손
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Codemotion
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitSulamita Garcia
 
Kotlin Basics & Introduction to Jetpack Compose.pptx
Kotlin Basics & Introduction to Jetpack Compose.pptxKotlin Basics & Introduction to Jetpack Compose.pptx
Kotlin Basics & Introduction to Jetpack Compose.pptxtakshilkunadia
 
DSC Android Study Jam
DSC Android Study JamDSC Android Study Jam
DSC Android Study JamDSC GVP
 
Android Study Jams - Session 1
Android Study Jams - Session 1Android Study Jams - Session 1
Android Study Jams - Session 1AditiSaxena72
 
Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduinoavikdhupar
 

Similar a Hacktime for adk (20)

From Arduino to ADK
From Arduino to ADKFrom Arduino to ADK
From Arduino to ADK
 
Arduino Development For Beginners
Arduino Development For BeginnersArduino Development For Beginners
Arduino Development For Beginners
 
pcDuino Presentation at SparkFun
pcDuino Presentation at SparkFunpcDuino Presentation at SparkFun
pcDuino Presentation at SparkFun
 
Smartphone++
Smartphone++Smartphone++
Smartphone++
 
Up and running with Arduino
Up and running with Arduino Up and running with Arduino
Up and running with Arduino
 
Arduino : how to get started
Arduino : how to get startedArduino : how to get started
Arduino : how to get started
 
Let's begin io t with $10
Let's begin io t with $10Let's begin io t with $10
Let's begin io t with $10
 
notes about Arduino
notes about Arduinonotes about Arduino
notes about Arduino
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
 
Arduino1.0 RC
Arduino1.0 RCArduino1.0 RC
Arduino1.0 RC
 
Ardu
ArduArdu
Ardu
 
Kotlin Basics & Introduction to Jetpack Compose.pptx
Kotlin Basics & Introduction to Jetpack Compose.pptxKotlin Basics & Introduction to Jetpack Compose.pptx
Kotlin Basics & Introduction to Jetpack Compose.pptx
 
DSC Android Study Jam
DSC Android Study JamDSC Android Study Jam
DSC Android Study Jam
 
Adk 101
Adk 101Adk 101
Adk 101
 
ESP8266 Wifi Nodemcu
ESP8266 Wifi Nodemcu ESP8266 Wifi Nodemcu
ESP8266 Wifi Nodemcu
 
Android Study Jams - Session 1
Android Study Jams - Session 1Android Study Jams - Session 1
Android Study Jams - Session 1
 
Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu
 
Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduino
 
What is Arduino ?
What is Arduino ?What is Arduino ?
What is Arduino ?
 

Más de SeongJae Park

Biscuit: an operating system written in go
Biscuit:  an operating system written in goBiscuit:  an operating system written in go
Biscuit: an operating system written in goSeongJae Park
 
GCMA: Guaranteed Contiguous Memory Allocator
GCMA: Guaranteed Contiguous Memory AllocatorGCMA: Guaranteed Contiguous Memory Allocator
GCMA: Guaranteed Contiguous Memory AllocatorSeongJae Park
 
Linux Kernel Memory Model
Linux Kernel Memory ModelLinux Kernel Memory Model
Linux Kernel Memory ModelSeongJae Park
 
An Introduction to the Formalised Memory Model for Linux Kernel
An Introduction to the Formalised Memory Model for Linux KernelAn Introduction to the Formalised Memory Model for Linux Kernel
An Introduction to the Formalised Memory Model for Linux KernelSeongJae Park
 
Design choices of golang for high scalability
Design choices of golang for high scalabilityDesign choices of golang for high scalability
Design choices of golang for high scalabilitySeongJae Park
 
Brief introduction to kselftest
Brief introduction to kselftestBrief introduction to kselftest
Brief introduction to kselftestSeongJae Park
 
Understanding of linux kernel memory model
Understanding of linux kernel memory modelUnderstanding of linux kernel memory model
Understanding of linux kernel memory modelSeongJae Park
 
Let the contribution begin (EST futures)
Let the contribution begin  (EST futures)Let the contribution begin  (EST futures)
Let the contribution begin (EST futures)SeongJae Park
 
Porting golang development environment developed with golang
Porting golang development environment developed with golangPorting golang development environment developed with golang
Porting golang development environment developed with golangSeongJae Park
 
gcma: guaranteed contiguous memory allocator
gcma:  guaranteed contiguous memory allocatorgcma:  guaranteed contiguous memory allocator
gcma: guaranteed contiguous memory allocatorSeongJae Park
 
An introduction to_golang.avi
An introduction to_golang.aviAn introduction to_golang.avi
An introduction to_golang.aviSeongJae Park
 
Develop Android/iOS app using golang
Develop Android/iOS app using golangDevelop Android/iOS app using golang
Develop Android/iOS app using golangSeongJae Park
 
Develop Android app using Golang
Develop Android app using GolangDevelop Android app using Golang
Develop Android app using GolangSeongJae Park
 
Sw install with_without_docker
Sw install with_without_dockerSw install with_without_docker
Sw install with_without_dockerSeongJae Park
 
Git inter-snapshot public
Git  inter-snapshot publicGit  inter-snapshot public
Git inter-snapshot publicSeongJae Park
 
(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.avi(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.aviSeongJae Park
 
Deep dark-side of git: How git works internally
Deep dark-side of git: How git works internallyDeep dark-side of git: How git works internally
Deep dark-side of git: How git works internallySeongJae Park
 
Deep dark side of git - prologue
Deep dark side of git - prologueDeep dark side of git - prologue
Deep dark side of git - prologueSeongJae Park
 
DO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCSDO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCSSeongJae Park
 
Experimental android hacking using reflection
Experimental android hacking using reflectionExperimental android hacking using reflection
Experimental android hacking using reflectionSeongJae Park
 

Más de SeongJae Park (20)

Biscuit: an operating system written in go
Biscuit:  an operating system written in goBiscuit:  an operating system written in go
Biscuit: an operating system written in go
 
GCMA: Guaranteed Contiguous Memory Allocator
GCMA: Guaranteed Contiguous Memory AllocatorGCMA: Guaranteed Contiguous Memory Allocator
GCMA: Guaranteed Contiguous Memory Allocator
 
Linux Kernel Memory Model
Linux Kernel Memory ModelLinux Kernel Memory Model
Linux Kernel Memory Model
 
An Introduction to the Formalised Memory Model for Linux Kernel
An Introduction to the Formalised Memory Model for Linux KernelAn Introduction to the Formalised Memory Model for Linux Kernel
An Introduction to the Formalised Memory Model for Linux Kernel
 
Design choices of golang for high scalability
Design choices of golang for high scalabilityDesign choices of golang for high scalability
Design choices of golang for high scalability
 
Brief introduction to kselftest
Brief introduction to kselftestBrief introduction to kselftest
Brief introduction to kselftest
 
Understanding of linux kernel memory model
Understanding of linux kernel memory modelUnderstanding of linux kernel memory model
Understanding of linux kernel memory model
 
Let the contribution begin (EST futures)
Let the contribution begin  (EST futures)Let the contribution begin  (EST futures)
Let the contribution begin (EST futures)
 
Porting golang development environment developed with golang
Porting golang development environment developed with golangPorting golang development environment developed with golang
Porting golang development environment developed with golang
 
gcma: guaranteed contiguous memory allocator
gcma:  guaranteed contiguous memory allocatorgcma:  guaranteed contiguous memory allocator
gcma: guaranteed contiguous memory allocator
 
An introduction to_golang.avi
An introduction to_golang.aviAn introduction to_golang.avi
An introduction to_golang.avi
 
Develop Android/iOS app using golang
Develop Android/iOS app using golangDevelop Android/iOS app using golang
Develop Android/iOS app using golang
 
Develop Android app using Golang
Develop Android app using GolangDevelop Android app using Golang
Develop Android app using Golang
 
Sw install with_without_docker
Sw install with_without_dockerSw install with_without_docker
Sw install with_without_docker
 
Git inter-snapshot public
Git  inter-snapshot publicGit  inter-snapshot public
Git inter-snapshot public
 
(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.avi(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.avi
 
Deep dark-side of git: How git works internally
Deep dark-side of git: How git works internallyDeep dark-side of git: How git works internally
Deep dark-side of git: How git works internally
 
Deep dark side of git - prologue
Deep dark side of git - prologueDeep dark side of git - prologue
Deep dark side of git - prologue
 
DO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCSDO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCS
 
Experimental android hacking using reflection
Experimental android hacking using reflectionExperimental android hacking using reflection
Experimental android hacking using reflection
 

Último

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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 

Último (20)

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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 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...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 

Hacktime for adk

  • 1. Hacktime for ADK SeongJae Park <sj38.park@gmail.com>
  • 2. Great to meet you SeongJae Park <sj38.park@gmail.com> A member of GDG Suwon Newbie to Arduino Let's enjoy hacking
  • 3. Just do it - 1:Let's hack Arduino Download and install IDE, Arduino 1.0 If Mac, install FTDI USB driver(Link)
  • 4. Just do it - 1:How to hack Arduino Let's blink led on Arduino board
  • 5. Just do it - 1:How to hack Arduino Let's blink led on breadboard
  • 6. Just do it - 1:How to hack Arduino Let's blink led on breadboard
  • 7. Just do it - 1:How to hack Arduino 5V Ground 300 Ohm LED Ground 300 Ohm 5V
  • 10. Background & Concepts ● No standard protocol / API ● Only selected devices ● Only selected developers
  • 11. ● Android Open Accessory(AOA) support ○ From 3.1, Back-ported to 2.3.4 ○ USB api ○ AOA protocol ○ ADK Background & Concepts
  • 12. ● Android Open Accessory(AOA) support ○ Standard ○ Any developer can develop ○ Works on every AOA supporting Android device Background & Concepts
  • 13. ● AOA 2.0 protocol & ADK 2012 ○ Announced from Google IO 2012 ○ Connection via Bluetooth ○ Audio output ○ HID accessory support ○ From JellyBean(4.1) Background & Concepts
  • 14. AOA support structure overview AOA protocol USB api Application
  • 15. AOA protocol Is in accessory mode? (show vendor id, product id) Support AOA? (GET_PROTOCOL) Start accessory mode (ACCESSORY_START) Establish connection Bad ending :'( YES NO YES NO
  • 16. USB API App can communicate with USB devices ● Host mode ○ From 3.1 ● Accessory mode ○ Back ported to 2.3.4(Google APIs add-on library)
  • 17. USB API ● Notify connected device using intent ● Can enumerates connected devices ● Request permission to user ● Can interact using I/O Stream like file
  • 18. ADK - components ● Sample USB api using application(DemoKit) ● Sample sketch for ADK using AOA(demokit) ● AOA protocol implementation library ● Arduino-USB control library ● ADK H/W design
  • 19. ADK - impl of AOA protocol AndroidAccessory class
  • 20. ADK - impl of AOA protocol isConnected : start point
  • 21. ADK - impl of AOA protocol Is in accessory mode?
  • 22. ADK - impl of AOA protocol Do you support AOA?
  • 23. ADK - impl of AOA protocol I am...; Start accessory mode.
  • 24. Establish connection Find end points, set configuration 1
  • 25. ADK - impl of AOA protocol End points usage
  • 26. Sample sketch using ADK adkminihack
  • 27. Sample sketch using ADK New AndroidAccessory
  • 28. Sample sketch using ADK init and power on
  • 29. Sample sketch using ADK Connect, listen, echo
  • 30. Sample app using USB api ADKMiniHack
  • 31. Sample app using USB api Feature, Library, Intent filter
  • 32. Sample app using USB api accessory_filter.xml
  • 33. Sample app using USB api ● "com.android.future.usb" for gingerbread ● "android.hardware.usb" for only 3.1 or upper
  • 34. Sample app using USB api Get UsbManager and Enumerate accessories Request Permission
  • 35. Sample app using USB api Open accessory
  • 36. Sample app using USB api File-like interface
  • 37. Sample app using USB api Listening, too.
  • 38. Sample app using USB api Clean up when accessory detached.
  • 39. Sample source codes ● Downloadable from github
  • 40. Just do it - 2. Let's make simple AOA
  • 41. Just do it - 2. Let's make simple AOA ADK Install ● Download ADK and extract
  • 42. Just do it - 2. Let's make simple AOA ADK Install On Windows: 1. Copy the arduino_libs/AndroidAccessory and arduino_libs/USB_Host_Shield directories (the complete directories, not just the files within) to the <arduino_installation_root>/libraries/ directory.
  • 43. Just do it - 2. Let's make simple AOA ADK Install On Mac: 1. Create, if it does not already exist, an Arduino directory inside your user account's Documents directory, and within that, a libraries directory. 2. Copy the arduino_libs/AndroidAccessory and arduino_libs/USB_Host_Shield directories (the complete directories, not just the files within) to your Documents/Arduino/libraries/ directory.
  • 44. Just do it - 2. Let's make simple AOA ADK Install On Linux (Ubuntu): 1. Copy the firmware/arduino_libs/AndroidAccessory and firmware/arduino_libs/USB_Host_Shielddirectories (the complete directories, not just the files within) to the<arduino_installation_root>/libraries/ directory. 2. Install the avr-libc library by entering sudo apt-get install avr-libc from a shell prompt.
  • 45. Just do it - 2. Let's make simple AOA To debug Arduino 1. Serial.begin(<baud-rate>) 2. Serial.println("This is debug message.")
  • 46. Just do it - 2. Let's make simple AOA To debug Android device without USB 1. $ adb tcpip 5555 2. $ adb connect <device-ip>:5555 3. $ adb logcat 4. $ adb usb But, looks doesn't works well...
  • 47. Just do it - 2. Let's make simple AOA ● For IP Confirm, ○ Wifi settings > Option menu > Advanced
  • 48. Just do it - 2. Let's make simple AOA ● example code ○ example/ADKMiniHack ■ Change project build target to Google APIs 10 ○ example/Sketch
  • 49. Just do it - 2. Let's make simple AOA ● OSCOKIRQ failed to assert ○ Problem occurs from ADK USB library's Max3421e. ○ Below is workaround for this from discussion
  • 50. Let the hacking begin : Suggested misson ● Clavier that Input from phone screen, Output to Arduino ○ Turn on/off LED for each keys ○ Blink RGB led for each keys ○ Turn off when it's too dark(night) ○ Make tones higher with analog dialer
  • 51. Let the hacking begin : Sample
  • 52. This work by SeongJae Park is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http: //creativecommons.org/licenses/by-sa/3.0/.