Questions tagged [usb-otg]

USB On-The-Go is a USB (Universal Serial Bus) specification that allows a device to act as Host to simpler gadgets, such as flash drives, but then also act as a "slave" device to other Hosts, such as a personal computer.

USB On-The-Go is a specification that allows a device to act as host to simpler gadgets, such as flash drives, but then also act as a slave device to other Hosts, such as a personal computer.

See:

227 questions
4
votes
0 answers

How to change Android configuration of USB Host to autosuspend device without rooting

I am working on an app that communicates to a device connected through the usb port. The communication is made using a serial converter from FTDI, the FTD 230x. I am using the driver D2xx. The problem i am having is that, when the device is…
4
votes
0 answers

How to access Micro USB External SD Card Reader in android

I have an external sd card reader, I can plug it into the micro usb connector and access data from sd card with a file explorer. I pluged the card reader on Nexus5 (6.0.1) and Asus tablet (4.1.2) The sd card is mount on…
Teiki
  • 200
  • 2
  • 18
4
votes
0 answers

USB Host mode device not detected - Which files are exactly needed

I am trying to make my samsung galaxy gt-i8530 phone read USB devices (mouse, pendrive, keyboard). It has the same SoC as the galaxy s 3 mini and the mini has OTG support. My goal is not to create an app, but to simply turn on USB host mode so the…
beamer
  • 41
  • 1
  • 3
3
votes
1 answer

Disable Usb Ports in rooted Android device

I want to disable usb ports in my rooted android device, When I run below code it returns result is true but usb ports is still active, I want to disable usb ports When I click disable button and then When I click enable button, enable usb ports how…
Diego
  • 937
  • 8
  • 24
3
votes
1 answer

How to identify removable storage is OTG in android programmatically?

I am trying to get all available storage which is connected to device, In my device total 3 number of storage available which is (Internal storage, SD Card, OTG storage), how can I identify which one is is OTG?, because Internal storage is non…
3
votes
1 answer

How to read USB OTG on Android 11

I want to read an OTG USB on Android 11 I'm able to list files like this on Android 9 : val path = File("/storage") I can list files from the external memory in Android 11 but not the USB OTG : val path =…
zzz
  • 83
  • 1
  • 9
3
votes
0 answers

Android phone as USB Keyboard/HID-Gadget/

I'm looking for a possibility to use Android Smartphones as a USB-Keyboard, same as I would be using Linux Gadget and a raspberry pi with OTG port. So I imagine it like this: Connect Android phone to some computer via standard USB. Start my App on…
pinas
  • 2,708
  • 4
  • 21
  • 33
3
votes
4 answers

Unable to do wireless debugging (ADB) in android

I have a situation where I need to store some data on USB. There are some errors that occur when I try to attach USB to my android device. I tried to debug my app through ADB. Here is what I have done up till now. I have downloaded the…
J.Doe
  • 53
  • 1
  • 1
  • 8
3
votes
0 answers

How to hide system mouse cursor? (bluetooth or OTG connect)

I am working on a game app. Like all game apps, it renders two side-by-side views. I would like to support using a bluetooth or OTG mouse in my app. So, I need to hide the normal mouse pointer. I have done a bit of searching, but can not seem to…
Alexia
  • 31
  • 1
3
votes
1 answer

How get runtime permission to communicate with a USB Flash Drive in an Android Application with LockTask Mode enable?

I'm developing an Application SDK 28 with LockTask Mode for a Single-Uses Device. The application transfer some files from Device to USB Flash Drive through USB OTG. For the comunication with the Flash Drive, the application requests a runtime…
3
votes
1 answer

Distinguish SDCard URI from USBStorage URI returned by SAF or StorageVolume API

I am using StorageVolume API to retrieve URI for both SDCard and USBStorage by following StorageManager storageManager = (StorageManager) getSystemService(STORAGE_SERVICE); for (StorageVolume storageVolume : storageManager.getStorageVolumes()) …
3
votes
3 answers

read file from usb removable storage

in my application I want to read a file from usb removable storage I have a.txt and i want to read it void read() { UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE); HashMap deviceList =…
user3441466
  • 43
  • 1
  • 6
3
votes
1 answer

No Response from Android BulkTransfer with proper Endpoints

I have already seen lot's of questions here about bulkTransfer, most of them have used the wrong interfaces to read and write but I'm quit sure that I have choosen the proper interfaces: private UsbManager usbManager; private UsbDevice…
Dominik
  • 43
  • 1
  • 4
3
votes
1 answer

Can I "safely remove" a USB device from Android OTG, after writing files to it?

This regards Android Lollipop 5.0 and above only. We have a custom device that can be mounted as a file system over USB. I've written an Android app that lets the user mount the device with OTG, after which we update files on the device. That part…
Bill Evans
  • 71
  • 6
3
votes
1 answer

How To Using Image Adjustment (Brightness, Contrast) in UVCCamera Library on Android Studio

I'm trying to build an apps to capture picture from usb camera, using UVCCamera from https://github.com/saki4510t/UVCCamera But, i didn't know, how to implement image adjustment setting (like Adjust Brightness, Contrast, White Balance) in this…
1 2
3
15 16