pelya / android-keyboard-gadget

Convert your Android device into USB keyboard/mouse, control your PC from your Android device remotely, including BIOS/bootloader.
Apache License 2.0
1.22k stars 308 forks source link

4.9 generic patch #165

Closed lazerl0rd closed 4 years ago

Sohil876 commented 4 years ago

Any reason why this hasnt been merged yet? @pelya

fasheng commented 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

https://github.com/johanlike/DJY-Nethunter-Andrax-Kernel-Source/commit/7143a0409552f6024e143eb52a71bdc2a38ebf59

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

lazerl0rd commented 4 years ago

@fasheng @Sohil876 mind updating your kernels with the following change https://github.com/pelya/android-keyboard-gadget/pull/172?

Sorry for the bother.

acai66 commented 4 years ago