Skip to content

USB Commands and Sysfs Utilities


Setting USB Functions

Set the current USB function. If the function is blank, sets to charging."

svc usb setFunctions

Set the functions which, if the device was charging, become current on screen unlock

svc usb setScreenUnlockedFunctions [function]

Get the list of currently enabled functions

svc usb getFunctions [function]

USB Gadget Utilities

Reset USB gadget

svc usb resetUsbGadget

Reset the specified connected USB port

svc usb resetUsbPort [port number]

Get current USB speed

svc usb getUsbSpeed

Get current Gadget Hal Version

svc usb getGadgetHalVersion

Get USB Hal Version

svc usb getUsbHalVersion