# [Q] An app to make my phone act like a USB flash drive



## denno020 (Mar 30, 2011)

I have a galaxy s, running android 2.2, and I was wondering if there is an app I can get which would make my phone emulate a USB flash drive, when the micro USB is plugged into the top.

The reason for this is I have USB input for my car stereo, as well as iPod/iPhone and all that fancy stuff, however that doesn't help for the phone I have. So I would like to be able to somehow 'fool' the head unit into thinking there is just a USB flash drive plugged into the USB input, but instead, it's actually the phone through the micro usb to normal usb cable. The head unit could then play music that is stored on the phone (hopefully by me selecting which directory to use as the emulation)

Is there anything like this around?

Thanks
Denno


----------



## Brut.all (Mar 30, 2011)

I thought every Android device can do that. Just connect device, tap new notification and select enable. I have used G1 with my Samsung TV, so it works well with non-PC devices.


----------



## denno020 (Mar 30, 2011)

Is there anything special you need to do on the phone or on the tv to get to the location of the media files?


----------



## cwill0303 (Mar 30, 2011)

Brut.all said:


> I thought every Android device can do that. Just connect device, tap new notification and select enable. I have used G1 with my Samsung TV, so it works well with non-PC devices.

Click to collapse



I dont think it comes up with that option unless its connected to a computer. Like when you plug it in to charge it, it doesnt let you mount the sd card. 

To OP, if your stereo allows you to plug into the headphone jack, you can use the music player to play the music and it will go to your car that way. I havent seen an app that will fool the phone into thinking its plugged into a computer or similar. Good idea though, I could see where an app like that would be useful.


----------



## denno020 (Mar 30, 2011)

It's not the phone that I want to trick into thinking it's plugged into a computer, it's the head unit. I want it to think that it's connected directly to a normal USB flash drive.
Unfortunately there is only USB and iPod inputs, no 3.5mm jack. I could hack one together, but I would much rather an app so everything stays neat  lol.


----------



## chjade84 (Mar 30, 2011)

denno020 said:


> I have a galaxy s, running android 2.2, and I was wondering if there is an app I can get which would make my phone emulate a USB flash drive, when the micro USB is plugged into the top.
> 
> The reason for this is I have USB input for my car stereo, as well as iPod/iPhone and all that fancy stuff, however that doesn't help for the phone I have. So I would like to be able to somehow 'fool' the head unit into thinking there is just a USB flash drive plugged into the USB input, but instead, it's actually the phone through the micro usb to normal usb cable. The head unit could then play music that is stored on the phone (hopefully by me selecting which directory to use as the emulation)
> 
> ...

Click to collapse



I did it with one of my friends phones a while back.  Plug into USB on the head unit and android should ask you if you want to 'charge only', 'mount as disk drive' etc.  Just choose 'mount as disk drive' and the head unit will have access to all the folders on the SD card.

The folders with music in them are listed on the head unit's screen and you go from there.



Maybe it's less of a phone problem and more of a 'that particular head unit' problem.


----------



## denno020 (Mar 30, 2011)

Oh cheers chjade84, if that's the case, I might go try that now... Who cares if it's 3.44am :/ haha


----------



## chjade84 (Mar 30, 2011)

I'll be interested to know if you get it working.


----------



## denno020 (Mar 30, 2011)

No good . I tried both with USB debugging on, and with it off, and both times the head unit said Device Error when I selected USB as the source.. Bugga, not going to be an easy solution lol. Surely there would be a way of making the phone 'behave' like a flash drive when I plug in the micro usb (and subsequently select the app to do the fooling).. I wonder how hard it would be to program something like this myself... Probably too hard lol.


----------



## denno020 (Mar 30, 2011)

when I say debugging, I mean with the usb connected. I have debugging turned on on my phone, so I get a different screen to that in the video posted above. So I don't mean turning debugging on and off, I simply mean 'connecting usb storage', and not having it connected.. if that makes sense..


----------



## Brut.all (Mar 30, 2011)

denno020 said:


> It's not the phone that I want to trick into thinking it's plugged into a computer, it's the head unit. I want it to think that it's connected directly to a normal USB flash drive.

Click to collapse



Still you don't understand. Android works as normal USB flash drive already. But seems you can't use this mode, because Android does not detect, that it should enable it. cwill0303 is right, you need to somehow force-enable usb mode.


----------



## denno020 (Mar 30, 2011)

Oh i see, thanks for clearing that up, I didn't know android ran in that way..

Sent from my GT-I9000 using XDA App


----------



## chjade84 (Mar 30, 2011)

You could try "Extended Controls" widget.  It has a toggle for as "Mass Storage - enables and disables mass storage" although my EVO gives me the error "Your device does not support direct control of USB".  

It's a paid app ($1.09) but it's well worth it for all the options it gives you for toggling stuff from your homescreen.


I don't know if it will help or not.



EDIT:  See my next post before buying!


----------



## Brut.all (Mar 30, 2011)

Do you have root? You could try to run this command from a terminal:


```
echo /dev/block/mmcblk0 > /sys/devices/platform/usb_mass_storage/lun0/file
```

I could confirm that it works on my G1 and it enables USB mode permanently - if I unplug phone and plug it back, it will mount automatically. So I think it should work even with device, which isn't recognized as a PC.

Few notes:


I think it requires root permissions.
You will have to disable USB manually. If you won't do that then most probably you won't have access to your SD-installed apps and it may drain battery.
If it will work, you should be able to create some widget or other method to easily enable/disable force-mount.

EDIT:
To disable force-mount run: "echo '' > /sys/devices/platform/usb_mass_storage/lun0/file"


----------



## chjade84 (Mar 30, 2011)

Try this app.







It's called Widgetsoid and it lets you toggle USB Storage - Connect/Disconnect SD card to PC.

And it's free!


----------



## denno020 (Mar 31, 2011)

I actually already had widgetsoid, so I tried with that widget, however it still didn't work. Still tells me 'device error' on the head unit display.
I do have root permissions, but I have no idea how to run terminals or anything, plus I think that's just going to be doing the same as the widgetsoid widget does...

I will have a look into the format type of the card and what the head unit can read...


----------



## denno020 (Mar 31, 2011)

Ok so I've just checked the file format of my sd card, and it's FAT32, which the head unit should be able to read.. So I'm out of ideas...


----------



## Brut.all (Mar 31, 2011)

denno020 said:


> I do have root permissions, but I have no idea how to run terminals or anything

Click to collapse



https://market.android.com/search?q=terminal+emulator&c=apps

or you could install SDK on your PC and run "adb shell" command.



denno020 said:


> plus I think that's just going to be doing the same as the widgetsoid widget does...

Click to collapse



You need root to modify /sys/devices/platform/usb_mass_storage/lun0/file file and Widgetsoid doesn't need root for usb mount, so it definitely uses different method to enable it.


----------



## jambamkin (Mar 31, 2011)

You could try to mount sd card from recovery. I know its an option on clockwork not sure about others.

Sent from my DHD


----------



## onslaught86 (Mar 31, 2011)

Having just gotten one of the Galaxy S family last week, they approach the USB options slightly differently from other Android devices (Due to Samsung's 'awesome' Kies suite, I believe). Assuming you're using Froyo, go to Settings/Applications/USB Settings and choose Mass Storage. Make sure debugging is disabled. That should trigger the regular Android mass storage interface when you plug in the microUSB cable.

It still might not play nicely though, most of those USB readers in stereos aren't good for reading anything bigger than ~4GB. Also, since the Galaxy S family have internal storage 'and' an SD slot, it'll mount as two mass storage devices instead of one, which may confuse things further.

Best of luck.

Sent from my Vibrant using XDA Premium App


----------



## denno020 (Mar 30, 2011)

I have a galaxy s, running android 2.2, and I was wondering if there is an app I can get which would make my phone emulate a USB flash drive, when the micro USB is plugged into the top.

The reason for this is I have USB input for my car stereo, as well as iPod/iPhone and all that fancy stuff, however that doesn't help for the phone I have. So I would like to be able to somehow 'fool' the head unit into thinking there is just a USB flash drive plugged into the USB input, but instead, it's actually the phone through the micro usb to normal usb cable. The head unit could then play music that is stored on the phone (hopefully by me selecting which directory to use as the emulation)

Is there anything like this around?

Thanks
Denno


----------



## laydros (Mar 31, 2011)

I think it may be a matter of what the device sees on the cable. I would google around a little, but I expect you can do something like bridging two of the four contacts in the usb cable to trick the phone into providing usb storage.

DON'T DO THIS UNLESS YOU ARE ABLE TO CONFIRM, MIGHT BREAK PHONE OR STEREO OR BOTH, but, it may be bridging the data and + contacts.


----------



## denno020 (Mar 31, 2011)

Thanks for the replies guys. I will check this out tomorrow after uni . If it doesn't work then I think I'm going to be hacking together an adapter to connect it from the 3.5mm headphone jack into the iPod input of the headunit lol .

Denno


----------



## denno020 (Apr 1, 2011)

Brut.all said:


> ```
> echo /dev/block/mmcblk0 > /sys/devices/platform/usb_mass_storage/lun0/file
> ```

Click to collapse



I tried the above command in Android Terminal Emulator, however it kept telling me that it couldn't find file /sys/devices/platform/usb_mass_storage/lun0/file or something.. I entered it exactly as you've typed it above..

Any ideas?

Thanks
Denno


----------



## Kolorkode (Apr 1, 2011)

Try MultiMount and set to automount. Also increased my transfer rates on .37 kernel


----------



## Brut.all (Apr 1, 2011)

denno020 said:


> I tried the above command in Android Terminal Emulator, however it kept telling me that it couldn't find file /sys/devices/platform/usb_mass_storage/lun0/file or something.. I entered it exactly as you've typed it above..

Click to collapse



Maybe it's named differently on your phone, but I don't know anyone with SGS, so I can't help you, sorry.


----------



## Younio (Sep 27, 2011)

Hi denno020,

I was struggling with the same problem, but different phone - ZTE Blade. I finally found a solution : You need to enter clockwork-mod recovery the select "mounts and storage" and the "mount USB drive" or something and the car stereo recognizes my phone as USB flash drive. I am sure that there are other ways to do this I.e. through terminal and then shortcut. but at the moment it is the easiest way  By the way My friend has Samsung galaxy S and after installing this recovery he could do the same. So it means it should work on your phone too 

good luck :7


----------



## denno020 (Sep 28, 2011)

Oh nice.. But that means I can't use the phone normally right? That doesn't seem to quite the ideal situation.. lol. Thanks for the input though


----------



## Dirk (Sep 29, 2011)

It's not going to work. For your computer to see your device as storage it installs the USB Storage drivers for that device. Same as it would if you plugged in a memory stick for the first time. Your head unit has no such drivers and no way to find and install them!

You want a Head Unit with Bluetooth that works with Android, and then you can do what you're asking without wires.


----------



## Mac-Gruber (Jun 7, 2014)

*xxx Resurrecting a Dead Thread xxx*

While it didn't work for my Galaxy S5, this app promises to do what you are(were) looking for. 

This is a dead thread, but I came across it looking for the same thing so maybe this will help someone.

The app is called *USB Sharer*, full version is under $3 and there is also a 7 day evaluation version on the play store. Sorry I can't post links as this is my first posy on XDA Dev. 

I'm hoping the Dev can work with me to get mine going on my S5.




denno020 said:


> I have a galaxy s, running android 2.2, and I was wondering if there is an app I can get which would make my phone emulate a USB flash drive, when the micro USB is plugged into the top.
> 
> The reason for this is I have USB input for my car stereo, as well as iPod/iPhone and all that fancy stuff, however that doesn't help for the phone I have. So I would like to be able to somehow 'fool' the head unit into thinking there is just a USB flash drive plugged into the USB input, but instead, it's actually the phone through the micro usb to normal usb cable. The head unit could then play music that is stored on the phone (hopefully by me selecting which directory to use as the emulation)
> 
> ...

Click to collapse


----------



## mantune (Dec 24, 2015)

I have a note 4 4.4.4 kitkat rooted I entered your posted code to force usb Mass storage and got can't create sys/device/platform/usb_mass_storage/lun0/file no such file or derectory. So how would  I fix this or what else could I try?


----------



## Hallikonrelas (Oct 14, 2016)

Some phones don't have a mass storage option. if your phone definitely has a mass storage, and not just mtp, try removing everything from the sd card except for your music. all the files should be a usable format to the stereo. Usually at least mp3 and wav are compatible.i had the same problem very recently. When you put the phone in mass storage mode, the receiver will start reading files.i couldn't get mine to actually play, until I removed all the non audio, specifically anything but mp3 files


----------



## Slayerkodi (Mar 8, 2018)

I can confirm this working drivedroid - it worked on all my previous phones just not my S8 plus. Brill app - buy it - been using it for years.


----------



## TUMUHEIRWE (May 17, 2018)

Thank you Team for having chosen to help us. my FLASH says write protected, is there any app that can solve this


----------



## lolvatveo (Sep 4, 2021)

You can use Drivedroid, it can mount as a usb only to use the Iso file. Unfortunately what everyone needs is to make it like a real usb, just plug it in and connect immediately no need for an adapter or driver, it can only be a virtual space usb, what a pity no one has done that yet


----------



## flash713 (Sep 4, 2021)

There was an app years ago that you could make Linux live iso's using your phone and you could boot your PC via phone but i can't remember the name of it and last I checked it hasn't been maintained in many years.


----------

