yashsingh1/xdaforums huggingface dataset:
[T-Mobile LG G2x] reisaru:
since CM7 was changed to allow use of the internal memory as primary via a setting in Cyanogenmod Settings, these files no longer change where the primary memory is. Now they change only the mount point for the secondary memory. That mount point is moved from /mnt/emmc to /mnt/sdcard/_ExternalSD for external_secondary.zip, mimicing the mounting scheme of the stock rom. It's /sdcard/_InternalSD for internal_secondary.zip.

After a wipe, the full install instructions:

1) Flash CM7

2) Flash this zip

3) Boot into CM7

4) Navigate to Menu : Settings : Cyanogenmod Settings : Application and check "Use internal storage"

5) Reboot

this will change /sdcard from the external SD Card to the internal eMMC memory and mount the SD card at /mnt/sdcard/_ExternalSD.

For future flashing when a full data wipe was not done, you can skip steps 4 and 5.
[T-Mobile LG G2x] arctic84:
ah, okay. I completely understand now. wow.. finally it's perfect :) THANK YOU SIR! :D
[T-Mobile LG G2x] reisaru:
165 has some good radio and routing fixes.
[T-Mobile LG G2x] nguyen2011:
Thanks for update, works great on CM7.1 !!!
[T-Mobile LG G2x] reisaru:
Zipfiles for 7.1.0.1

7.1 was incremented for the G2x to incorporate the changes from 165, as well as enabling the radio change when rebooting into recovery. 166 has no improvements for the G2x.
[T-Mobile LG G2x] reisaru:
167 has some commits for the G2x, including a microphone volume adjustment.

Additionally, please see the the quote above for information as to why CM does not include this mount schema. I do still use this modification, as I have not run into any problems.
[T-Mobile LG G2x] reisaru:
Here's 173 for y'all.
[T-Mobile LG G2x] reisaru:
Was out of town for Disneyland and BlizzCon this weekend, so I missed a number of updates. Here's 179.
[T-Mobile LG G2x] iceman3kco:
I am running nightly 184 currently. Can I flash your 179 zip without ill effects?
[T-Mobile LG G2x] reisaru:
Nothing G2x-specific (that wasn't reverted) in 184 or 186, but 183 has some entries and I haven't updated the post in a while.
[T-Mobile LG G2x] iceman3kco:
I just wanted to say thank you. This brought me back to CM7!
[T-Mobile LG G2x] iceman3kco:
I however am noticing when choosing sdcard in root explorer it defaults to externel sd with your externel_secondary_nightly_186.zip. Selecting _Externalsd takes me to the internal sd.
[T-Mobile LG G2x] reisaru:
Yes. I took the actual internal-external-swap out of these because, a number of nightlies ago, CM7 implemented the option natively. I figured it would be best to use the native setting rather than hack it into place, so these zipfiles now only move the secondary memory from /mnt/emmc to /mnt/sdcard/_(Ex/IN)ternalSD.

Go into CyanogenMod Settings, Application, and then check the "Use Internal Memory". Once you reboot, the internal and external memories will be swapped.
[T-Mobile LG G2x] iceman3kco:
Thank you very much! That did it. Thanks for your work!
[T-Mobile LG G2x] HAvoktek:
death' Great work man!

I have a question concerning the alpha Miui zips, is there an actual difference in using the CM7 nightly swap builds that are updated as opposed to your Miui alpha builds?

WhiteHawxs has some dope Miui builds that I have been using this on with success. :cool:
[T-Mobile LG G2x] fcisco13:
Can we get back to topic please....

Whitehawks new miui 11.4 now works with faux regular .44 kernel in op, thanks faux very good work.
[T-Mobile LG G2x] HAvoktek:
My question was on topic or pertaining to don't you think?
[T-Mobile LG G2x] fcisco13:
Yes it was, my apologies, was just back from a long night out and posted in wrong thread.

Blame it on the alcohol ...
[T-Mobile LG G2x] HAvoktek:
Ha!! been there!!! :D

No worries......
[T-Mobile LG G2x] reisaru:
Edit: Heh, didn't realize I wasn't at the end of the thread.
[T-Mobile LG G2x] pastime1971:
i don't know whether it has been discussed or not, but why not make a script to add lines to build.prop instead of making zip for every nightly ?

it would be something like

#!/system/bin/sh
su -c 'mount -o remount,rw /system && echo "ro.additionalmounts=/mnt/sdcard/ExternalSD" >> /system/build.prop && reboot'

or it could be done in flashable zip updater-script ?
[T-Mobile LG G2x] reisaru:
It hasn't been discussed in this thread as far as I know, but it sounds very doable. What you mention might work, but wouldn't be very elegant-- the line already exists, so you would in effect be duplicating it and trusting that the second line overrules the first. Kind of messy.

Further adding to that is the fact that a second line also has to be modified, as a result of the "Use internal memory" change.

I imagine the ideal implementation of such a script would be performed immediately after flashing the nightly, but I don't know enough about Android to say that sed and/or grep are available in the recovery image.
[T-Mobile LG G2x] pastime1971:
well in that case, you could use 'grep -v' or 'sed -e' or 'awk'

grep -v gets rid of expression, sed replaces, and i am not too familiar with awk, but i'm guessing it is similar to sed but more powerful...

sed example goes like ...

sed -e 's/ro.additionalmounts=\/mnt\/emmc/ro.additionalmounts=\/mnt\/sdcard\/ExternalSD' /system/build.prop > /tmp/build.prop.new

vorkKernel installer (Anykernel) uses awk to modify build.prop from flashable zip updater-script. i could look into it more tomorrow, if you are interested....
[T-Mobile LG G2x] pastime1971:
i skimmed vork kernel installer, and it changes build.prop from

# Mount the internal SD card, too
ro.additionalmounts=/mnt/emmc
ro.vold.switchablepair=/mnt/sdcard,/mnt/emmc

to

# Mount the internal SD card, too
ro.additionalmounts=/mnt/sdcard/_ExternalSD
ro.vold.switchablepair=/mnt/sdcard,/mnt/emmc

apparently, it doesn't change vold.fstab probably because cm already supports internal/external swap ?

please confirm that it is making a correct change, and then test zip

i have not tested it on my p990. (just on linux shell)

here is a flashable zip *** link removed ***
[T-Mobile LG G2x] reisaru:
Both lines need to be changed from emmc to sdcard/_(Ex/In)ternalSD, otherwise it won't work. vold.fstab doesn't need to be modified for exactly the reason you state.
[T-Mobile LG G2x] pastime1971:
i added a pattern rule for ro.vold.switchablepair as well and now it makes changed in build.prop to

# Mount the internal SD card, too
ro.additionalmounts=/mnt/sdcard/_ExternalSD
ro.vold.switchablepair=/mnt/sdcard,/mnt/sdcard/_ExternalSD

flashable zip at http://www.mediafire.com/?5fhtko6xghixnig

the point of this is to have a universal script to modify build.prop regardless of nightly version.

edit: forgot to say that all the credit goes to vork team. i just skimmed it down.

edit: again, i didn't really tested it on my phone... but it should work i guess... :) let me know if it does.

edit: found some bug, and removed it. link updated
[T-Mobile LG G2x] pastime1971:
any feedback on this zip (derived from vork installer) ?

no feedback is a good feedback, i assume ?
[T-Mobile LG G2x] nguyen2011:
Can you make one with _InternalSD please? Thanks.
[T-Mobile LG G2x] reisaru:
It looks like it would work, but I haven't had the opportunity to test it out. Been getting absorbed into Glitch and Minecraft, and not ten minutes ago I got a D3 beta invite. So.. I'll probably be missing from the boards for a while. ;)
[T-Mobile LG G2x] pastime1971:
here it is. http://www.mediafire.com/?0gcc4h4c3q8y7zn

it should work, but i haven't tested it on my phone.

in worst case, re-flash nightly to revert it or those zip files that overwrite build.prop if anything goes wrong... (and yell at me... :))
[T-Mobile LG G2x] hesher:
Does this work on nightly 199? I currently dont have a SD card and am unable to install apps as its not recognizing my intenral SD. Please help!
[T-Mobile LG G2x] pastime1971:
in your case (no external SD), you will just have to use Settings > CM settings > Application settings > Use Internal Storage.

that is unless CM automatically does that when no external. (not sure if it does or not)

this thread is about mounting external over internal (or vice versa) and it is of no use to you.
[T-Mobile LG G2x] iceman3kco:
So can this be applied to 199+? As of the moment 201 is the latest nightly. death1246's nightly zips brought me back to CM7 as I do not like the mount point CM7 decided to use for the ROM. (32GB SD in G2x)
[T-Mobile LG G2x] nguyen2011:
Tested on G2x & NookColor CM7. Works perfect. Thanks for this ultimate solution. No more waiting for the zip file tweak for specific nightly.

---------- Post added at 09:32 PM ---------- Previous post was at 09:31 PM ----------

You should try it. Works for me.
[T-Mobile LG G2x] pastime1971:
should work regardless of nightly version...

---------- Post added at 07:38 PM ---------- Previous post was at 07:37 PM ----------

all the credit goes to vork team, who made the installer w/ this mounting tweak.

i just skimmed it down to mount tweak only.
[T-Mobile LG G2x] iceman3kco:
Flashed nightly 201 and the 186.zip and works perfectly!!
[T-Mobile LG G2x] reisaru:
Alright, I finally had time to look into things! I haven't used it, but by looking into the updater-script, I can see that tweakmounts.zip does a lot of unnecessary work. busybox is already present in CWM, so I'm not sure why vorkKernel copies a new one--perhaps theirs has functionality the CWM one didn't, or maybe they were intending that people be able to flash their files from a recovery without busybox. My experience with Android recoveries is limited to CWM, so I'm not sure.

In any case, I spent the better part of this afternoon working on what turned out to be a fairly fast script--it doesn't create or copy any files, it just uses sed to modify what CM has already placed, and it should be compatible with all G2X CM installations since implementation of the "use internal memory" option.

ADDITIONALLY, and I'm really happy about this: If you go with an external_secondary file, this script will automatically tick the option to use internal memory. I was tired of having to reboot twice after wiping and flashing, so I built it into this script. As a result of the regexp, no change will be made to this option if it's already on. Ignore this part. I will need to do further work to make this happen properly.

Further, since I didn't see anything in the nightly thread about CM doing it automatically, I also added the option to combine Rusty!'s script to convert /data and /cache to EXT4 (from this post). Below are zipfiles, for both _InternalSD and _ExternalSD, both with and without this functionality.

TL;DR VERSION: These should run faster, the _ExternalSD ones will won't tick 'use internal storage' automatically, and functionality is available to convert /data and /cache to EXT4.

Appreciation to Rusty! and pastime1971 for their contributions, to this thread and just plain in general.

external_secondary_cm.zip: mounts internal eMMC memory at /sdcard and the removable SD Card at /sdcard/_ExternalSD, and activates the "use internal storage" CM option. Use only with Cyanogenmod, no MIUI*.

external_secondary_with_ext4_data_cache_cm.zip: mounts internal eMMC memory at /sdcard and the removable SD Card at /sdcard/_ExternalSD, and activates the "use internal storage" CM option. Converts /cache and /data to EXT4. Use only with Cyanogenmod, no MIUI*.

internal_secondary_cm.zip: mounts removable SD Card at /sdcard and the internal eMMC memory at /sdcard/_InternalSD. Use only with Cyanogenmod, no MIUI*.

internal_secondary_with_ext4_data_cache_cm.zip: mounts removable SD Card at /sdcard and the internal eMMC memory at /sdcard/_InternalSD. Converts /cache and /data to EXT4. Use only with Cyanogenmod, no MIUI*.

(* it's entirely possible that these files will work with the MIUI mod. If someone wants to look into it and report back here, that would be very helpful)
[T-Mobile LG G2x] pastime1971:
Awesome...
[T-Mobile LG G2x] reisaru:
Nevermind. Apparently the CM7 startup actions delete the cmparts preferences file on a new boot. There might be a way to make this work, but I'll have to work on it later. In the mean time, you can ignore the files attached here.
[T-Mobile LG G2x] pastime1971:
well, i don't know for sure, but isn't that setting written to settings.db or something?

i will have to check it later...
[T-Mobile LG G2x] reisaru:
I found it in /data/data/com.cyanogenmod.cmparts/shared_prefs/com.cyanogenmod.cmparts_preferences.xml

The second set of files were supposed to create this file with the correct entries if it didn't exist, and the script worked well for that. The problem is that when CM7 boots for the first time, it deletes this file.
[T-Mobile LG G2x] lotherius:
Mod for LG 2.3.3 or 2.3.4 Roms (non-Cm)

My apologies if someone already posted this...

However - a common request is changing the Mount Points of the STOCK 2.3.3 or 2.3.4 builds. It CAN be done and it turns out it was much easier than I thought!

Here's how for a STOCK 2.3.3 or 2.3.4 Rom:

Edit your /system/etc/vold.fstab (how to do this is an excercise for the reader)

Change:

dev_mount extsdcard /mnt/sdcard/_ExternalSD auto /devices/platform/tegra-sdhci.2/mmc_host/mmc1 /devices/platform/tegra-sdhci.2/mmc_host/mmc0
dev_mount sdcard /mnt/sdcard auto /devices/platform/tegra-sdhci.3/mmc_host/mmc2

To:

dev_mount extsdcard /mnt/sdcard/_ExternalSD auto /devices/platform/tegra-sdhci.3/mmc_host/mmc2 /devices/platform/tegra-sdhci.3/mmc_host/mmc0
dev_mount sdcard /mnt/sdcard auto /devices/platform/tegra-sdhci.2/mmc_host/mmc1

I tested the changes on Tsugi with the Oyasumi kernel, BUT the changes should work on any 2.3.3 or 2.3.4 rom even with a stock kernel (I think).

EDIT: You will not be able to mount USB Mass Storage Mode with these changes in place. I am 100% certain there's a fix, but it's just a matter of finding where it is. USB Mass Storage obviously has some settings somewhere else that just haven't been found yet.
[T-Mobile LG G2x] lilaliend:
Does anyone have mirrors(or can send) files from the original post? Specifically External-Secondary for MIUI? I was about to go back to MIUI but can't find my backup of that file.

THANKS!
[T-Mobile LG G2x] iArtisan:
ditto. anyone have the miui external secondary file?
[T-Mobile LG G2x] exaphor:
Does anyone happen to have the external secondary file for MIUI?

I think it's called external_secondary_miui_alpha2.zip so search your computers for it please please please :D
[T-Mobile LG G2x] AndroidKills:
ditto i would glad if someone could post that miui one, like exaphor said!

Edit - actually after making a backup and feeling completely fearless, i just flashed the one posted by Reisaru ( external secondary along with ext 4 data cache ). Now my phone reads the internal sd just fine, by the way i am on MIUI.
[T-Mobile LG G2x] exaphor:
Hey, after searching through a few hundred pages of comments in multiple threads (not even exaggerating :( ) I finally stumbled upon a solution. Download the InternalSDMIUI.zip file found on this thread: http://xdaforums.com/showthread.php?t=1412046&page=120

There's a similar file a few pages back; but that one doesn't work. If you download the one on page 120 (the one I linked) it should work (flash with cwm).
[T-Mobile LG G2x] death1246:
Whipe Dalvik and Cahce

then restart happened to me first time I flashed.
[T-Mobile LG G2x] arctic84:
So you're saying you can create a file which can be flashed to make the Internal SD function as if it were on stock 2.2.2? If so, count me in for someone who's interested! :eek:
[T-Mobile LG G2x] awaisuk:
I am alittle confused.....

does this mod make the rom act like it does on 2.2? Like you use your internal sd for apps, camera pictures, etc?

Because on CM7 you use external card for apps, camera pictures, etc.....
[T-Mobile LG G2x] Rootuser3.0:
Not working when plugged in to PC to mount only internal mounts and external SD card doesnt

sent from Abbottabad, Pakistan with no internet connection
[T-Mobile LG G2x] death1246:
No the interneal is reversed from the external its the same as stock just reversed so apps install to your main SD card not the internal one.

Im not sure whats going on maybe you have to create the folder __InternalSD on your external memory card if not then your buildprop is probably not set up correctly.

EDIT: Just noticed on windows 7 it doesnt appear to get mounted as fast just wait a few seconds then click it. It will open the directory of your memory card.

If anything after you mount. Unmount then remount again. Should work.
[T-Mobile LG G2x] xipher_zero:
Reversed Update Zip

Here is a working cwm zip that will mount the emmc (Internal Storage) to /sdcard and the external storage to /sdcard/_ExternalSD

For this to work you need to create the folder _ExternalSD (Only 1 Underscore) on your internal sdcard. This will make the device mount the storage exactly like stock.

Cheers,

Xipher

Link for CyanogenMod 7.1 RC1:

Download from my personal FTP server

Link for CyanogenMod 7.1 Nightly 74:

Download from my personal FTP server
[T-Mobile LG G2x] arctic84:
Xipher, you're my hero. Would you happen to have a way so i can buy you a beer? I've been searching for this for the LONGEST time. You just made my day.
[T-Mobile LG G2x] arctic84:
Following up:

Sorry, not trying to be picky.. however when i plugged it in to the computer, it only mounts the external SD. is there any way for it to mount both internal and external SD's?
[T-Mobile LG G2x] arctic84:
Ok, so my phone's acting a bit wacky. I just got it to mount both internal and external now. *scratches head* So i guess i'm good? lol.. guess i'll follow up with more results later.
[T-Mobile LG G2x] Rootuser3.0:
Link not working bro thanks for this though nice work

sent from Abbottabad, Pakistan with no internet connection
[T-Mobile LG G2x] Cubeology:
Link does "appear" broken, but the file downloaded anyway on my PC (not the phone). Ran program and it seems to be working. I did not have to create /_ExternalSD it was already there.

Can anyone tell me what sd-ext is supposed to be for, it is empty folder on my phone and I get errors relating to it when I wipe Dalvik cache from CWR.
[T-Mobile LG G2x] death1246:
LOL that's it you are good man.
[T-Mobile LG G2x] xipher_zero:
I through this up after making the changes. To clear up the mounting issues I had to wipe the dalvik and cache partitions and reboot a couple of times. It isn't a magic bullet but it works. You will also need to move you app settings (IE Android and data folders) to the internal SD.

This should clear up the remaining issues

Xipher
[T-Mobile LG G2x] xipher_zero:
It's on my home FTP, I could multiupload it, but I didn't bother because of the size. If the download craps out just try again a little later.
[T-Mobile LG G2x] gaww:
Does this have to get flashed with every ROM flash (it gets wiped)? If not, can this be reversed if needed?
[T-Mobile LG G2x] xipher_zero:
It must be flashed after every new ROM install or the mount points from the ROM will be set up and not the ones that are adjusted with this zip.
[T-Mobile LG G2x] zimphishmonger:
Does this work completely, meaning it can be mounted to a PC. When I did this swap to vold without modifying the kernel init, I count mount the volume to a PC.
[T-Mobile LG G2x] xipher_zero:
LOL Depends on the computer it is being connected to. My home ubuntu system mounts both correctly most of the time, the WinXP computer here at the office only ever mounts the ExternalSD. Until the kernel init is modified it seems that only one of the two can be mounted simultaneously under Windows. Now you can unmount the external sd in the settings and the internal will mount on the computer, but at least in windows you can't have both mount at the same time.
[T-Mobile LG G2x] muzicman0:
I am running XP at work, and am able to mount both internal and external...or am I confused by what is being asked here?
[T-Mobile LG G2x] xipher_zero:
?? Well Windows kind of hates me so that might be the issue here at the office.
[T-Mobile LG G2x] gaww:
I have looked for setting to do the above, but in neither system app settings nor CM app settings do I see a way to do this.

In any case, while I have set up the _ExternalSD in the internal, flashed the zip, cleard cache and dalvek, and rebooted a few times - still has not changed the mount points.
[T-Mobile LG G2x] Cubeology:
This works flawlessly with Android Commander, which is one of the easiest ways to interface with the phone via a windows computer.
[T-Mobile LG G2x] xipher_zero:
You need to actually move the folders on the SD's either using a file manager or by mounting the drives on your computer and moving them that way. Most applications have their SD settings on the /sdcard. Once you apply these fixes your app data will not be where the applications expect them to be.
[T-Mobile LG G2x] death1246:
I dont think this is his problem I think he's using a different OS
[T-Mobile LG G2x] gaww:
There was discussion of ROMs (plural) earlier. The zip in the OP was to be for only RC1. I thought this one was for CM7 in general. i ma currently (today) on EB 2.3.4 - is this why the mounts will not change. i have a well functioning nandroid of RC1 which i was using yesterday - will the remount work ther?

I do not care and have little trouble connecting to a computer. My objective is to not have to have major files (like self contained GPS programs) on both internal and external SD's, as I also switch back to stock base ROMs when I need everything working, which CM7 is getting closer to but has still quite a ways to go on the G2x (MT4G was way ahead on that from the start - probably because it was not burdened by half-assed LG drivers and framework, etc.

So if this zip is a non-starter with all but CM7 RC1 - will give it a go tomorrow. However, it looks like the Nightlies are finally starting to make some progress beyond RC1, so it would be good if this could also.

Update - just restored CM7 RC 1 and flashed over nightly 67 and this zip - works as advertised - but not on EM 2.3.4 apparently even though that is derived from CM7.
[T-Mobile LG G2x] khaos12:
my hero man
[T-Mobile LG G2x] shilent:
I'm no longer able to see my total and available space on my external SD card. Is this normal? Also when plugging into my PC, I can't access the internal SD card via USB mass storage.
[T-Mobile LG G2x] moshe22:
An anyone post the _externalSD card mod?
[T-Mobile LG G2x] arctic84:
I had the same issue with the internal storage, i cleared the cache and dalvik and it seemed to work? (i think) However being able to see the available space seems to be an issue
[T-Mobile LG G2x] death1246:
the framework or settings apk needs editing ill have a look at the github if not ill just decompile edit and recompile everything.

just give me a few school and life is main priority
[T-Mobile LG G2x] bdkinney:
Didn't see it looking through here...but it works fine on Faux's ROM.
[T-Mobile LG G2x] gaww:
Good to know. It did not work however on EB RC1 (with morfic's kernel) however - tried a number of times.

Note - I have no trouble seeing capacity and amount used on External SD.
[T-Mobile LG G2x] Lazerfingers:
When I try to DL the file you've posted (thank you, btw) I get the message, "your phone doesn't have internal storage" which is actually the problem that I came here to fix. Any way of working around this so that I can DL the zip file?
[T-Mobile LG G2x] PrettyPistol555:
Briefly, what is the reason that this wouldn't work with nightlies?

I really wish cm would just change the mounting behavior. But I'm sure u all feel the same.

G2X
[T-Mobile LG G2x] death1246:
Its just the build prop that needs editing and maybe the code changed ill see about keeping up with the nightlies
[T-Mobile LG G2x] fiffer1:
File System Like Stock Now!

This was just what I was looking for! Worked perfectly. Both internal mem and sdcard also show up in windows when connected, just as before.