• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[FIX/APP] <<RemountSD>> mount external_sd to /sdcard/external_sd

Search This thread

gundalbert

Senior Member
Mar 24, 2008
104
144
Trier
Hi,

I have seen many people asking how to really mount /emmc to /sdcard/external_sd and... keeping it there after a reboot.

I was searching for a solution to this myself and wrote a little app to do the job, for my own usage. I already published the app on request and people keep asking me to createa separate thread for this.

So... I'm doing so :)

Most of the fixes use a "mount -o bind" command, which will basically do what was expected but people will end up with duplicate media files and so on.


This will not happen with RemountSD. Just one location for your files.

Another plus is, RemountSD will listen for the original mount of the external SD and then kick in and do it's work. This way you do not have to care about it.


Within the application you will have the possibility to deactivate the tool and you are back to the original state after a reboot.

Installation:

* You need root
* Install the apk and launch the app
* RemountSD will ask for super user permissions (grant it)
* Done

From now on you will not have to touch the app ever again.

Usage:
For now, RemountSD has three basic functionalities
* Remount: If the checkbox is ticked, RemountSD will move /mnt/emmc to /mnt/sdcard/external_sd on every boot, furthermore you have the option to trigger this manually
* UMS fix: If ticked, RemountSD will try to fix existing problems with USB mass storage.
* Storage Mode Selection: ON the fly switch between UMS, MTP, PTP

Automatic functions
* Remount on boot
* fix storage mode on boot
(both can be deactivated in the preferences)




Depending on the kernel you use the app may not work, if so, please report back and I will see if I can fix it.
If it works, please report back (kernel, Rom, ...) also, so I can build a list with known working setups.

From version 1.3 on:
This app is designed to fit to the hardware of a Galaxy I9100 but where ever possible I use generic methods to determine the location of system files.
* RemountSD should now work on almost any android version (including JB)
* and possibly on more devices then just the Galaxy S2.

Regards,
Gundalbert


Changelog:

v1.0: Initial release
* Basic remount functionality
* App can be enabled / disabled
* Automatic kick in on first mount of ext_sdcard

v1.1: USB mass storage support
* Added support for USB mass storage of both cards (internal, external)
* Option to enable / disable this fix

v1.2: Toggle storage modes / configurable mount points
* Added the possibility to change storage mode with one click (MTP and PTP experimental, details below)
* Made source and target location changeable
* Added toasts to explain what is going on / what to do next.

v1.3: Complete re-write
* Complete rework of internal functionalities
* Complete rework of the UI (the first time I would call this an UI... but still not very pretty ;)
* Support of more android verisons
* Possible support of more devices (BUT I won't provide support for anything other than I9100)
* Remount triggers media - rescan


Why MTP / PTP experimental?
* If you have set MTP or PTP as your current storage mode on boot time, everything will be working. If you booted with usb mass storage set, the MTPService is not running and the storage mode switch will fail. This can be fixed again by manually setting the storage mode to MTP/PTP in device settings -> storage. Everything will work after this is done.
* I haven't experienced this in v_1.3 yet, but do not consider it as solved yet


Planned:
--

FAQ:
*** My media files are missing / doubled / not working, what went wrong? ***

Android scans the device for media files and supplies applications like gallery, music, ... with the information, which media is available.
After switching to RemountSD it is possible, that files are missing, you see them doubled or they are simply not working anymore.
This is because the scanning has gone wrong, which can be corrected with a one-time fix like this:


* Delete data of your media players / gallery / ...
* Delete data of media storage (I don't know if the name might be different on other roms)
* If you open up gallery for example you shouldn't see any files
* Reboot and let the media scanner work (or alternatively try sdrescan, available at the play store)
** The scan process might take a while, depending how many media files are present

I will add a rescan mechanism to RemountSD at a later point of time.


Known issues (general)

* Save to SD-Card not working in camera app
* System settings -> storage information does not show external sd card


Known issues (v_1.3 specific)

* I experienced long MediaScanner time after a remount / reboot but I'm not sure why this is happening. I tried solving it with different approaches but still had no luck. Maybe it is specific to my ROM, maybe it has to do with changes made to the MediaScanner in Jelly Bean.

If you can reproduce this (or not), please report it (if possible with logcats).
If you have any idea how to avoid this ( I know how to disable the scanner, but this is no permanent solution), I would be thankfull for any hint.
 

Attachments

  • remountSD_v1.1.apk
    27.1 KB · Views: 3,607
  • remountSD_v1.2.apk
    30.9 KB · Views: 8,261
  • remountSD_v1.3.apk
    738.4 KB · Views: 52,219
Last edited:

neo_hito

Member
Jun 20, 2011
23
1
Thank you very much for this.
One positive side effect that I got from this is that when connecting through usb, the 'external_sd' gets mounted first (as opposed to the internal sd)

So this is quite handy for example if you use it for devices that can't read multiple partitions (eg. my car's headunit)


So far I can only replicate this functionality in an AOKP rom...
Do you have any idea what causes the app to change the usb mount order? I would like to see if it can be configured.
 

gundalbert

Senior Member
Mar 24, 2008
104
144
Trier
Not really... No changes to config-files are made.

One would need to know how exactly the mount order is determined by the device or, respectively, how android does provide a mount order to devices.

I never tried to figure that out.
 
  • Like
Reactions: mido_love_maker

TheMatrix2000

Senior Member
Jun 28, 2008
275
56
Herzogenrath
Realy nice. Trying it wright now on paranoid V1.4a AOSP. got none problems so far. Only a few apps where "confused" but after a reboot and a wipe cache and dalvik-cach all is better as it was with the standard /mnt/emmc.

Thanks, this solved a few Problems.

:thumbup::thumbup::thumbup::thumbup:

Sent from my GT-I9100 using xda premium
 

gundalbert

Senior Member
Mar 24, 2008
104
144
Trier
Realy nice. Trying it wright now on paranoid V1.4a AOSP. got none problems so far. Only a few apps where "confused" but after a reboot and a wipe cache and dalvik-cach all is better as it was with the standard /mnt/emmc.

Thanks, this solved a few Problems.

:thumbup::thumbup::thumbup::thumbup:

Sent from my GT-I9100 using xda premium

Which apps and confused about what? Just curious

Sent from my GT-I9100 using xda app-developers app
 

TheMatrix2000

Senior Member
Jun 28, 2008
275
56
Herzogenrath
Titanium Backup was one for example. Couldn't find my backups anymore wich was on /mnt/emmc. It kept searching, searching.. Perhaps only a reboot was enough, but i always do a cleanup of the caches after a change in the system.

Isyncr, or isyncwifi for example are working now on AOSP-ROMS.

Thanks again. Still none problems at the moment with the remount. Will let you now when something strange happens.

Sent from my GT-I9100 using xda premium
 
  • Like
Reactions: gundalbert

gundalbert

Senior Member
Mar 24, 2008
104
144
Trier
I wonder if there are specific things that i need to keep in mind when i move from one app doing remount, to remountsd? I'm currently using ics sd binder

Sent from my GT-I9100 using Tapatalk 2

Hi,

I haven't used this app but I read about it and had a look in play store.
As far as I can say, you won't encounter any problems.

This is what I would do, if there were any doubts about losing stuff:

* Do a nandroid backup
* Uninstall ics sd binder
* install RemountSD as stated in the op (don't use both apps!!)
* Reboot
* Check if anything is broken or unusual

If you encounter any problems let me know.
 

PureLoneWolf

Senior Member
Hi there

I have a weird issue

I just installed 1.1 and enabled the the UMS fix. Now, when I connect the cable, my PC tells me that the USB Device is not functioning correctly and I have no way to access USB. Even disabling the UMS fix doesn't help unfortunately.

Would you have any ideas?

Thanks
 

remorema

Senior Member
Mar 12, 2009
1,581
673
Lisbon
wil this also work if my initial external sd mount point is /mnt/external_sd ?

would like to mount it as /mnt/sdcard/external_sd cause some apps only use external sd if mouted that way

tks,

remorema
 

gundalbert

Senior Member
Mar 24, 2008
104
144
Trier
Hi there

I have a weird issue

I just installed 1.1 and enabled the the UMS fix. Now, when I connect the cable, my PC tells me that the USB Device is not functioning correctly and I have no way to access USB. Even disabling the UMS fix doesn't help unfortunately.

Would you have any ideas?

Thanks

Hi,

RemountSD should not make any permanent changes, so disabling and a reboot should bring you back to the default of your ROM.
I will add a toast to make this more clear.

I'm just downloading RR 2.5.1 and will try it on my phone, I hope I can reproduce the issue.

Which OS is your computer/notebook on?
Do MTP or PTP work, or are all storage modes non funtional?

Edit: Just tested it with RR 2.5.1 and everything is working for me.

* Installed RR 2.5.1
* Set storage mode to UMS
* Connected the SGS2 to my PC, UMS not working
* Installed RemountSD and granted super user permissions
* UMS starts working emmediately

Even after a couple of reboots everything is fine.

Could you PM me the output of logcat RemountSD:D *:S ?
I will add the possibility to export the logs later.
 
Last edited:

PureLoneWolf

Senior Member
Hi,

RemountSD should not make any permanent changes, so disabling and a reboot schould bring you back to the default of your ROM.
I will add a toast to make this more clear.

I'm just downloading RR 2.5.1 and will try it on my phone, I hope I can reproduce the issue.

Which OS is your computer/notebook on?
Do MTP or PTP work, or are all storage modes non funtional?

Ok, I unmounted, rebooted, uninstalled, rebooted, re-installed, remounted and enabled the UMS fix...now it works

It could have been because I upgraded, rather than uninstalling first.

Now, when I connect the cable, the drives open immediately..rather than having to select Turn USB Storage ON

Is this the expected behaviour? It doesn't seem to affect the ability for the phone to access the cards...even when connected

Thanks

For the record..Windows 7 Ultimate 32bit and MTP was working.
 

gundalbert

Senior Member
Mar 24, 2008
104
144
Trier
Ok, I unmounted, rebooted, uninstalled, rebooted, re-installed, remounted and enabled the UMS fix...now it works

It could have been because I upgraded, rather than uninstalling first.

Now, when I connect the cable, the drives open immediately..rather than having to select Turn USB Storage ON

Is this the expected behaviour? It doesn't seem to affect the ability for the phone to access the cards...even when connected

Thanks

For the record..Windows 7 Ultimate 32bit and MTP was working.

I just edited my post above, it's working for me, also.

Glad everything seems to be fine now.
 
  • Like
Reactions: PureLoneWolf

pp085ster

Senior Member
Sep 5, 2010
336
88
Chicago
OnePlus 8
Media scanner doesn't seem to find any of the files in external_sd once I've changed the mount point from /emmc to /sdcard/external_sd.. I've tried to restart the media scanner but still no luck.. Any ideas? I've already wiped cache and dalvik

Sent from my GT-I9100 using xda app-developers app
 

gundalbert

Senior Member
Mar 24, 2008
104
144
Trier
Media scanner doesn't seem to find any of the files in external_sd once I've changed the mount point from /emmc to /sdcard/external_sd.. I've tried to restart the media scanner but still no luck.. Any ideas? I've already wiped cache and dalvik

Sent from my GT-I9100 using xda app-developers app

Hi,

this is still an open topic and on my todo list.

Until I can give you a simple fix, I suggest trying this:

* Delete data of your media players / gallery / ...
* Delete data of media storage (I don't know if the name might be different on other roms)
* If you open up gallery for example you shouldn't see any files
* Reboot and let the media scanner work (or alternatively try sdrescan, available at the play store)
** The scan process might take a while, depending how many media files are present


I hope this helps.
 
  • Like
Reactions: pp085ster

Top Liked Posts

  • There are no posts matching your filters.
  • 80
    Hi,

    I have seen many people asking how to really mount /emmc to /sdcard/external_sd and... keeping it there after a reboot.

    I was searching for a solution to this myself and wrote a little app to do the job, for my own usage. I already published the app on request and people keep asking me to createa separate thread for this.

    So... I'm doing so :)

    Most of the fixes use a "mount -o bind" command, which will basically do what was expected but people will end up with duplicate media files and so on.


    This will not happen with RemountSD. Just one location for your files.

    Another plus is, RemountSD will listen for the original mount of the external SD and then kick in and do it's work. This way you do not have to care about it.


    Within the application you will have the possibility to deactivate the tool and you are back to the original state after a reboot.

    Installation:

    * You need root
    * Install the apk and launch the app
    * RemountSD will ask for super user permissions (grant it)
    * Done

    From now on you will not have to touch the app ever again.

    Usage:
    For now, RemountSD has three basic functionalities
    * Remount: If the checkbox is ticked, RemountSD will move /mnt/emmc to /mnt/sdcard/external_sd on every boot, furthermore you have the option to trigger this manually
    * UMS fix: If ticked, RemountSD will try to fix existing problems with USB mass storage.
    * Storage Mode Selection: ON the fly switch between UMS, MTP, PTP

    Automatic functions
    * Remount on boot
    * fix storage mode on boot
    (both can be deactivated in the preferences)




    Depending on the kernel you use the app may not work, if so, please report back and I will see if I can fix it.
    If it works, please report back (kernel, Rom, ...) also, so I can build a list with known working setups.

    From version 1.3 on:
    This app is designed to fit to the hardware of a Galaxy I9100 but where ever possible I use generic methods to determine the location of system files.
    * RemountSD should now work on almost any android version (including JB)
    * and possibly on more devices then just the Galaxy S2.

    Regards,
    Gundalbert


    Changelog:

    v1.0: Initial release
    * Basic remount functionality
    * App can be enabled / disabled
    * Automatic kick in on first mount of ext_sdcard

    v1.1: USB mass storage support
    * Added support for USB mass storage of both cards (internal, external)
    * Option to enable / disable this fix

    v1.2: Toggle storage modes / configurable mount points
    * Added the possibility to change storage mode with one click (MTP and PTP experimental, details below)
    * Made source and target location changeable
    * Added toasts to explain what is going on / what to do next.

    v1.3: Complete re-write
    * Complete rework of internal functionalities
    * Complete rework of the UI (the first time I would call this an UI... but still not very pretty ;)
    * Support of more android verisons
    * Possible support of more devices (BUT I won't provide support for anything other than I9100)
    * Remount triggers media - rescan


    Why MTP / PTP experimental?
    * If you have set MTP or PTP as your current storage mode on boot time, everything will be working. If you booted with usb mass storage set, the MTPService is not running and the storage mode switch will fail. This can be fixed again by manually setting the storage mode to MTP/PTP in device settings -> storage. Everything will work after this is done.
    * I haven't experienced this in v_1.3 yet, but do not consider it as solved yet


    Planned:
    --

    FAQ:
    *** My media files are missing / doubled / not working, what went wrong? ***

    Android scans the device for media files and supplies applications like gallery, music, ... with the information, which media is available.
    After switching to RemountSD it is possible, that files are missing, you see them doubled or they are simply not working anymore.
    This is because the scanning has gone wrong, which can be corrected with a one-time fix like this:


    * Delete data of your media players / gallery / ...
    * Delete data of media storage (I don't know if the name might be different on other roms)
    * If you open up gallery for example you shouldn't see any files
    * Reboot and let the media scanner work (or alternatively try sdrescan, available at the play store)
    ** The scan process might take a while, depending how many media files are present

    I will add a rescan mechanism to RemountSD at a later point of time.


    Known issues (general)

    * Save to SD-Card not working in camera app
    * System settings -> storage information does not show external sd card


    Known issues (v_1.3 specific)

    * I experienced long MediaScanner time after a remount / reboot but I'm not sure why this is happening. I tried solving it with different approaches but still had no luck. Maybe it is specific to my ROM, maybe it has to do with changes made to the MediaScanner in Jelly Bean.

    If you can reproduce this (or not), please report it (if possible with logcats).
    If you have any idea how to avoid this ( I know how to disable the scanner, but this is no permanent solution), I would be thankfull for any hint.
    3
    It Works!

    It worked on my LG L7 P700 (v10i, Open Europe) like a charm! GREAT JOB!!! Already recommended this utility to all my LG L7 friends on 4pda.ru :)

    Some details: I remounted the external /mnt/sdcard/external_sd as a part of the internal memory - /mnt/sdcard and now all my games and apps are being installed to the internal card, but what is important - the cache downloaded from the PlayStore for these games as well as all my newly created documents, dashcam videos, music downloads,etc. go to the external card!

    Thus for me the application does not work exactly a Move2SD for my previous LG GT540 - moving everything to the SDCard, but I think this mode of operation is even better!

    In fact I've installed v1.2 about two weeks ago and am happy as a pink hippo since then :good:

    Now I'll give a try to the new v1.3 and send some feedback later :highfive:


    ADDED: Wow! This one is far better - with v1.2 I had to reboot my phone after pressing the "Remount now" button in order to get the things ticking. With v1.3 the external SD card was mounted instantly!
    2
    anyone tested this on cm10 builds ?? if so what are the settings

    Yes, me.
    Tested on Resurrection 3.03, it works.

    Original external sd location :
    /storage/sdcard1

    Target location:

    /storage/sdcard0/external_sd

    Target folder has to exist.




    Wouldn't this break some newer JB/ICS apps expecting /emmc and /mnt/emmc to be the external sd card?

    Wouldn't it be better to mount to both locations since those would be syncronised and we can't symlink?

    Hi, this could happen, sure but mounting to both locations has some other disadvantages, which do exist for sure.
    E. G. The media scanner (at least the ICS one) would scan both dirs, which leads to duplicate media.



    I did not have a look if anything has changed on jb in the vold confs which would make it possible to mount the Directories right a way like the user wants it to be.

    If it is possible i will let you know and give you the needed settings.

    Sent from my GT-I9100 using xda app-developers app
    2
    it works :) but when i reboot my phone, it doesnt change anymore so I must remount again after it :(
    can you solve this? I'm using rootbox V2.2 + dream kernel V 2.7.0
    thx :)

    Thanx, it does not depend on rom / Kernel, that really is a general Bug. I will Have a look at it, but unfortunately cannot give you an eta

    Sent from my GT-I9100 using xda app-developers app
    2
    Hi,

    a new Version is online.

    Added a fix for all guys having problems with usb mass storage.
    For me UMS never worked, even before using RemountSD, now it is working.

    As always, please report any problems.

    Regards