2
votes

After weeks of mucking around i have (i think) successfully compiled g_hid.ko (USB Gadget HID module) for my Samsung Galaxy S3 but have been unable to test it. If i try and use insmod from the directory it is stored in i get insmod: can't insert 'g_hid.ko': No such device I'm new to this but i think this means that i should have loaded something else that g_hid is dependent on first. Any one know what this would be or how i can find out?

Also when trying to use rmmod i receive the following error rmmod: chdir(/system/lib/modules): No such file or directory which is true, that directory doesnt exist, as far as i can tell, my modules are stored in /lib/modules but this is a read only file system so i cant add my modle there. I also get the same error if i try and use modprobe. Any help you can offer would be greatly appreiated.

Thanks

Adrian

2
This would perhaps be better suited for xda-developers.com - Raghav Sood
Thanks, ill see if they can help - Darc
maybe you need to "root" your device first? :P - TheCodeArtist

2 Answers

1
votes

I eventually got this to work. The continual discussion on the topic is at Is it possible to program Android to act as physical USB keyboard? and http://forum.xda-developers.com/showthread.php?t=1871281 When i have some free time in a few weeks (after uni) i intend to write up how i did every thing as there appears to be a lot of interest.

1
votes

Regarding the inability to place the module into system/lib/modules... You must first connect to the device and issue the commands: adb root adb remount

After issuing these commands you can place your .ko into the correct directory and the "read only file system" problem will go away.