tejado / android-usb-gadget

Convert your Android phone to any USB device you like! USB Gadget Tool allows you to create and activate USB device roles, like a mouse or a keyboard. 🛠🛡📱
GNU General Public License v3.0
885 stars 69 forks source link

Phone reboots after trying to add the keyboard + mouse devicr #39

Open aka56kg opened 2 years ago

aka56kg commented 2 years ago

I can't add the keyboard and mouse devices, because my phone freezes for a while and then reboots

ROOT - Execute command: for dir in /config/usb_gadget/*/; do echo GADGET_PATH=$dir; cd $dir/configs/; echo CONFIG_PATH="$dir/configs/ls -1 | head -1`/"; 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/ CONFIG_PATH=/config/usb_gadget/g1//configs/b.1/ UDC=a600000.dwc3 FUNCTIONS_ACTIVE=ffs.adb 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=ffs.diag FUNCTIONS=ffs.diag_mdm FUNCTIONS=ffs.diag_mdm2 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 FUNCTIONS=rndis.rndis manufacturer=Xiaomi product=POCO F1 serialnumber=b192cba7

GADGET_PATH=/config/usb_gadget/g2/ CONFIG_PATH=/config/usb_gadget/g2//configs/b.1/ UDC= FUNCTIONS=* manufacturer=Xiaomi product=POCO F1 serialnumber=b192cba7

ROOT (stderr) - ROOT - Execute command: echo KERNEL_VERSION=(uname -r |cut -d '-' -f1 ) && (gunzip -c /proc/config.gz | grep -i configfs | sed 's/# //; s/ is not set/=NOT_SET/')

ROOT (stdout) - KERNEL_VERSION=4.9.274 CONFIG_USB_CONFIGFS=y CONFIG_USB_CONFIGFS_SERIAL=y CONFIG_USB_CONFIGFS_ACM=y CONFIG_USB_CONFIGFS_OBEX=y CONFIG_USB_CONFIGFS_NCM=y CONFIG_USB_CONFIGFS_ECM=y CONFIG_USB_CONFIGFS_ECM_SUBSET=y CONFIG_USB_CONFIGFS_QCRNDIS=NOT_SET CONFIG_USB_CONFIGFS_RNDIS=y CONFIG_USB_CONFIGFS_EEM=y CONFIG_USB_CONFIGFS_MASS_STORAGE=y CONFIG_USB_CONFIGFS_F_LB_SS=NOT_SET CONFIG_USB_CONFIGFS_F_FS=y CONFIG_USB_CONFIGFS_F_MTP=y CONFIG_USB_CONFIGFS_F_PTP=y CONFIG_USB_CONFIGFS_F_ACC=y CONFIG_USB_CONFIGFS_F_AUDIO_SRC=y CONFIG_USB_CONFIGFS_UEVENT=y CONFIG_USB_CONFIGFS_F_UAC1=NOT_SET CONFIG_USB_CONFIGFS_F_UAC2=NOT_SET CONFIG_USB_CONFIGFS_F_MIDI=y CONFIG_USB_CONFIGFS_F_HID=y CONFIG_USB_CONFIGFS_F_UVC=NOT_SET CONFIG_USB_CONFIGFS_F_PRINTER=NOT_SET CONFIG_USB_CONFIGFS_F_DIAG=y CONFIG_USB_CONFIGFS_F_CDEV=y CONFIG_USB_CONFIGFS_F_CCID=y CONFIG_USB_CONFIGFS_F_GSI=y CONFIG_USB_CONFIGFS_F_QDSS=y CONFIG_USB_CONFIGFS_F_IPC=NOT_SET CONFIG_IIO_CONFIGFS=NOT_SET CONFIG_CONFIGFS_FS=y

ROOT (stderr) - `

dcowan-london commented 1 year ago

Same for me. Android 11, also an Xiaomi phone.

NOctu1412 commented 1 year ago

Same here, also android 11, samsung a32

Spiderfffun commented 8 months ago

Same here, android 12 xiaomi redmi 9

KotMilkMeoWtwo commented 8 months ago

Same here, android 13, poco m4 pro 4g with pixel experience ROM

wegahahegeyha commented 2 months ago

Same here on Redmi 9 android 12/13 with MiUI 13/Pixel OS fork (same problem on both roms)