Arian04/android-hid-client

Character device creation failure on Android 8.0.0 Motorola device

Closed this issue · 2 comments

Describe the bug
ERROR: failed to create character device

Device details (please complete the following information):

  • Device: Motorola ???
  • OS: Stock Android 8.0
  • Root Method: Magisk

Additional context (From #26)

I installed USB gadget tool and took the screenshot
I also copied the log, in case it can help

image

log 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 FUNCTIONS_ACTIVE=$(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//
CONFIG_PATH=/config/usb_gadget/
//configs/acct/
Error - not able to change dir to /config/usb_gadget/*/... exit

ROOT (stderr) - : [1]: cd: /config/usb_gadget//configs: No such file or directory
: [1]: cd: /config/usb_gadget/
: No such file or directory
root - length=1; index=1
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=3.18.71

ROOT (stderr) - : [1]: gunzip: not found
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 FUNCTIONS_ACTIVE=$(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//
CONFIG_PATH=/config/usb_gadget/
//configs/acct/
Error - not able to change dir to /config/usb_gadget/*/... exit

ROOT (stderr) - : [1]: cd: /config/usb_gadget//configs: No such file or directory
: [1]: cd: /config/usb_gadget/
: No such file or directory
root - length=1; index=1
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 FUNCTIONS_ACTIVE=$(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/g2/
CONFIG_PATH=/config/usb_gadget/g2//configs//
UDC=
FUNCTIONS=*
UDC=
bDeviceClass=0x00
bDeviceProtocol=0x00
bDeviceSubClass=0x00
bMaxPacketSize0=0x00
bcdDevice=0x0318
bcdUSB=0x0000
configs=
functions=
idProduct=0x0000
idVendor=0x0000
os_desc=
strings=

=============

ROOT (stderr) - : [1]: cd: /config/usb_gadget/g2/strings/0x409: No such file or directory
cat: configs: Is a directory
cat: functions: Is a directory
cat: os_desc: Is a directory
cat: strings: Is a directory

Originally posted by @wokawoka in #26 (comment)

@wokawoka

I've improved the ability to troubleshoot issues like this in the latest release (v2.3.0). Do you mind trying that out and exporting a log file for me to check out?

You would just have to:

  1. Install v2.3.0
  2. Give the app root permissions
  3. Go to the "Troubleshooting" screen in the overflow menu in the top right
  4. Click the button at the bottom to export logs (a screenshot of the troubleshooting page would also be nice)

closing due to lack of response. will reopen if there's a response later on.