Closed lazerl0rd closed 4 years ago
This patch works and you must enable HID gadget function in some place(DEVICE_ATTR's show or store function will be a good choice), here is my example: https://github.com/fasheng/nethunter_kernel_lge_sdm845/commit/e74d3c43b4e3c74c7c1717c88266d4cedafe9b26
Edit: Fixed version to get usb_configuration: https://github.com/fasheng/nethunter_kernel_lge_sdm845/commit/164b0b2c5fdb8e6845a4422d1c23dded46e70fe3
Edit-2: @johanlike said:
In the new version of 4.X kernel, HID attack mode can be run without HID patch. And write init.nethunter.rc to init.usb.configfs.rc
Edit-3: Forget this patch, I follow @acai66's code and wrote a magisk module to enable hid gadget function like the latest nethunter project did: https://gitea.com/fasheng/magisk-modules/src/branch/master/release/nethunter-hid-gadget_0.1.6.zip
@fasheng @Sohil876 mind updating your kernels with the following change https://github.com/pelya/android-keyboard-gadget/pull/172?
Sorry for the bother.
Any reason why this hasnt been merged yet? @pelya