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

Doesn't generate hidg files, kernel 4.9 #174

Closed Time1apse closed 4 years ago

Time1apse commented 4 years ago

Device: beryllium(poco f1), soc: snapdragon 845, maybe another devices on 4.9 kernel.

I am patching the kernel, then i am modifing the kernel and enable some features, enable hid (in diffirent tries i'm enable hiddev and hidraw)

But when kernel is compiled and i install it in my phone, kernel doesn't make an hidg0 and hidg1 files, what i do wrong?

EDIT: On my phone it not work too(vince), i asking some people and the say, that this files doesn't generate because there is no .rc files, that can generate it, if anybody know how to generate it, pls help

Thiviyan commented 4 years ago

You should try changing usb mode or enabling adb. Else try to host an image in drivedroid. Trust me I am enabling hidg by this method sometimes.

i3ima commented 4 years ago

I agree that the files are not being generated.

Time1apse commented 4 years ago

I agree that the files are not being generated.

If you use nethunter, enable hid in usb arsenal, it will generate files, but idk is there needed for patched kernel bcs offensive security say, that kernel > 4.x already have hid support

paulzhusz commented 4 years ago

I have the same issue in my Android 9.0 + Kernel 4.9. I suppose there is a switch to enable the HID feature just like mtp... but i have no idea how to do it now.

Time1apse commented 4 years ago

I have the same issue in my Android 9.0 + Kernel 4.9. I suppose there is a switch to enable the HID feature just like mtp... but i have no idea how to do it now.

Man, download New build of nethunter app, from "usb arsenal" in menu you can enable hid if you use kernel >4.x

paulzhusz commented 4 years ago

I have the same issue in my Android 9.0 + Kernel 4.9. I suppose there is a switch to enable the HID feature just like mtp... but i have no idea how to do it now.

Man, download New build of nethunter app, from "usb arsenal" in menu you can enable hid if you use kernel >4.x

Thanks so much. Do you mean the app in "https://gitlab.com/kalilinux/nethunter/apps/kali-nethunter-app"?

Time1apse commented 4 years ago

I have the same issue in my Android 9.0 + Kernel 4.9. I suppose there is a switch to enable the HID feature just like mtp... but i have no idea how to do it now.

Man, download New build of nethunter app, from "usb arsenal" in menu you can enable hid if you use kernel >4.x

Thanks so much. Do you mean the app in "https://gitlab.com/kalilinux/nethunter/apps/kali-nethunter-app"?

Yea, download it and you needed yo download kali chroot after

paulzhusz commented 4 years ago

I have the same issue in my Android 9.0 + Kernel 4.9. I suppose there is a switch to enable the HID feature just like mtp... but i have no idea how to do it now.

Man, download New build of nethunter app, from "usb arsenal" in menu you can enable hid if you use kernel >4.x

Thanks so much. Do you mean the app in "https://gitlab.com/kalilinux/nethunter/apps/kali-nethunter-app"?

Yea, download it and you needed yo download kali chroot after

OK, so " kali chroot" is also in nethunter-app package?

Time1apse commented 4 years ago

I have the same issue in my Android 9.0 + Kernel 4.9. I suppose there is a switch to enable the HID feature just like mtp... but i have no idea how to do it now.

Man, download New build of nethunter app, from "usb arsenal" in menu you can enable hid if you use kernel >4.x

Thanks so much. Do you mean the app in "https://gitlab.com/kalilinux/nethunter/apps/kali-nethunter-app"?

Yea, download it and you needed yo download kali chroot after

OK, so " kali chroot" is also in nethunter-app package?

Its like Linux enviroment in your phone(aka isolated system)

paulzhusz commented 4 years ago

I have the same issue in my Android 9.0 + Kernel 4.9. I suppose there is a switch to enable the HID feature just like mtp... but i have no idea how to do it now.

Man, download New build of nethunter app, from "usb arsenal" in menu you can enable hid if you use kernel >4.x

Thanks so much. Do you mean the app in "https://gitlab.com/kalilinux/nethunter/apps/kali-nethunter-app"?

Yea, download it and you needed yo download kali chroot after

OK, so " kali chroot" is also in nethunter-app package?

Its like Linux enviroment in your phone(aka isolated system)

Do you mean this "https://www.kali.org/docs/development/kali-linux-arm-chroot/" nethunter-app can't run at the original Android 9 (AOSP)?

Time1apse commented 4 years ago

I have the same issue in my Android 9.0 + Kernel 4.9. I suppose there is a switch to enable the HID feature just like mtp... but i have no idea how to do it now.

Man, download New build of nethunter app, from "usb arsenal" in menu you can enable hid if you use kernel >4.x

Thanks so much. Do you mean the app in "https://gitlab.com/kalilinux/nethunter/apps/kali-nethunter-app"?

Yea, download it and you needed yo download kali chroot after

OK, so " kali chroot" is also in nethunter-app package?

Its like Linux enviroment in your phone(aka isolated system)

Do you mean this "https://www.kali.org/docs/development/kali-linux-arm-chroot/" nethunter-app can't run at the original Android 9 (AOSP)?

You can install chroot from app, that app works on any rooted phone

Thiviyan commented 4 years ago

dont waste your time trying on nethunter for hid on a kernel version 4.9.. it still dont work on nethunter usb arsenal. already tested and confirmed with this patch and the configs mentioned in nethunter official tutorial..

Time1apse commented 4 years ago

dont waste your time trying on nethunter for hid on a kernel version 4.9.. it still dont work on nethunter usb arsenal. already tested and confirmed with this patch and the configs mentioned in nethunter official tutorial..

Lol, do it without patch man, i'm already say'd that 4.x didnt need this patch

Thiviyan commented 4 years ago

we tried with and without patch both never worked... have you ever tried it on Kernel Version 4.9???

Time1apse commented 4 years ago

If you use poco you need modifed rom, on my redmi 5 plus all works fine(with kernel, that i build on my phone) (and yes, kernel 4.9)

Thiviyan commented 4 years ago

do you have its source on github?

Time1apse commented 4 years ago

do you have its source on github?

Source of kernel? I'm using any kernel from github that compiling without errors

Thiviyan commented 4 years ago

actually i wanted to see what exactly your have changed in defconfig. maybe you pushed the changes to your github?

Time1apse commented 4 years ago

actually i wanted to see what exactly your have changed in defconfig. maybe you pushed the changes to your github?

Nothing about hid

i3ima commented 4 years ago

If you use poco you need modifed rom, on my redmi 5 plus all works fine(with kernel, that i build on my phone) (and yes, kernel 4.9)

Can you upload R5Plus(vince) kernel on some hosting (anonfile,mega,gdrive, e.t.c)?

Time1apse commented 4 years ago

If you use poco you need modifed rom, on my redmi 5 plus all works fine(with kernel, that i build on my phone) (and yes, kernel 4.9)

Can you upload R5Plus(vince) kernel on some hosting (anonfile,mega,gdrive, e.t.c)?

I can and i've builded one Day ago with 8188eu WiFi adapter support, but it seems that hid not work, but it generate hidg files, maybe i have bad cable https://mega.nz/file/TCBkHCjA#HuWImHN-Y1-x0fO5unzKkBkUBnIIh91MziK8EskjOXk

i3ima commented 4 years ago

If you use poco you need modifed rom, on my redmi 5 plus all works fine(with kernel, that i build on my phone) (and yes, kernel 4.9)

Can you upload R5Plus(vince) kernel on some hosting (anonfile,mega,gdrive, e.t.c)?

I can and i've builded one Day ago with 8188eu WiFi adapter support, but it seems that hid not work, but it generate hidg files, maybe i have bad cable mega.nz/file/TCBkHCjA#HuWImHN-Y1-x0fO5unzKkBkUBnIIh91MziK8EskjOXk

I'll try it today and report if any success

i3ima commented 4 years ago

If you use poco you need modifed rom, on my redmi 5 plus all works fine(with kernel, that i build on my phone) (and yes, kernel 4.9)

Can you upload R5Plus(vince) kernel on some hosting (anonfile,mega,gdrive, e.t.c)?

I can and i've builded one Day ago with 8188eu WiFi adapter support, but it seems that hid not work, but it generate hidg files, maybe i have bad cable mega.nz/file/TCBkHCjA#HuWImHN-Y1-x0fO5unzKkBkUBnIIh91MziK8EskjOXk

HID working on Android Q (and yet functions switching in USB Arsenal), can you please share your defconfig? image

Time1apse commented 4 years ago

If you use poco you need modifed rom, on my redmi 5 plus all works fine(with kernel, that i build on my phone) (and yes, kernel 4.9)

Can you upload R5Plus(vince) kernel on some hosting (anonfile,mega,gdrive, e.t.c)?

I can and i've builded one Day ago with 8188eu WiFi adapter support, but it seems that hid not work, but it generate hidg files, maybe i have bad cable mega.nz/file/TCBkHCjA#HuWImHN-Y1-x0fO5unzKkBkUBnIIh91MziK8EskjOXk

HID working on Android Q (and yet functions switching in USB Arsenal), can you please share your defconfig? image

There is no need to change defconfig if you want hid, but i have a bug, that my phone doesn't recognize connection to pc, and i fix it

i3ima commented 4 years ago

If you use poco you need modifed rom, on my redmi 5 plus all works fine(with kernel, that i build on my phone) (and yes, kernel 4.9)

Can you upload R5Plus(vince) kernel on some hosting (anonfile,mega,gdrive, e.t.c)?

I can and i've builded one Day ago with 8188eu WiFi adapter support, but it seems that hid not work, but it generate hidg files, maybe i have bad cable mega.nz/file/TCBkHCjA#HuWImHN-Y1-x0fO5unzKkBkUBnIIh91MziK8EskjOXk

HID working on Android Q (and yet functions switching in USB Arsenal), can you please share your defconfig? image

There is no need to change defconfig if you want hid, but i have a bug, that my phone doesn't recognize connection to pc, and i fix it

So in this way please provide a patch or tell how you make working HID

Time1apse commented 4 years ago

If you use poco you need modifed rom, on my redmi 5 plus all works fine(with kernel, that i build on my phone) (and yes, kernel 4.9)

Can you upload R5Plus(vince) kernel on some hosting (anonfile,mega,gdrive, e.t.c)?

I can and i've builded one Day ago with 8188eu WiFi adapter support, but it seems that hid not work, but it generate hidg files, maybe i have bad cable mega.nz/file/TCBkHCjA#HuWImHN-Y1-x0fO5unzKkBkUBnIIh91MziK8EskjOXk

HID working on Android Q (and yet functions switching in USB Arsenal), can you please share your defconfig? image

There is no need to change defconfig if you want hid, but i have a bug, that my phone doesn't recognize connection to pc, and i fix it

So in this way please provide a patch or tell how you make working HID

There is no need to patch 4.x kernel if you dont know

i3ima commented 4 years ago

If you use poco you need modifed rom, on my redmi 5 plus all works fine(with kernel, that i build on my phone) (and yes, kernel 4.9)

Can you upload R5Plus(vince) kernel on some hosting (anonfile,mega,gdrive, e.t.c)?

I can and i've builded one Day ago with 8188eu WiFi adapter support, but it seems that hid not work, but it generate hidg files, maybe i have bad cable mega.nz/file/TCBkHCjA#HuWImHN-Y1-x0fO5unzKkBkUBnIIh91MziK8EskjOXk

HID working on Android Q (and yet functions switching in USB Arsenal), can you please share your defconfig? image

There is no need to change defconfig if you want hid, but i have a bug, that my phone doesn't recognize connection to pc, and i fix it

So in this way please provide a patch or tell how you make working HID

There is no need to patch 4.x kernel if you dont know

Ok, then how you fix your bug?

Time1apse commented 4 years ago

If you use poco you need modifed rom, on my redmi 5 plus all works fine(with kernel, that i build on my phone) (and yes, kernel 4.9)

Can you upload R5Plus(vince) kernel on some hosting (anonfile,mega,gdrive, e.t.c)?

I can and i've builded one Day ago with 8188eu WiFi adapter support, but it seems that hid not work, but it generate hidg files, maybe i have bad cable mega.nz/file/TCBkHCjA#HuWImHN-Y1-x0fO5unzKkBkUBnIIh91MziK8EskjOXk

HID working on Android Q (and yet functions switching in USB Arsenal), can you please share your defconfig? image

There is no need to change defconfig if you want hid, but i have a bug, that my phone doesn't recognize connection to pc, and i fix it

So in this way please provide a patch or tell how you make working HID

There is no need to patch 4.x kernel if you dont know

Ok, then how you fix your bug?

Change some settings in usb settings in menuconfig, idk what exactly cause that bug

i3ima commented 4 years ago

If you use poco you need modifed rom, on my redmi 5 plus all works fine(with kernel, that i build on my phone) (and yes, kernel 4.9)

Can you upload R5Plus(vince) kernel on some hosting (anonfile,mega,gdrive, e.t.c)?

I can and i've builded one Day ago with 8188eu WiFi adapter support, but it seems that hid not work, but it generate hidg files, maybe i have bad cable mega.nz/file/TCBkHCjA#HuWImHN-Y1-x0fO5unzKkBkUBnIIh91MziK8EskjOXk

HID working on Android Q (and yet functions switching in USB Arsenal), can you please share your defconfig? image

There is no need to change defconfig if you want hid, but i have a bug, that my phone doesn't recognize connection to pc, and i fix it

So in this way please provide a patch or tell how you make working HID

There is no need to patch 4.x kernel if you dont know

Ok, then how you fix your bug?

Change some settings in usb settings in menuconfig, idk what exactly cause that bug

Ok, thank you

KaiJan57 commented 1 year ago

Just future reference and other people stumbling upon this: One can extract the kernel configuration using this script. I've extracted the kernel options from the working kernel and attached the kconfig.