title: USB host mode in Android device supporting OTG
body: <p>I'd like to know in which mode a USB-OTG-supporting Android device is by default, - in the USB host mode or USB slave mode ?<br>
  I guess, if the device is in slave mode, then there's no point of using API described on link below ?  <a href="https://developer.android.com/guide/topics/connectivity/usb/host.html" rel="nofollow">https://developer.android.com/guide/topics/connectivity/usb/host.html</a><br>
  Is there a way to programmatically switch from host to slave mode and vice versa ?</p>
  
  <p>As you know, a USB OTG (On the go) device automatically switches to host or slave mode, depending on which end of an OTG-specific cable has been inserted into device</p>
  
  <p>And the second question is, in case if a device has necessary OTG ports, but the kernel does not support OTG yet, which parts of the kernel should be modified in order to be able to set host-slave mode, based on cable end detection ? (no need to implement HNP)</p>