[MOD] Swap Internal & External SD [CM9, CM10, rooted stock XXLQ1 and probably more]

Search This thread

darz

Member
Jan 30, 2005
31
25
[MOD] Swap Internal & External SD [CM9, CM10, rooted stock XXLQ1 and probably more]

Hi folks!

Like many of you I'm sure, I had the problem of running out of space on the internal SD and all the existing tricks seemed to be too much work. So I took mattiadj's script and just made a few changes for the 7.7 on CM9, then CM10, then rooted stock XXLQ1. Thanks mattiadj for this one!
I've tested this on the 7.7 but I suspect it will work on all other devices and other ROMs too.

WARNING: I'm just tinkering, I don't have any solid experience with ROMs, and I certainly take no responsibility for any damage or injuries caused by the following instructions! I'm just passing on helpful hints ;)

What does it do?
From what I understand the script remaps the SD directories, swapping the internal with the external.

init.d approach
Androguide.fr has been kind enough to convert the scripts into init.d scripts, check out the scripts here to test them out and let us know how you go!

What do you need?
- The script, either use one that is attached (extsd2internalsd_7.7cm9.txt or extsd2internalsd_7.7cm10.txt or extsd2internalsd_7.7RootedStockXXLQ1_v2.txt), or create your own.
- SManager to run the script.
- A file manager with root access to check the vold folder, the mounting points for the SD cards and to copy the script over.

Any Issues?
Only issue I have seen is sometimes the script is run (via SManager) after apps like swiftkey and so I temporarily get an error notification (language pack not found), but if you wait just a little while, SManager eventually runs the script and everything is back to normal.

[size=+2]What you need to do:[/size]
1) Confirm that the storage locations are:
/mnt/sdcard (internel) & /mnt/emmc (external) for CM9,
/storage/sdcard0 (internal) & /storage/sdcard1 (external) for CM10/JB,
/mnt/sdcard/ (internal) & /mnt/sdcard/extStorages/SdCard (external) for XXLQ1.
e6395120.jpg



2) Confirm that the two files in /dev/block/vold are:
179:24 & 179:25 in CM9,
179:8 & 179:9 in in CM10,
179:8 & 179:9 in XXLQ1.
02108d25.jpg

NOTE: If steps 1 or 2 show a different setup, follow the steps described in What I did listed below

3) Download or create appropriate script and copy to /data

4) Open the script using SManager, ENABLE Su, click save then run the script.
056e14e0.jpg

NOTE: if there is no output when you run the script then it probably means it was successful.

4b) ADDITIONAL STEP FOR ROOTED STOCK XXLQ1
After running the script once, you would have received one error message, the external SD is unlinked from /mnt/sdcard/extStorages/SdCard, and so the SdCard directory no longer exists.
Create a directory titled SdCard in /mnt/sdcard/extStorages and run the script again.

5) Check in Settings>Storage to see if the internal and external SDs have been swapped
4f18004d.jpg

NOTE: If the result is different for you, follow the steps described in What I did listed below

6) Go back to SManager and enable Su & Boot, then click Save
4841b0d3.jpg


7) Reboot and check Settings>Storage again!

8) Feel smug about the fact you can install as many games as you want!!! :D


[size=+2]How it all works:[/size]
I picked up mattiadj's script for the S3 from his discussion thread [MOD] ExtSd2InternalSd v3|Increase your data storage|CMW zip|CM10|100% Working| and logically deduced the following format for the script:
mount -t vfat -o umask=0000 [EXTERNAL SD SOURCE LOCATION] [INTERNAL SD DESTINATION LOCATION]
mount -o bind [INTERNAL SD SOURCE LOCATION] [EXTERNAL SD DESTINATION LOCATION]

where:
[EXTERNAL SD SOURCE LOCATION] is the location where external sd can be referenced from. There are typically two files in /dev/block/vold/, one of those files is the external sd source location. For CM9 I set this to /dev/block/vold/179:25. For CM10 I set this to /dev/block/vold/179:9

[INTERNAL SD SOURCE LOCATION] is the location where internal sd can be referenced from. From what I understand, it is always /data/media.

[INTERNAL SD DESTINATION LOCATION] is the location where android will look for the internal sd. In CM9 I set this to /mnt/sdcard. In CM10 I set this to /storage/sdcard0.

[EXTERNAL SD DESTINATION LOCATION] is the location where android will look for the external sd. In CM9 I set this to /mnt/emmc. In CM10 I set this to /storage/sdcard1.

What I did:
1) I checked the storage locations to find that CM9 uses /mnt/sdcard (internel) & /mnt/emmc (external) for sd storage, and CM10/JB uses /storage/sdcard0 (internal) & /storage/sdcard1 (external).
2) Secondly I checked the /dev/block/vold to find two files, in CM9: 179:24 and 179:25, in CM10: 179:8 and 179:9.
3) To work out which vold file is correct I:
a) created a script using the information I found above
b) installed SManager
c) rebooted to ensure previous attempts didn't muck up the results
d) ran the script using SManager
e) checked Settings>Storage to confirm that script did in fact swap internal and external SDs.
After getting the correct vold file I:
4) Copied the script to /data/
5) Open the script in SManager and enabled Su and Boot (execute script on boot with SU permissions)
6) Rebooted and checked Settings>Storage once again.

Final scripts
FYI: The scripts attached contain the following:

===== 7.7 ExtSd2InternalSd for CM9 =======
mount -t vfat -o umask=0000 /dev/block/vold/179:25 /mnt/sdcard
mount -o bind /data/media /mnt/emmc


===== 7.7 ExtSd2InternalSd for CM10 =======
mount -t vfat -o umask=0000 /dev/block/vold/179:9 /storage/sdcard0
mount -o bind /data/media /storage/sdcard1

===== 7.7 ExtSd2InternalSd for rooted stock XXLQ1 version 2 =======
mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
mount -o bind /data/media /mnt/sdcard/extStorages/SdCard


Like I said, I'm just a tinkerer, I'll be happy to help but keep in mind my expertise is limited. Let me know how you go!

Enjoy! And don't forget to swap the contents of the internal and external SD directories ;)
Again all credits go to mattiadj and his thread [MOD] ExtSd2InternalSd v3|Increase your data storage|CMW zip|CM10|100% Working|



POST HISTORY
[UPDATE: I've made some changes to this post to make it a bit easier to read]
[UPDATE 2: I've added some instructions on how to make this work for rooted stock XXLQ1, an additional step has been added in What you need to do section]
[UPDATE 3: I missed an important step before running the script. You MUST enable Su (and save) in SManager before you run the script!]
[UPDATE 4: Moved instructions to top for better readability]
[UPDATE 5: Testing out init.d method]
 

Attachments

  • extsd2internalsd_7.7cm9.txt
    99 bytes · Views: 2,142
  • extsd2internalsd_7.7cm10.txt
    110 bytes · Views: 4,659
  • extsd2internalsd_7.7RootedStockXXLQ1_v2.txt
    119 bytes · Views: 1,396
Last edited:

Axelman8

Senior Member
Aug 26, 2009
789
257
Rotterdam
This is awesome.. Thnx for sharing dude
This might be usefull for a dev. to enable in a Rom installer.

Regards

Axelman

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

aletheus

Senior Member
Oct 13, 2011
586
280
this would be the PERFECT thing to fix superbricked tabs... is there any way to run a script like this from adb? surely you've read about the superbrick hardware bug. well, from what i can tell, my internal memory is FRIED.... so being able to swap out the memory would be AWESOME, but i need it to be a switch on a much deeper level than whether or not swiftkey will start before or after this script. like is there a way to change this thing permanently?
 

johnnobts

Senior Member
Oct 3, 2008
260
15
this would be the PERFECT thing to fix superbricked tabs... is there any way to run a script like this from adb? surely you've read about the superbrick hardware bug. well, from what i can tell, my internal memory is FRIED.... so being able to swap out the memory would be AWESOME, but i need it to be a switch on a much deeper level than whether or not swiftkey will start before or after this script. like is there a way to change this thing permanently?

dunno how to write the script correctly but would love to have one made for stock ics, non cm9/10 users
 

darz

Member
Jan 30, 2005
31
25
this would be the PERFECT thing to fix superbricked tabs... is there any way to run a script like this from adb? surely you've read about the superbrick hardware bug. well, from what i can tell, my internal memory is FRIED.... so being able to swap out the memory would be AWESOME, but i need it to be a switch on a much deeper level than whether or not swiftkey will start before or after this script. like is there a way to change this thing permanently?

I wouldn't know where to start, but mattiadjn has created a kernel mod for the s3 which works great, but doesn't work for cm10 (hence the script). http://xdaforums.com/showthread.php?t=1772234
 

johnnobts

Senior Member
Oct 3, 2008
260
15
well it says my internal and external storage are swapped but not sure apps are being copied to the microsd actually, my external storage space is shrinking with all my installs (actually internal storage)... nice effort though.
 

johnnobts

Senior Member
Oct 3, 2008
260
15
well it says my internal and external storage are swapped but not sure apps are being copied to the microsd actually, my external storage space is shrinking with all my installs (actually internal storage)... nice effort though.

Never mind, I think it is working running CM10. Would still love to get this working using stock ROM.
 

darz

Member
Jan 30, 2005
31
25
the quicksilver pre 1.0 is one of my favorite custom ics roms. but also the P6800XXLQ2_P6800OXALQ2_ATO stock rom maybe?
I'll try that one a bit later, but I did try running it on a rooted stock XXLQ1 with partial success.

The /dev/block/vold folder contains files 179:8 and 179:9. 179:9 is the correct reference to the external SD.
The SD locations are /mnt/sdcard and /mnt/sdcard/extStorages/SdCard, but I couldn't get the mount to bind /mnt/sdcard/extStorages/SdCard, so I tried /mnt/sdcard/extStorages instead with partially successful results.

So the final script (attached) is
===== 7.7 ExtSd2InternalSd for rooted stock XXLQ1 =======
mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
mount -o bind /data/media /mnt/sdcard/extStorages

The internal sd (now external SD card) works perfectly, shows up properly in Setttings>Storage.
The external sd (now internal SD) is accessible from /mnt/sdcard/extStorages, but it doesn't show up in Settings>Storage.
[FIX] I created the directory "SdCard" in /mnt/sdcard/extStorages and whalla, the internal storage is showing up as external SD in Settings>Storage.


Anyone care to add some insight why this is the case?
I suspect (with many assumptions) that I can't bind the mount to /mnt/sdcard/extStorages/SdCard because it doesn't initially exist, but I think Settings>Storage looks for that directory specifically.
 

Attachments

  • extsd2internalsd_7.7RootedStockXXLQ1.txt
    112 bytes · Views: 239

darz

Member
Jan 30, 2005
31
25
I'll try that one a bit later, but I did try running it on a rooted stock XXLQ1 with partial success.

The /dev/block/vold folder contains files 179:8 and 179:9. 179:9 is the correct reference to the external SD.
The SD locations are /mnt/sdcard and /mnt/sdcard/extStorages/SdCard, but I couldn't get the mount to bind /mnt/sdcard/extStorages/SdCard, so I tried /mnt/sdcard/extStorages instead with partially successful results.

So the final script (attached) is
===== 7.7 ExtSd2InternalSd for rooted stock XXLQ1 =======
mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
mount -o bind /data/media /mnt/sdcard/extStorages

The internal sd (now external SD card) works perfectly, shows up properly in Setttings>Storage.
The external sd (now internal SD) is accessible from /mnt/sdcard/extStorages, but it doesn't show up in Settings>Storage.
[FIX] I created the directory "SdCard" in /mnt/sdcard/extStorages and whalla, the internal storage is showing up as external SD in Settings>Storage.


Anyone care to add some insight why this is the case?
I suspect (with many assumptions) that I can't bind the mount to /mnt/sdcard/extStorages/SdCard because it doesn't initially exist, but I think Settings>Storage looks for that directory specifically.

OK, I tried something different!
1) I ran:
mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
to unlink the external sd from /mnt/sdcard/extStorages/SdCard
2) I created SdCard in /mnt/sdcard/extStorages/ (to have something to bind to)
3) Then I ran the following script:
===== 7.7 ExtSd2InternalSd for rooted stock XXLQ1 version 2 =======
mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
mount -o bind /data/media /mnt/sdcard/extStorages/SdCard

And everything looks good! Not sure which approach is better but this seems to match the original setup more accurately.
 

Attachments

  • extsd2internalsd_7.7RootedStockXXLQ1_v2.txt
    119 bytes · Views: 112
  • Like
Reactions: gti8160

johnnobts

Senior Member
Oct 3, 2008
260
15
OK, I tried something different!
1) I ran:
mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
to unlink the external sd from /mnt/sdcard/extStorages/SdCard
2) I created SdCard in /mnt/sdcard/extStorages/ (to have something to bind to)
3) Then I ran the following script:
===== 7.7 ExtSd2InternalSd for rooted stock XXLQ1 version 2 =======
mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
mount -o bind /data/media /mnt/sdcard/extStorages/SdCard

And everything looks good! Not sure which approach is better but this seems to match the original setup more accurately.

great, so all i have to do is creat an SdCard folder in extStorages/ right, then run the script? thanks! i bet it works with the q2 version, will give it a go
 

darz

Member
Jan 30, 2005
31
25
great, so all i have to do is creat an SdCard folder in extStorages/ right, then run the script? thanks! i bet it works with the q2 version, will give it a go

Correct, but remember to run the first line of the script (or the whole script, you will just get an error for the second line of the script) before you create the folder.
Also note, I had made a mistake with the instructions, before you run the script in SManager, you must enable Su first. If you don't then it will not run properly.
 
Last edited:

Androguide.fr

Account currently disabled
Jul 21, 2012
2,056
7,236
GB
meettomy.site
Thanks a lot for the awesome script darz :good:

I modified it a little bit to make it work simply by putting it in /system/etc/init.d so that it will run at each boot without the user having to do anything. See attachements. (Couldn't test atm, but it should be working).
If someone could try it and give some feedback, would be nice.

I included your script in my "Pimp My Rom" aroma script, with proper credits, hope you don't mind.
 

Attachments

  • Ext2Sd_cm9-initd.txt
    147 bytes · Views: 245
  • Ext2Sd_cm10-initd.txt
    158 bytes · Views: 753
  • Ext2Sd_stock-initd.txt
    168 bytes · Views: 333
Last edited:
  • Like
Reactions: Pachonk and darz

darz

Member
Jan 30, 2005
31
25
Thanks a lot for the awesome script darz :good:

I modified it a little bit to make it work simply by putting it in /system/etc/init.d so that it will run at each boot without the user having to do anything. See attachements. (Couldn't test atm, but it should be working).
If someone could try it and give some feedback, would be nice.

I included your script in my "Pimp My Rom" aroma script, with proper credits, hope you don't mind.

Excellent! Much appreciated :D
Do you mind if I add them to the first post after we have confirmed they work?
I'll test a couple of them later today.
 

darz

Member
Jan 30, 2005
31
25
Thanks a lot for the awesome script darz :good:

I modified it a little bit to make it work simply by putting it in /system/etc/init.d so that it will run at each boot without the user having to do anything. See attachements. (Couldn't test atm, but it should be working).
If someone could try it and give some feedback, would be nice.

I included your script in my "Pimp My Rom" aroma script, with proper credits, hope you don't mind.
I can't get it to work on CM10 no matter what I do, I believe mattiadj is having the same problem for the s3.
 

Androguide.fr

Account currently disabled
Jul 21, 2012
2,056
7,236
GB
meettomy.site
I can't get it to work on CM10 no matter what I do, I believe mattiadj is having the same problem for the s3.

+1 that's true, didn't think of trying on my s3, and doesn't work either.
Maybe a permission problem, i'll try to set_perm to 777 through pimp-my-rom's updater-script and see if it works.

Anyway your work is of great help for people with a superbricked tab (like me), kudos :good:
 

darz

Member
Jan 30, 2005
31
25
+1 that's true, didn't think of trying on my s3, and doesn't work either.
Maybe a permission problem, i'll try to set_perm to 777 through pimp-my-rom's updater-script and see if it works.

Anyway your work is of great help for people with a superbricked tab (like me), kudos :good:

I'm glad it helps!!
OK, I mucked around with the CM9 script a bit on my s3 and I _think_ it started running when I removed the .txt extension.
But only the internal sd was being mapped, which leads me to believe there's something wrong with "mount -t vfat -o umask=0000 /dev/block/vold/179:25 /mnt/sdcard" line.
 

asafki

Member
Jan 16, 2012
25
3
What should be done to get the same results in galaxy note? I'm missing some of the numbers in the list, can I get them somehow?

Thanks,
 

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    [MOD] Swap Internal & External SD [CM9, CM10, rooted stock XXLQ1 and probably more]

    Hi folks!

    Like many of you I'm sure, I had the problem of running out of space on the internal SD and all the existing tricks seemed to be too much work. So I took mattiadj's script and just made a few changes for the 7.7 on CM9, then CM10, then rooted stock XXLQ1. Thanks mattiadj for this one!
    I've tested this on the 7.7 but I suspect it will work on all other devices and other ROMs too.

    WARNING: I'm just tinkering, I don't have any solid experience with ROMs, and I certainly take no responsibility for any damage or injuries caused by the following instructions! I'm just passing on helpful hints ;)

    What does it do?
    From what I understand the script remaps the SD directories, swapping the internal with the external.

    init.d approach
    Androguide.fr has been kind enough to convert the scripts into init.d scripts, check out the scripts here to test them out and let us know how you go!

    What do you need?
    - The script, either use one that is attached (extsd2internalsd_7.7cm9.txt or extsd2internalsd_7.7cm10.txt or extsd2internalsd_7.7RootedStockXXLQ1_v2.txt), or create your own.
    - SManager to run the script.
    - A file manager with root access to check the vold folder, the mounting points for the SD cards and to copy the script over.

    Any Issues?
    Only issue I have seen is sometimes the script is run (via SManager) after apps like swiftkey and so I temporarily get an error notification (language pack not found), but if you wait just a little while, SManager eventually runs the script and everything is back to normal.

    [size=+2]What you need to do:[/size]
    1) Confirm that the storage locations are:
    /mnt/sdcard (internel) & /mnt/emmc (external) for CM9,
    /storage/sdcard0 (internal) & /storage/sdcard1 (external) for CM10/JB,
    /mnt/sdcard/ (internal) & /mnt/sdcard/extStorages/SdCard (external) for XXLQ1.
    e6395120.jpg



    2) Confirm that the two files in /dev/block/vold are:
    179:24 & 179:25 in CM9,
    179:8 & 179:9 in in CM10,
    179:8 & 179:9 in XXLQ1.
    02108d25.jpg

    NOTE: If steps 1 or 2 show a different setup, follow the steps described in What I did listed below

    3) Download or create appropriate script and copy to /data

    4) Open the script using SManager, ENABLE Su, click save then run the script.
    056e14e0.jpg

    NOTE: if there is no output when you run the script then it probably means it was successful.

    4b) ADDITIONAL STEP FOR ROOTED STOCK XXLQ1
    After running the script once, you would have received one error message, the external SD is unlinked from /mnt/sdcard/extStorages/SdCard, and so the SdCard directory no longer exists.
    Create a directory titled SdCard in /mnt/sdcard/extStorages and run the script again.

    5) Check in Settings>Storage to see if the internal and external SDs have been swapped
    4f18004d.jpg

    NOTE: If the result is different for you, follow the steps described in What I did listed below

    6) Go back to SManager and enable Su & Boot, then click Save
    4841b0d3.jpg


    7) Reboot and check Settings>Storage again!

    8) Feel smug about the fact you can install as many games as you want!!! :D


    [size=+2]How it all works:[/size]
    I picked up mattiadj's script for the S3 from his discussion thread [MOD] ExtSd2InternalSd v3|Increase your data storage|CMW zip|CM10|100% Working| and logically deduced the following format for the script:
    mount -t vfat -o umask=0000 [EXTERNAL SD SOURCE LOCATION] [INTERNAL SD DESTINATION LOCATION]
    mount -o bind [INTERNAL SD SOURCE LOCATION] [EXTERNAL SD DESTINATION LOCATION]

    where:
    [EXTERNAL SD SOURCE LOCATION] is the location where external sd can be referenced from. There are typically two files in /dev/block/vold/, one of those files is the external sd source location. For CM9 I set this to /dev/block/vold/179:25. For CM10 I set this to /dev/block/vold/179:9

    [INTERNAL SD SOURCE LOCATION] is the location where internal sd can be referenced from. From what I understand, it is always /data/media.

    [INTERNAL SD DESTINATION LOCATION] is the location where android will look for the internal sd. In CM9 I set this to /mnt/sdcard. In CM10 I set this to /storage/sdcard0.

    [EXTERNAL SD DESTINATION LOCATION] is the location where android will look for the external sd. In CM9 I set this to /mnt/emmc. In CM10 I set this to /storage/sdcard1.

    What I did:
    1) I checked the storage locations to find that CM9 uses /mnt/sdcard (internel) & /mnt/emmc (external) for sd storage, and CM10/JB uses /storage/sdcard0 (internal) & /storage/sdcard1 (external).
    2) Secondly I checked the /dev/block/vold to find two files, in CM9: 179:24 and 179:25, in CM10: 179:8 and 179:9.
    3) To work out which vold file is correct I:
    a) created a script using the information I found above
    b) installed SManager
    c) rebooted to ensure previous attempts didn't muck up the results
    d) ran the script using SManager
    e) checked Settings>Storage to confirm that script did in fact swap internal and external SDs.
    After getting the correct vold file I:
    4) Copied the script to /data/
    5) Open the script in SManager and enabled Su and Boot (execute script on boot with SU permissions)
    6) Rebooted and checked Settings>Storage once again.

    Final scripts
    FYI: The scripts attached contain the following:

    ===== 7.7 ExtSd2InternalSd for CM9 =======
    mount -t vfat -o umask=0000 /dev/block/vold/179:25 /mnt/sdcard
    mount -o bind /data/media /mnt/emmc


    ===== 7.7 ExtSd2InternalSd for CM10 =======
    mount -t vfat -o umask=0000 /dev/block/vold/179:9 /storage/sdcard0
    mount -o bind /data/media /storage/sdcard1

    ===== 7.7 ExtSd2InternalSd for rooted stock XXLQ1 version 2 =======
    mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
    mount -o bind /data/media /mnt/sdcard/extStorages/SdCard


    Like I said, I'm just a tinkerer, I'll be happy to help but keep in mind my expertise is limited. Let me know how you go!

    Enjoy! And don't forget to swap the contents of the internal and external SD directories ;)
    Again all credits go to mattiadj and his thread [MOD] ExtSd2InternalSd v3|Increase your data storage|CMW zip|CM10|100% Working|



    POST HISTORY
    [UPDATE: I've made some changes to this post to make it a bit easier to read]
    [UPDATE 2: I've added some instructions on how to make this work for rooted stock XXLQ1, an additional step has been added in What you need to do section]
    [UPDATE 3: I missed an important step before running the script. You MUST enable Su (and save) in SManager before you run the script!]
    [UPDATE 4: Moved instructions to top for better readability]
    [UPDATE 5: Testing out init.d method]
    2
    the quicksilver pre 1.0 is one of my favorite custom ics roms. but also the P6800XXLQ2_P6800OXALQ2_ATO stock rom maybe?
    I'll try that one a bit later, but I did try running it on a rooted stock XXLQ1 with partial success.

    The /dev/block/vold folder contains files 179:8 and 179:9. 179:9 is the correct reference to the external SD.
    The SD locations are /mnt/sdcard and /mnt/sdcard/extStorages/SdCard, but I couldn't get the mount to bind /mnt/sdcard/extStorages/SdCard, so I tried /mnt/sdcard/extStorages instead with partially successful results.

    So the final script (attached) is
    ===== 7.7 ExtSd2InternalSd for rooted stock XXLQ1 =======
    mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
    mount -o bind /data/media /mnt/sdcard/extStorages

    The internal sd (now external SD card) works perfectly, shows up properly in Setttings>Storage.
    The external sd (now internal SD) is accessible from /mnt/sdcard/extStorages, but it doesn't show up in Settings>Storage.
    [FIX] I created the directory "SdCard" in /mnt/sdcard/extStorages and whalla, the internal storage is showing up as external SD in Settings>Storage.


    Anyone care to add some insight why this is the case?
    I suspect (with many assumptions) that I can't bind the mount to /mnt/sdcard/extStorages/SdCard because it doesn't initially exist, but I think Settings>Storage looks for that directory specifically.
    2
    Thanks a lot for the awesome script darz :good:

    I modified it a little bit to make it work simply by putting it in /system/etc/init.d so that it will run at each boot without the user having to do anything. See attachements. (Couldn't test atm, but it should be working).
    If someone could try it and give some feedback, would be nice.

    I included your script in my "Pimp My Rom" aroma script, with proper credits, hope you don't mind.
    1
    I'll try that one a bit later, but I did try running it on a rooted stock XXLQ1 with partial success.

    The /dev/block/vold folder contains files 179:8 and 179:9. 179:9 is the correct reference to the external SD.
    The SD locations are /mnt/sdcard and /mnt/sdcard/extStorages/SdCard, but I couldn't get the mount to bind /mnt/sdcard/extStorages/SdCard, so I tried /mnt/sdcard/extStorages instead with partially successful results.

    So the final script (attached) is
    ===== 7.7 ExtSd2InternalSd for rooted stock XXLQ1 =======
    mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
    mount -o bind /data/media /mnt/sdcard/extStorages

    The internal sd (now external SD card) works perfectly, shows up properly in Setttings>Storage.
    The external sd (now internal SD) is accessible from /mnt/sdcard/extStorages, but it doesn't show up in Settings>Storage.
    [FIX] I created the directory "SdCard" in /mnt/sdcard/extStorages and whalla, the internal storage is showing up as external SD in Settings>Storage.


    Anyone care to add some insight why this is the case?
    I suspect (with many assumptions) that I can't bind the mount to /mnt/sdcard/extStorages/SdCard because it doesn't initially exist, but I think Settings>Storage looks for that directory specifically.

    OK, I tried something different!
    1) I ran:
    mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
    to unlink the external sd from /mnt/sdcard/extStorages/SdCard
    2) I created SdCard in /mnt/sdcard/extStorages/ (to have something to bind to)
    3) Then I ran the following script:
    ===== 7.7 ExtSd2InternalSd for rooted stock XXLQ1 version 2 =======
    mount -t vfat -o umask=0000 /dev/block/vold/179:9 /mnt/sdcard
    mount -o bind /data/media /mnt/sdcard/extStorages/SdCard

    And everything looks good! Not sure which approach is better but this seems to match the original setup more accurately.
    1
    Ok Darz - Here is a question. The line "mount -o bind /data/media /mnt/emmc" in the cm9 script. In my Galaxy Tab 2 10.1. There is no reference in "/data/media /mnt/emmc" to the external sdcard. The way I get to it normally is to go to "mnt/extsdcard/". So, does that mean I should remove the "/data/media/emmc" to just "mnt/extsdcard"? I don't know what the data media refers to.
    Thanks
    superdog404

    Maybe this is over my head, but it appears this is jist swapping the data partiton, is there any way to just trick the device into thinking extSD IS the internal storage? Like having the device boot from mmcblk1 instead of mmcblk0, so that all partitions are actually on the extsd card? Or is this totally impossible.

    ---