Enable UMS mounting of storage drives

Change-Id: I4c369222cf16cb5bd87f007c3b172cd787d20fb1
diff --git a/etc/init.rc b/etc/init.rc
index aeec483..8cff20e 100644
--- a/etc/init.rc
+++ b/etc/init.rc
@@ -41,6 +41,16 @@
 on property:sys.powerctl=*
    powerctl ${sys.powerctl}
 
+on property:sys.storage.ums_enabled=1
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/functions adb,mass_storage
+    write /sys/class/android_usb/android0/enable 1
+
+on property:sys.storage.ums_enabled=0
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/functions adb
+    write /sys/class/android_usb/android0/enable ${service.adb.root}
+
 service ueventd /sbin/ueventd
     critical