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
6
votes
0 answers

Android read/write file in USB drive OTG programatically

I would like to read-write a file in USB drive OTG programatically. Use case is following: User connects an USB OTG to Nexus 10 device. My App will get notified that USB is connected. (achieved) My App will read some files from the USB drive…
tausiq
  • 937
  • 1
  • 13
  • 23
6
votes
1 answer

Sending data from a PC to an Android device using USB OTG

I want to send data between a host (Android) and a client (PC) using the Android USB OTG API. Code to send data from the host to the client using the API exists. However, I'm having difficulty finding code to send data from the client to the…
user2461391
  • 1,433
  • 3
  • 16
  • 26
5
votes
2 answers

How to catch signals from a unknown USB OTG device?

I have a USB OTG device which acts like a mouse, bought in china with not much more information about the used controller. When I connect it to my android there is a mouse cursor and the device has 5 hard buttons (left, right, up, down, enter). I…
Felix
  • 284
  • 2
  • 12
5
votes
1 answer

Cannot detect for usb attach on android

I have an android 5.1.1 device, an OTG cable and an ACS CardReader. I want to detect when CardReader is plugged in via OTG cable. I can detect DETACH but no luck with ATTACH. Here is what I have: Manifest file:
guness
  • 6,336
  • 7
  • 59
  • 88
5
votes
1 answer

How to list files on USB OTG device

I know how to do following: listen to attach and detach events of usb devices getting all attached devices getting permissions for a device So in the end I have an UsbDevice and I have permissions to read/write it. How to go on from here? I can…
prom85
  • 16,896
  • 17
  • 122
  • 242
5
votes
0 answers

How to install apk directly on OTG USB pen drive?

I have set in my manifest file android:installLocation="preferExternal" but not installed in external storage as USB. I am able to install on external storage as SDCARD. Also, I have tried adb commands such as : adb devices adb shell pm…
Mukesh Parmar
  • 941
  • 1
  • 15
  • 25
5
votes
2 answers

Play Video using connected USB via OTG cable in Android?

I want to ask that there are application available in which user can connect USB to Android via OTG cable device and play the media (specially videos) contained by it. i have made a Broadcast Receiver to detect the attached USB, i want to read the…
hitesh141
  • 963
  • 12
  • 25
5
votes
1 answer

Path of OTG in Android device

I am developing an Android application in which I have to get details of USB device connected to Tablet via OTG . when I use sys/bus/usb0/devices then I am getting list of all devices of Tablet while I want to only fetch device name attached via OTG…
Neha Shukla
  • 3,572
  • 5
  • 38
  • 69
5
votes
0 answers

STM32 USB OTG: how does one properly flush the Tx FIFO?

STM32 manual for the F4xx series chips says that the application writes TXFFLSH bit in the OTG_FS_GRSTCTL register to flush the TxFIFO. As a note it mentions that ...application must write this bit only after checking that the core is neither…
alexsh
  • 1,121
  • 8
  • 12
5
votes
1 answer

How to read/write external USB storage on Android?

I am currently making an app that needs to be able to read from and write to a USB flash drive connected via a USB OTG adapter. Is there an easy way to access this storage via standard Java.io.File APIs? This app is only going to be run on a rooted…
Nathan Walters
  • 4,116
  • 4
  • 23
  • 37
5
votes
3 answers

External Hardware Info

is there is any possibility to check what are the external hardware where connected in computer Getting the status of each hardware is online or offline
Bucks
  • 689
  • 3
  • 11
  • 28
4
votes
1 answer

Can USB-OTG be used for U-Boot and Linux consoles?

I have a custom i.MX6Q-based board with working U-Boot and Linux (Ubuntu) setups. The micro and board have support for USB-OTG and one serial port; currently, the serial port serves the console for both U-Boot and Linux. However, we may need to use…
Bob
  • 587
  • 8
  • 17
4
votes
3 answers

g_multi mode (mass storage & ethernet) not working on Raspberry Pi Zero W

I'm attempting to get the g_multi mode to work on: Raspberry Pi Zero W running a Fresh install of Raspbian Jessie (April 2017 kernel 4.4) The goal is to have the device run as a g_mass_storage pointing to a local bootable ISO, and be able to SSH…
Matt
  • 41
  • 1
  • 4
4
votes
1 answer

Android lollipop create a folder in USB OTG

Unable to create a folder in USB storage using this method: File dest = new File("storage/usbotg/NewFolder"); dest.mkdirs(); the same method working fine in device storage File dest = new File(Environment.getExternalStorageDirectory() +…
Mohammad abumazen
  • 1,286
  • 1
  • 11
  • 24
4
votes
0 answers

How to disable "Do you want to change the default write disk?" dialog

I have a Wiko Bloom running Android 4.4. When I connect a USB device via USB OTG, I get the following dialog: External USB storage ready Do you want to change the default write disk? This dialog appears no matter if I change the default write disk…
migueljuan
  • 437
  • 1
  • 3
  • 15
1
2
3
15 16