• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Proposal/Theory for External SD storage solution on F6

Some notes:
1. Like crm701 said,
EDIT: use either -install OR initd. You dont need both.

2.
Fresh installed 4.4.4
Intd zip installed successful
Install zip successful
Rebooted
No monts no change.
After installing the rom, reboot into system to allow the rom to set up its /data. And the partitions need to be set up on the SD card already (1st=fat32, 2nd=ext4). The copier script needs valid data to copy from and needs valid destination partition to copy to. So do -initd.zip after getting back in TWRP (without triggering data wipe from using physical buttons to enter). After flashing the -initd.zip, TWRP will complain about unable to mount /data. In the file copying process, I mount /data read-only and unmount afterwards. Perhaps doing so leaves the partition in a state unknown to TWRP. I didn't bother trying to figure out the reason, since I assume the user is rebooting to the system anyway.

3.
The copier script does not create or format the partition. The script will remove all files before copying files unless the tag file .LGF6DataOnSD_DO_NOT_REMOVE already exists.
- So, to delete the tag file only, mount /sd-ext and use the file manager to delete /sd-ext/.LGF6DataOnSD_DO_NOT_REMOVE .
- To delete all files on the partition (without relying on the copier script), do:
Settings->check "use rm -rf..."->back to main screen->Wipe->Advanced Wipe->check only "sd-ext"->swipe to wipe->back to main screen->Settings->uncheck "use rm -rf..."->back to main.
- To format the ext4 partition in TWRP, make sure /sd-ext is not mounted. Then in terminal window, use the command:
mke2fs -T ext4 /dev/block/mmcblk1p2
Be careful with any command that formats anything.

4.
I did note a bit of lag, not much, on the browsers or the app stores scrolling up/down. I got thinking and tested my SD-card and got benchmark scores of 27-32 read / 8-11 write. The F6's intern. storage 45 read / 15 write. I was wondering if there is a way to have /cache and maybe /system mounted (or symlink?) back to F6's intern.? If so, would that possibly provide any boost for slow SD cards? I am not sure if it would provide any benefit, or if its possible or feasible, but I am curious.
Try to measure the random r/w performance. Using A1 SD Bench's (dunno if reliable, I just use one I found in play store) random I/O, I get roughly 10.84 MB/s reading and 0.41 MB/s writing on a Samsung class 6 (using internal memory option after mounted as /data) and 17.24 MB/s reading and 0.20 MB/s writing on the phone's internal storage. Class 6 cards are obviously not fast performers, but Samsung cards have very good random access characteristics. Maybe lag exists on my end too, but I haven't tested it enough to notice. Note that I'm not using ext4 for my /data on the external SD, so don't compare with my numbers. Compare your benchmark data between the internal storage and the SD card.
The internal memory on a low-end phone usually isn't very fast. I think it might be possible for a high-end SD card to have better performance numbers.
Also, only /data resides on the SD card. The other partitions like /system and /cache remain where they are, on the internal storage. The dalvik cache is normally in /data, so that might be relocated. I think CM puts that in /cache, so you might use CM to see if the lag occurs or disappears compared with the other KK rom. If it turns out a better SD card can actually help performance, perhaps /cache could be moved to the SD card as well.

Thanks for the feedback.
 
Holy smokes third time I am writing this considering fire fox catches on attempt to select all before I wish to paste Doing so would allow me to multi task with no worries of my long af reply getting removed from the system. anyways.
First off I do 110% appreciate the accurate and swift response from both of you.
(Thus will be summed up compared to the last two drafts)
Considering that I am a very obsessed music producer & the variables at hand (baby moms destroyed 5k gaming pc and the other baby moms destroyed the LG g2) I am left with the simple ms500 I purchased unanimously for $20.
Considering my needs for an operating system and internet I really could not expose the time to go back and follow both of your very well and swiftly explained instructions.
Per the fact I have learned a load in the last month modifying phones, Reading both instructions I know exactly where the problem lied. Unfortunately due to my time restraints I have been unable to actually physically test either method, although they are identical.
I WILL TEST IF NEEDED JUST ASK PLEASE.
I have reverted to my method of a LG "omega" f6.
Tr.apk (quick and easy and can save to my backup/spare ad card)
SSu
Twrp (gt)
Xperion 4.2.1
Freedom "overcooked"
Removed all unnecessary data manually, although only for RAM reasons. Not storage. Considering its all on system anyway.
External2internal (easy af starts at boot option and only swaps the necessary data leaving your internal still doing the labor. (No lag))
Device control (for switches to fast charge batter when screen is off and to run @ max (2000mhz with my self update of freedom(not recommended if u value your device and want it for long time)) cpu and gpu. few other useful settings and it is very light weight/non intrusive.
I'm still debating this app and wish it was generically integrated correctly with the values and such into freedom, the enterprise boosters (pro all in one) apk.
Roesoft ram expander apk(using /cache as vram (considering its on internal and not filled to max ever) pressing optimize (runs about 238mb which is plenty... the smaller your vram partition the faster it will write. besides it won't use a lot even if you allocate 4g.) And done. (Lowered minfreekb quit a bit)
Turn off led on soft keys
All vibrations off
Brightness customized specifically for me.
Used link2sd to uninstall everything that ran at any time in the background without consent / did not use.
Custom home launcher (only uses 30mb mem total)
And flashed an old Rom I found that increases download which on the test DL was at 42-125kb to 300-650kb.
O and I have a back up sd with Xperion and m11 gnapp and all the apps I find essential.
And freedom etc.
Like I said I will test I'd needed more then happy to but my system is perfect in my eyes. Can run mc4 Facebook and rr3 at the same time no lag.
 
Can tell I miss my g2 lol, well made one with a f6.
Edit: messaged external2internal dev and request a walkthrough and or support for 4.4.4.
Edit: bench @ 17 / 4 class 4 8g
Idk If it is against this forum agreement, but if not I will gladly link my paid apps via dropbox.
 
No dude you are good! Awesome setup you got rolling. I have already tested on a less tricked out CM11 (Just dl'ed and installed) and both of WV's latest mount .zips work. Also tested on KK 4.4.2, working, along with DANA JB 4.1.2 rom also working. If WV needs you, he will tell you.

Really my man I think you have exceeded the scope of the average user lol! I assume you to be a serious tinkerer and/or modder. I personally would like in the future to give your setup a go. (mind if I PM you?) and man, two baby mom's? A truly terrible and awesome thing, that.

I'm not sure what direction WV is going to go with his mod. He might declare success and call it a day or maybe keep tweaking it. Personally I think that there are some good additions that can be made. The hard part was getting a basically "universal" mount solution that was easy to install, minimal problems and most people could use with relative ease. Xposed was a biggie originally, but it was working on KK 4.4.2 and I am using it on JB 4.1.2 currently.
 
I used to freelance very high end gaming computers until my life train wrecked eg. Why I'm doing the mobile thing which is cool cause honestly these devices will make pcs obsolete very soon.
I do have a passion for making whatever os run at the most extreme heights of performance. Altho phone is so much easier almost no hardware!
Yes you can pm me but instead email me as you please. It would be more convenient in my opinion. Danielstevenurso@gmail,com
As of warranty voids efforts, I would like to see him/her work with the dev from external2internal and get 4.4+ running from the app in store. It will be available to a greater audience helping more users and I suppose if discussed profit sharing, if not wv should make his/her own gp app with very small add in app. The sheer amount of downloads I'm sure will compensate for all the hard work, I'd hope anyway.
If you would like to run my system just let me know: ))
 
I managed some how to make this magic happen for me earlier... It's the first time (outside of creating the partition)I witnessed evidence that ext4 was being used....

I nearly jumped for joy... Then.... Everything was slooooooowwww.... Because, I have an easily affordable sdcard ... And it was not worthy of such god like accomplishments ....

Format... Format... Format... Flash..

.... Hello PAC MAN ROM...!!!!

LOLL... boot loop.... Game over... Insert coin....

Back to mini kk after correctly following procedure.....

I actually tried to flash the SD miracle script again.. With a start....

I was denied.. Took it as a sign....... Oh well.. I tried...

Thank you for a chance at ending the storage problem.... At least I know it exists
 
I tried it with a kingston class 4 or 6 and it got super slow. But with my sandisk ultra u1 64 gb card i got on ebay for 30 bucks it works great. Be careful buying cards on ebay though. Alot of them are fake. Always check feedback, good and bad. Sometimes someome will call out fakes on good feedback.
 
Last edited:
I managed some how to make this magic happen for me earlier... It's the first time (outside of creating the partition)I witnessed evidence that ext4 was being used....

I nearly jumped for joy... Then.... Everything was slooooooowwww.... Because, I have an easily affordable sdcard ... And it was not worthy of such god like accomplishments ....

Format... Format... Format... Flash..

.... Hello PAC MAN ROM...!!!!

LOLL... boot loop.... Game over... Insert coin....

Back to mini kk after correctly following procedure.....

I actually tried to flash the SD miracle script again.. With a start....

I was denied.. Took it as a sign....... Oh well.. I tried...

Thank you for a chance at ending the storage problem.... At least I know it exists

Of course, SD card speed is important. If you use a card slower than the internal storage speed of the phone, the system will slow down when swapped. I have tried WV's dataonSD on almost every ROM for this phone, and it works on every one so far. I have it on PAC-MAN right now in fact (decent ROM, but it is a bit laggy, without the swap. Did Eversleyd fix the init.d tweaks under PAC settings?)
For me, the main reason it doesn't function is the SD-ext (partition 2) sometimes seems to get corrupted or something. Try deleting 'LGF6DataOnSD_DO_NOT_REMOVE' on the sd-ext and then flash 'DataOnSD-copy.zip'. If you already flashed the mount script OR init.d script (not both), it should be swapped on your next reboot.
 
it does....i proved it does....well..to myself..

the main issue is ...if you're using a sd card that was red tagged from big lots and its 32 gigs big........

it could be terabytes big{over kill and only a fraction would be seen if at all} ...

if it's not a faster class ...you're turning your F6 into a 386 with 8 megs of ram ..basically.....

you're choking your chance for it to work fast enough to fit in a "magical SD fix " description...

simple....sad SD...sad phone ...

even simpler yet!!! ~~~~~~~> WHAT crm701 SAID...

reading is fundamental
 
I hope someone can set me straight here. I'm no expert on this but I have done some rooting on my old HP Touchpad so I'm not unfamiliar with the concept. I have a D500 with firmware 10h and 4.1.2. It's my daughter's and I'm trying to make it more useful by increasing the memory.

Followed the steps in WarrantyVoider's comment #301 and #251.

  • Used Aparted to set up 32GB SD card with ~25GB fat 32 partition and 4GB ext4
  • Installed ADB on PC
  • rooted phone with towelroot
  • extracted the zip from comment #251 (/DataOnSD) and copied it to the SD card's fat32 partition
  • disconnected phone, turned on USB debugging, reconnected to PC
  • opened ADB window
  • typed adb devices, it showed my device
  • typed adb shell, got a prompt
  • typed these commands: (I think they "took", but I'm an amateur at this stuff)
  • su
  • cd /storage/external_SD
  • touch LGF6DataOnSD_INIT
  • cd DataOnSD
  • sh installer.sh both
  • typed "exit" twice to exit (versus three times as in directions...??)
  • disconnected cable
  • turned off USB debugging
  • (already had SuperSU installed)
  • restarted phone - BUT, it booted up as normal, no delay while it copied files as the directions said would occur.
  • rebooted a few more times, but total internal storage still shows 1.27GB
So... what do I do now? Any suggestions? Thanks in advance.
 
Haven't been on here for a while. Don't know if replies to the following are still relevant, but I'll comment in case others are interested.

It looks like this method will work for most of the android phones, not just this model (LG Optimus F6), am I right?
Yes, conceptually and theoretically, the method would seem to work for most of the android devices. In practice, I can't be sure unless it's tested on actual hardware. My implementation may need some tweaking to adapt to another device's environment.

The first potential problem is how to interrupt the normal booting process to mount our partition. KitKat's SELINUX made it tougher. It took a while and a lot of learning to come up with a solution (although there were workarounds since KK wasn't entirely locked down). I'd imagine Samsung's KNOX would be even tougher. The second potential problem is when the normal booting process is interrupted. If mounting of our partition occurs too late, some issues may come up, like sensors not working on the F6. Those issues may require additional workarounds.

Edit: In my implementation I did try to make it as generic as I can (i.e. nothing really device specific), so it might be usable as is on other devices. If anyone has tried or is trying to get it to work on another device, please let me know.

sad SD...sad phone ...
The class rating of an SD card has to do with its sequential r/w performance. Sequential performance matters when you do HD recording or copy large files. In our use case, it's more important to pay attention to the random r/w performance. That's why one of the prerequisites I've mentioned is to use a Samsung or SanDisk card. If you check (by doing or by googling) CrystalDiskMark's random 4k write benchmark data (or other similar benchmark) for a generic card vs. that of a Samsung/SanDisk, you'll understand why the phone is unusable with a generic card. I've tried a class 4 SanDisk before. While it's not fast, it's usable. Anyway, just some info to keep in mind for anyone who plans to use this hack.
 
So... what do I do now? Any suggestions? Thanks in advance.
I'll assume you got no errors after each step. So that means files are installed but the script won't copy your files. My guess is the script can't mount the partition. By the way, the three "exit"s thing: The 1st exits the superuser mode, the 2nd exits adb, and the 3rd (if you typed it) exits Windows' command window.

There's an init_debug.sh script you can try, post #256. Check the post to see if it helps you solve the problem. If you need further assistance, let me know where you get stuck.

You can also debug it manually, since you have adb. Start with "su" to get a "#" prompt. In the following, text following the "#" prompt is command and expected output follows that.
Check the absence of the temporary directory:
Code:
shell@android:/ # ls -ld /cache/DataOnSD
/cache/DataOnSD: No such file or directory
If the script has aborted, you might get this instead:
Code:
shell@android:/ # ls -ld /cache/DataOnSD
drwxrwxrwx root     root              2014-11-07 17:20 DataOnSD
If so, clean up:
Code:
shell@android:/ # rmdir /cache/DataOnSD/vfat
shell@android:/ # rmdir /cache/DataOnSD/ext4
shell@android:/ # rmdir /cache/DataOnSD
If you get any "No such file or directory" message, don't worry about it. If a command returns some other message you can't figure out, let me know.

Check installed files:
Code:
shell@android:/ # ls -l /system/bin/vold*
-rwxr-xr-x root     shell       13660 2014-09-07 04:07 vold
-rwxr-xr-x root     shell       87580 2014-03-24 05:21 vold-original
shell@android:/ # ls -l /system/etc/DataOnSD
-rwx------ root     root         1220 2014-09-11 15:42 vold
Check partitions exist:
Code:
shell@android:/ # ls -l /dev/block/mmcblk1p*
brw------- root     root     179,  33 2014-11-07 16:45 mmcblk1p1
brw------- root     root     179,  34 2014-11-07 16:45 mmcblk1p2
Make temporary directories:
Code:
shell@android:/ # mkdir /mnt/asec/temp1
shell@android:/ # mkdir /mnt/asec/temp2
Try to mount partitions:
Code:
shell@android:/ # mount -t vfat /dev/block/mmcblk1p1 /mnt/asec/temp1
shell@android:/ # mount -t ext4 -o nosuid,nodev /dev/block/mmcblk1p2 /mnt/asec/temp2
If the commands return any error message, something's not right. Otherwise, check partition contents:
Code:
shell@android:/ # ls -la /mnt/asec/temp1
<... DIRECTORY LISTING OF YOUR FAT32 PARTITION ...>
shell@android:/ # ls -la /mnt/asec/temp2
<... DIRECTORY LISTING OF YOUR EXT4 PARTITION ...>
Directory listing of the fat32 partition should show an empty file "LGF6DataOnSD_INIT" if the script never got to deleting it.

If everything looks okay, reboot and see if it works. If something doesn't look right, let me know what you get.
Good luck.
 
OK, I was puzzled when those zips didn't work. It turns out I messed up. The diagnosis was right. The treatment should have worked. But the manufacturing of the cure was flawed. Specifically, I left out a parameter (used "setenforce" instead of "/sbin/toolbox setenforce"). Sorry about that.

So in summary, use these zips for TWRP because TWRP has enforcing mode on. These zips put the recovery system in permissive mode so that installation would work. This enforcing/permissive switch is only for the recovery environment, and is not relevant for the regular booting of the rom. I don't think CWM was built using KK's environment, and consequently, this enforcing/permissive thing should be irrelevant for CWM. The old zips (#259 or #280) should work in CWM. I expect the enforcing/permissive command to silently fail for CWM, so the new zips should work in CWM as well. As usual, if anyone encounters or observes something unexpected, please let me know.

Attached Files
DataOnSD-install.zip (184.1 KB, 19 views)
DataOnSD-uninstall.zip (178.0 KB, 14 views)
DataOnSD-copy.zip (178.1 KB, 16 views)

So instead if using console I could use TWRP to this up, right?
If yes, what order do I install the zip files. Do install DataOnSD-install.zip 1st and then DataOnSD-copy.zip?
 
Yes, you can use TWRP. I've provided several installation methods. TWRP is one of them and is probably the easiest way if everything works as planned.

It doesn't matter which order to do the -install.zip and -copy.zip. But I suggest doing the -copy.zip first because it doesn't make changes to the phone's files. In case something goes wrong in the copying process, you can just start over after fixing the problem. Even if you do -install.zip first and -copy.zip fails afterwards, it shouldn't really cause big problems and you should still be able to try again.

By the way, the zips in the post you've quoted don't work with KitKat. (Edit: For KK, use zips from #319.)

Good luck and report back with success or failure if you can.
 
Yes, you can use TWRP. I've provided several installation methods. TWRP is one of them and is probably the easiest way if everything works as planned.

It doesn't matter which order to do the -install.zip and -copy.zip. But I suggest doing the -copy.zip first because it doesn't make changes to the phone's files. In case something goes wrong in the copying process, you can just start over after fixing the problem. Even if you do -install.zip first and -copy.zip fails afterwards, it shouldn't really cause big problems and you should still be able to try again.

By the way, the zips in the post you've quoted don't work with KitKat.

Good luck and report back with success or failure if you can.

It worked, I got 22Gb internal (from 32Gb class 10card).
 
Hello All:

Found this post while searching for a solution to the low storage messages. I tried the 11ext2internalsd method but it made copies on both internal and external memory. Lots of reading but I decided to try it. I put a few methods together and it works fine.
After partitioned the sdcard with minitool partition wizard, I installed the TWRP-F6.zip, then loaded your 2 zips (copy and install). Everything works as expected. Now to let the boys install FIFA and Asphalt...

Thanks for all your hard work!
 
I need help desperately I been trying to get this to work but I don't understAnd I flash both the zips the copy and install one and try to boot and get a bootloop go back to recovery and I rename the cold,original back to vold and it boots fine then k check my storage and it says I have 1.10 gb of 1.27 left so my question is what did I do wrong cuz I have a lot of storage left but it still only shows 1.27 also when I format my sd one is fat32 the other is ext4 but r they both primary? Please I really want to get this to work I'm on xperion anyone who can help me I'd greatly appreciate it
 
See
 

Attachments

  • 1415809848273.jpg
    1415809848273.jpg
    51.6 KB · Views: 107
Question: Can I now install KK 4.4.4 on the F6 without issues?
If you're asking in general whether KK on F6 has issues, check the thread for the particular rom you want to run for information. If you're asking about compatibility between this hack and KK, check post #319 and some of the posts by crm701. Let me know if you run into problems.

I need help desperately I been trying to get this to work but I don't understAnd I flash both the zips the copy and install one and try to boot and get a bootloop go back to recovery and I rename the cold,original back to vold and it boots fine then k check my storage and it says I have 1.10 gb of 1.27 left so my question is what did I do wrong cuz I have a lot of storage left but it still only shows 1.27 also when I format my sd one is fat32 the other is ext4 but r they both primary? Please I really want to get this to work I'm on xperion anyone who can help me I'd greatly appreciate it
Both fat32 and ext4 partitions should be primary. If you navigate to /dev/block/platform/msm_sdcc.3/ with a file manager, you should see entries: mmcblk1, mmcblk1p1, and mmcblk1p2 (plus more if you have more partitions).

To use this hack with a newly flashed rom, boot into the system first to let the rom set up its files in /data. After things are set up (with data written into the internal storage), reboot into recovery without triggering data wipe (i.e. don't use button combos to enter recovery unless using hroark13's home button mod). Delete files (at least .LGF6DataOnSD_DO_NOT_REMOVE if it exists) on the external ext4 partition. Then do this hack. See post #313.

If the rom supports both init.d and busybox, you can try the -initd.zip version in #319. The -copy.zip and -install.zip set should achieve the same goal, but does it differently. Like I've said before, zips in #309 should work with Xperion or other 4.1.2-based roms, but only zips in #319 would work with KK. Technically, zips in #319 should work with everything. One observable difference is the version in #319 makes an extra /system/bin/vold-copy (in order to deal with KK's selinux permission).

You should not be getting boot problems even if attempts to mount the partition fail. If you still have problems after doing the right steps, let me know (which rom version, which recovery, etc.) and I'll check to see if there's some new incompatibility issue.
 
Do I have to partition on a PC cuz the play store has a SD partition app . would I be able to use that ?
 
Back
Top Bottom