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

And what with 3.10 kernel? #115

Closed Dante383 closed 6 years ago

Dante383 commented 6 years ago

I wanted to compile a kernel patch for Galaxy J5 2017 (j5xnlte, MSM8916) but there is no such kernel patch in the repository. What am I supposed to do?

conrad-heimbold commented 6 years ago

Please try out

Dante383 commented 6 years ago

@conrad-heimbold motorola_msm8916 was the closest one, but I get these while patching:

patching file drivers/usb/gadget/Makefile patching file drivers/usb/gadget/android.c Hunk #1 FAILED at 61. Hunk #2 FAILED at 2899. Hunk #3 FAILED at 2979. Hunk #4 succeeded at 3392 (offset 54 lines). 3 out of 4 hunks FAILED -- saving rejects to file drivers/usb/gadget/android.c.rej patching file drivers/usb/gadget/f_hid.c patching file drivers/usb/gadget/f_hid.h patching file drivers/usb/gadget/f_hid_android_keyboard.c patching file drivers/usb/gadget/f_hid_android_mouse.c

I'm using kernel from here: https://github.com/MSM8916-Samsung/android_kernel_samsung_msm8916 What am I doing wrong?

conrad-heimbold commented 6 years ago

You are not doing anything wrong. Please try to patch the files manually by comparing every $FILE with its $FILE.rej

Dante383 commented 6 years ago

Okay, compiled. I'm going to flash him now, keep your fingers crossed.

conrad-heimbold commented 6 years ago

Wait! Please first make a backup of your current kernel / boot partition! Otherwise you might regret what you did...Without working kernel, you are pretty helpless...

Dante383 commented 6 years ago

I didn't get a notification from your comment, but.. guess what... yes! It works! My first compiled kernel ever, thank you stranger! <3 It feels amazing.

conrad-heimbold commented 6 years ago

Congratulations! Could you please upload the diff as a patch file? That would be really nice! With "diff as a patch file" I mean: git diff cm-14.1 > samsung_msm8916_kernel-3.10.patch

Dante383 commented 6 years ago

Sure, but are you sure that I have to compare it with cyanogenmod 14.1? Actually I have used kernel from official samsung open source page, so give me some time, I have to figure out how to make a diff out of this

conrad-heimbold commented 6 years ago

Ok, then it is more difficult. Could you unpack the src from samsung somewhere else again and compare the two folders with diff -r folder-with-patch folder-without-patch? Thanks!

Dante383 commented 6 years ago

https://pastebin.com/uvN8jHuy

Here it is. Probably something is wrong, but it's getting 12 AM here and with my daily amount of sleep..

conrad-heimbold commented 6 years ago

Thank you very much!