One of the things I really miss about my old phone is that because it had an SD card I could just mount the phone as mass storage and I had full access to /sdcard as if I plugged the card straight into the laptop. However because I can no longer do this on my Galaxy Nexus getting files off of the phone has become a real hassle. I'm running Linux, for which there are no good MTP implementations (either they don't work at all, or are very very slow). Also because I no longer have direct access things like filesystem metadata (timestamps, etc) are lost when copying files over from the phone to the laptop. Add to this that there are far more host devices that will read mass storage than MTP. I've also tried things like FTP servers and other ways of pulling data, but none of them are as good for my needs as the old mass storage method.
Is there any way I can make a separate /sdcard partiton, mount it with Android's fstab (or whatever Android is using for an fstab), format it how I please, and have Android just let me umount the partiton from the phone and mount it on the host device when plugged in? How would I go about doing this? is it possible to make the stock AOSP allow mass storage again or would I need a custom ROM?
Related
Hi,
does any of you know if the device can work in USB Mass Storage mode, i.e. can it be seen as an external drive from Windows/OSX/Linux without additional software? I own a MacBook Pro and HTC support told me that they are going to release soon a piece of software that works under OSX, but it would be wonderful to have access to the device storage without additional software..
Question already asked and answered here:
http://forum.xda-developers.com/showthread.php?t=1543735
They dont use USB Mass Storage they use Media Transfer Protocol to deal with USB connection. This change was introduced in Honeycomb and has continued into Ice Cream Sandwich.
You can still transfer files to and from the devices its just a diffrent way of doing it.
Forum user Gogol posed these questions:
- Why Google is using MTP instead of USB file transfer on Honeycomb?”
He received the following response from a Google developer:
“MTP is a big improvement over USB mass storage — for devices with lots of internal memory, a manufacturer no longer needs to come up with some hard partition between the USB mass storage and internal storage. Instead, they are all in one partition, with MTP providing access to the directory of media files that would normally be available through USB mass storage. This means there is no longer a need for apps on SD card for such devices, because what used to be the ‘internal SD card’ is in the same partition as where applications are stored. The storage on your device can be used for either applications or media, depending on what you want to put on it. You aren’t stuck with how much space the manufacturer decided to leave for the two areas.
Oh also this means that the media storage doesn’t need to be unmounted from Android when it is being access through the PC.“
Click to expand...
Click to collapse
Source: http://glasskeys.com/2011/02/28/why-google-uses-mtp-instead-of-usb-file-transfer-on-android-3/
A main reason for using MTP rather than for example the USB mass-storage device class (MSC) is that the latter operates at the granularity of a mass storage device block (usually in practice, a FAT block), rather than at the logical file level. In other words, the USB mass storage class is designed to give a host computer undifferentiated access to bulk mass storage, such as compact flash, rather than to a file system, which might be safely shared with the target device (except for specific files which the host might be modifying/accessing). In practice, therefore, when a USB host computer has mounted an MSC partition, it assumes absolute control of the storage, which then may not be safely modified by the device without risk of data corruption until the host computer has severed the connection. Furthermore, because the host computer has full control over the connected storage device, there is a risk that the host computer may corrupt the file system, reformat it to a file system not supported by the USB device, or otherwise modify it in such a way that the USB device cannot completely understand it.
MTP and PTP specifically overcome this issue by making the unit of managed storage a local file rather than an entire (possibly very large) unit of mass storage at the block level. In this way, MTP works like a transactional file system - either the entire file is written/read or nothing. The storage media is not affected by failed transfers.
Click to expand...
Click to collapse
Source: http://en.wikipedia.org/wiki/Media_Transfer_Protocol
No idea how this works with OSX though I'm a Windows guy
HTC-Gunge said:
No idea how this works with OSX though I'm a Windows guy
Click to expand...
Click to collapse
Very nice reply, thank you very much!
I've found Android File Transfer Google utility for OSX: http://www.android.com/filetransfer/
Actually, the One X still uses mass storage mode. Plug it in and you get the same old prompt for charge only, disk drive etc. and it still shows up as a removable disk.
Yes, vanilla android handsets like the GN use MTP mode, but HTCs don't. They have a separate partition still.
Hmm that's interesting if its true, it means HTC have implemented it independently of the OS. Could even be a selling point as I know quite a few people didn't really like the change from USB Mass Storage to MTP.
Thanks for the info!
I'm one of those who hates MTP because it is not as reliable as USB Mass Storage. MTP just doesn't want to play nice with my Win7 machine on my Nexus so I'm really looking forward to the One X and getting proper USB Mass Storage on it.
As much as i prefer MSC over MTP (mainly because you can open music and video files directly from your mass storage device, but if you use MTP, they will have to copy the entire file over to your computer before it will play), my office blocks MSC devices, but strange enough, MTP devices are not blocked.
Therefore i am actually trying to find out of i can use MTP mode in my One X, since MTP is embedded into ICS, there might be a chance. This will enable me to access my One X in office..
anyone has any idea?
I have a slightly similar problem here:
How do i tell the HTC ONE phone, that i want use the mass-storage-mode in USB, and not the f******g HTC/Nero bloatware crap?
Before the update to Android 4.1.1 it was working fine as mass-storage.
CBrown0815 said:
I have a slightly similar problem here:
How do i tell the HTC ONE phone, that i want use the mass-storage-mode in USB, and not the f******g HTC/Nero bloatware crap?
Before the update to Android 4.1.1 it was working fine as mass-storage.
Click to expand...
Click to collapse
HTC has changed mass-storage-mode to MTP in their latest update. I didn't find any way to use as mass storage so I installed CM10.1 (A8 supports mass storage mode).
parkentosh said:
HTC has changed mass-storage-mode to MTP in their latest update. I didn't find any way to use as mass storage so I installed CM10.1 (A8 supports mass storage mode).
Click to expand...
Click to collapse
Thanks for this info. Unfortunally is this no option for me. I dont want to hack my phone, i want to use it.
CBrown0815 said:
Thanks for this info. Unfortunally is this no option for me. I dont want to hack my phone, i want to use it.
Click to expand...
Click to collapse
Agreed - I have the same problem with my OneX on 4.1.1. 4.0.4 was great, 4.1.1 is a backward step in several ways. My Galaxy Nexus (bought to play with Ubuntu Touch!) did the same [email protected] until it updated itself to 4.2.2, and now works correctly - to my mind - as a mass storage device. I think Google realised the error and quietly fixed it. I can't find a document that details all the changes in 4.2.2 so not sure.
i was wondering, when we can get ASOP/AKOP or CM9/10 we can re-partition the glide to have only system partition and the extranal sd card can act as the internal one. we all know that the 8GB is not enough, especially with 2gb system and 6gb sd card - i have 2gb in system and 4gb in sd card - but if we can combine it to full partition then it will be more then enough as a basic install space - cos allot of apps can be moved to sd card and leave little room on the system partition.
It's already possible to change the mount points so that your physical sd card is mounted as /sdcard, and the internal storage takes its place at /sdcard/external_sd. It's a quick vold.fstab edit. You can see my post about it here, with a pre-modified file and a backup of the original.
You'll need root and busybox (or some form of file explorer with root permissions) to copy the file over, but it's pretty straightforward. As for repartitioning the internal storage to be used for /data, I've got no clue how to do that, but this is a reasonable enough workaround.
i know about that workaround but still there some side effects to it, like the usb mounting in the PC.
still i think its doable if creating aosp from source with cross with our ics source from samsung..
maybe a more knowledgeable dev can shed some light on the subject.
Changing the actual partitioning isn't something that's commonly done, as it can wreck compatibility with roms (including official updates) that expect things a certain way. The only issue in ICS with the vold.fstab edit is the internal memory isn't mounted on the phone at boot, you have to manually mount it any time you reboot. MTP file transfers work just fine (with your physical sdcard being labeled Phone and the internal labeled Card) as does the legacy USB Mass Storage mode.
If you really want to mess with it, look into partition editing using parted. This can go very very wrong, and may not work at all, so proceed with caution.
i see thanks for the info
is it possible force the MTP mode into Mass Storage Device ?
as for many users come from Nexus S , Nexus S uses mass storage device to communicate with PC for copy/past/delete files on internal SDcard
i found that it isn't same here on Galaxy Nexus , which uses new mode MTP ...
but i figured out this MTP is little bite pain in ass as i modified files with Root Explorer , but it doesn't show any changes when I try to access internal SDcard with PC to copy/delete files.
even i rebooted my phone twice or thrice , still doesn't show any changes ...
so i begin to miss the old MASS STORAGE DEVICE MODE as we had in Nexus S ...
is it possible to do so ?
If it was possible, it would have been done already. It is not possible on gnex because the sdcard is just a link on the /data partition, which cannot be unmounted while android is running.
Sent from my Galaxy Nexus using Tapatalk 2
There is no way to enable USB Mass Storage. You're gonna have to deal with MTP.
.... well, in that case any possible solutions to what I have described about no showing files change in PC ?
Sent from my Galaxy Nexus using xda premium
not possible in this configuration. And honestly why would you want to? I certainly do not miss the delay of mount/dismount, also being able to access the storage on my phone at the same time as the connected pc is so much more useful
I don't why and how to say it, for example, I want to mod SystemUI.apk so I copy from /system/app to /sdcard by using Root Explorer, then I connected my phone to PC, but windows explorer doesn't show SystenUI.apk exists in SDcard section while the Root Explorer indicates there is in the SDcard, even I rebooted my phone twice or thrice, it still doesn't show up in windows explorer...
This is what being bother me
Sent from my Galaxy Nexus using xda premium
i just attempted your exact scenario and windows explorer is now showing systemui.apk in root of /sdcard/, soon as i copied the file using es explorer on the phone i saw my windows explorer window flicker and updated with the newly copied apk. i did this while the phone was connected fyi
Try the app "sdrescan". It'll for android o re "read" the sdcard and populate any changes in it's database.
Sent from my Galaxy Nexus using Tapatalk 2
The implementation of MTP on Android 4.x is buggy. While it seems to work for some people, a large number of users experience issues with file transfers hanging & refresh issues. Forcing a rescan seems to work for the refresh issue.
Personally, I avoid MTP and use ADB for copying stuff. Follow the link in my signature for more info.
lol! try backing up your sdcard using MTP sometime.
strumcat said:
lol! try backing up your sdcard using MTP sometime.
Click to expand...
Click to collapse
This.
I know this thread is old, but hoping someone can help - I cannot find ANY undelete programs for Windows that recognize my GNex. They all require Mass Storage Mode or a disk drive, and even though "Internal Storage" shows up in My Computer, none of the programs see it as a viable location for scanning.
I need to undelete a lot of files from my internal storage (sdcard folder on my GNex). How can I mount this? Or how can I mount the entire internal storage as a "drive" in Windows? I'll put the phone in any mode I have to recover what I accidentally deleted. Can I do it from recovery (mount sdcard perhaps?)
crobs808 said:
I know this thread is old, but hoping someone can help - I cannot find ANY undelete programs for Windows that recognize my GNex. They all require Mass Storage Mode or a disk drive, and even though "Internal Storage" shows up in My Computer, none of the programs see it as a viable location for scanning.
I need to undelete a lot of files from my internal storage (sdcard folder on my GNex). How can I mount this? Or how can I mount the entire internal storage as a "drive" in Windows? I'll put the phone in any mode I have to recover what I accidentally deleted. Can I do it from recovery (mount sdcard perhaps?)
Click to expand...
Click to collapse
Try this http://forum.xda-developers.com/showthread.php?t=1994705
geoffcorey said:
If it was possible, it would have been done already. It is not possible on gnex because the sdcard is just a link on the /data partition, which cannot be unmounted while android is running.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
bull****
look at the nexus S. it has built in storage and it used USB mass storage prior to ICS.
it is not a hardware limitation, it is strictly software. google did it so the partition can be EXT3/EXT4 and allow an unlimited amount of storage for apps
the problem with this is, even with its EXT3/4 capability, MTP is ****ing TRASH on linux. i can only send files to my phone, i cant move them onto my PC. i cant move/delete/copy files within the storage.. the only way for me to do it is through a file manager on my phone and even then it doesnt update when i connect to my PC until i reboot my phone a few times.
MTP is a decent technology but mass storage should still be offered. why not have a scalable partition for apps using EXT and allow the rest to be what it wants. i dont know. there are many different ways they could have implemented this internal storage thing but MTP is the worst way (at least for linux)
Nexus S's /sdcard is a separate partition, GNex's /sdcard is just a link to /data/media/0
In other words in with the nexus s the command umount /sdcard works and doesn't with the gnex.
mrplowdan said:
Nexus S's /sdcard is a separate partition, GNex's /sdcard is just a link to /data/media/0
In other words in with the nexus s the command umount /sdcard works and doesn't with the gnex.
Click to expand...
Click to collapse
again, not a hardware issue but a software issue.
why can we not partition the internal storage in this way?
the nexus S was partitioned to allow mass storage but with JB it doesnt allow it. it is obviously capable of reverting.
i dont know.. im gonna try to figure something out. ill come back with updates (if i remember to)
Recently I had my galaxy s3 updated to cm10.1, and I'm loving the new features but I'm having some difficulties connecting the phone to the computer for file transfer. My computer does recognize the device, but when I click on it, and look in the internal storage, it shows that there are no files in there, even though there are. When I go in my file manager on my phone, there are 3 storage components: sd card (/storage/sdcard1), internal storage (/storage/emulated/0), and USB storage (storage/usbdisk0). I'm only able to access internal storage, and the rest it says "This operation requires elevated permissions. Try changing the Root Access mode." Not sure if this part is relevant, but just wanted to share. What do?
Anyone know of any custom roms that allow me to mount my phone as a mass storage device rather then mtp? I want to be able to connect my phone to my tablet and transfer files but need my phone to read as mass storage first.
mastermind1234321 said:
Anyone know of any custom roms that allow me to mount my phone as a mass storage device rather then mtp? I want to be able to connect my phone to my tablet and transfer files but need my phone to read as mass storage first.
Click to expand...
Click to collapse
then you need to get another phone with a sdcard.
this topic has been beaten into the ground. use search next time.
The Galaxy Nexus does not have the Mass Storage function, it uses MTP instead.