USB Device Info


Source link: https://github.com/alt236/USB-Device-Info---Android

Description

Android 3.1 introduced USB host mode which allows the user to plug USB devices to your Android tablet in the same way as a Desktop PC and extend its functionality (if the tablet has the correct drivers of course).

This application will provide information about almost all currently plugged-in USB device (see below for more info about the 'almost').

Information includes:

  • The Device class
  • The USB device path
  • The Vendor ID (VID) and the Product ID (PID).
  • A List of all interfaces and their endpoints.

No ads.

Apart from using the build in API it now also parses "/sys/bus/usb/devices/" to display devices which are hidden by the Android OS, although in less detail. This part is also available as a Java library (see Library below)

Important

As of version 2.0.0 SysBusUsbDevice is no longer Parcelable; it is now Serializable. This is so that the library can be used in pure java projects.

Library

The Linux part of the project is available as an artifact for use with Gradle/Maven. To use that, add the following blocks:

gradle

 repositories {

maven {

 url "https://dl.bintray.com/alt236/maven"

}
  
}

dependencies {

compile 'uk.co.alt236:usbdeviceenumerator:2.0.0'  
}

maven

 <dependency>

 <groupId>uk.co.alt236</groupId>

 <artifactId>usbdeviceenumerator</artifactId>

 <version>2.0.0</version>

 <type>pom</type>
  </dependency>

Notes

  • If you download the accompanying databases, the application will also be able to provide you with additional info such as the Vendor of the device (which is not necessarily the brand!), the vendor's logo and the product name.
  • As this application is using the default Android API some devices might not appear. USB Hubs (and devices connected to them) are invisible event though they seem to function properly, and mice seem to be filtered out of the provided list. I'm looking into ways to fix this.
  • Device Subclass resolution will be added in the next version.
  • The database is parsed from: http://www.linux-usb.org/usb.ids
  • SELinux can interfere with accessing sysfs which will block the Linux part of the app from working.

Changelog

  • v0.0.1 First public release\n
  • v0.0.2 Added Interface and Endpoint resolution\n
  • v0.0.3 Databases can now be downloaded.\n
  • v0.0.4 Now also parses /sys/bus/usb/devices/ for those pesky devices android hides. Added export.
  • v0.0.5 Added support for small screen devices. Bugfixes and stability improvements.
  • v1.0.0 Materialise design, better tablet support, code overhaul
  • v2.0.0 Added debug screens, SysBusUsbDevice is now Serializable instead of Parcelable

Permission Explanation

  • ACCESS_NETWORK_STATE: Used to check if the device is on-line and using which interface.
  • INTERNET: Used to go on-line and download the updated database.
  • WRITE_EXTERNAL_STORAGE: Used to write the database to the SD card.

Links

Credits

Author: Alexandros Schillings.

All logos are the property of their respective owners

The code in this project is licensed under the Apache Software License 2.0.

Copyright (c) 2017 Alexandros Schillings.

Resources

This is a Android Button with a progress bar over it. This is useful when you do something that takes a while like networking, etc.

AndroidQuery is an Android SQLite and ContentProvider ORM powered by an annotation preprocessor. It focus on easy of use without sacrificing performances.

Built-in support for:

  • RxJava2 / Android loaders
  • custom migration
  • custom type converters
  • joins
  • default models for Android ContentProviders (like Contacts, BlockedNumbers, ...)

An android lib for enhancing BottomNavigationView.

The library came out as an effort to reduce the boilerplate required for getting runtime permissions for Android devices running OS 6.0 and above.

The developer can now focus on handling the granted and denied state of the permission rather than dealing with the permission flow and dialogues.

A custom reusable circular slider control for Android application.

MP3 audio recording component.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes