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

What is the version that i should use for this kernel ? #67

Closed alex9099 closed 6 years ago

alex9099 commented 7 years ago

Hi, it seems like i have to compile the kernel myself to use this "mod", but i cant find what is the version of the kernel for my phone, also i dont know which patch to use :(

The kernel for my phone is this one https://github.com/bq/aquaris-E5FHD/

gmkbenjamin commented 7 years ago

The Makefile gives you version info: VERSION = 3 PATCHLEVEL = 10 SUBLEVEL = 72

Try the 3.10 patches.

alex9099 commented 7 years ago

Thanks :) , just for curiosity, can the phone be hard bricked by changing / patching the kernel

EDIT: this patch? https://github.com/pelya/android-keyboard-gadget/blob/master/kernel-3.10-nexus9.patch

gmkbenjamin commented 7 years ago

Not likely if it's soft bricked or in bootloop try reflashing the stock kernel or a different working kernel.

Not sure exactly which kernel will work with your phone. Try them one by one maybe? Use the "--check" flag when trying to apply the patch. If it doesn't give you any errors then it's a good indication that it might work with your phone.

alex9099 commented 7 years ago

Use the "--check" flag

Where?

gmkbenjamin commented 7 years ago

Assuming you are using git apply to patch?

alex9099 commented 7 years ago

It gave me this output error: patch failed: drivers/usb/gadget/Makefile:1 error: drivers/usb/gadget/Makefile: patch does not apply error: patch failed: drivers/usb/gadget/android.c:43 error: drivers/usb/gadget/android.c: patch does not apply

It does not seem like it wants to work :(

EDIT: I dont find the function / line static struct android_usb_function usbnet_function = { I am trying to modify the files manually, that might not be a good idea :/

EDIT AGAIN: This one does not give any errors, i'll try it 👍 https://raw.githubusercontent.com/pelya/android-keyboard-gadget/master/kernel-3.10-jiayus3.patch

alex9099 commented 7 years ago

Just compiled the kernel for my phone following the instructions of my phone kernel github page with the patch applied, now, do i need to do the

To compile boot.img, launch commands:

part?

alex9099 commented 7 years ago

I just tried the zImage with fastboot but it just shows "booting..." on terminal and "USB transfer OK" on phone screen :( that means that it is not compatible or i did something wrong?

conrad-heimbold commented 6 years ago
alex9099 commented 6 years ago

i think i was doing something wrong, meanwhile i did have success on it, i think i was flashing the wrong file or just generating the image in a wrong way :/ btw the e5 4g uses a different soc from the fhd