yashsingh1/xdaforums huggingface dataset:
[Galaxy S 4 Themes and Apps] Trilyan:
Hello developer, I'd like to ask you for kind help.

Ever since I installed your app and selected Media Storage in my Galaxy Note n7000 my computer will not recognize neither my internal storage nor my sdcard. It just connects and disconnects very rapidly in any PC I try to connect it.

At first I thought it was the cable, or even the port, but after tinkering A LOT and triying lots of convinations, I decided to go back to a previous nandroid backup where your app was not installed and guess what? the phone connects!

Now, I don't want to go back to that backup, because it's very old. is there any way I could use the system files of that backup to undo any changes your app could have made in my current ROM? (I have it nanded to go back when I find a solution)

More specifically, what are the files I need to restore in order to undo your app changes? Does your app make an automatic backup to easily restore? :confused:

Thanks in advance for all you time. Your app is indeed very good, I'm just not having good luck with it and want to undo whatever it has done.
[Galaxy S 4 Themes and Apps] mad_ady:
Have you tried uninstalling the app and rebooting? As far as I know the app doesn't do any permanent changes.
[Galaxy S 4 Themes and Apps] turbare:
also disable USB debugging and mock locations from developer options. then, make sure when you plug the cable that the connection is set to mtp, not from the app, from the Android menu in the notification bar
[Galaxy S 4 Themes and Apps] Trilyan:
Yes I did. In fact I did try doing a complete clean un-install (wiping data) and the problem persists. I'm also pretty sure there is some sort of change system wise as in my "clean" nan backup (the one where the app was never installed before) when I install the app, in the main screen, where it says "Current State:" it is completely blank, with no value whatsoever, just empty. As soon as I hit either option the value is assigned and the PC stops recognizing the phone.

In my current ROM (where the app was already installed and used) if I do the unistall-reboot process and then afterwards re-install the app, the "Current State:" is loaded with the previous value I had before un-install, even after wiping data. So it is clearly reading and modifiying some sort of file somewhere. I just don't know where :/

Tried that one also. But the problem still persists :S
[Galaxy S 4 Themes and Apps] LeoKas:
Thanks again Mad Ady for help.

I'm not sure if I want to go there, it's been at least 30 years since I worked with Unix (Linux).

We are now unsure if the pictures were infact part of the main memory as they normally reside on DCIM something.

Regards, and until the next time!

Leo.
[Galaxy S 4 Themes and Apps] TaLEntZ96:
Unfortunately this isn't working for me. I activate UMS, it is successfully put into UMS mode, but then nothing comes up on my computer. Any help appreciated, cheers :D
[Galaxy S 4 Themes and Apps] mad_ady:
Dcim is part of the main memory by default. If you have an external sd you can rule it out by scanning it with photorec (on your pc via a card reader)
[Galaxy S 4 Themes and Apps] fatjoez:
same problem S4 Mini

See 1x "removable disk" no capacity :|
[Galaxy S 4 Themes and Apps] PhunkyBob:
Same thing for me: even a "clean" backup did not restore my tablet.

I'ld really like to know what system file is modified, and how to restore it.
[Galaxy S 4 Themes and Apps] turbare:
Check this thread: http://xdaforums.com/showthread.php?p=54148775#post54148775

Worked for me, a bit incovenient but you only need to do it once per reboot.
[Galaxy S 4 Themes and Apps] Trilyan:
I DID get it to go away with a "clean" (never installed or used the app) backup, but it is not ideal as my backup is a really really old one.

If I could just know which file is modified, I could extract that file from my backup and overwrite the one on my current ROM. But I haven't got any clue where to even start looking.

Only thing I know, is that my Stock JB rom leaves "Current state" field in the app blank when the USB connection is actually is working (never using the app), and as soon as I assign any of the options (first use of the app), the field gets filled with that option and the USB connection stops working altogether, so evidently, there is some sort of system file mainpulation.
[Galaxy S 4 Themes and Apps] PhunkyBob:
Thank you.

Unfortunatly, I don't have KK, but 4.2.2.

The scripts modifies the "/sys/devices/platform/msm_hsusb/gadget/lun0/file" file, but the "msm_hsusb" doesn't exists in my system.

Is it possible to know what "SG USB Mass Storage Enabler" does exactly, to allow me to do manually the reverse operation on my device?
[Galaxy S 4 Themes and Apps] turbare:
Well, back on 4.2.2 the SG USB worked for me, I didn't need to use scripts.

Apart from that, have no ideea, I'm just a regular user :)
[Galaxy S 4 Themes and Apps] Trilyan:
Is the dev for this app still active? I still haven't found the files the app modifies :(
[Galaxy S 4 Themes and Apps] dorian2kx:
.

Guess not
[Galaxy S 4 Themes and Apps] hoverdonkey:
Thank you

It is great to have UMS back on my CM11 SGS3 i9300.

(I registered just so that I could thank you!)
[Galaxy S 4 Themes and Apps] vmmore:
plz...update this app , so that it works on our galaxy s4 kitkat..:eek:

kitkat has disabled UMS mode ...waiting for update :mad:
[Galaxy S 4 Themes and Apps] Mortalll:
MY DEVICE: GALAXY S4 int I9505 with ECHOE ROM v29.1

Yeah !!! this is the right procedure..GUYS this way..THANKS to rakesh2002 and Metallica

but the transfer speed is not higher than via MTP mode..WHY? I am just trying copying 3dmovie to sd card and speed is 2MB/s when I plug micro sd card via card reader it is about 30MB/s..so I dont see the advatege of MASS STORAGE ENABLER or anybody is going faster ??
[Galaxy S 4 Themes and Apps] roymental:
razr i works great!

hey there

just installed it on my motorola razr i with rom mod ONE V2.3.0 (here) by FourOne82 and it works flawlessly. very good feeling to have those folders back on my desktop! :D:D:D:D

THX & cheers from zurich
[Galaxy S 4 Themes and Apps] jimbobmcginty:
The advantage is being able to access your external SD card as if it was a USB drive attached to your computer.

I can use any standard file sync application on my PC - SyncToy in windows, FreeFileSync in linux - rather than be forced down the route of Kies or whatever - because it looks like just another hard disk.

MTP is severely limited for file management - it's half duplex / single action at a time. If you're copying a file, you can't navigate around other folders etc while you're waiting.

As for the speed thing, IIRC it's a phone's internal USB->extSd interface limitation.
[Galaxy S 4 Themes and Apps] williamguile:
I'm trying to recover files off my internal memory (pictures, I'll be using drop box going forward) I wanted to know if there was a way to make my internal storage a mass storage device? When I use this app, my phone is recognized as a CD drive o_O I have the samsung galaxy note 3 sprint N900P
[Galaxy S 4 Themes and Apps] uni:
plz...update this app , so that it works on our galaxy s4 kitkat..

kitkat has disabled UMS mode ...waiting for update
[Galaxy S 4 Themes and Apps] dorian2kx:
Yea we really need it
[Galaxy S 4 Themes and Apps] Crono88:
working on sony z1c 4.4.4
[Galaxy S 4 Themes and Apps] kevinco1:
This app no longer works.

If you want to mount both your internal/external SD cards, use MoboRobo, works perfect with file transfers back and forth:

http://www.moborobo.com/products/moborobo.html
[Galaxy S 4 Themes and Apps] dorian2kx:
Y are u Spamming the forum with this
[Galaxy S 4 Themes and Apps] kevinco1:
Because it's an actual workaround? This is for their file management program, not their store.
[Galaxy S 4 Themes and Apps] zigar:
It doesn't work on my Samsung Galaxy Core 2 (SM-G355H).

First it says "An error occurred while identifying the SD Card. The card is either not ready or there is no SD card inserted."

When I try again everything seems to be OK, but after connecting it to the PC it still recognizes it as a phone, only this time the card folder is empty and the capacity shown below is a huge negative number.

I really hope there is a solution, as this is a really nice app to connect a phone to a USB car stereo?
[Galaxy S 4 Themes and Apps] ahmednabass:
Thanks

thanks man for your effort :good:
[Galaxy S 4 Themes and Apps] mamdroid:
Hello I have a couple noob questions, I feel I should already know the answer to but I dont lol. What is USB mass storage? Also what will the app do? I have read the OP and several of the post but still in need of a little help to understand farther. Sorry it takes me a little longer to understand things, slow on the up take of stuff lol. I am always +1 for storage though. Thanks a bunch for any help that someone can offer. Yall have a great tuesday!!!!:cowboy:

Also I have a t-mobile galaxy s4 m919
[Galaxy S 4 Themes and Apps] george_shudi:
not working on S4 i9505,, any ideas?
[Galaxy S 4 Themes and Apps] Snake2000:
On Windows 8 I get "Please insert a disk into Removable Disk (K):"

When I try to enter the drive under My Computer. Any sollution?

Edit: This works!!!!:

http://xdaforums.com/showpost.php?p=52655216&postcount=6
[Galaxy S 4 Themes and Apps] Shino.rin:
Mine is S4 E300K - Same CPU like I9500 but it's Korea version

Check in dev/block. I have 179:8 and 179:9. Pls help me.
[Galaxy S 4 Themes and Apps] zigar:
Samsung Galaxy Core 2

Anyone knows a solution that works on Samsung Galaxy Core 2 (SM-G355H)?
[Galaxy S 4 Themes and Apps] Tom-Helge:
Maybe it's a good idea to ask about that in the Galaxy Core 2 section of the forum about that?

Remember, you are in the Galaxy S4 forum section now, so the chance of an answer to that are slim here.
[Galaxy S 4 Themes and Apps] mrnapolean1:
Please insert a disk into Removable Disk (G:).

How to get rid of this and see my SD cards contents.
[Galaxy S 4 Themes and Apps] danixx:
This the only one solution for kitkat but it works!!

http://xdaforums.com/showthread.php?t=2740826
[Galaxy S 4 Themes and Apps] iraklius92:
/sys/devices/virtual/android_usb/android0/f_mass_storage/lun0

/sys/devices/platform/exynos-dwc3.0/exynos-ss-udc.0/gadget/lun0

don't work galaxy s4 9500
[Galaxy S 4 Themes and Apps] cmert:
how to use on 4.4.2 roms ?
[Galaxy S 4 Themes and Apps] Green Pill Zone:
Also not seeing how this isn't spam. We can already access files through a PC; this thread is about UMS.
[Galaxy S 4 Themes and Apps] kpoman:
Guys, I have issues with Bluetooth and my car sound station, but it has USB, so I wonder if there is any easy way to export only the specific folder containing music as an UMS device so the car sound mounts, scans and plays music from it. I already tried usb debug and this app from Mohammed and they both fail, the car station saying usb error. Any clues or further dev of this thing ?

Thanks
[Galaxy S 4 Themes and Apps] rammbbs7:
help me please

I installed it on tab 3 t211 and i am stuck with no usb connection as lun file is not available, please help me how to revert back to normal mtp mode. Thanks in advance.
[Galaxy S 4 Themes and Apps] rammbbs7:
DriveDroid does the following under root:

setprop persist.sys.usb.config mass_storage,adb

setprop sys.usb.config mass_storage,adb

setprop sys.usb.state mass_storage,adb

echo 0 > /sys/class/android_usb/android0/enable

echo 18d1 > /sys/class/android_usb/android0/idVendor

echo 4e21 > /sys/class/android_usb/android0/idProduct

echo mass_storage,adb > /sys/class/android_usb/android0/functions

echo 1 > /sys/class/android_usb/android0/enable

Read this on anoher site, while I am trying to edit /sys/class/android_usb/android0/functions with text editor to change value to mtp,ptp,adb, I am getting error saying it cant be done. Can anyone help me with this? Can I use echo with terminal like echo mtp,ptp,adb > /sys/class/android_usb/android0/functions
[Galaxy S 4 Themes and Apps] rammbbs7:
setprop persist.sys.usb.config mass_storage,adb

echo 0 > /sys/class/android_usb/android0/enable

echo mass_storage,adb > /sys/class/android_usb/android0/functions

echo 1 > /sys/class/android_usb/android0/enable

I think these are four lines which the program is using to change my usb function

Using terminal in root mode, I tried entering these

setprop persist.sys.usb.config mtp

echo 0 > /sys/class/android_usb/android0/enable

echo mtp > /sys/class/android_usb/android0/functions

echo 1 > /sys/class/android_usb/android0/enable

However I am getting a kernel panic when trying to disable using echo 0 and the device is restarting, any help on how to edit fuctions file? May be certain kernel process is crashing and setting reboot when trying to disable, I also getting same reboot when trying to disable developer options or usb debugging, is there any way i can disable that process (which i dont know) and edit the file or can i edit that file without booting android in recovery or something?
[Galaxy S 4 Themes and Apps] rammbbs7:
I entered recovery and using adb pulled the functions file and it read as adb, with no mass storage, so now I think its not functions file but the process that creates that file which is modified, can anyone clarify which process writes /sys/class/android_usb/android0/functions file? Also I note that there are no changes made to /system, so I think I can comeback to normal state with factory wipe, but I am not interested in that lengthy process, please someone guide me further or correct me if I am wrong
[Galaxy S 4 Themes and Apps] rammbbs7:
finally got it

if anyone experienced similar error, please do this

(even though its simple thing, i have overlooked this)

use terminal to su and enter su setprop persist.sys.usb.config mtp,adb

or go to /data/property folder and manually edit persist.sys.usb.config value to mtp,adb

reboot

thank you.
[Galaxy S 4 Themes and Apps] PhunkyBob:
Thanks to you, my device doesn't crash anymore when I plug it to my computer.

However, it's still not detected as a device on my computer.

I have to open "USB Mass Storage Enabler" and tap on "MTP" (whereas it already says "you are MTP") to activate the connexion.
[Galaxy S 4 Themes and Apps] washwash:
on 9506 with permissive on, doesn't works

appear a new CD reader...

found an answer here

can you correct it with the source code?
[Galaxy S 4 Themes and Apps] CosmicJedi:
Trying to Recover Deleted Photos from Internal Memory on Galaxy Mini s5..

I have installed this App but my Samsung Galaxy Mini s5 is still showing up as a CD-Rom. I am trying to do this because I accidentally deleted a bunch of (extremely valuable to me) photos that were only on the device internal memory and were not backed up anywhere else. If only I could get the internal memory to show up on my computer as a normal disc drive then the data recovery programs would recognize it, but they do not recognize the CD-Rom. Any suggestions or advice? Thanks so much.
[Galaxy S 4 Themes and Apps] jimbobmcginty:
I'm fairly sure the internal storage cannot be accessed as mass storage, this tool is for external sd only.
[Galaxy S 4 Themes and Apps] AndoidTab:
I'l try to help, i don't guarantee we will recover everything, pm me

:fingers-crossed::highfive:
[Galaxy S 4 Themes and Apps] dorian2kx:
It's only reading SD card and not the internal memory, how comes
[Galaxy S 4 Themes and Apps] rotturm:
Hello,

first: thanks to the OP for the App and to Metallica for the information. Because I was struggling with my S4 GT-I9505 with Kitkat 4.4.2 Touchwiz I decided to make a new app. It works fine with the S4.

It's a widget and basicaly executes this code.

But now comes the interesting part: you can configure the LUN-filepath and the USB-device point. So it should work for different devices. You have to investigate only this 2 parameters for your phone. The widget trys to find known lun file paths and lists the enumeration points. But you must select the right one.

It's free available on the Play store.

If you get it working with other devices/systems please give a feedback so I can update the internal app list and the Play store description.
[Galaxy S 4 Themes and Apps] MysteryIII:
Can you add a list which device uses which parameter on Play Store, please? Just for the devices you already know. It would be a great help for everyone I think.

But thanks for your work at all!
[Galaxy S 4 Themes and Apps] rotturm:
There is a list in the Play store description ... unfortunately with only one item - my own 9505. I'm waiting for replies to extend the list and update the appwidget.... so guys, I'm watching you - Play store statistics is telling me that there are installations on different devices with different systems - send me the lun files and device nodes, please.
[Galaxy S 4 Themes and Apps] cioce:
Many thanks Mr. rotturm, it works perfect on my Samsung Galaxy S4 (GT-9505) with Firmware XXUGNG8 ITV 4.4.2
[Galaxy S 4 Themes and Apps] slimshouki:
Not working for S4 e330s/i9506 on lollipop.

Display as an empty CDROM
[Galaxy S 4 Themes and Apps] rotturm:
Just to be sure - was there only one device node shown in the preference activity or various? If there were various - did you tried with all device nodes? And a second question: did you get it working in a terminal with:

su

setprop persist.sys.usb.config mass_storage,adb

echo DEVICE-POINT > LUN-FILE

exit
[Galaxy S 4 Themes and Apps] slimshouki:
It has two nodes 64 and 65

I tried from terminal not working

I even tried smanager and mass storage script but not working also

The one valid method that works from twrp mass storage mode
[Galaxy S 4 Themes and Apps] rotturm:
This works for my S4 too. There must be a difference (Hans Christian Andersen) :confused:

Keep subscribed on this thread, I don't promise...
[Galaxy S 4 Themes and Apps] slimshouki:
My device is s4 e330s with different parameters from common s4 but its very similar to s4 i9506, actually same partitions
[Galaxy S 4 Themes and Apps] quinielascom:
Now I have changed with apkstudio-2.0.3b-windows the next file:

a.smali

from

/mnt/extSdCard/ to /mnt/extSdCard

/storage/extsdcard/ to /storage/extSdCard

Very small changes, but works for me, tested in sgh-m919v lollipop.
[Galaxy S 4 Themes and Apps] PIRATA!:
How can I apply your mod? Can you explain it step by step?

For me that I'm watching this now, please explain how can I retrieve for you those information on my S5 G906K.

In a few words, what is this zip all about? Do I need the apk installed first?
[Galaxy S 4 Themes and Apps] quinielascom:
zip is SGUSBMassStorageEnabler from Metallica's mod, and I added a fix for the path of external sdcard, tested in S4 with rom lollipop 5.01 stock.
[Galaxy S 4 Themes and Apps] PIRATA!:
So your zip is from a rom, and you edited for letting this app work on stock Lollipop for S4??
[Galaxy S 4 Themes and Apps] slimshouki:
Not working for S4 e330s even after modifing :64 & :65 files
[Galaxy S 4 Themes and Apps] pika456:
confirm working on TW Lollipop i9505

finally 1-button mount without running scripts!

Thanks!!
[Galaxy S 4 Themes and Apps] k525ab:
thanks dude works fine on 9295 int ver:good:
[Galaxy S 4 Themes and Apps] rotturm:
If you have installed my appwidget play.google.com/store/apps/details?id=com.rotturm.mtpusbswitcher and it works fine, send me the values from the preference activity and your system, like:

Samsung S5 G906K, X.Y.Z Kitkat Touchwiz

/sys/devices/platform/msm_hsusb/gadget/lun0/file

/dev/block/vold/179:33

and I will add it to the Play store description.
[Galaxy S 4 Themes and Apps] yovesmlmt:
I will try

Enviado desde mi SM-G900F
[Galaxy S 4 Themes and Apps] lefedor:
Reporting on 4.4.2 870A:

Widget tells:

LUN files:

/sys/class/android_usb/android0/f_mass_storage/lun/file

/sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file

nodes:

/dev/block/vold/179:65 (it's sdcard [MENTION=5711379]ANDROID[/MENTION] fstab)

/dev/block/vold/179:64

Linux on cable plug says:

dmsg on desktop:

and do not mounts

tried enter commands via shell manually - still same results:

SD_Card appear [MENTION=232868]Nautilus[/MENTION] file explorer, even have SD card label, but "mount: /dev/sr0: can't read superblock"
[Galaxy S 4 Themes and Apps] rotturm:
Yes, the appwidget only runs this commands...

I found this: in storage_list.xml the <device> element has an optional boolean attribute:

allowMassStorage: (boolean) true if this volume can be shared via USB mass storage

Perhaps your devices' Android doesn't define this attribute?
[Galaxy S 4 Themes and Apps] lefedor:
There was no attribute defined. Have updated framework-res, but the result still the same.

<?xml version="1.0" encoding="utf-8"?>
<StorageList
xmlns:android="http://schemas.android.com/apk/res/android">
<storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_internal" android:primary="true" android:emulated="true" android:mtpReserve="100" android:subsystem="fuse" />
<storage android:mountPoint="/storage/extSdCard" android:storageDescription="@string/storage_sd_card" android:primary="false" android:removable="true" android:subsystem="sd" android:activitySecureContainer="true" android:allowMassStorage="true" />
<storage android:mountPoint="/storage/Private" android:storageDescription="@string/storage_sd_card" android:primary="false" android:removable="false" android:subsystem="private" />
<storage android:mountPoint="/storage/UsbDriveA" android:storageDescription="@string/storage_usb" android:removable="true" android:subsystem="usb" />
<storage android:mountPoint="/storage/UsbDriveB" android:storageDescription="@string/storage_usb" android:removable="true" android:subsystem="usb" />
<storage android:mountPoint="/storage/UsbDriveC" android:storageDescription="@string/storage_usb" android:removable="true" android:subsystem="usb" />
<storage android:mountPoint="/storage/UsbDriveD" android:storageDescription="@string/storage_usb" android:removable="true" android:subsystem="usb" />
<storage android:mountPoint="/storage/UsbDriveE" android:storageDescription="@string/storage_usb" android:removable="true" android:subsystem="usb" />
<storage android:mountPoint="/storage/UsbDriveF" android:storageDescription="@string/storage_usb" android:removable="true" android:subsystem="usb" />
</StorageList>
[Galaxy S 4 Themes and Apps] yovesmlmt:
Reporting on 4.4.2 S5 G900F

Widget tells:

LUN files:

/sys/class/android_usb/android0/f_mass_storage/lun/file

/sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file

nodes:

/dev/block/vold/179:65 [recommended]

/dev/block/vold/179:64

Results:

Only mount as CD-ROM. I can not access to sd card
[Galaxy S 4 Themes and Apps] PIRATA!:
Does NOT work on Samsung S5 Prime LTE-A SM-G906K.

It starts like is going to work, but I end up with an empty CD rom.

Any help??

Tnx.
[Galaxy S 4 Themes and Apps] behcet98:
Ntfs write support pls
[Galaxy S 4 Themes and Apps] autoservis:
Prestigio Multipad Wize 3047 3g

Android 4.4.2

nodes:

/dev/block/vold/179:97

/dev/block/vold/179:96
[Galaxy S 4 Themes and Apps] jack_ssl:
My Device Is Samsung Galaxy S4 I9505 [ 5.0.1 ] . Please Share Tested File .. I Need To Install This Application ... Always I Am Using MTP Only .. Too Much Problem .. Please Give Working File (.apk). One Question This Application Only Mount The Ext.SDCard And Int.SDCard
[Galaxy S 4 Themes and Apps] sosikxxx:
I have the same problem :(
[Galaxy S 4 Themes and Apps] polo2popa:
will this work on SGH-T399n? or will any Flash drive work for this model phone?
[Galaxy S 4 Themes and Apps] saeedygujjar:
U test on (Gti9500) lollipop or KitKat????
[Galaxy S 4 Themes and Apps] ximikas:
Hello.

Just today found a topic to enable usb mass storage mode, by direct editing persist.sys.usb.config file,after that

Meizu m2 Note successfully displayed sd card contents as disk drive on win xp explorer.Then i found your widget on playstore,installed,but no icons appear anywhere.have tried to manually add as widget,icon appears,but if u click it,nothing happens. Maybe android 5.0.1 based flyme os 64bit not supported ? It will be nice to have a better way to switch usb mode when needed,rather than copy file from root system,edit it,then copy back and reboot.Cant post logs,because app_or_widget not runs. Ideas ?
[Galaxy S 4 Themes and Apps] iBab:
works on my Samsung Galaxy Grand Duos i9082 !

thank you very much

;)