MIDI over ADB

TouchDAW 1.3.5 added support for running MIDI over the "Android Debug Bridge", aka ADB. This provides a fairly solid USB based connection that does not require the Android device to be equipped with cellular connectivity.

Note: This is a 2012 hack providing much asked for wired Usb functionality that Android had no direct support for before Marshmallow. It may not be as convenient as one has come to expect from desktop operating systems' USB support!

Get required software
  1. Download and install the mnet driver. Launch its control panel from Program Files (x86)/np/MIDIHub
    mnet comes with all required adb binaries. You do NOT need to install the Android SDK or anything else!
Prepare the Android device
  1. Install the device's USB drivers
    (You need those even if your device mounts as external storage without them!
    Find additional info and download links at developer.android.com).
  2. Connect the phone or tablet to the computer via USB
  3. On Android's system level go to "Setup / Applications / Development" and enable "USB debugging"
    On ICS and greater this is in a seperate "Developer Options" menu under "System". Jelly Bean and beyond have it initially hidden, you need to tap 7 times (sic!) on the "About Phone/Tablet" entry to have it shown.
  4. On Android 4.2.2 and greater you will be prompted to confirm the connected PC as a trusted machine. Click OK if you trust your PC.
  5. Launch TouchDAW and set its MIDI ports to ADB: Go to Setup / DAW Controller (resp. MIDI Utilities) / MIDI Connection. In the upcoming dialog select "USB". This should normally be it unless you also have USB tethering active or a hardware interface connected in which case there would be another dialog allowing you to select between Tethering, the MIDI interface and ADB. In that case select "ADB" in the last dialog.

Discover and connect

  1. In MIDIHub click the Android icon in the upper toolbar.


    This will make the driver scan for connected devices. For each discovered ADB channel an entry will be added to the left (networked devices) half of the patchbay. Channels will be named "(Phone or tablet model) - ADB MIDI 1(2)". Note that TouchDAW must be running with at least one MIDI connection set to ADB or no channel will be found.



  2. Once you see the new channel(s) drag a patchline to the MIDI port that you want to receive its MIDI data on.
  3. Long as the channels remain patched you do not need to repeat any of this. mnet will try to reconnect them when it is launched and will keep trying should the device not be present. Only when you unpatch a channel it will be removed the next time the driver shuts down. In that case you would need to rescan if you want to again use an ADB connection.


Troubleshooting MIDI over ADB

If your device is not found, try changing the USB mode (from Media Device to Camera or vice versa). On some devices adb seems to work in only one mode.

Still having problems finding the device? Before you put the blame on TouchDAW or mnet, type the phone model and "adb" into Google. You will very likely find plenty of posts from developers struggling to get their device seen by adb. Go through the replies, somebody will have solved the problem. This is Android, you can not take anything for granted. Some vendors may supply extra development drivers, some devices may require Google's universal USB driver.

Sync software interference

There is a chance that sync software provided by device vendors (like HTC Sync) may interfere with mnet's access to the phone or tablet. In case the device is not found or you get error notifications saying the connection was refused, consider removing that software or temporarily disable its adb access.

Trouble after Android system updates:
After system updates an Android device will usually have a different ID, which will make the scanned address that mnet refers to invalid. Unpatch all present ADB channels, shut down the driver, relaunch it and rescan ADB. It should then find the device back again.

In some cases system updates seem to completely disable adb functionality on the driver level under Windows (seen for example with Acer's ICS updates). The following procedure should make it functional again:
  • Check for updated device drivers and install them if any are available
  • Go to Device Manager
  • Right click the Android device showing with the "!" under "Other Devices" and select "Update Driver Software"
  • Select "Browse my computer for driver software"
  • Select "Let me pick from a list..."
  • In the upcoming list select "Android USB Devices"
  • In the next Window select the device's manufacturer on the left and the entry including something like "Composite ADB Interface" on the right, click next, let it install and you should be fine again.

Device offline
Android 4.2.2 introduced a new security barrier to prevent unauthorized adb access. mnet uses an adb version that should handle this without problem, but you may need to add your computer(s) to a list of trusted hosts. Android should present a confirmation dialog when making an adb connection. Find further info in this detailed blogpost by Nikolay Elenkov (Google's official release notes are rather vague about the topic).

In case you get an "offline" notice on older Android versions, here is a Stack Overflow thread presenting possible solutions. The adb version mnet uses is in Program Files (x86)/humatic/MIDIHub/mnet/lib. Run terminals from within that directory.