SlideShare a Scribd company logo
1 of 20
Download to read offline
USB storage on Android Magnus Jahnen
USB mass storage
on Android
Implementation of an Android Framework for USB
storage access without root rights
1
Bachelor thesis
23.04.2014
USB storage on Android Magnus Jahnen
USB storage on Android
1. Introduction
2. Basics of USB
3. USB mass storage class
4. FAT32 file system
5. Implementation
6. Results
2
USB storage on Android Magnus Jahnen
Introduction
• USB features in Android since 3.1 Honeycomb
• Mass storage access: Currently two proprietary
applications available
• USB-Stick Plugin-TC (Plugin for Total Commander)
• Nexus Media Importer
3
USB storage on Android Magnus Jahnen
Basics of USB
• Stands for: Universal Serial Bus
• Standard by the USB Implementers forum
• Host (master) and multiple clients (slaves)
• Host powers the client and manages communication
process
• USB On the go as part of USB 2.0
4
USB storage on Android Magnus Jahnen
Client Device Hierarchy
5
USB storage on Android Magnus Jahnen
Endpoints
• Unidirectional communication pipes
• Different types
• Control
• Interrupt
• Bulk
• Isochronous
6
USB storage on Android Magnus Jahnen
USB mass storage class
• Determined by class and subclass in interface
descriptor
• Two different types
• Control/Bulk/Interrupt (CBI) [obsolete]
• Bulk-only transfer (BBB)
7
USB storage on Android Magnus Jahnen
Bulk-only transfer
• USB interface must have IN and OUT bulk endpoint
• Different protocols (specified by interface subclass)
• Reduced Block Commands (RBC)
• SCSI transparent command set (most commonly used)
8
USB storage on Android Magnus Jahnen
SCSI transparent command set
• Command Block Wrapper (CBW)
• Includes SCSI command
• Command Status Wrapper (CSW)
• Actual supported standard resp. SCSI commands
determined by issuing an INQUIRY
9
USB storage on Android Magnus Jahnen
SCSI commands
• INQUIRY
• READ CAPACITY(10)
• READ(10)
• REQUEST SENSE
• TEST UNIT READY
• WRITE(10)
10
USB storage on Android Magnus Jahnen
FAT32 file system
• Belongs to FAT family
• Developed by Microsoft
• Released in 1996 with Windows 95B
• Most commonly used on mass storage devices for
maximum compatibility
11
USB storage on Android Magnus Jahnen
General layout
12
USB storage on Android Magnus Jahnen
FAT
13
USB storage on Android Magnus Jahnen
Data Area
• Structured in clusters
• Directories and files
• Directories have a defined structure
• Files save raw data from user
14
USB storage on Android Magnus Jahnen
Implementation
15
partition
handling of partitions
and partition tables
fs
file system abstraction
driver
low level block
device communication
USB storage on Android Magnus Jahnen
Driver package
16
uses
creates
ScsiInquiry
+ScsiInquiry(): ctor
+serialize(ByteBuffer buffer): void
CommandBlockWrapper
#CommandBlockWrapper(...): ctor
+serialize(ByteBuffer buffer): void
ScsiBlockDevice
BlockDeviceDriverFactory
«interface»
BlockDeviceDriver
+init(): void
+read(long deviceOffset, ByteBuffer buffer): void
+write(long deviceOffset, ByteBuffer buffer): void
+getBlockSize(): int
USB storage on Android Magnus Jahnen
Results
• Supported features:
• Bulk-only transfer
• FAT32 (MBR)
• Usual directory/file operations
• Features tested on various devices
• Requirements:
• Android 3.1 or later
• Hardware and software enabled USB host support
17
USB storage on Android Magnus Jahnen
Demonstration
18
USB storage on Android Magnus Jahnen
Thank you for your attention!
Questions?
19
USB storage on Android Magnus Jahnen
Image resources
(In the order they appear)
• http://diepresse.com/layout/diepresse/files/mobilesleben/android-logo.png
• http://developer.android.com/guide/topics/connectivity/usb/index.html
• https://play.google.com/store/apps/details?id=de.hechler.tcplugins.full.usb
• https://play.google.com/store/apps/details?id=com.homeysoft.nexususb.importer
• http://en.wikipedia.org/wiki/File:USB.png
• http://www.sprut.de/electronic/interfaces/usb/deskriptor.htm
• http://www.iconarchive.com/show/icons8-metro-style-icons-by-visualpharm/Computer-Hardware-
Mouse-icon.html (http://www.visualpharm.com/)
• http://www.softicons.com/system-icons/web0.2ama-icons-by-chrfb/usb-stick-icon
• http://www.iconarchive.com/show/icons8-metro-style-icons-by-visualpharm/Phones-Headset-
icon.html (http://www.visualpharm.com/)
• http://www.clker.com/cliparts/d/5/f/b/1195437711991895099Machovka_harddisk.svg.hi.png
• http://www.center.hu/images/cikkek/win95/win95logo.jpg
• http://ferienwohnungen-koehnke.de/kurbeitrag/
• http://www.tecnigen.com/wp-content/uploads/2013/07/usbandroid.png
20

More Related Content

Recently uploaded

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 

Recently uploaded (20)

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 

Featured

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 

Featured (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

USB mass storage on Android

  • 1. USB storage on Android Magnus Jahnen USB mass storage on Android Implementation of an Android Framework for USB storage access without root rights 1 Bachelor thesis 23.04.2014
  • 2. USB storage on Android Magnus Jahnen USB storage on Android 1. Introduction 2. Basics of USB 3. USB mass storage class 4. FAT32 file system 5. Implementation 6. Results 2
  • 3. USB storage on Android Magnus Jahnen Introduction • USB features in Android since 3.1 Honeycomb • Mass storage access: Currently two proprietary applications available • USB-Stick Plugin-TC (Plugin for Total Commander) • Nexus Media Importer 3
  • 4. USB storage on Android Magnus Jahnen Basics of USB • Stands for: Universal Serial Bus • Standard by the USB Implementers forum • Host (master) and multiple clients (slaves) • Host powers the client and manages communication process • USB On the go as part of USB 2.0 4
  • 5. USB storage on Android Magnus Jahnen Client Device Hierarchy 5
  • 6. USB storage on Android Magnus Jahnen Endpoints • Unidirectional communication pipes • Different types • Control • Interrupt • Bulk • Isochronous 6
  • 7. USB storage on Android Magnus Jahnen USB mass storage class • Determined by class and subclass in interface descriptor • Two different types • Control/Bulk/Interrupt (CBI) [obsolete] • Bulk-only transfer (BBB) 7
  • 8. USB storage on Android Magnus Jahnen Bulk-only transfer • USB interface must have IN and OUT bulk endpoint • Different protocols (specified by interface subclass) • Reduced Block Commands (RBC) • SCSI transparent command set (most commonly used) 8
  • 9. USB storage on Android Magnus Jahnen SCSI transparent command set • Command Block Wrapper (CBW) • Includes SCSI command • Command Status Wrapper (CSW) • Actual supported standard resp. SCSI commands determined by issuing an INQUIRY 9
  • 10. USB storage on Android Magnus Jahnen SCSI commands • INQUIRY • READ CAPACITY(10) • READ(10) • REQUEST SENSE • TEST UNIT READY • WRITE(10) 10
  • 11. USB storage on Android Magnus Jahnen FAT32 file system • Belongs to FAT family • Developed by Microsoft • Released in 1996 with Windows 95B • Most commonly used on mass storage devices for maximum compatibility 11
  • 12. USB storage on Android Magnus Jahnen General layout 12
  • 13. USB storage on Android Magnus Jahnen FAT 13
  • 14. USB storage on Android Magnus Jahnen Data Area • Structured in clusters • Directories and files • Directories have a defined structure • Files save raw data from user 14
  • 15. USB storage on Android Magnus Jahnen Implementation 15 partition handling of partitions and partition tables fs file system abstraction driver low level block device communication
  • 16. USB storage on Android Magnus Jahnen Driver package 16 uses creates ScsiInquiry +ScsiInquiry(): ctor +serialize(ByteBuffer buffer): void CommandBlockWrapper #CommandBlockWrapper(...): ctor +serialize(ByteBuffer buffer): void ScsiBlockDevice BlockDeviceDriverFactory «interface» BlockDeviceDriver +init(): void +read(long deviceOffset, ByteBuffer buffer): void +write(long deviceOffset, ByteBuffer buffer): void +getBlockSize(): int
  • 17. USB storage on Android Magnus Jahnen Results • Supported features: • Bulk-only transfer • FAT32 (MBR) • Usual directory/file operations • Features tested on various devices • Requirements: • Android 3.1 or later • Hardware and software enabled USB host support 17
  • 18. USB storage on Android Magnus Jahnen Demonstration 18
  • 19. USB storage on Android Magnus Jahnen Thank you for your attention! Questions? 19
  • 20. USB storage on Android Magnus Jahnen Image resources (In the order they appear) • http://diepresse.com/layout/diepresse/files/mobilesleben/android-logo.png • http://developer.android.com/guide/topics/connectivity/usb/index.html • https://play.google.com/store/apps/details?id=de.hechler.tcplugins.full.usb • https://play.google.com/store/apps/details?id=com.homeysoft.nexususb.importer • http://en.wikipedia.org/wiki/File:USB.png • http://www.sprut.de/electronic/interfaces/usb/deskriptor.htm • http://www.iconarchive.com/show/icons8-metro-style-icons-by-visualpharm/Computer-Hardware- Mouse-icon.html (http://www.visualpharm.com/) • http://www.softicons.com/system-icons/web0.2ama-icons-by-chrfb/usb-stick-icon • http://www.iconarchive.com/show/icons8-metro-style-icons-by-visualpharm/Phones-Headset- icon.html (http://www.visualpharm.com/) • http://www.clker.com/cliparts/d/5/f/b/1195437711991895099Machovka_harddisk.svg.hi.png • http://www.center.hu/images/cikkek/win95/win95logo.jpg • http://ferienwohnungen-koehnke.de/kurbeitrag/ • http://www.tecnigen.com/wp-content/uploads/2013/07/usbandroid.png 20