mobile-nixos / autoport

GNU General Public License v3.0
13 stars 0 forks source link

Improve gadgetfs detection #10

Closed samueldr closed 3 years ago

samueldr commented 3 years ago

See motorola-surfna.

Confirmed to be and work as gadgetfs.

It wasn't detected initially.


This condition is the culprit:

https://github.com/mobile-nixos/autoport/blob/9774af6ed37fc9005e37e8d9ff850a4c02124d0e/lib/autoport/device_file.rb#L38-L46

It's probably wrong to do it that way. The first check should probably be for CONFIG_USB_G_ANDROID=y, then somehow detect gadgetfs presence.

It's probably CONFIG_USB_CONFIGFS that matters here.

samueldr commented 3 years ago

Trivial grepping our existing kernel config files seem to confirm that devices with android_usb don't have it set, while gadgetfs does.