Compiling Android USB Gadget drivers and insmod

Hi everyone,
I have been trying for quite a while now to compile HID Gadget support for my galaxy S3 and think i may be getting close. My current problem is that when i run insmod g_hid.ko i receive the following

Code:
insmod: init_module 'g_hid.ko' failed (Device or resource busy)

. The weird thing is that next time the screen turns off or if i attempt to insert it again the phone crashes (kernel panic i assume). I get this same error when i try and insmod g_zero.ko (although this one doesn't kill the phone). Can anyone tell me how i would attempt to debug this? Or even better, has anyone got g_hid working on there phone and if so, what modifications/kernel configs did you use?

Also, when compiling the kernel, in "USB gadget support" if i select any option other than Android Gadget in USB Gadget Drivers my kernel fails to build. Has anyone got any USB gadgets to compile and run and if so what procedure/modifications did you have to make. Currently i am compiling my kernel with android gadget selected as the usb gadget driver and then changing it to HID module and running make module_prepair and make module to get my .ko files (which may be why i am getting the above error).

If anyone can provide some insite and advice it would be greatly appreciated.
Thank you
Adrian

Show Accepted Answer

Guest Quick Reply (No URL, BBcode or HTML)

Last post by okon.gail
14 minutes ago
Last post by ron.fritsch
3 hours ago
Last post by lockman.lisette
4 hours ago
Last post by wunsch.margarete
1 hour ago
Last post by hgutkowski
26 minutes ago
Last post by cade89
3 hours ago
Last post by frederique.gislason
2 hours ago
Last post by toy.alycia
1 hour ago
Last post by vanessa.abernathy
1 hour ago
Last post by susan.larson
3 hours ago
Last post by ibarton
2 hours ago
ROM Porting
Started by arlo72
Last post by keith91
2 hours ago
Last post by roscoe42
49 minutes ago