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

oneplus5 what should i do? #182

Open karencho777 opened 3 years ago

karencho777 commented 3 years ago

i have oneplus5 and install the rucky app for HID injection, but there is no kernel support for oneplus 5 maybe someone has it please respond

tejado commented 3 years ago

If your OnePlus 5 has a kernel version higher than 3.19, instead of the custom kernel patch, you can try https://github.com/tejado/android-usb-gadget Let me know if you have any issues with it. I released the app just recently so it might have some issues.

karencho777 commented 3 years ago

If your OnePlus 5 has a kernel version higher than 3.19, instead of the custom kernel patch, you can try https://github.com/tejado/android-usb-gadget Let me know if you have any issues with it. I released the app just recently so it might have some issues.

i have donloaded install it, and grant permissions, then add gadget mouse+keyboard.sh , now i am not getting an error about no kernel support but dont executes any payload

tejado commented 3 years ago

Did you activate the new Gadget in the USB Gadget Tool? What kernel version do you have? Can you post the logcat output of the app (remove any sensitive data)?

karencho777 commented 3 years ago

Did you activate the new Gadget in the USB Gadget Tool? What kernel version do you have? Can you post the logcat output of the app (remove any sensitive data)?

yes i activate it...

output where i need to get it?

tejado commented 3 years ago

Do you have adb installed? adb logcat adb shell cat /proc/version

Or you can install Logcat app from fdroid or play store.

karencho777 commented 3 years ago

here is kernel info: linux version 4.4.205-perf+ onrplus@rd-build-104 gcc version 4.9.x 20150123

tejado commented 3 years ago

The kernel version looks good. So lets check the output of the USB Gadget Tool. Give me a day and I will integrate the log function inside the app.

karencho777 commented 3 years ago

here is the log : https://anonymousfiles.io/cnc1mgB6/

tejado commented 3 years ago

There is no info about the gadget activation inside the log :/ can you get the log part for it?

karencho777 commented 3 years ago

There is no info about the gadget activation inside the log :/ can you get the log part for it?

i dont actually ))) i am a newbie

tejado commented 3 years ago

Okay, let me integrate that into the app.

karencho777 commented 3 years ago

okay

karencho777 commented 3 years ago

is there some news?

tejado commented 3 years ago

I will let you know when I integrated it. Will need some additional days.

karencho777 commented 3 years ago

ok sure

tejado commented 3 years ago

Can you try my latest release, @karencho777 ? https://github.com/tejado/android-usb-gadget/releases/tag/v0.2-beta

Please provide the log here (you can select the log text inside the app), thanks.

karencho777 commented 3 years ago

ROOT - Execute command: for dir in /config/usb_gadget//; do echo GADGET_PATH=$dir; cd $dir; if [ "$?" -ne "0" ]; then echo "Error - not able to change dir to $dir... exit"; exit 1; fi; echo UDC=$(cat UDC); find ./configs/ -type l -exec sh -c 'echo FUNCTIONSACTIVE=$(basename $(readlink "$@"))' {} \;; for f in ./functions//; do echo FUNCTIONS=$(basename $f); done; cd ./strings/0x409/; for vars in *; do echo ${vars}=$(cat $vars); done; echo "============="; done;

ROOT (stdout) - GADGET_PATH=/config/usb_gadget/g1/ UDC= FUNCTIONS_ACTIVE=ffs.adb FUNCTIONS_ACTIVE=mass_storage.0 FUNCTIONS_ACTIVE=mtp.gs0 FUNCTIONS=accessory.gs2 FUNCTIONS=audio_source.gs3 FUNCTIONS=ccid.ccid FUNCTIONS=cser.dun.0 FUNCTIONS=cser.dun.2 FUNCTIONS=cser.nmea.1 FUNCTIONS=diag.diag FUNCTIONS=diag.diag_mdm FUNCTIONS=diag.diag_mdm2 FUNCTIONS=ffs.adb FUNCTIONS=gsi.dpl FUNCTIONS=gsi.rmnet FUNCTIONS=gsi.rndis FUNCTIONS=mass_storage.0 FUNCTIONS=midi.gs5 FUNCTIONS=mtp.gs0 FUNCTIONS=ncm.0 FUNCTIONS=ptp.gs1 FUNCTIONS=qdss.qdss FUNCTIONS=qdss.qdss_mdm manufacturer=OnePlus product=OnePlus serialnumber=210be4c8

GADGET_PATH=/config/usb_gadget/g2/ UDC= FUNCTIONS=* manufacturer=OnePlus product=ONEPLUS A5000 serialnumber=210be4c8

GADGET_PATH=/config/usb_gadget/keyboard/ UDC=a800000.dwc3 FUNCTIONS_ACTIVE=hid.usb1 FUNCTIONS_ACTIVE=hid.usb0 FUNCTIONS=hid.usb0 FUNCTIONS=hid.usb1 manufacturer=tejado product=HID serialnumber=42

ROOT (stderr) - ROOT - Execute command: for dir in /config/usb_gadget//; do echo GADGET_PATH=$dir; cd $dir; if [ "$?" -ne "0" ]; then echo "Error - not able to change dir to $dir... exit"; exit 1; fi; echo UDC=$(cat UDC); find ./configs/ -type l -exec sh -c 'echo FUNCTIONSACTIVE=$(basename $(readlink "$@"))' {} \;; for f in ./functions//; do echo FUNCTIONS=$(basename $f); done; cd ./strings/0x409/; for vars in *; do echo ${vars}=$(cat $vars); done; echo "============="; done;

ROOT (stdout) - GADGET_PATH=/config/usb_gadget/g1/ UDC= FUNCTIONS_ACTIVE=ffs.adb FUNCTIONS_ACTIVE=mass_storage.0 FUNCTIONS_ACTIVE=mtp.gs0 FUNCTIONS=accessory.gs2 FUNCTIONS=audio_source.gs3 FUNCTIONS=ccid.ccid FUNCTIONS=cser.dun.0 FUNCTIONS=cser.dun.2 FUNCTIONS=cser.nmea.1 FUNCTIONS=diag.diag FUNCTIONS=diag.diag_mdm FUNCTIONS=diag.diag_mdm2 FUNCTIONS=ffs.adb FUNCTIONS=gsi.dpl FUNCTIONS=gsi.rmnet FUNCTIONS=gsi.rndis FUNCTIONS=mass_storage.0 FUNCTIONS=midi.gs5 FUNCTIONS=mtp.gs0 FUNCTIONS=ncm.0 FUNCTIONS=ptp.gs1 FUNCTIONS=qdss.qdss FUNCTIONS=qdss.qdss_mdm manufacturer=OnePlus product=OnePlus serialnumber=210be4c8

GADGET_PATH=/config/usb_gadget/g2/ UDC= FUNCTIONS=* manufacturer=OnePlus product=ONEPLUS A5000 serialnumber=210be4c8

GADGET_PATH=/config/usb_gadget/keyboard/ UDC=a800000.dwc3 FUNCTIONS_ACTIVE=hid.usb1 FUNCTIONS_ACTIVE=hid.usb0 FUNCTIONS=hid.usb0 FUNCTIONS=hid.usb1 manufacturer=tejado product=HID serialnumber=42

ROOT (stderr) -

tejado commented 3 years ago

At first, please use markdown code tags here if you write such a log output in a github comment otherwise the output is difficult to read. So it seems that it should work and that you have your hid activated. Please check, e.g. with termux if the file /dev/hidg0 is really there. Also you can try any other app (like mentioned in the README of this repository) to test if HID is working. Is there any log available for the Rucky app?

karencho777 commented 3 years ago

yes files are there... can it be usb fault?

tejado commented 3 years ago

If your USB works otherwise well, then I guess it is a problem with the Rucky app. Please test it with others...

Please also check if your computer identifies your phone as a keyboard.

karencho777 commented 3 years ago

no i have test it on Nethunter too

karencho777 commented 3 years ago

how can i check if phone identifies as keyboard?

tejado commented 3 years ago

Check the device manager in your Operating System.

karencho777 commented 3 years ago

No, it dont see it like keyboard, only Standard PS/2 Keyboard

tejado commented 3 years ago

Okayy... is your phone recognized as an Android device if you switch back to your standard profile? Did you tried other apps like mentioned in the README of android-keyboard-gadget? Please do this....

karencho777 commented 3 years ago

No it dont recognizes it like Android phone, have tried Authorizer just saved pass for codeby.net url and tried to use it there was no effect((

tejado commented 3 years ago

Maybe switch the USB cable or you have some issue with the connection, e.g. there is dust in the USB socket or the contacts have a defect... also try to use a different PC to connect your phone to...

karencho777 commented 3 years ago

have tried with another computer outcome is the same, my guess it is usb, need to change it

Sohil876 commented 3 years ago

Maybe switch the USB cable or you have some issue with the connection, e.g. there is dust in the USB socket or the contacts have a defect... also try to use a different PC to connect your phone to...

Usb keyboard app on mi a1 android10 just hangs on opening screen with your app, yes i enabled keyboard and mouse

tejado commented 3 years ago

Usb keyboard app on mi a1 android10 just hangs on opening screen with your app, yes i enabled keyboard and mouse

@Sohil876 Is this related to the issue to karencho777 or a new one? If it is a new one, please create a new issue.

Sohil876 commented 3 years ago

Usb keyboard app on mi a1 android10 just hangs on opening screen with your app, yes i enabled keyboard and mouse

@Sohil876 Is this related to the issue to karencho777 or a new one? If it is a new one, please create a new issue.

Ok but im not sure if issue is with your app or usb keyboard app, ill try other apps you mentioned first.