Has anyone successfully used the USB Accessory Development Kit given away at GoogleIO 2011 with any of the EVO Gingerbread 2.3.4 ROM images floating about?
I have one of those kits, have downloaded the SDK and ADK, and followed the installation instructions. When I install Demokit.apk on a borrowed non-rooted "generic" Nexus one with Gingerbread 2.3.4, the app on the phone controls the LEDs and relays on ADK board set as expected.
However I've also attempted the same with the gingerbread-evo-deck-1.2s ROM image on my own unactivated EVO (wireless only, no 3G or phone) without success. My experience is much like that of ObsidianX on the thread '[DEV][AADK] Google's Arduino based "ADK" Working on Nexus One', where an EVO slows to a crawl as soon as it is attached to the ADK board and the ADK does not respond even after waiting out the now doggedly slow UI. I'm not meaning to disparage the ROM image I'm using - it demonstrates a lot of very good work - but I would like to be able to use the USB accessory capability. Might someone be able to suggest an alternative ROM image that does work with USB accessories? Thanks.
Related
Ok, I know much of what I'm about to ask has generally been answered or discussed in other posts, but I could really use some more direct/specific answers to my own questions.
My first question is about hardware drivers. To my understanding, a great many, if not most, of the more common wifi drivers are incorporated into the latest linux kernels. If this is the case, will more or less any Android system run on a device so long as the appropriate kernel is provided?
To be a little more clear on that, I'm actually trying to learn Android development (both for apps and building roms) on a cheap Chinese tablet that I picked up. Naturally it already has a version of Android 2.2 pre-installed. However, I have not been able to extract the contents of the boot.img or the system.img, I keep getting an error, whereas I can unpack the SDK img's no problem. So I was hoping that I can get away without compiling a custom kernel, use the already existing one, and go ahead with tweaking the system.img from either the AOSP or SDK sources. Getting the source code from the manufacturer may be impossible since I can't even seem to find out who the manufacturer is or get their contact info.
I'm actually looking to port CM7 to my wife's LG Shine Plus eventually, but I don't want to pull a Tim Allen on her phone so I want to get some experience and feel for working with Android's internals on my tablet.
So my next question is still about drivers, but what I want to know is how are things like the LCD, touchscreen input, audio output, wifi and the cell radio handled on a typical Android device? Is it mostly handled by the hardware itself with the Android framework or kernel just passing universal APIs or do the drivers for each individual piece of hardware need to be compiled into the kernel? As in the gkisystem for radios, is this handled by the kernel or the framework? Which kinda brings me back to my first question, if it is built into the kernel itself, can I not use, for example, the already existing kernel on the LG Shine Plus (it's running 2.1) to port CM7?
Any and ALL help is honestly and truly appreciated. I've been looking for detailed answers for these questions EVERYWHERE.
** just bumping this post so that it can get seen**
any help or advice at all?
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.
I really want usb host capabilities on my phone.
Honeycomb 3.1 has this as does (if I understand correctly) Samsung Galaxy S2, where it is backported to gingerbread.
So first thing to do of course was to look at the galaxy s2 source code.
But there is nothing there. No UsbDevice.java, no additional drivers, nothing.
Do I miss anything? Isn't Samsung required by GPL to publish such modifications?
Thanks,
quietNaN
So far USB host mode doesn't work for Androids < 3.1
For 2.3.4 there's only an external library to support the USB accessory mode but it needs to be built into the OS. From latest news this is included in CyanogenMod 7.1 so as soon as this is released for your phone you can at least connect peripherals to S2.
See also this link for more details on Android USB support:
http://developer.android.com/guide/topics/usb/index.html
Thanks ramdroid77 for your answer.
I am aware that the feature I am asking for is not available before 3.1 .
And I am also aware of the "accessory mode".
However, there are two reasons why I am pretty sure that the S2 does not use the accessory mode.
1. From what I gathered around the internet (mostly from the exact link you mentioned) the handshake in accessory mode is quite different from the usual usb host mode. An android phone in accessory mode will for example not be able to provide an identifier for the client. The accessory is supposed to do this.
So (please correct me here, this point is halfway guessed) I think it will not be possible to plug an usb device into your phone and expect things to work. An "usb accessory" is something you actually have to develop to work with android. There are videos on youtube however that show people just plugging in a stick into their S2...
2. Usb accesory mode is introduced as an optional feature in 2.3.4 . The S2 runs 2.3.3 .
The README_platform.txt provided with the S2 source gives instructions how to build the code. It says to download 2.3.3(r1) and replace some files by the files provided by Samsung before make. The usb handling is not part of 2.3.3(r1) and (as far as I can see) not part of the modified files they offer for download.
The modifications were actually what I was looking for. I was hoping that Samsung backported the true usb host mode which is introduced with 3.1 (but not published yet by google) to 2.3.3 so that I can have a look and also backport it to the pre-CM7.1 (build from source) I am using on my legend. Well, at least try to figure out which informations I need to gather before I even can start to think about backporting it.
Since the S2 does not use accessory mode (I think) they either use a host mode and hold the code out on us (since my original question) or they use something completely different (neither the android accessory mode nor the android usb host mode) which then I must have missed in the kernel code. If I remember correctly the tiamat kernel for example has support for usb mass storage devices (which I cannot test on my legend).
I have some projects on my mind which (from what I gathered about the accessory mode) requires a real host mode.
So my question persists (or has to be reformulated): What does the S2 use to communicate with a usb device?
quietNaN
In my quest to learn how Android works, I have a question about finding and installing hardware drivers for devices like the cameras, graphics, audio, etc.
Aside from the Google provided drivers for flagship devices (basically devices that Google worked with such as Nexus, Pandaboard, and Xoom) found here (http://code.google.com/android/nexus/drivers.html#maguroiml74k), where would you get drivers that aren't being used by these devices, such as the Mali400MP that the Galaxy S II uses?
And once obtained, how do you install the drivers? Is it part of the compiling process, or is it just copying the binary files to a folder and editing some configuration files to reference to the binary files?
Thanks.
PS: In starting to learn about the low level innards of Android (and probably Linux), is there other resources I can research, ask, and learn? Is this a good place for it (the Q&A section of XDA forums)?
The drivers will be compiled into the kernel for the specific device.
You will either have to get the source code or reverse engineer the samsung ones and write your own.
Thanks.
I currently have a Samsung Vibrant that has ICS Passion v9.2 (a ROM that doesn't use the RFS file system, but uses the standard EXT4), and has the FFC mod. Do you know if the hardware is basically the same as the Nexus S? Would I be able to use the Nexus S binaries from Google's site?
If so, I'll stick with the Vibrant as my play thing. If not, I may have to purchase a Nexus S or the Galaxy Nexus to kick around.
Edit: Never mind. I'll pose this question in the Vibrant Q&A section, as this part of the question is Vibrant-specific. Thanks!
After searching and not finding what I was looking for, I always go to XDA. What android phones from Verizon have usb hosting capabilities. Specifically I want to connect and external hard drive to transfer files. I know you're probably wondering why I just don't use a computer, well my 4 year old son made my computer unusable. Thanks in advance for any help.
Sent from my DINC2
Just look at the market
Search: "usb host"
First result is okay
The problem is:
- Your hardware need to support it
- You need to be root.
But you can try!
---------------------------------
Fernando Setien
I've tried the usb host controllers app, but that was a no go. I have an incredible 2 that is rooted. I should have included this in my first post, but I failed to.
Sent from my DINC2
Also the kernel needs to support it and no stock kernel does that I know of.
Supposedly, Android 3.1 and newer support USB host mode. In some cases you'll need special adapters and/or a powered USB hub. Unfortunately, I'm too new of a user to post outside links (the forum won't let me), but there's much documentation on the Android developer site regarding host mode v. accessory mode, and at least one article/forum thread showing an Android 3.1 tablet with an Android 2.2 phone plugged into it, the tablet reading the phone's logs over the USB connection.
In other words, it's possible, but hardware limitations may make it difficult, as will whatever version of Android you're using.
YellowApple said:
Supposedly, Android 3.1 and newer support USB host mode. In some cases you'll need special adapters and/or a powered USB hub. Unfortunately, I'm too new of a user to post outside links (the forum won't let me), but there's much documentation on the Android developer site regarding host mode v. accessory mode, and at least one article/forum thread showing an Android 3.1 tablet with an Android 2.2 phone plugged into it, the tablet reading the phone's logs over the USB connection.
In other words, it's possible, but hardware limitations may make it difficult, as will whatever version of Android you're using.
Click to expand...
Click to collapse
I am running a ICS and it is not enabled by default. It maybe on Tablets but not mobile phones. A search will lead you to threads about it asking for it to be add to the kernel but you remove options when you do and there has not been alot of want for it.
Native support
At least Samsung Galaxy SII and Note does usb Host with the default ROM. You can see with cable you need (witch could be an issue too) on many blogs.