[Q] Adding Android Open Accessory (AOA) protocol to defy (CM10) - Defy Q&A, Help & Troubleshooting

Hi all!
I will try to get the Android Open Accessory (AOA) protocol into our defy/defy+.
Anybody else working on this topic?
Atm I just added the android.hardware.usb.accessory.xml file to /etc/permissions and the com.android.future.usb.accessory.jar to /system/framework (jar taken from the droid sdk API16, my fw is latest quarx CM10).
Right now I can install f.w. the ADK2012 app. So I may on the right way... but I guess that is not all the work... does anybody know if we need to add some kernel modules f.e.?
[Edit] btw... looks like we just need to add a new f_accessory.o to our usb gadget... f.e. see https://www.codeaurora.org/gitweb/q...in;h=5d9d8625e39f815673dedea353f39edccabb1fac
Best regards, Stephan

Like to know this to. If quarx managed to give us sub host, I might be able to use my duomilanove board...
Aren't there other projects for the ADK that doesn't use the protocols?

Please ask all questions in the Q&A section. Thread moved there.

Ok... I gave it a short try with the patch and quarx's linux-2.6.32 but it failed during the compiliation... but meanwhile I noticed that quarx is working on linux-3.0.8 (see its repo in github). There we have our accessory...
So I would say stay tuned for a while and let's if quarx may got this newer kernel working with our defy...

You can find all the steps needed to patch it here:
https://github.com/ezterry/manifest-gingerbread-DS/issues/32
They're saying everywere that you need 2.6.35+ kernel (don't know if it really is mandatory, kernel in the link is 2.6.34)
A kernel with the same chipset that has it enabled can be found here:
https://github.com/XDA-Bam/samsung_kernel_latona_GB
Apparently, you need to enable it in the kernel (config), add the libs to the kernel (driver/usb/f_accesory and include/linux/f_.accesory), add the lib in the framework (might be included from CM side already??), hope it will work (or debug why not).
---------- Post added at 01:21 AM ---------- Previous post was at 01:06 AM ----------
It seems that the files are indeed in the 3.0 kernel.
I already ordered a USB-host shield for my arduino a week ago, I'll try and compile a kernel with it ones it comes in the mail.
Edit:
Tried the changes I listed, will build it tomorrow (or so). Maybe then my shield might arrive to (hate waiting, stupid holidays.. )
Any place to upload it when it works?

Got something build, but it didn't include the /system/framework/com.android.future.usb.accessory.jar and got bootloop without (cause I added the /etc/permision/something_with_usb_accesory.something
Pushed the jar with adb from bootmenu (from another CM rom).
Don't have the usb_shield yet, so can't really test. Will try and install an usb_accessory app. Does someone want the build to try?
Ok, the app fails to launch.

Ok, my repo's:
Kernel: https://github.com/labsin/jordan-kernel/commits/2.6.32
Device: https://github.com/labsin/android_device_moto_jordan-common/commits/jb_2ndboot
But doesn't work. The library isn't build (in framework/base).
And it also doesn't build in the kernel... :/
Anyone??

Might it be possible to check the driver?
Edit: Found it.
It seems to many commits need to be merged in. Can't seem to find a kernel that's not based on the nexus line that has it.

If anyone is still interested in this, I managed to make an Arduino Mega ADK board with the DemoKit application work in accessory mode on my Defy
Quarx backported the USB gadget driver from 3.0.8 kernel into his 2.6.32 based kernel already a while ago. All that was still missing was the accessory configuration in init.usb.rc and the .jar and .xml files. Quarx has already merged my pull request, so in the next CM10.1 nightly with 2.6.32 kernel, USB accessory mode should work out of the box

Thnx. Already saw this actually

Related

[Q] help build cp210x.ko on Iconia A500 3.2.1

Hi,
I really need the cp210x.ko module, but I couldn't successfully build it properly for my Iconia A500 with 3.2.1 and 2.6.36.3+ kernel.. I get the following when I tried insmod my cp210x.ko build using ubuntu cross compiler approach:
cp210x: version magic '2.6.36.3+ preempt mod_unload ARMv5 ' should be '2.6.36.3+ SMP preempt mod_unload ARMv7 '
A little search showed that I need to build it in ARMv7, and need to set the kernel config to build SMP kernel. In this thread I saw a few modules offered but couldn't post reply as a new xda-developers user, so I post here. My A500 has already been rooted via the su (version 3) method posted few days ago.
Please help me build the cp201x.ko module - I am kinda stuck..
Bill
Bill,
Might I suggest you look at loading one of the many custom ROM's that will have what you want? If you are rooted, then install CWM (ACER Recovery from the marketplace) which should allow you to load custom ROM's. In order to load the cp201x.ko module you'd have to recompile the kernel and people doing this type of work normally are building custom ROM's.
Anyway, just my 2¢
Thanks for the advice. I am testing Thor ROM at the moment. Cool..
From what I can read and see within various ROMs /system/lib/modules, very few (out of total possible) kernel modules made it to these custom ROMs - mostly to get game controller to work, extra filesystems, or networking protocols. USB-to-serial modules are rare and certainly my search didn't turn up cp210x.
Cross-compiling the kernel source on Gentoo is mentioned to be better supported then ubuntu, due to its crossdev toolkit, as I'm trying to figure out how to specify target ARMv7 instead of ARMv5 I'm defaulting to when cross compiling from Ubuntu's arm-linux-gnueabi-*
I'm wondering if various nice ROM cooks have releases of their modified kernel source - or might be willing to help me build the just the cp210x as a .ko module, e.g. in the .config, "CONFIG_USB_SERIAL_CP210X=m" - I've found a post few months ago where a successful build and insertion of cp210x module was done but he had some problems when initiating communication on it - I fear the worst but hope for the best, and would like to try that myself as I've successfully talked to my device through the cp210x module on Linux.
Or, if any tips on how to build kernel (just the modules really) properly e.g. As Thor's ROM version number hints at need for some custom and virtualized build environment, I'm looking for the quick and dirty solution if cooking ROMs/kernel/ko's has steep learning curve..
Any help much appreciated!
Bill
It looks like I was speeding down the the wrong track last few days
Apparently the /proc/config.z copied off the a500 device was missing something - and how strange that is - so I had to enable SMP and choose Tegra 2 ARM processor using "make menuconfig" to get the vermagic on the build module (e.g. modinfo after successful make modules) to show ARMv7 and SMP, build from my Ubuntu cross-compiling setup. I haven't tested this new cp210x.ko on a500 yet (as it's currently running one of the customized ROMs that has different EXTRAVERSION/vermagic to the stock Acer kernel source version 2.6.36.3 that I'm based on.
I think it'd be really wonderful if various Android kernel and kernel module makers release their kernel config, sync'ed to each ROM or kernel release, so people like me may independently build special purpose kernel modules with more efficiency and accuracy (to target their customized kernel), and we can recontribute back to to a growing list of tested and working modules for corresponding devices.
Bill
Hmm... Silly. It looks like Thor's ROM already has cp210x build-in, not as a loadable module but compiled in. My device is reported to attach to ttyUSB0! How nice
Thanks!
Bill
For those who are interested, the cp210x.ko module build using latest mentioned approach, e.g. modified kernel config.z, generate module that appear to insert correctly into lightspeed and taboonay roms (neither has this USB-to-serial module) - with a little modification of the EXTRAVERSION variable in the Makefile.
Bill
CP210x and GT-P7500
Has anyone got CP210x module working with Samsung Tab GT-P7500? My problem is that the connected USB-device doesn't create node dev/ttyUSB*. I have spent lot of time trying to figure this one out.
I have tried 1) Manually compiling the linux kernel that has cp210x support as a module. After compiling the module I tried insmoding the cp210x.ko to a running kernel, but even though it seemed to load and unload all right, it did not give me the wanted results. It does not create device node /dev/ttyUSB*. I have also tried modifying ueventd.rc for adding this row, but I am guessing it is only relevant for permissions after the node is created.
Also 2) loading cyanogenmod 10 (which should have cp210x support) to tablet but it doesnot create the desired /dev/ttyUSB* node. I can see device file under dev/bus/usb/001/ but the node does not exist.
I am going to try making needed files for building custom kernel and inserting to tablet. However, I have 0 experience on this, I think it can be tough one.
Any help would be welcome, thanks.

{I9001} CyanogenMod 10 (Ivendor) weekly compiled by PsychoGame

Hello everybody,
Before I jump into the compilation proces and uploading my build I want to ask everybody first if anybody is interested in a weekly build CM10.
I know that Ivendor is not changing his sources every week, but the base of CyanogenMod is under constant development, so changes in the CyanogenMod source will be up to date again.
Let me know if you're interested by replying to this thread.
Also if theres enough interest in a build with kernel 3.0 inside I'm also willing to upload this image as well.
Because already one person replied I'm willing to share my compiled image. After all it's already compiled.
This build is compiled against ivendors sources on his Github and the latest CyanogenMod sources which were available.
Of course this image is already tested on my phone and everything seems to work like it did on Ivendor's last build.
Because Ivendors sources haven't been changed, this build still has the same bugs as his build.
To be complete the following:
- Vsync doesn't work, because the current kernel doesn't support this yet.
- Panorama shots
- Also mobile internet has a little glitch, which only appears to happen if you have a Pin locked SIM.
Solutions to this are:
* Setting the phone into Airplane Mode and back to normal. This should load the needed module.
* A more clean solution is to use the patch provided at: d-h.st/BgH This patch can be applied through CWM.
- Also camera view is upside down, but this is not noticable in the final saved image. (Don't know if this is a new or already known bug I don't use camera that much).
You can download my build from: mediafire.com/?m765ok5mtly7l6h
You have to copy the links into you're adress bar, because I'm not yet allowed to post outside links.
If anyone has questions feel free to ask.
Greetings PsychoGame
a weekly build would be nice
i don´t use the 3.0 kernel because of the not working camera
i hope it changes soon
Hereby I updated my thread and put in the links to where you can download my build.
Greetings PsychoGame
PsychoGame said:
Hereby I updated my thread and put in the links to where you can download my build.
Greetings PsychoGame
Click to expand...
Click to collapse
Great idea. You can use 2 builds,one with 2.6 kernel, second with 3.x
it would be very great
Sent from my GT-I9001 using xda premium

Kernel modules for Atheros AR9271 based usb wifi dongles(now in Hundsbuah's kernel)

UPDATE: These modules were added by request to Hundsbuah's kernel here:
http://forum.xda-developers.com/showthread.php?t=2246062
______________________________________________________________________
I was not going to post this because it has limited use for most TF300T owners but it can't hurt so here it is. The attached file(ath9k.tar.gz) contains kernel modules needed to get AR9271 based usb wifi dongles working on the latest stock TF300T kernel(Asus build 10.4.2.20, kernel version 3.1.10). I have tested the modules with this dongle: TP-Link TL-WN722N.
Uncompress the file and you will get an ath9k directory. Inside are the modules, 2 scripts for easy loading and unloading of the modules, and iwconfig compiled for Android. Getting the dongle working goes something like this:
Su to root. Copy htc_9271.hw to /system/etc/firmware. Run the scripts start_ath9k and stop_ath9k to load and unload the modules.
After the modules are loaded, insert the dongle into the keyboard full size usb port and run ifconfig and iwconfig as needed. If wlan0(default android wifi) is on then iwconfig will show the dongle as wlan1.
Note: I did not post this on the Dev forum because I did not develop these modules...I only changed a few lines in 2 modules before compiling them.
ath9k
I have one mtech atab7t tablet with 4.0.4 android(rooted) and 3.0.8+ kernel [email protected] can i add the driver somehow?
kerteszalex said:
I have one mtech atab7t tablet with 4.0.4 android(rooted) and 3.0.8+ kernel [email protected] can i add the driver somehow?
Click to expand...
Click to collapse
Not very likely...you would need to get your kernel source, add ath9k driver support to the kernel config, then fix any compile errors.
bads3ctor said:
Not very likely...you would need to get your kernel source, add ath9k driver support to the kernel config, then fix any compile errors.
Click to expand...
Click to collapse
you can able to make a tutor for me? i am new in these things :/
kerteszalex said:
you can able to make a tutor for me? i am new in these things :/
Click to expand...
Click to collapse
Hmmm...kernel module compiling in 1 easy lesson....not sure it's possible.
bads3ctor said:
Hmmm...kernel module compiling in 1 easy lesson....not sure it's possible.
Click to expand...
Click to collapse
I really need this usb wifi support for my tab :/ i purchased recently more powerful antennas for my router but this tablet lost the signal on the next room :/ sorry for my bad english
kerteszalex said:
I really need this usb wifi support for my tab :/ i purchased recently more powerful antennas for my router but this tablet lost the signal on the next room :/ sorry for my bad english
Click to expand...
Click to collapse
You need the kernel source for your tablet and a way to root your tablet. I did a cursory Google search for the kernel source for your tablet and I can't find it. If you can get the kernel source code for your tablet then it might be possible to compile ath9k modules. If you can't root that tablet then kernel modules won't be useful because there would be no way to load them.
bads3ctor said:
You need the kernel source for your tablet and a way to root your tablet. I did a cursory Google search for the kernel source for your tablet and I can't find it. If you can get the kernel source code for your tablet then it might be possible to compile ath9k modules. If you can't root that tablet then kernel modules won't be useful because there would be no way to load them.
Click to expand...
Click to collapse
the tablet comes with root.i can extract the kernel from it?
kerteszalex said:
the tablet comes with root.i can extract the kernel from it?
Click to expand...
Click to collapse
You need the kernel source code from the tablet manufacturer.
Hello! I have source code for my kernel (Nexus 7 4.2.2) and I successful built module cifs.ko and cp210x.ko, but i can't build module ath9_htc. I add in my nexus_defconfig file
CONFIG_ATH_COMMON=m
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
CONFIG_ATH9K_HTC=m
but after make modules command only atk.ko created.
Sorry for my english.
SpulN said:
Hello! I have source code for my kernel (Nexus 7 4.2.2) and I successful built module cifs.ko and cp210x.ko, but i can't build module ath9_htc. I add in my nexus_defconfig file
CONFIG_ATH_COMMON=m
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
CONFIG_ATH9K_HTC=m
but after make modules command only atk.ko created.
Sorry for my english.
Click to expand...
Click to collapse
I had to comment out a few lines of code in 2 modules to get mine to compile. On the TF300T, it has to do with LED code not present in the stock kernel that is referred to in 2 of the modules. If you use my modules on the TF300T, you will get no LED blinking on the WIFI stick when data is transmitted or received.
EDIT: Newegg has an Atheros AR9271 USB stick for $9.99 with a cradle.
http://www.newegg.com/Product/Product.aspx?Item=N82E16833166068
For anyone wondering what these modules are used for, read this:
http://forum.xda-developers.com/showthread.php?t=1714300
HELP!! Need Kernel Module ath9k for GT-N5110 Galaxy Note 8.0
HELP !!!
Could really use some help. For the life of me I can't compile a kernel module driver ath9k for my USB wireless adapter TL-WN722N. So it can be used by insmod on my rooted Galaxy Note 8.0 GT-N5110 on Kernel 3.0.31 Build BMC9 running android 4.1.2. The source code is available at opensource.samsung. and is listed as the GT-N5110 NA (north america) model. If some one could help me please? I would be forever in your debt... :good:
Hello
When trying to add modules via your script, it gives me an "exec format error" for each module. How can this be fixed?
Device: Asus Padfone A66, Android 4.1.1
hi I am getting some problem with this attach file, i decompressed it and got the directory. but what are the next stapes ? sorry but i am not getting that part to copy to system/etc/firmware. will u make clear the process stapewise?
Sorry for bothering this old thread. I'm trying to get this to work on my OnePlus 3 running Oxygen OS Nougat. I installed Linux on my phone and I would like to install the TP-LINK drivers on it as the inbuilt WiFi module on my phone does not support monitor mode. I connected this WiFi adapter and trying to get it to work. Please help.

[Q] Building Quarx' CM10.2

Hi guys,
First I want to thank Quarx for his outstanding work!
And secondly, i want to apologize for not posting this in the appropriate thread (thought about the CM10.2 thread in the developer section), which seems to be impossible since I just registered and lack the required 10 posts... I also want to apologize if some of my questions have been answered already, I employed the search function and wasn't able to find them.
I have to admit I'm a total newbie when it comes to building Android custom roms. However, I want cm10.2 on my defy+ and need PDroid-Support, so I'm currently trying to patch and build it myself.
What I've accomplished so far is fetching the 4.1.2 jellybean sources, applying the OpenPDroid patches, and compiling / building it. With the exception of the text-to-speech engine (I get the error message "google text to speech engine was terminated" on startup), which is actually not a big deal for me, everything (including PDroid) seems to work fine.
However, since my actual goal is to patch and build cm10.2, I have some questions:
1. How can I check out the correct source tree for cm10.2 using repo? I've tried "repo init -u git://github.com/Quarx2k/android.git -b cm-10.2", which doesn't seem to do the trick.
2. After checking out the source tree for cm10, I noticed that the file device/moto/jordan-common/apply_linaro.sh was missing. Does this actually mean that it's application is not neccessary (anymore) or do I have to obtain it from another (which?) source. Without really knowing what I was doing, I just tried the "apply_linaro.sh" I found via google on https://github.com/NiharG15/htc_pico_cm10...
Additional question: Reading the CM10.2 thread, I'm a little bit confused about the current state of Bluetooth / Bluetooth Audio. Does it work in some cases or doesn't it work at all? Which kernel should I use and how can I decide which kernel is used for the building proces?
Thank you in advance for your help!
syrran said:
1. How can I check out the correct source tree for cm10.2 using repo?
Click to expand...
Click to collapse
Read http://forum.xda-developers.com/showpost.php?p=42584118&postcount=552 and change 'cm-10.1' to 'cm-10.2'
Again, thank you very much! So the information was there after all ...

Custom kernel build (help needed)

I am trying to build a custom kernel for my redmi 2 running on Nexus Experience. I found there kernel source at their github page in nx_kernel_xiaomi_msm8916 . It's the only kernel referring to XIAOMI so I think it is the right one.
I am really new to kernel building. I read some tutorials on the web and tried building one for the stock miui rom but it didn't work out.
So before I start re-building the kernel for Nexus Experience I had some questions. I wanted to add the support for external wifi adapters based on RTL8188CUS. I found the option to enable it. My question is that , By just enabling that feature will my phone just start supporting the adapter out of the box or do I have to add some Modules to it.
And the last question, After I compile the kernel I get this zImage file. I put this file in the anyKernel.zip but I found that I also have to add the wlan.ko file and I couldn't find it....
I really need some help here.

Categories

Resources