Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to read permissions #50

Open
Damglador opened this issue Sep 25, 2024 · 19 comments
Open

Failed to read permissions #50

Damglador opened this issue Sep 25, 2024 · 19 comments
Assignees
Labels
device-specific Cannot reproduce on my device, so it's probably a kernel-specific quirk or something similar

Comments

@Damglador
Copy link

Describe the bug
App doesn't work, I mean it doesn't pass keys and trackpad. Every time I return to main screen of the app the popup pops up with No or Yes (I press Yes every time). Maybe it faild to add HID thing.

In troubleshoot screen:

  • Chracter Device Info (Both) errors
  • Error log: Failed to read permissions

Root permissions are available through KernelSU, the command ksud sepolicy patch works in Termux (I didn't pass any parameters, but it gives an output)

To Reproduce
Steps to reproduce the behavior:

  1. Install app
  2. Grant roo
  3. Open the app
  4. Click yes
  5. Observe how nothing works

Expected behavior
I guess everything in troubleshooting should be checked and app should be working

Screenshots
Screenshot_20240925-212241.png

Device details (please complete the following information):

  • Device: Ulefone Armor 21
  • OS: Android 14
  • Soft Keyboard: GBoard
  • Are You Rooted? Yup
  • Root Method: KernelSU

Additional context
Da loog
debug_log_me.arianb.usb_hid_client_1727292220.txt

Maybe I should do anything to make it work?

@Damglador Damglador added the bug Something isn't working label Sep 25, 2024
@Arian04
Copy link
Owner

Arian04 commented Sep 25, 2024

well that's a strange issue. every time I think I added enough debugging information in the logs, a weirder issue comes up that leads to me going "ugh I wish I added X piece of information to the log output".

I work on this app kinda sporadically, but I'll keep it in mind when I get a chance to work on this again. ty for the detailed bug report.

@Arian04 Arian04 self-assigned this Sep 25, 2024
@Damglador
Copy link
Author

I'm here to test at any time

@bill88t
Copy link

bill88t commented Oct 8, 2024

Got it happening on magisk too..

  • Device: Moto G32
  • OS: Android 14
  • Soft Keyboard: Unexpected
  • Are You Rooted? Yup
  • Root Method: Magisk

debug_log_me.arianb.usb_hid_client_1728379608.txt
Screenshot_20241008-122858_USB HID Client

@Zekiu
Copy link

Zekiu commented Oct 20, 2024

Got it happening on magisk too..

  • Device: Moto G32
  • OS: Android 14
  • Soft Keyboard: Unexpected
  • Are You Rooted? Yup
  • Root Method: Magisk

debug_log_me.arianb.usb_hid_client_1728379608.txt
Screenshot_20241008-122858_USB HID Client

Seems like it's the same issue that I had on my Moto g(100), where /dev/hidg0 is on /dev/hidg1 and /dev/hidg1 is on /dev/hidg2, I think it would be good if the app allowed to either change the path to these character devices, or add an option to use hidg1 and hidg2 instead of hidg0 and hidg1

@Arian04
Copy link
Owner

Arian04 commented Oct 20, 2024

I think it would be good if the app allowed to either change the path to these character devices, or add an option to use hidg1 and hidg2 instead of hidg0 and hidg1

I've been meaning to add this feature for a long time but tbh I've just been busy, I got a midterm on Tuesday and lots of other stuff to work on, so I'll try to keep this in mind, but it might be a while until I can work on it

@IsNevis
Copy link

IsNevis commented Nov 19, 2024

Having the same issue.

Device: Pixel 8 (spoofed to Pixel 9 Pro XL)
OS: Android 14 (stock Pixel rom)
Soft Keyboard: GBoard
Are You Rooted?: Yes
Root Method: KernelSU

debug_log_me.arianb.usb_hid_client_1731980533.txt

Please do look at it when you are free.

Edit: Forgot to say this but my issue is only similar to the original issue not this. I think this way cause for both the original issue and my issue the files just don't exist at all... I can atleast confirm that for mine since I tried searching for then in /dev folder

Edit 2: somehow fixed it... Idk I used USB Gadget Tool and some random apps and it made those files

@alr86
Copy link

alr86 commented Nov 22, 2024

Having the same issue.

Device: Redmi note 9
OS: Android 14 (CrDroid v10.9)
Soft Keyboard: FlorisBoard
Are You Rooted?: Yes
Root Method: Magisk

Log file: debug_log_me.arianb.usb_hid_client_1732259042.txt

Screenshot_20241122-111733_USB HID Client.png

@Arian04 Arian04 added device-specific Cannot reproduce on my device, so it's probably a kernel-specific quirk or something similar and removed bug Something isn't working labels Dec 20, 2024
@Driv28
Copy link

Driv28 commented Dec 24, 2024

Same issues here. Xiaomi 14

Screenshot_2024-12-25-00-16-43-223_me arianb usb_hid_client

debug_log_me.arianb.usb_hid_client_1735082094.txt

@Arian04
Copy link
Owner

Arian04 commented Dec 28, 2024

Okay so I looked through all the logs and compared the issues. There seem to be two groups of issues:

  1. /dev/hidg0 is missing, /dev/hidg1 looks fine
  2. Both character devices are missing

To try and avoid asking everyone multiple times, I'm going to attach a shell script to retrieve just about every piece of information I think I'll want to know. Hopefully this means that once people start responding, I'll be able to figure out what's wrong without too many delays due to back-and-forth communication.

Please make sure to run the script in a root shell and respond with the output attached.

EDIT: Please also make sure to run this script after opening the app and attempting to create the character devices via the prompt and trying to send keystrokes or touchpad inputs.

Most terminals have some option to save the entire buffer into a text file, which could help you with this. The beginning of the script has usage instructions, the TL;DR of those instructions are "Just get the script onto the device, put it in /sdcard/ if you want, and run source path/to/the/script. Don't worry about making it executable."

GitHub won't let me attach the script as a file, so I'm putting it here as a code block:

#!/system/bin/sh

# Usage Notes:
#
# It's a bit annoying to find a location to put an executable script on android
# due to restrictions on what directories are writable and which ones are able
# to hold executable files.
#
# Because of this, I wrote this script with `source`-ing it in mind.
#
# In other words, just get the script onto your device and run:
#
# `source path/to/the/script/get_more_info.sh`
#
# Of course, replace that path with wherever you put the script. I just put it in /sdcard/

# Wrap the whole thing in () to run it in a subshell, so it's safe to `source` without
# inadvertedly altering the parent shell.
(
	set -x

	if [ ! $(id -u) -eq 0 ]; then
		echo "Please run the script as root :)"
		exit
	fi

	# Print every gadget recursively
	ls -lZR /config/usb_gadget/

	echo "------------------------------"

	ls -lZ /dev/hid*

	echo "------------------------------"

	ls -lZR /sys/class/udc
	getprop sys.usb.controller

	echo "------------------------------"
)

@Driv28
Copy link

Driv28 commented Dec 28, 2024

Thank you.

Output (#1 - Incomplete)
# This code block looks like a chunk of output from some other run of the script.
# Some timestamps are different but otherwise it looks roughly the same as Output #2.
/config/usb_gadget/g1/functions/uvc.0/control/terminal/camera/default:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bAssocTerminal
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bTerminalID
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bmControls
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 iTerminal
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 wObjectiveFocalLengthMax
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 wObjectiveFocalLengthMin
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 wOcularFocalLength
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 wTerminalType

/config/usb_gadget/g1/functions/uvc.0/control/terminal/output:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 1970-06-08 05:26 default

/config/usb_gadget/g1/functions/uvc.0/control/terminal/output/default:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bAssocTerminal
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bSourceID
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bTerminalID
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 iTerminal
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 wTerminalType

/config/usb_gadget/g1/functions/uvc.0/streaming:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bInterfaceNumber
drwxr-xr-x 5 root root u:object_r:configfs:s0     0 1970-06-08 05:26 class
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 1970-06-08 05:26 color_matching
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 2024-12-25 15:16 header
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 2024-12-25 15:16 mjpeg
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 2024-12-25 15:16 uncompressed

/config/usb_gadget/g1/functions/uvc.0/streaming/class:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-25 15:16 fs
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-25 15:16 hs
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-25 15:16 ss

/config/usb_gadget/g1/functions/uvc.0/streaming/class/fs:
total 0
lrwxrwxrwx 1 root root u:object_r:configfs:s0  0 2024-12-25 15:16 h -> ../../../../../../../usb_gadget/g1/functions/uvc.0/streaming/header/h

/config/usb_gadget/g1/functions/uvc.0/streaming/class/hs:
total 0
lrwxrwxrwx 1 root root u:object_r:configfs:s0  0 2024-12-25 15:16 h -> ../../../../../../../usb_gadget/g1/functions/uvc.0/streaming/header/h

/config/usb_gadget/g1/functions/uvc.0/streaming/class/ss:
total 0
lrwxrwxrwx 1 root root u:object_r:configfs:s0  0 2024-12-25 15:16 h -> ../../../../../../../usb_gadget/g1/functions/uvc.0/streaming/header/h

/config/usb_gadget/g1/functions/uvc.0/streaming/color_matching:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 1970-06-08 05:26 default

/config/usb_gadget/g1/functions/uvc.0/streaming/color_matching/default:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bColorPrimaries
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bMatrixCoefficients
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bTransferCharacteristics

/config/usb_gadget/g1/functions/uvc.0/streaming/header:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-25 15:16 h

/config/usb_gadget/g1/functions/uvc.0/streaming/header/h:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bStillCaptureMethod
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bTerminalLink
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bTriggerSupport
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bTriggerUsage
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bmInfo
lrwxrwxrwx 1 root root u:object_r:configfs:s0     0 2024-12-25 15:16 m -> ../../../../../../../usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m
lrwxrwxrwx 1 root root u:object_r:configfs:s0     0 2024-12-25 15:16 u -> ../../../../../../../usb_gadget/g1/functions/uvc.0/streaming/uncompressed/u

/config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg:
total 0
drwxr-xr-x 4 root root u:object_r:configfs:s0  0 2024-12-25 15:16 m

/config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0     0 2024-12-25 15:16 360p
drwxr-xr-x 2 root root u:object_r:configfs:s0     0 2024-12-25 15:16 720p
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bAspectRatioX
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bAspectRatioY
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bDefaultFrameIndex
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bFormatIndex
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bmFlags
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bmInterlaceFlags
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 bmaControls

/config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bFrameIndex
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bmCapabilities
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 dwDefaultFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 dwMaxBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 dwMaxVideoFrameBufferSize
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 dwMinBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 wHeight
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 wWidth

/config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bFrameIndex
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bmCapabilities
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwDefaultFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMaxBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMaxVideoFrameBufferSize
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMinBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 wHeight
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 wWidth

/config/usb_gadget/g1/functions/uvc.0/streaming/uncompressed:
total 0
drwxr-xr-x 4 root root u:object_r:configfs:s0  0 2024-12-25 15:16 u

/config/usb_gadget/g1/functions/uvc.0/streaming/uncompressed/u:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0     0 2024-12-25 15:16 360p
drwxr-xr-x 2 root root u:object_r:configfs:s0     0 2024-12-25 15:16 720p
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bAspectRatioX
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bAspectRatioY
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bBitsPerPixel
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bDefaultFrameIndex
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bFormatIndex
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bmInterlaceFlags
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bmaControls
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 guidFormat

/config/usb_gadget/g1/functions/uvc.0/streaming/uncompressed/u/360p:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bFrameIndex
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bmCapabilities
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 dwDefaultFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 dwMaxBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 dwMaxVideoFrameBufferSize
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 dwMinBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 wHeight
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 wWidth

/config/usb_gadget/g1/functions/uvc.0/streaming/uncompressed/u/720p:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bFrameIndex
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bmCapabilities
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwDefaultFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMaxBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMaxVideoFrameBufferSize
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMinBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 wHeight
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 wWidth

/config/usb_gadget/g1/os_desc:
total 0
lrwxrwxrwx 1 root   root u:object_r:configfs:s0     0 2024-12-28 12:59 b.1 -> ../../../usb_gadget/g1/configs/b.1
-rw-r--r-- 1 system usb  u:object_r:configfs:s0  4096 1970-06-08 05:26 b_vendor_code
-rw-r--r-- 1 system usb  u:object_r:configfs:s0  4096 1970-06-08 05:26 qw_sign
-rw-r--r-- 1 system usb  u:object_r:configfs:s0  4096 2024-12-28 12:59 use

/config/usb_gadget/g1/strings:
total 0
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 1970-06-08 05:26 0x409

/config/usb_gadget/g1/strings/0x409:
total 0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 manufacturer
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 product
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 serialnumber

/config/usb_gadget/g2:
total 0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 UDC
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bDeviceClass
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bDeviceProtocol
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bDeviceSubClass
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bMaxPacketSize0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bcdDevice
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bcdUSB
drwxr-xr-x 3 system usb u:object_r:configfs:s0     0 1970-06-08 05:26 configs
drwxr-xr-x 2 system usb u:object_r:configfs:s0     0 1970-06-08 05:26 functions
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 idProduct
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 idVendor
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 max_speed
drwxr-xr-x 2 system usb u:object_r:configfs:s0     0 1970-06-08 05:26 os_desc
drwxr-xr-x 3 system usb u:object_r:configfs:s0     0 1970-06-08 05:26 strings

/config/usb_gadget/g2/configs:
total 0
drwxrwx--- 3 system usb u:object_r:configfs:s0  0 1970-06-08 05:26 b.1

/config/usb_gadget/g2/configs/b.1:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 MaxPower
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 bmAttributes
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 1970-06-08 05:26 strings

/config/usb_gadget/g2/configs/b.1/strings:
total 0
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 1970-06-08 05:26 0x409

/config/usb_gadget/g2/configs/b.1/strings/0x409:
total 0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 configuration

/config/usb_gadget/g2/functions:
total 0

/config/usb_gadget/g2/os_desc:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 b_vendor_code
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 qw_sign
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:51 use
Output (#2)
# Now onto the output that seems to not be broken
ource /storage/emulated/0/USBHID.sh                <
[1735404724.541973] id -u
[1735404724.548808] '[' ! 0 -eq 0 ']'
[1735404724.548834] ls -lZR /config/usb_gadget/
/config/usb_gadget:
total 0
drwxrwx--- 6 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 g1
drwxrwx--- 6 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 g2

/config/usb_gadget/g1:                               total 0
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 2024-12-28 12:59 UDC
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 2024-12-28 12:59 bDeviceClass
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 2024-12-28 12:59 bDeviceProtocol
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 2024-12-28 12:59 bDeviceSubClass
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bMaxPacketSize0
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bcdDevice
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bcdUSB
drwxr-xr-x  3 system usb u:object_r:configfs:s0     0 1970-06-08 05:26 configs
drwxr-xr-x 25 system usb u:object_r:configfs:s0     0 1970-06-08 05:26 functions
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 2024-12-28 12:59 idProduct
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 2024-12-28 12:59 idVendor
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 max_speed
drwxr-xr-x  2 system usb u:object_r:configfs:s0     0 2024-12-28 17:51 os_desc
drwxr-xr-x  3 system usb u:object_r:configfs:s0     0 1970-06-08 05:26 strings

/config/usb_gadget/g1/configs:
total 0
drwxrwx--- 3 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 b.1

/config/usb_gadget/g1/configs/b.1:
total 0
-rw-r--r-- 1 system usb  u:object_r:configfs:s0  4096 2024-12-28 12:03 MaxPower
-rw-r--r-- 1 system usb  u:object_r:configfs:s0  4096 2024-12-28 12:03 bmAttributes
lrwxrwxrwx 1 root   root u:object_r:configfs:s0     0 2024-12-28 12:59 function0 -> ../../../../usb_gadget/g1/functions/ffs.adb
drwxr-xr-x 3 system usb  u:object_r:configfs:s0     0 1970-06-08 05:26 strings

/config/usb_gadget/g1/configs/b.1/strings:
total 0
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 0x409

/config/usb_gadget/g1/configs/b.1/strings/0x409:
total 0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 2024-12-28 12:59 configuration

/config/usb_gadget/g1/functions:
total 0
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 1970-06-08 05:26 accessory.gs2
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 1970-06-08 05:26 audio_source.gs3
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 1970-06-08 05:26 ccid.ccid
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 cser.dun.0
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 cser.dun.2
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 cser.nmea.1
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 1970-06-08 05:26 ffs.adb
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 1970-06-08 05:26 ffs.diag
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 1970-06-08 05:26 ffs.diag_mdm
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 1970-06-08 05:26 ffs.diag_mdm2
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 1970-06-08 05:26 ffs.mtp
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 1970-06-08 05:26 ffs.ptp
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 gsi.dpl
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 gsi.rmnet
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 gsi.rndis
drwxrwx--- 3 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 mass_storage.0
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 midi.gs5
drwxrwx--- 3 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 ncm.0
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 qdss.qdss
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 qdss.qdss_mdm
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 qdss.qdss_sw
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 uac2.0
drwxrwx--- 4 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 uvc.0

/config/usb_gadget/g1/functions/accessory.gs2:
total 0

/config/usb_gadget/g1/functions/audio_source.gs3:
total 0

/config/usb_gadget/g1/functions/ccid.ccid:
total 0

/config/usb_gadget/g1/functions/cser.dun.0:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 status

/config/usb_gadget/g1/functions/cser.dun.2:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 status

/config/usb_gadget/g1/functions/cser.nmea.1:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 status

/config/usb_gadget/g1/functions/ffs.adb:
total 0

/config/usb_gadget/g1/functions/ffs.diag:
total 0

/config/usb_gadget/g1/functions/ffs.diag_mdm:
total 0

/config/usb_gadget/g1/functions/ffs.diag_mdm2:
total 0

/config/usb_gadget/g1/functions/ffs.mtp:
total 0

/config/usb_gadget/g1/functions/ffs.ptp:
total 0

/config/usb_gadget/g1/functions/gsi.dpl:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 info

/config/usb_gadget/g1/functions/gsi.rmnet:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 info

/config/usb_gadget/g1/functions/gsi.rndis:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 info
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 rndis_class_id

/config/usb_gadget/g1/functions/mass_storage.0:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0     0 2024-12-28 17:51 lun.0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 stall

/config/usb_gadget/g1/functions/mass_storage.0/lun.0:
total 0
-rw-r--r-- 1 root root   u:object_r:configfs:s0  4096 2024-12-28 17:52 cdrom
-rw-rw---- 1 root system u:object_r:configfs:s0  4096 1970-06-08 05:26 file
--w------- 1 root root   u:object_r:configfs:s0  4096 2024-12-28 17:52 forced_eject
-rw-r--r-- 1 root root   u:object_r:configfs:s0  4096 2024-12-28 17:52 inquiry_string
-rw-r--r-- 1 root root   u:object_r:configfs:s0  4096 2024-12-28 17:52 nofua
-rw-r--r-- 1 root root   u:object_r:configfs:s0  4096 2024-12-28 17:52 removable
-rw-r--r-- 1 root root   u:object_r:configfs:s0  4096 2024-12-28 17:52 ro

/config/usb_gadget/g1/functions/midi.gs5:
total 0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 buflen
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 id
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 in_ports
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 index
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 out_ports
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 qlen

/config/usb_gadget/g1/functions/ncm.0:
total 0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 dev_addr
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 host_addr
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 ifname
drwxr-xr-x 3 system usb u:object_r:configfs:s0     0 1970-06-08 05:26 os_desc
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 qmult

/config/usb_gadget/g1/functions/ncm.0/os_desc:
total 0
drwxr-xr-x 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 interface.ncm

/config/usb_gadget/g1/functions/ncm.0/os_desc/interface.ncm:
total 0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 compatible_id
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 sub_compatible_id

/config/usb_gadget/g1/functions/qdss.qdss:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 enable_debug_inface

/config/usb_gadget/g1/functions/qdss.qdss_mdm:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 enable_debug_inface

/config/usb_gadget/g1/functions/qdss.qdss_sw:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 enable_debug_inface

/config/usb_gadget/g1/functions/uac2.0:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_chmask
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_hs_bint
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_mute_present
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_srate
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_ssize
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_sync
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_volume_max
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_volume_min
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_volume_present
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_volume_res
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 fb_max
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 function_name
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_chmask
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_hs_bint
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_mute_present
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_srate
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_ssize
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_volume_max
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_volume_min
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_volume_present
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_volume_res
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 req_number

/config/usb_gadget/g1/functions/uvc.0:
total 0
drwxr-xr-x 6 root root u:object_r:configfs:s0     0 2024-12-28 17:51 control
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 function_name
drwxr-xr-x 7 root root u:object_r:configfs:s0     0 2024-12-28 17:51 streaming
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 streaming_interval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 streaming_maxburst
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 streaming_maxpacket

/config/usb_gadget/g1/functions/uvc.0/control:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bInterfaceNumber
drwxr-xr-x 4 root root u:object_r:configfs:s0     0 1970-06-08 05:26 class
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 2024-12-25 15:16 header
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 1970-06-08 05:26 processing
drwxr-xr-x 4 root root u:object_r:configfs:s0     0 1970-06-08 05:26 terminal

/config/usb_gadget/g1/functions/uvc.0/control/class:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-25 15:16 fs
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-25 15:16 ss

/config/usb_gadget/g1/functions/uvc.0/control/class/fs:
total 0
lrwxrwxrwx 1 root root u:object_r:configfs:s0  0 2024-12-25 15:16 h -> ../../../../../../../usb_gadget/g1/functions/uvc.0/control/header/h

/config/usb_gadget/g1/functions/uvc.0/control/class/ss:
total 0
lrwxrwxrwx 1 root root u:object_r:configfs:s0  0 2024-12-25 15:16 h -> ../../../../../../../usb_gadget/g1/functions/uvc.0/control/header/h

/config/usb_gadget/g1/functions/uvc.0/control/header:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 17:51 h

/config/usb_gadget/g1/functions/uvc.0/control/header/h:
total 0
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bcdUVC
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwClockFrequency

/config/usb_gadget/g1/functions/uvc.0/control/processing:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 17:51 default

/config/usb_gadget/g1/functions/uvc.0/control/processing/default:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bSourceID
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bUnitID
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmControls
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 iProcessing
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wMaxMultiplier

/config/usb_gadget/g1/functions/uvc.0/control/terminal:
total 0
drwxr-xr-x 3 root root u:object_r:configfs:s0  0 1970-06-08 05:26 camera
drwxr-xr-x 3 root root u:object_r:configfs:s0  0 1970-06-08 05:26 output

/config/usb_gadget/g1/functions/uvc.0/control/terminal/camera:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 17:51 default

/config/usb_gadget/g1/functions/uvc.0/control/terminal/camera/default:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bAssocTerminal
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bTerminalID
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmControls
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 iTerminal
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wObjectiveFocalLengthMax
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wObjectiveFocalLengthMin
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wOcularFocalLength
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wTerminalType

/config/usb_gadget/g1/functions/uvc.0/control/terminal/output:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 17:51 default

/config/usb_gadget/g1/functions/uvc.0/control/terminal/output/default:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bAssocTerminal
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bSourceID
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bTerminalID
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 iTerminal
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wTerminalType

/config/usb_gadget/g1/functions/uvc.0/streaming:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bInterfaceNumber
drwxr-xr-x 5 root root u:object_r:configfs:s0     0 1970-06-08 05:26 class
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 1970-06-08 05:26 color_matching
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 2024-12-25 15:16 header
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 2024-12-25 15:16 mjpeg
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 2024-12-25 15:16 uncompressed

/config/usb_gadget/g1/functions/uvc.0/streaming/class:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-25 15:16 fs
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-25 15:16 hs
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-25 15:16 ss

/config/usb_gadget/g1/functions/uvc.0/streaming/class/fs:
total 0
lrwxrwxrwx 1 root root u:object_r:configfs:s0  0 2024-12-25 15:16 h -> ../../../../../../../usb_gadget/g1/functions/uvc.0/streaming/header/h

/config/usb_gadget/g1/functions/uvc.0/streaming/class/hs:
total 0
lrwxrwxrwx 1 root root u:object_r:configfs:s0  0 2024-12-25 15:16 h -> ../../../../../../../usb_gadget/g1/functions/uvc.0/streaming/header/h

/config/usb_gadget/g1/functions/uvc.0/streaming/class/ss:
total 0
lrwxrwxrwx 1 root root u:object_r:configfs:s0  0 2024-12-25 15:16 h -> ../../../../../../../usb_gadget/g1/functions/uvc.0/streaming/header/h

/config/usb_gadget/g1/functions/uvc.0/streaming/color_matching:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 17:51 default

/config/usb_gadget/g1/functions/uvc.0/streaming/color_matching/default:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bColorPrimaries
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bMatrixCoefficients
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bTransferCharacteristics

/config/usb_gadget/g1/functions/uvc.0/streaming/header:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 17:51 h

/config/usb_gadget/g1/functions/uvc.0/streaming/header/h:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bStillCaptureMethod
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bTerminalLink
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bTriggerSupport
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bTriggerUsage
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmInfo
lrwxrwxrwx 1 root root u:object_r:configfs:s0     0 2024-12-25 15:16 m -> ../../../../../../../usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m
lrwxrwxrwx 1 root root u:object_r:configfs:s0     0 2024-12-25 15:16 u -> ../../../../../../../usb_gadget/g1/functions/uvc.0/streaming/uncompressed/u

/config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg:
total 0
drwxr-xr-x 4 root root u:object_r:configfs:s0  0 2024-12-28 17:51 m

/config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0     0 2024-12-28 17:51 360p
drwxr-xr-x 2 root root u:object_r:configfs:s0     0 2024-12-28 17:51 720p
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bAspectRatioX
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bAspectRatioY
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bDefaultFrameIndex
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bFormatIndex
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmFlags
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmInterlaceFlags
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 bmaControls

/config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bFrameIndex
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmCapabilities
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwDefaultFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwMaxBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwMaxVideoFrameBufferSize
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwMinBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wHeight
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wWidth

/config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bFrameIndex
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmCapabilities
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwDefaultFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMaxBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMaxVideoFrameBufferSize
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMinBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 wHeight
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 wWidth

/config/usb_gadget/g1/functions/uvc.0/streaming/uncompressed:
total 0
drwxr-xr-x 4 root root u:object_r:configfs:s0  0 2024-12-28 17:51 u

/config/usb_gadget/g1/functions/uvc.0/streaming/uncompressed/u:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0     0 2024-12-28 17:51 360p
drwxr-xr-x 2 root root u:object_r:configfs:s0     0 2024-12-28 17:51 720p
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bAspectRatioX
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bAspectRatioY
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bBitsPerPixel
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bDefaultFrameIndex
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bFormatIndex
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmInterlaceFlags
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmaControls
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 guidFormat

/config/usb_gadget/g1/functions/uvc.0/streaming/uncompressed/u/360p:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bFrameIndex
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmCapabilities
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwDefaultFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwMaxBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwMaxVideoFrameBufferSize
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwMinBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wHeight
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wWidth

/config/usb_gadget/g1/functions/uvc.0/streaming/uncompressed/u/720p:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bFrameIndex
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmCapabilities
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwDefaultFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMaxBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMaxVideoFrameBufferSize
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMinBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 wHeight
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 wWidth

/config/usb_gadget/g1/os_desc:
total 0
lrwxrwxrwx 1 root   root u:object_r:configfs:s0     0 2024-12-28 12:59 b.1 -> ../../../usb_gadget/g1/configs/b.1
-rw-r--r-- 1 system usb  u:object_r:configfs:s0  4096 1970-06-08 05:26 b_vendor_code
-rw-r--r-- 1 system usb  u:object_r:configfs:s0  4096 1970-06-08 05:26 qw_sign
-rw-r--r-- 1 system usb  u:object_r:configfs:s0  4096 2024-12-28 12:59 use

/config/usb_gadget/g1/strings:
total 0
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 0x409

/config/usb_gadget/g1/strings/0x409:
total 0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 manufacturer
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 product
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 serialnumber

/config/usb_gadget/g2:
total 0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 UDC
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bDeviceClass
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bDeviceProtocol
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bDeviceSubClass
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bMaxPacketSize0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bcdDevice
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bcdUSB
drwxr-xr-x 3 system usb u:object_r:configfs:s0     0 1970-06-08 05:26 configs
drwxr-xr-x 2 system usb u:object_r:configfs:s0     0 1970-06-08 05:26 functions
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 idProduct
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 idVendor
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 max_speed
drwxr-xr-x 2 system usb u:object_r:configfs:s0     0 2024-12-28 17:51 os_desc
drwxr-xr-x 3 system usb u:object_r:configfs:s0     0 1970-06-08 05:26 strings

/config/usb_gadget/g2/configs:
total 0
drwxrwx--- 3 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 b.1

/config/usb_gadget/g2/configs/b.1:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 MaxPower
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmAttributes
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 1970-06-08 05:26 strings

/config/usb_gadget/g2/configs/b.1/strings:
total 0
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 0x409

/config/usb_gadget/g2/configs/b.1/strings/0x409:
total 0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 configuration

/config/usb_gadget/g2/functions:
total 0

/config/usb_gadget/g2/os_desc:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 b_vendor_code
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 qw_sign
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 use

/config/usb_gadget/g2/strings:
total 0
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:51 0x409

/config/usb_gadget/g2/strings/0x409:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 1970-06-08 05:26 manufacturer
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 1970-06-08 05:26 product
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 1970-06-08 05:26 serialnumber
[1735404724.569935] echo ------------------------------
------------------------------
[1735404724.570311] ls -lZ '/dev/hid*'
ls: /dev/hid*: No such file or directory
[1735404724.577376] echo ------------------------------
------------------------------
[1735404724.577401] ls -lZR /sys/class/udc
/sys/class/udc:
total 0
lrwxrwxrwx 1 root root u:object_r:sysfs:s0  0 2024-12-28 17:51 a600000.dwc3 -> ../../devices/platform/soc/a600000.ssusb/a600000.dwc3/udc/a600000.dwc3
[1735404724.583816] getprop sys.usb.controller
a600000.dwc3
[1735404724.589871] echo ------------------------------
------------------------------
Output (#3 - Seemingly after opening app)
ource /storage/emulated/0/USBHID.sh                <
[1735404768.646190] id -u
[1735404768.652419] '[' ! 0 -eq 0 ']'
[1735404768.652510] ls -lZR /config/usb_gadget/
/config/usb_gadget:
total 0
drwxrwx--- 6 system usb u:object_r:configfs:s0  0 2024-12-28 17:52 g1
drwxrwx--- 6 system usb u:object_r:configfs:s0  0 2024-12-28 17:52 g2

/config/usb_gadget/g1:
total 0
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 2024-12-28 17:52 UDC
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 2024-12-28 12:59 bDeviceClass
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 2024-12-28 12:59 bDeviceProtocol
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 2024-12-28 12:59 bDeviceSubClass
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bMaxPacketSize0
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bcdDevice
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bcdUSB
drwxr-xr-x  3 system usb u:object_r:configfs:s0     0 1970-06-08 05:26 configs
drwxr-xr-x 27 system usb u:object_r:configfs:s0     0 2024-12-28 17:52 functions
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 2024-12-28 12:59 idProduct
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 2024-12-28 12:59 idVendor
-rw-r--r--  1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 max_speed
drwxr-xr-x  2 system usb u:object_r:configfs:s0     0 2024-12-28 17:52 os_desc
drwxr-xr-x  3 system usb u:object_r:configfs:s0     0 1970-06-08 05:26 strings

/config/usb_gadget/g1/configs:
total 0
drwxrwx--- 3 system usb u:object_r:configfs:s0  0 2024-12-28 17:52 b.1

/config/usb_gadget/g1/configs/b.1:
total 0
-rw-r--r-- 1 system usb  u:object_r:configfs:s0  4096 2024-12-28 12:03 MaxPower
-rw-r--r-- 1 system usb  u:object_r:configfs:s0  4096 2024-12-28 12:03 bmAttributes
lrwxrwxrwx 1 root   root u:object_r:configfs:s0     0 2024-12-28 12:59 function0 -> ../../../../usb_gadget/g1/functions/ffs.adb
drwxr-xr-x 3 system usb  u:object_r:configfs:s0     0 1970-06-08 05:26 strings

/config/usb_gadget/g1/configs/b.1/strings:
total 0
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:52 0x409

/config/usb_gadget/g1/configs/b.1/strings/0x409:
total 0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 2024-12-28 12:59 configuration

/config/usb_gadget/g1/functions:
total 0
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 1970-06-08 05:26 accessory.gs2
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 1970-06-08 05:26 audio_source.gs3
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 1970-06-08 05:26 ccid.ccid
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 2024-12-28 17:52 cser.dun.0
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 2024-12-28 17:52 cser.dun.2
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 2024-12-28 17:52 cser.nmea.1
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 1970-06-08 05:26 ffs.adb
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 1970-06-08 05:26 ffs.diag
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 1970-06-08 05:26 ffs.diag_mdm
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 1970-06-08 05:26 ffs.diag_mdm2
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 1970-06-08 05:26 ffs.mtp
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 1970-06-08 05:26 ffs.ptp
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 2024-12-28 17:52 gsi.dpl
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 2024-12-28 17:52 gsi.rmnet
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 2024-12-28 17:52 gsi.rndis
drwxr-xr-x 2 root   root u:object_r:configfs:s0  0 2024-12-28 17:52 hid.keyboard
drwxr-xr-x 2 root   root u:object_r:configfs:s0  0 2024-12-28 17:52 hid.mouse
drwxrwx--- 3 system usb  u:object_r:configfs:s0  0 2024-12-28 17:52 mass_storage.0
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 2024-12-28 17:52 midi.gs5
drwxrwx--- 3 system usb  u:object_r:configfs:s0  0 2024-12-28 17:52 ncm.0
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 2024-12-28 17:52 qdss.qdss
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 2024-12-28 17:52 qdss.qdss_mdm
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 2024-12-28 17:52 qdss.qdss_sw
drwxrwx--- 2 system usb  u:object_r:configfs:s0  0 2024-12-28 17:52 uac2.0
drwxrwx--- 4 system usb  u:object_r:configfs:s0  0 2024-12-28 17:52 uvc.0

/config/usb_gadget/g1/functions/accessory.gs2:
total 0

/config/usb_gadget/g1/functions/audio_source.gs3:
total 0

/config/usb_gadget/g1/functions/ccid.ccid:
total 0

/config/usb_gadget/g1/functions/cser.dun.0:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 status

/config/usb_gadget/g1/functions/cser.dun.2:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 status

/config/usb_gadget/g1/functions/cser.nmea.1:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 status

/config/usb_gadget/g1/functions/ffs.adb:
total 0

/config/usb_gadget/g1/functions/ffs.diag:
total 0

/config/usb_gadget/g1/functions/ffs.diag_mdm:
total 0

/config/usb_gadget/g1/functions/ffs.diag_mdm2:
total 0

/config/usb_gadget/g1/functions/ffs.mtp:
total 0

/config/usb_gadget/g1/functions/ffs.ptp:
total 0

/config/usb_gadget/g1/functions/gsi.dpl:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 info

/config/usb_gadget/g1/functions/gsi.rmnet:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 info

/config/usb_gadget/g1/functions/gsi.rndis:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 info
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 rndis_class_id

/config/usb_gadget/g1/functions/hid.keyboard:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dev
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 no_out_endpoint
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 protocol
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 report_desc
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 report_length
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 subclass

/config/usb_gadget/g1/functions/hid.mouse:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dev
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 no_out_endpoint
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 protocol
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 report_desc
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 report_length
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 subclass

/config/usb_gadget/g1/functions/mass_storage.0:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0     0 2024-12-28 17:52 lun.0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 stall

/config/usb_gadget/g1/functions/mass_storage.0/lun.0:
total 0
-rw-r--r-- 1 root root   u:object_r:configfs:s0  4096 2024-12-28 17:52 cdrom
-rw-rw---- 1 root system u:object_r:configfs:s0  4096 1970-06-08 05:26 file
--w------- 1 root root   u:object_r:configfs:s0  4096 2024-12-28 17:52 forced_eject
-rw-r--r-- 1 root root   u:object_r:configfs:s0  4096 2024-12-28 17:52 inquiry_string
-rw-r--r-- 1 root root   u:object_r:configfs:s0  4096 2024-12-28 17:52 nofua
-rw-r--r-- 1 root root   u:object_r:configfs:s0  4096 2024-12-28 17:52 removable
-rw-r--r-- 1 root root   u:object_r:configfs:s0  4096 2024-12-28 17:52 ro

/config/usb_gadget/g1/functions/midi.gs5:
total 0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 buflen
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 id
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 in_ports
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 index
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 out_ports
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 qlen

/config/usb_gadget/g1/functions/ncm.0:
total 0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 dev_addr
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 host_addr
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 ifname
drwxr-xr-x 3 system usb u:object_r:configfs:s0     0 1970-06-08 05:26 os_desc
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 qmult

/config/usb_gadget/g1/functions/ncm.0/os_desc:
total 0
drwxr-xr-x 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:52 interface.ncm

/config/usb_gadget/g1/functions/ncm.0/os_desc/interface.ncm:
total 0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 compatible_id
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 sub_compatible_id

/config/usb_gadget/g1/functions/qdss.qdss:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 enable_debug_inface

/config/usb_gadget/g1/functions/qdss.qdss_mdm:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 enable_debug_inface

/config/usb_gadget/g1/functions/qdss.qdss_sw:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 enable_debug_inface

/config/usb_gadget/g1/functions/uac2.0:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_chmask
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_hs_bint
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_mute_present
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_srate
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_ssize
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_sync
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_volume_max
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_volume_min
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_volume_present
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 c_volume_res
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 fb_max
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 function_name
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_chmask
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_hs_bint
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_mute_present
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_srate
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_ssize
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_volume_max                         -rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_volume_min
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_volume_present
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 p_volume_res                         -rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 req_number

/config/usb_gadget/g1/functions/uvc.0:
total 0
drwxr-xr-x 6 root root u:object_r:configfs:s0     0 2024-12-28 17:52 control                              -rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 function_name
drwxr-xr-x 7 root root u:object_r:configfs:s0     0 2024-12-28 17:52 streaming
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 streaming_interval                   -rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 streaming_maxburst
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 streaming_maxpacket

/config/usb_gadget/g1/functions/uvc.0/control:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bInterfaceNumber
drwxr-xr-x 4 root root u:object_r:configfs:s0     0 1970-06-08 05:26 class                                drwxr-xr-x 3 root root u:object_r:configfs:s0     0 2024-12-25 15:16 header
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 1970-06-08 05:26 processing
drwxr-xr-x 4 root root u:object_r:configfs:s0     0 1970-06-08 05:26 terminal
/config/usb_gadget/g1/functions/uvc.0/control/class:
total 0                                              drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-25 15:16 fs
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-25 15:16 ss

/config/usb_gadget/g1/functions/uvc.0/control/class/fs:                                                   total 0
lrwxrwxrwx 1 root root u:object_r:configfs:s0  0 2024-12-25 15:16 h -> ../../../../../../../usb_gadget/g1/functions/uvc.0/control/header/h

/config/usb_gadget/g1/functions/uvc.0/control/class/ss:
total 0
lrwxrwxrwx 1 root root u:object_r:configfs:s0  0 2024-12-25 15:16 h -> ../../../../../../../usb_gadget/g1/functions/uvc.0/control/header/h

/config/usb_gadget/g1/functions/uvc.0/control/header:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 17:52 h

/config/usb_gadget/g1/functions/uvc.0/control/header/h:
total 0
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bcdUVC
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwClockFrequency

/config/usb_gadget/g1/functions/uvc.0/control/processing:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 17:52 default

/config/usb_gadget/g1/functions/uvc.0/control/processing/default:
total 0                                              -r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bSourceID
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bUnitID
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmControls
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 iProcessing
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wMaxMultiplier

/config/usb_gadget/g1/functions/uvc.0/control/terminal:
total 0
drwxr-xr-x 3 root root u:object_r:configfs:s0  0 1970-06-08 05:26 camera
drwxr-xr-x 3 root root u:object_r:configfs:s0  0 1970-06-08 05:26 output

/config/usb_gadget/g1/functions/uvc.0/control/terminal/camera:                                            total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 17:52 default
/config/usb_gadget/g1/functions/uvc.0/control/terminal/camera/default:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bAssocTerminal
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bTerminalID                          -r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmControls                           -r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 iTerminal
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wObjectiveFocalLengthMax
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wObjectiveFocalLengthMin
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wOcularFocalLength
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wTerminalType

/config/usb_gadget/g1/functions/uvc.0/control/terminal/output:                                            total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 17:52 default

/config/usb_gadget/g1/functions/uvc.0/control/terminal/output/default:                                    total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bAssocTerminal
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bSourceID
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bTerminalID
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 iTerminal
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wTerminalType

/config/usb_gadget/g1/functions/uvc.0/streaming:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bInterfaceNumber
drwxr-xr-x 5 root root u:object_r:configfs:s0     0 1970-06-08 05:26 class
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 1970-06-08 05:26 color_matching
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 2024-12-25 15:16 header                               drwxr-xr-x 3 root root u:object_r:configfs:s0     0 2024-12-25 15:16 mjpeg                                drwxr-xr-x 3 root root u:object_r:configfs:s0     0 2024-12-25 15:16 uncompressed
/config/usb_gadget/g1/functions/uvc.0/streaming/class:                                                    total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-25 15:16 fs
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-25 15:16 hs                                      drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-25 15:16 ss

/config/usb_gadget/g1/functions/uvc.0/streaming/class/fs:                                                 total 0
lrwxrwxrwx 1 root root u:object_r:configfs:s0  0 2024-12-25 15:16 h -> ../../../../../../../usb_gadget/g1/functions/uvc.0/streaming/header/h

/config/usb_gadget/g1/functions/uvc.0/streaming/class/hs:                                                 total 0
lrwxrwxrwx 1 root root u:object_r:configfs:s0  0 2024-12-25 15:16 h -> ../../../../../../../usb_gadget/g1/functions/uvc.0/streaming/header/h
/config/usb_gadget/g1/functions/uvc.0/streaming/class/ss:
total 0                                              lrwxrwxrwx 1 root root u:object_r:configfs:s0  0 2024-12-25 15:16 h -> ../../../../../../../usb_gadget/g1/functions/uvc.0/streaming/header/h

/config/usb_gadget/g1/functions/uvc.0/streaming/color_matching:                                           total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 17:52 default

/config/usb_gadget/g1/functions/uvc.0/streaming/color_matching/default:                                   total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bColorPrimaries
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bMatrixCoefficients
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bTransferCharacteristics

/config/usb_gadget/g1/functions/uvc.0/streaming/header:                                                   total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 17:52 h

/config/usb_gadget/g1/functions/uvc.0/streaming/header/h:                                                 total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bStillCaptureMethod
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bTerminalLink
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bTriggerSupport
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bTriggerUsage
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmInfo
lrwxrwxrwx 1 root root u:object_r:configfs:s0     0 2024-12-25 15:16 m -> ../../../../../../../usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m
lrwxrwxrwx 1 root root u:object_r:configfs:s0     0 2024-12-25 15:16 u -> ../../../../../../../usb_gadget/g1/functions/uvc.0/streaming/uncompressed/u

/config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg:                                                    total 0
drwxr-xr-x 4 root root u:object_r:configfs:s0  0 2024-12-28 17:52 m

/config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0     0 2024-12-28 17:52 360p
drwxr-xr-x 2 root root u:object_r:configfs:s0     0 2024-12-28 17:52 720p
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bAspectRatioX
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bAspectRatioY
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bDefaultFrameIndex
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bFormatIndex
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmFlags
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmInterlaceFlags
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 bmaControls

/config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bFrameIndex
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmCapabilities                       -rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwDefaultFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwMaxBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwMaxVideoFrameBufferSize
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwMinBitRate                         -rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wHeight                              -rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wWidth

/config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p:                                             total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bFrameIndex
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmCapabilities
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwDefaultFrameInterval               -rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwFrameInterval                      -rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMaxBitRate                         -rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMaxVideoFrameBufferSize            -rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMinBitRate                         -rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 wHeight                              -rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 wWidth
/config/usb_gadget/g1/functions/uvc.0/streaming/uncompressed:
total 0
drwxr-xr-x 4 root root u:object_r:configfs:s0  0 2024-12-28 17:52 u

/config/usb_gadget/g1/functions/uvc.0/streaming/uncompressed/u:                                           total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0     0 2024-12-28 17:52 360p
drwxr-xr-x 2 root root u:object_r:configfs:s0     0 2024-12-28 17:52 720p
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bAspectRatioX
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bAspectRatioY
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bBitsPerPixel                        -rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bDefaultFrameIndex                   -r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bFormatIndex                         -r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmInterlaceFlags                     -rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmaControls                          -rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 guidFormat

/config/usb_gadget/g1/functions/uvc.0/streaming/uncompressed/u/360p:                                      total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bFrameIndex                          -rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmCapabilities
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwDefaultFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwMaxBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwMaxVideoFrameBufferSize            -rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 dwMinBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wHeight
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 wWidth

/config/usb_gadget/g1/functions/uvc.0/streaming/uncompressed/u/720p:
total 0                                              -r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bFrameIndex
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmCapabilities
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwDefaultFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwFrameInterval
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMaxBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMaxVideoFrameBufferSize
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 dwMinBitRate
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 wHeight
-rw-rw-rw- 1 root root u:object_r:configfs:s0  4096 2024-12-25 15:16 wWidth

/config/usb_gadget/g1/os_desc:
total 0                                              lrwxrwxrwx 1 root   root u:object_r:configfs:s0     0 2024-12-28 12:59 b.1 -> ../../../usb_gadget/g1/configs/b.1
-rw-r--r-- 1 system usb  u:object_r:configfs:s0  4096 1970-06-08 05:26 b_vendor_code
-rw-r--r-- 1 system usb  u:object_r:configfs:s0  4096 1970-06-08 05:26 qw_sign
-rw-r--r-- 1 system usb  u:object_r:configfs:s0  4096 2024-12-28 12:59 use

/config/usb_gadget/g1/strings:
total 0                                              drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:52 0x409
/config/usb_gadget/g1/strings/0x409:                 total 0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 manufacturer
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 product
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 serialnumber

/config/usb_gadget/g2:
total 0                                              -rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 UDC
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bDeviceClass
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bDeviceProtocol
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bDeviceSubClass
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bMaxPacketSize0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bcdDevice
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 bcdUSB
drwxr-xr-x 3 system usb u:object_r:configfs:s0     0 1970-06-08 05:26 configs
drwxr-xr-x 2 system usb u:object_r:configfs:s0     0 1970-06-08 05:26 functions
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 idProduct                           -rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 idVendor                            -rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 max_speed                           drwxr-xr-x 2 system usb u:object_r:configfs:s0     0 2024-12-28 17:52 os_desc                             drwxr-xr-x 3 system usb u:object_r:configfs:s0     0 1970-06-08 05:26 strings
/config/usb_gadget/g2/configs:
total 0
drwxrwx--- 3 system usb u:object_r:configfs:s0  0 2024-12-28 17:52 b.1
/config/usb_gadget/g2/configs/b.1:                   total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 MaxPower                             -rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 bmAttributes
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 1970-06-08 05:26 strings
/config/usb_gadget/g2/configs/b.1/strings:
total 0                                              drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:52 0x409

/config/usb_gadget/g2/configs/b.1/strings/0x409:     total 0
-rw-r--r-- 1 system usb u:object_r:configfs:s0  4096 1970-06-08 05:26 configuration

/config/usb_gadget/g2/functions:                     total 0

/config/usb_gadget/g2/os_desc:                       total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 b_vendor_code                        -rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 qw_sign                              -rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 17:52 use

/config/usb_gadget/g2/strings:
total 0
drwxrwx--- 2 system usb u:object_r:configfs:s0  0 2024-12-28 17:52 0x409

/config/usb_gadget/g2/strings/0x409:                 total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 1970-06-08 05:26 manufacturer                         -rw-r--r-- 1 root root u:object_r:configfs:s0  4096 1970-06-08 05:26 product                              -rw-r--r-- 1 root root u:object_r:configfs:s0  4096 1970-06-08 05:26 serialnumber                         [1735404768.672828] echo ------------------------------                                                   ------------------------------
[1735404768.673111] ls -lZ '/dev/hid*'               ls: /dev/hid*: No such file or directory
[1735404768.677348] echo ------------------------------                                                   ------------------------------
[1735404768.677419] ls -lZR /sys/class/udc
/sys/class/udc:                                      total 0
lrwxrwxrwx 1 root root u:object_r:sysfs:s0  0 2024-12-28 17:51 a600000.dwc3 -> ../../devices/platform/soc/a600000.ssusb/a600000.dwc3/udc/a600000.dwc3
[1735404768.683543] getprop sys.usb.controller       a600000.dwc3
[1735404768.687036] echo ------------------------------                                                   ------------------------------
:/data/data/com.termux/files/home #

@Arian04
Copy link
Owner

Arian04 commented Dec 28, 2024

I said to source it and not execute it to avoid that

@alr86
Copy link

alr86 commented Dec 28, 2024

Okay so I looked through all the logs and compared the issues. There seem to be two groups of issues:

  1. /dev/hidg0 is missing, /dev/hidg1 looks fine
  2. Both character devices are missing

To try and avoid asking everyone multiple times, I'm going to attach a shell script to retrieve just about every piece of information I think I'll want to know. Hopefully this means that once people start responding, I'll be able to figure out what's wrong without too many delays due to back-and-forth communication.

Please make sure to run the script in a root shell and respond with the output attached.

EDIT: Please also make sure to run this script after opening the app and attempting to create the character devices via the prompt and trying to send keystrokes or touchpad inputs.

Most terminals have some option to save the entire buffer into a text file, which could help you with this. The beginning of the script has usage instructions, the TL;DR of those instructions are "Just get the script onto the device, put it in /sdcard/ if you want, and run source path/to/the/script. Don't worry about making it executable."

GitHub won't let me attach the script as a file, so I'm putting it here as a code block:

#!/system/bin/sh

# Usage Notes:
#
# It's a bit annoying to find a location to put an executable script on android
# due to restrictions on what directories are writable and which ones are able
# to hold executable files.
#
# Because of this, I wrote this script with `source`-ing it in mind.
#
# In other words, just get the script onto your device and run:
#
# `source path/to/the/script/get_more_info.sh`
#
# Of course, replace that path with wherever you put the script. I just put it in /sdcard/

# Wrap the whole thing in () to run it in a subshell, so it's safe to `source` without
# inadvertedly altering the parent shell.
(
	set -x

	if [ ! $(id -u) -eq 0 ]; then
		echo "Please run the script as root :)"
		exit
	fi

	# Print every gadget recursively
	ls -lZR /config/usb_gadget/

	echo "------------------------------"

	ls -lZ /dev/hid*

	echo "------------------------------"

	ls -lZR /sys/class/udc
	getprop sys.usb.controller

	echo "------------------------------"
)
Output
# source /storage/emulated/0/sh.sh
[1735403486.804311] id -u
[1735403486.813246] '[' ! 0 -eq 0 ']'
[1735403486.813302] ls -lZR /config/usb_gadget/
/config/usb_gadget:
total 0
drwxrwx--- 6 root root u:object_r:configfs:s0  0 2024-12-28 19:57 g1

/config/usb_gadget/g1:
total 0
-rw-r--r--  1 root root u:object_r:configfs:s0  4096 2024-12-27 09:41 UDC
-rw-r--r--  1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 bDeviceClass
-rw-r--r--  1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 bDeviceProtocol
-rw-r--r--  1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 bDeviceSubClass
-rw-r--r--  1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 bMaxPacketSize0
-rw-r--r--  1 root root u:object_r:configfs:s0  4096 2024-12-27 09:41 bcdDevice
-rw-r--r--  1 root root u:object_r:configfs:s0  4096 2024-12-27 09:41 bcdUSB
drwxr-xr-x  3 root root u:object_r:configfs:s0     0 2024-12-27 09:41 configs
drwxr-xr-x 18 root root u:object_r:configfs:s0     0 2024-12-27 09:41 functions
-rw-r--r--  1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 idProduct
-rw-r--r--  1 root root u:object_r:configfs:s0  4096 2024-12-27 09:41 idVendor
drwxr-xr-x  2 root root u:object_r:configfs:s0     0 2024-12-28 19:57 os_desc
drwxr-xr-x  3 root root u:object_r:configfs:s0     0 2024-12-27 09:41 strings

/config/usb_gadget/g1/configs:
total 0
drwxrwx--- 3 root root u:object_r:configfs:s0  0 2024-12-28 19:57 b.1

/config/usb_gadget/g1/configs/b.1:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-27 09:41 MaxPower
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 bmAttributes
lrwxrwxrwx 1 root root u:object_r:configfs:s0     0 2024-12-27 09:41 f1 -> ../../../../usb_gadget/g1/functions/ffs.adb
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 2024-12-27 09:41 strings

/config/usb_gadget/g1/configs/b.1/strings:
total 0
drwxrwx--- 2 root root u:object_r:configfs:s0  0 2024-12-28 19:57 0x409

/config/usb_gadget/g1/configs/b.1/strings/0x409:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-27 09:41 configuration

/config/usb_gadget/g1/functions:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-27 09:41 accessory.gs2
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 19:57 acm.gs0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 19:57 acm.gs1
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 19:57 acm.gs2
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 19:57 acm.gs3
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-27 09:41 audio_source.gs3
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-27 09:41 ffs.adb
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 19:57 hid.gs0
drwxr-xr-x 3 root root u:object_r:configfs:s0  0 2024-12-28 19:57 mass_storage.usb0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 19:57 midi.gs5
drwxr-xr-x 3 root root u:object_r:configfs:s0  0 2024-12-27 09:41 mtp.gs0
drwxr-xr-x 3 root root u:object_r:configfs:s0  0 2024-12-27 09:41 ptp.gs1
drwxr-xr-x 3 root root u:object_r:configfs:s0  0 2024-12-28 19:57 rndis.gs4
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-27 09:41 via_atc.gs0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-27 09:41 via_ets.gs0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-27 09:41 via_modem.gs0

/config/usb_gadget/g1/functions/accessory.gs2:
total 0

/config/usb_gadget/g1/functions/acm.gs0:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 port_num

/config/usb_gadget/g1/functions/acm.gs1:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 port_num

/config/usb_gadget/g1/functions/acm.gs2:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 port_num

/config/usb_gadget/g1/functions/acm.gs3:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 port_num

/config/usb_gadget/g1/functions/audio_source.gs3:
total 0

/config/usb_gadget/g1/functions/ffs.adb:
total 0

/config/usb_gadget/g1/functions/hid.gs0:
total 0
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 dev
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 protocol
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 report_desc
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 report_length
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 subclass

/config/usb_gadget/g1/functions/mass_storage.usb0:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0     0 2024-12-28 19:57 lun.0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 stall

/config/usb_gadget/g1/functions/mass_storage.usb0/lun.0:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 cdrom
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 file
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 inquiry_string
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 nofua
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 removable
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 ro

/config/usb_gadget/g1/functions/midi.gs5:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 buflen
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 id
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 in_ports
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 index
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 out_ports
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 qlen

/config/usb_gadget/g1/functions/mtp.gs0:
total 0
drwxr-xr-x 3 root root u:object_r:configfs:s0  0 2024-12-27 09:41 os_desc

/config/usb_gadget/g1/functions/mtp.gs0/os_desc:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 19:57 interface.MTP

/config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-27 09:41 compatible_id
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 sub_compatible_id

/config/usb_gadget/g1/functions/ptp.gs1:
total 0
drwxr-xr-x 3 root root u:object_r:configfs:s0  0 2024-12-27 09:41 os_desc

/config/usb_gadget/g1/functions/ptp.gs1/os_desc:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 19:57 interface.MTP

/config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 compatible_id
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 sub_compatible_id

/config/usb_gadget/g1/functions/rndis.gs4:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 dev_addr
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 host_addr
-r--r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 ifname
drwxr-xr-x 3 root root u:object_r:configfs:s0     0 2024-12-27 09:41 os_desc
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 qmult

/config/usb_gadget/g1/functions/rndis.gs4/os_desc:
total 0
drwxr-xr-x 2 root root u:object_r:configfs:s0  0 2024-12-28 19:57 interface.rndis

/config/usb_gadget/g1/functions/rndis.gs4/os_desc/interface.rndis:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 compatible_id
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-28 20:01 sub_compatible_id

/config/usb_gadget/g1/functions/via_atc.gs0:
total 0

/config/usb_gadget/g1/functions/via_ets.gs0:
total 0

/config/usb_gadget/g1/functions/via_modem.gs0:
total 0

/config/usb_gadget/g1/os_desc:
total 0
lrwxrwxrwx 1 root root u:object_r:configfs:s0     0 2024-12-27 09:41 b.1 -> ../../../usb_gadget/g1/configs/b.1
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-27 09:41 b_vendor_code
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-27 09:41 qw_sign
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-27 09:41 use

/config/usb_gadget/g1/strings:
total 0
drwxrwx--- 2 root root u:object_r:configfs:s0  0 2024-12-28 19:57 0x409

/config/usb_gadget/g1/strings/0x409:
total 0
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-27 09:41 manufacturer
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-27 09:41 product
-rw-r--r-- 1 root root u:object_r:configfs:s0  4096 2024-12-27 09:41 serialnumber
[1735403486.825004] echo ------------------------------
------------------------------
[1735403486.825208] ls -lZ '/dev/hid*'
ls: /dev/hid*: No such file or directory
[1735403486.834424] echo ------------------------------
------------------------------
[1735403486.834451] ls -lZR /sys/class/udc
/sys/class/udc:
total 0
lrwxrwxrwx 1 root root u:object_r:sysfs:s0  0 2024-12-28 20:01 musb-hdrc -> ../../devices/platform/mt_usb/musb-hdrc/udc/musb-hdrc
[1735403486.843427] getprop sys.usb.controller
musb-hdrc
[1735403486.851091] echo ------------------------------
------------------------------

@Arian04
Copy link
Owner

Arian04 commented Dec 28, 2024

@alr86 thanks, and just to verify, did you run this right after opening the app and attempting to create the character device and send keystrokes (even if it expectedly fails)?

@alr86
Copy link

alr86 commented Dec 29, 2024

@alr86 thanks, and just to verify, did you run this right after opening the app and attempting to create the character device and send keystrokes (even if it expectedly fails)?

Yes👍

@Arian04
Copy link
Owner

Arian04 commented Jan 3, 2025

Looking over this again after I did some experimenting and wrote some testing code. Just wanted to let you guys know I edited your comments a bit to hide the code blocks in a little submenu to avoid cluttering the issue page as much. @Driv28 your output seemed slightly broken, so I also tried to clean it up a bit. Your version is saved in the edit history if you want to compare them or anything.

@Arian04
Copy link
Owner

Arian04 commented Jan 6, 2025

note 1: meant to send this message a few days ago but got busy halfway through and forgot to finish it up

note 2: just realized I accidentally messed up the formatting of Driv28's comment earlier, but just fixed it.

Response to output received so far

@Driv28 : your 3rd output looks very very close to functional actually. unless i missed something, it looks like only 1 symlink failed to be created, which is weird.

@alr86 : app didn't seem to get far at all in creating the character device. the functions aren't even created in the usb gadget, which is extra strange because when you first submitted a comment on this issue, the app successfully detected hidg1 at least. Not sure what went wrong here.

Code Progress Update

I have a version of the app with the (kinda fragile) shell script logic with a full root service that runs some Kotlin code with root permissions. I'm hoping this will achieve at least one of (but hopefully both) two things:

  1. better error handling/error detection
  2. more detailed debugging information when something goes wrong

I've been trying to bolt on more debugging info and working around the limitations of running a shell script in the app for gadget configuration for a while, now hopefully I can get entire detailed stacktraces and all that.

I'll drop a debug APK here sometime when I verify that the updated logic works as intended (as much as I can test that on one device).

@alr86
Copy link

alr86 commented Jan 6, 2025

@alr86 : app didn't seem to get far at all in creating the character device. the functions aren't even created in the usb gadget, which is extra strange because when you first submitted a comment on this issue, the app successfully detected hidg1 at least. Not sure what went wrong here.

As I remember, I used [This app] in my first comment to manually enable hid.gs0 but it didn't have any effect on the issue

@wnccode
Copy link

wnccode commented Feb 3, 2025

hi everyone
i'm on Xiaomi Mi9T Pro/K20 Pro on soviet star kernel 4.14.352 with EvolutionX from 17/09/2024 (cant find version number ?!)
I had the same problem. no hidg0/hidg1 ok
i just tried to rename hidg1 to hidg0 and hidg2 to hidg1 and everything fine ! got mouse and keyboard working through usb !!

mv /dev/hidg1 /dev/hidg0
mv /dev/hidg2 /dev/hidg1
=> fix permissions with USB HID Client app and everything working like a charm

i have to rename devices at each reboot and after creating devices with app, USB HID Client is always creating hidg1 and hidg2 not 0/1 on my device, like just starting index at 1 instead of 0 but both created devices (1/2) are fine and working. I don't know if it helps but i hope so

@Arian04
Copy link
Owner

Arian04 commented Feb 4, 2025

hi everyone i'm on Xiaomi Mi9T Pro/K20 Pro on soviet star kernel 4.14.352 with EvolutionX from 17/09/2024 (cant find version number ?!) I had the same problem. no hidg0/hidg1 ok i just tried to rename hidg1 to hidg0 and hidg2 to hidg1 and everything fine ! got mouse and keyboard working through usb !!

That's great information thank you! I once again got super busy with life stuff, but when I do get time to work on this, my main issue is that my fixes for these bugs aren't thoroughly tested and are sometimes even slightly fragile. I might add some sort of experimental option to enable all my WIP code that may or may not function as expected. I'll try to get to it soon ish, but like I said, I've been busy.

Thanks again for this information!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
device-specific Cannot reproduce on my device, so it's probably a kernel-specific quirk or something similar
Projects
None yet
Development

No branches or pull requests

8 participants