2

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

Darc
  • 745
  • 10
  • 26

2 Answers2

1

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.

Community
  • 1
  • 1
Darc
  • 745
  • 10
  • 26
  • Sorry, I never got around to the detailed writeup. I haven't done anything with this since I got it working 2 years ago and don't remember exact details on how to use it. Your best bet is to check out the XDA link above as I wrote up most of it there (although that was more focused on getting it to compile). Good luck – Darc Dec 09 '14 at 19:50
1

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.

Rod Dewell
  • 840
  • 1
  • 7
  • 18