[Q] is /dev/bus/usb/* Standard in Android - Android Software/Hacking General [Developers Only]

I have an ePad (Android 2.1) that mounts usb devices in the normal Linux way so that I can use libusb to access them, I have managed to control my usb robot arm using an NDK app. Before I move onto making it a proper app instead of a hack job I wanted to know if the usb device files are standard to Android or if it's specific to my system.
Put it this way, if I make a nice cuddly app is it going to fail on most devices or work on most devices? (ones with USB OTG interface)
Sorry, I understand this could be a 'how long is a piece of string' type of question.
Many thanks,
Richard e Collins.

After a few hours of routing about on the internet I found an article on an exploit on the init daemon, google "android-root-source-code-looking-at-the-c-skills". This gave enough insight for me to deduce that this functionality I am getting is present on at least anything running 2.1 and above and is not a customisation unique to my device.

Related

[REQ][APP] Bluetooth communication

hello everyone,
Can anyone make an application which sends ASCII code via bluetooth to a PC or a bluetooth module??
I really need it for my mechatronics project.
Thanks before
Does it have to be Bluetooth? You might be able to cobble something together over USB with the USB host driver.
I'd like wireless communication for the system since cable is kinda out of date...
But when time is running out... I guess USB will be OK. But for now, since I still have plenty of time, I'd go with wireless.
You could use the chroot method and install Ubuntu on your Nexus One. I don't know if it exposes the phone's Bluetooth interface, but it might be worth looking at since you could code up anything you want in any language if that were the case.
ermmm... it's kinda advance...
any URL to the guide maybe???
is there no ordinary apps or so?
Basic serial over bluetooth is done using the RFCOMM profile, details on how to write an app can be found here:
http://developer.android.com/guide/topics/wireless/bluetooth.html
I'd guess you open a socket to the destination machine, just like normal network programming, just over bluetooth rather than tcp. Here is a stackoverflow article on the subject
http://stackoverflow.com/questions/...-sdp-connection-to-a-rs232-adapter-in-android
....
I'll try my best to understad it
complete noob on java programing here T^T

Question related android ?

i just want to know that why android operating system does not work directly in mobile devices
why there is need of development in it to use in all diffrent phones?
why it cant work directly like windows in pc does
and other question all others like bada os, symbien and apple os they all need they also need development or we can use them directly
if sumone didnt understand my question i will explain more
for further explanation>
windows we can install directly in any pc of any company or assembled
but android need development and designed for a seprate product of a specific brand
why?
no1 is intrestd in answring these questions ?
You are just kidding here right?
/Pun intended.
For example
[1] ....
[n] Windows has the complete set of drivers
[n+1] The manufacturer delivers the driver
Fundamentally, you're misunderstanding the situation. Windows does not run on any computer you can throw together. It runs on any computer that you can throw together that matches the evolving, de facto standard that started as the IBM PC.
It won't run on a SPARC Station or a 68k Mac or an IBM 360 or a Wii or a PS3 or, well, a HTC Vision.
Similarly, Android will run on any PC, er phone, er tablet, er, well computer that is basically the same as an existing Android device. The vast majority of the custom development that is, strictly-speaking, necessary for a new device amounts to device drivers. Now, most manufacturers do a lot on top of that to distinguish their product. That's where Sense and MotoBlur and such-like come into play.
A further complication is that storage space and memory are at a heavy premium on these devices. So, it is infeasible to include the incredible variety of drivers and other hardware support that makes a typical Windows or Linux install need several GBs.
Back in the day, when dinosaurs roamed the earth and there were only a handful of PC makers in the world, similar customization was needed. My first PC came with a manufacturer-custom version of DOS 2.1 and Windows 1.1. Is wasn't until at least DOS 3.x (maybe 4.x, that was a long time ago) that a vanilla MS copy had a chance of working. Even then, most peripherals *needed* a custom driver to be used at all. My first mouse is an example. Only way to use it was the Genius Mouse drivers that came with it.
thanks for ur answers guys

Accessing USB devices without root from Android NDK code

First up, I tried to post this in "Android Software Development" but unfortunately don't have the minimum 10 posts required to do so and didn't really feel like spamming the forums to make the count. If a moderator could move this post for me it would be greatly appreciated.
On an Android 4.0+ device (ie, contains the USB Host APIs), you can write applications that interface with USB devices that don't require root. Unfortunately I'm working with a codebase that is in C using libusb and while I've gotten a prototype working in a terminal emulator, at this stage it seems to require root to actually talk to the devices (enumerating devices seems ok though).
I had a look at the Android NDK API list but didn't see any reference to USB Host APIs leading me to believe that the only ones that exist are the underlying Linux APIs. Is there a way (without bouncing all calls to the USB Host APIs through JNI, or rewriting the entire thing in Java) to access USB devices when in USB OTG mode without root from Android NDK code?

[Q] Where does Android map USB devices to the apps that handle them?

When I plug a USB device into an Android tablet, the OS has the ability to "know" what app needs to be launched in order to handle it. This is probably based on the VID/PID values that come from the USB device during configuration. But somewhere, Android must be storing the relationship between VID/PID and application. Where is that mapping stored? I've searched and cannot find anything on this topic.
Thanks!

send serial data over USB from my motorola defy+

Hi xda dev team !
I would like to write an android app which sends serial data (over USB as bridge) to a hobby
circuit. The app should work on my Motorola Defy+ (android 2.3.6) and look like
a text editor (with some exceptions) - the window content should be sent to my circuit.
The problem is that the only programming language I know is C and my Linux knowledge
is minimal, almost zero ! FTDI offers some "java drivers" on their site for USB to serial converter
chipsets, but those work only on android 3.1 and above (USB host capability on android device).
An alternative would be the use chipsets like FT 311/312 which act as usb hosts
and comunicate over AOA (Android Open Accessory) Protocols with android devices.
How do i know which AOA protocol version my phone has (i want to make my app upwards compatible
so it can be used by as much android devices as possible)? Also, which IDE should i use
taking into account that i'm a beginner in this matter ? Can somebody give me some tips
where to start from ?
thanks!

Categories

Resources