mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-17 04:51:31 +03:00
bd1217c993
This relies on one of the patches added to the build.
11 lines
274 B
Ruby
11 lines
274 B
Ruby
class Tasks::UsbRoleSwitchTask < SingletonTask
|
|
def initialize()
|
|
Tasks::SetupGadgetMode.instance.add_dependency(:Task, self)
|
|
add_dependency(:Mount, "/sys")
|
|
end
|
|
|
|
def run()
|
|
System.write("/sys/class/usb_role/fe800000.usb-role-switch/role", "device")
|
|
end
|
|
end
|