UMS on HTC M7
Here is a quick tuto from a friend:
echo 0 > /sys/class/android_usb/android0/enable
echo 22D9 > /sys/class/android_usb/android0/idVendor
echo 2767 > /sys/class/android_usb/android0/idProduct
echo adb,mass_storage > /sys/class/android_usb/android0/functions
echo /storage/sdcard1/debian.iso > /sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file
echo 1 > /sys/class/android_usb/android0/enable
Here is the interesting part:
root@htc_m8:/storage/emulated/legacy # cat /sys/class/android_usb/android0/functions
mtp,adb,mass_storage
This means ... my kernel can do UMS. I will dig this later.
Sounds like this method can be used to simulate several devices at the same time: several HDD, several CDs ...
Hi doublehp,
Your is the closest I have come to what I call as 'hope'! I've been trying for the past three weeks to recover data from my HTC One M7 after an accidental factory reset.:crying: In order to use a Recovery Software(I have R-Studio), the phone needs to be mounted as a USB drive. Unfortunately, I cannot find a way to disable MTP and enable UMS on my phone.
I haven't tried DriveDroid yet. I want to be sure (at least as much as possible) before I write more data into the drive thereby overwriting my previous data. My phone has an unlocked bootloader, rooted and has terminal emulator on it. I can access it through adb shell from my PC. I tried the last command you have quoted. I got this.
root@m7:/ # cat /sys/class/android_usb/android0/functions
mtp,adb,mass_storage
Using lsusb, I got the following
root@m7:/ # lsusb
lsusb
Bus 001 Device 002: ID 05c6:9048
Bus 001 Device 001: ID 1d6b:0002
I'm not sure what device 001 & 002 stand for and which ones to use for the IDs. Is there a way to activate UMS with a similar set of commands?
Else, my option seems to be DriveDroid. I have the following.
Android 5.0.2
HTC Sense 6.0
Software Number 7.17.1540.7
Kernel 3.4.10-g3c9a631
Baseband Version 4T.35.3218.16_10.33Q.1718.01L
Build Number 7.17.1540.7 CL468180
Is it possible for DriveDroid to enable UMS on my device? Please let me know.
Thanks a lot in advance....
---------- Post added at 01:43 PM ---------- Previous post was at 01:08 PM ----------
Not sure if you're still trying to figure this out, but I got UMS working in TWRP
. Link is in my sig.
Hi Captain_Throwback,
I have the following on my HTC One M7 (no external SD card, unlocked bootloader, rooted, superSU installed). I'm trying to mount the internal storage as a drive and recover data.
Android 5.0.2
HTC Sense 6.0
Software Number 7.17.1540.7
Kernel 3.4.10-g3c9a631
Baseband Version 4T.35.3218.16_10.33Q.1718.01L
Build Number 7.17.1540.7 CL468180
Can the TWRP ROM you quote enable UMS on my device? I'm currently running TWRP v2.8.0.2 and cannot activate UMS with the Mount option. Please let me know.
Thanks a lot in advance....