Create virtual devices (slave mode) - Android Software/Hacking General [Developers Only]

I need to find out a way to develop an app that creates two virtual devices on the usb port but still in usb slave mode. Here is what I need to do:
Install my app on android.
Connect my android via usb cable to a Windows CE host.
Windows CE will detect two devices:
1. USB MASS STORAGE (android app will map this to a fs image file - can be readonly)
2. Standard serial port (android app will read and write to this port to communicate to a specific app on WinCE).
Is there any APIs that helps me to do this? I can only find docs about USB HOST mode and thats not what I'm looking for.

Related

runing adb on t-mobile phone

can it be done ?
i set the phone to USB development on, however when windows asks for driver, it wont accept that driver that comes with the sdk, nor the one supplied in the google android site.
Yes it can be done you need a zip file called android_usb_windows it has the drivers you need if that does not work then are you on vista?
thats the file I have, and I'm on XP pro
are you running xp x64 edition?
no, regular 32bit
Won't accept? does it install the driver or give an error? have you made sure its on a powered usb 2.0 port? people have problems with 1.2 and 1.0 usb ports.
also, does mass storage work? does it mount to your pc as a drive?
its a usb2.0 port on my vaio laptop...
what i mean was that windows won't install the driver for the phone when connected in dev mode (it finds new hardware, just won't accept the android driver..)
for mass storage, it does detect the android phone, it installed the driver fine, but won't mount it as a drive..

need help about ziio usb host mode

i want help is any one know possible enable usb host mode to make keyboard or mouse or digital camera or 3g dongole usb work with it on my ziio i found away to get external electra for usb device but i dono what files need push for android os to see my device

[Q] USB Host mode in iberry BT07i

I am developing an android terminal application to communicate with USB-serial devices.
I have iberry BT07i running ICS 4.0.3 with 3.0.8 kernel. Build number is given as crane_evb-eng 4.0.3 IML74K 20120418.
My tablet is already rooted.
The tablet has usb otg port with host adapter and it powers the usb bus also.
When USB mass storage device is connected, it is detected and I am able to see the contents. Also when I connect USB serial devices like FTDI/prolific they are detected through USB Device Info application in linux mode. But when I came to know from the iberry support that host apis are not enabled in this tablet.
My app need to work in all devices with usb host api support without rooting. Is there a way to enable the host apis in my tablet through custom roms?

[Q] [Q / Dev / USB] Unable to claim interface (official ICS)

Hello. That's a vague question :
I have a custom USB device (class 0xff) and I want to communicate with it using my Android phone. I'm on ICS "stock" (original), and official API provides USB functionnalites.
I use a Java and C API to communicate with my device from my computer (libusb), so I though that it could be possible to do the same with my Androphone, and an OTG USB cable.
But my problem : When I plug the device to the Smartphone, it is correctly detected (and powered). Endpoints are correctly listed, and I can retrieve the serial name. But when I call the "claimInterface" function (Android API), it fails. I don't understand why, because the class of my device is unspecified and shouldn't be handled by Android OS or other App.
When I do a diagnostic with the XDA USB Host test software, I get "yes" in line "claimed" (Base API).
I realize that my question is too specific. My hope is to find someone who has already worked on this kind of problem, or who knows the limits of the USB host.
Thanks in advance.
(My phone is not rooted)
EDIT : Rooted. Same problem :/

Android file transfer using a USB cable

Hi,
For some reason I can no longer transfer files from my Android device to my Linux PC using Android File Transfer.
I can list the device:
sudo adb devices -l
List of devices attached
????????? device usb:1-4 product:OnePlus5T model:ONEPLUS_A5010 device:OnePlus5T transport_id:2
Click to expand...
Click to collapse
but Andorid File Transfer (version 4.2) wouldn't start with this phone. When I attach an older phone (Nexus 4) all is fine and I can transfer files without problem.
USB Debugging is enabled on the device.
On USB Preferences File Transfer is selected. Other options are USB tethering, MIDI, PTP, No data transfer.
Any help will be appreciated.
Update: problem solved - had to use root privilidges
Try another cable. Cliché but it's often the culprit. When you get the USB mode popup just cancel it and it'll decide on its own. Disable USB debugging as it doesn't need to be on. Try other USB ports, or the last one it was known working on. Failing that see if there's a proprietary software. Microsoft Your Phone Companion might help..

Categories

Resources