How to emulate mass storage device in Genymotion Emulator - android

I currently have a cable that allows me to plug in a flash drive into my phone (as seen here). My phone then picks up the flash drive as a "mass storage device" that has been attached.
I started using the Genymotion Emulator and was wondering if it's possible to emulate a mass storage device being attached to the emulator? Thanks in advance.

Related

How to communicate with USB devices on Android via studio

I am making an application on an android tablet that is supposed to act as a file backup application, the tablet is going to be locked down and all applications other than the app I am making are to be disabled, the tablet is then to be shipped to users who will be recording video footage onto a USB flash drive using head-mounted cameras, at the end of each day the users are to plug the flash drives into the tablet, during this time, the application will wake up and allow the users to click the "backup" button, the files are then to be copied from the usb drives and saved on the tablet.
The users are assumed to be technology illiterate so we are not asking them to do anything more than plug the flash drive into the device and click the transfer button.
For testing purposes I have a flash drive, a USB 3.0 to Type-C adapter and a tablet, when I plug it all in the flash drive appears on my Android device, my question is, how do I communicate with the flash drive through code?
I'm using Android Studio, the flash drive is attached to my tablet via USB, my tablet is connected to Android Studio via wireless debugging, Android Studio detects and displays my tablet, however it does not display the USB device inserted into my tablet, which is what I need to communicate with. I would like for the flash drive to appear on Android Studio so I can know the correct file path to put in my code.
(I am aware that communication with external USB devices disallows my app from being published on the app store, this is an internal only app)

Activate OTG on non-otg Android phone

I have an old LG K120 that by default doesn't have OTG. So I did what was needed (root the phone and installed a software that now tells me OTG is active) however when I try to plug a usb pen or card reader, it doesn't detect it. I hope I don't have to install a custom rom or whatever it's called risking to ruin everything. I just need to read a microSD without having to open the cover all the time.
For running SD cards on the mobile you can use some of the pocket Wi-Fis which support SD card inside them,like some of the JioFis (check before you purchase any,if you). Then connect it to your mobile using Wi-Fi(Password protected or open) and run it.
And for running pendrives(only) you can use the SanDisk Wireless Stick pendrives, which run on Wi-Fi.
Edit: USB can also be used for radiation free transfer with laptop computers.(Credit goes to blackapps).

Cannot discover Android device

I have made a simple Android Application and have chosen to debug it on my android mobile. On connecting it with the PC and enabling USB debugging on mobile, the Android Device Chooser is not showing the mobile.
you need to install the phone driver
example:
samsung need kies http://www.samsung.com/us/kies/
for nexus device just use google usb driver http://developer.android.com/sdk/win-usb.html
On my nexus5 I need to turn on Camera (PTP) storage mode as well as Debugging before the device appears in DDMS.
Settings -> Storage -> Options (top right) -> USB computer connection then select Camera (PTP).
Use adb driver. From my experience, this small - free software works for all vendors and devices.

Is there a solution to sideload app from external device via USB and running it without install?

I'm looking for the solution to develop an external device(Android-powered) for smart phone with Android embedded that can sideload app via USB and auto-run like PC2PC USB transfer cable without installing application. I want everyone could plug and play without further settings, installation, no doubt having no root and USB debugging mode turned on.
Is there a solution for doing such a thing like that?
I mean external device has Android app itself. And When it connect to phone via USB, the application will sideload app, put it to runtime for an auto-run and takes over touchscreen control to instruct the external device but still run no secure risk.

MTP connection with PC required for android but is it device independent?

I want to write a program on windows which transfers music to android via MTP.
The real device I have is HTC desire(froyo) and when I connect this via a USB cable to PC, it shows up as a removable storage and not as a Windows Portable Device ..
only ICS seems to support MTP but I do not have it. I was looking if I could connect Android Emulator with ICS to my host machine via some sort of emulated USB connection. But this not supported in android emulator.
I need some tip or suggestions as to how can I setup the environment to program for it.
I have another device (a creative media player) which shows up as Windows portable device.
If this protocol is device independent can I write my program for my "Creative media player" and expect that it would theoretically work with android ?
Thanks,

Categories

Resources