-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Enable the HID function in the USB gadget driver #3
Comments
@Jack-Rickwood In "drivers/../../function" Makefile, f_hid.o not presented. So USB HID feature skipped. However, USB HID skipped on official N935 kernel source too. Thanks for noticing. 😊 |
Np. Not sure if it helps, but this kernel seems to include it: https://github.com/Svirusx/Nethunter-s7-kernel-WirusMOD-AiO (the file is there for me when I flash it). |
@Jack-Rickwood "usb_f_hid-y := f_hid.oobj-$(CONFIG_USB_G_ANDROID) += usb_f_hid.o" This strings added in Makefile and also there is bunch of edits too. Svirusx/EOL-Nethunter-s7-kernel-WirusMOD-AiO@a246ff3 Thanks again for finding. However, Kali kernel works for pure distro. I'm not sure all of the commits works directly on Samsung Q without broke any feature. |
Yeah idk either. If it's not an easy thing to do, this can be closed i think. I just opened this in case it was a super quick one line fix or something. |
I think I've seen commits that does this. I don't know the use case but I'll take a look and let you know |
Thanks! My use case is that there is a certain app that checks if you have a specific controller connected, and the way it checks is by matching the product name (which I can already spoof), and interface class code. The interface class for HID devices is 0x03, and I want my phone to report as that over usb. I don't even need it to be able to send inputs over. Not really the end of the world if I cant do that, but I opened this issue just in case. |
Alright thanks for the info, are you on S7 Flat or edge? i will add it and send you a test image once i have the chance |
S7 flat, and thanks a bunch! |
@ananjaser1211 Not really relevant to this issue, but I didn't think it was worth making another one. Do you know what I'm doing wrong when trying to build the kernel?
And then it compiles for a while before failing on: |
Use the included build script to compile this kernel. i dont think make *_Defconfig works, the script will cat each config into one tmp_defconfig and then make that instead and regardless of what ROM you are targeting, export ANDROID_MAJOR_VERSION=q this is invalid, it needs to be export ANDROID_MAJOR_VERSION=p |
@ananjaser1211 Lol, didn't see the build script - that would have saved me a lot of headaches! Works perfectly now, thanks! |
Most welcome mate. |
I tried applying the commits affecting the file in question from "https://github.com/Svirusx/Nethunter-s7-kernel-WirusMOD-AiO" to this kernel and the hid function appears to work now. |
In
/drivers/usb/gadget/function/
the f_hid function seems to exist, but it isn't working on my phone. I think this is because it isn't enabled in the makefile/KConfig or something, and was wondering if this could be included in the kernel?The text was updated successfully, but these errors were encountered: