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

Root Increase available gigabytes

I am more of a do-er and troubleshooter as I go than a teacher, so I apologize if this guide is not clear. Hopefully you can use your own intuition and skills to understand what I'm saying as I cannot articulate well and may be a little messy with this guide. That being said, please read and be sure you understand it fully before attempting it. Don't blame me if something breaks. :) in fact, I suggest using the recovery screen to do a full backup of all your data, boot, system and store it safe on a PC.

I know LG Optimus don't come with much memory but I wanted to tell you that you can edit the phone to boot from the external SD card, maybe this is known already, but I am the only one I know who has done this. This is better than using an app to move apps to external because it makes the phone actually read as having much more space available in system, and data. I recommend a class 10 card for speed, but class 6 may be enough I haven't tried a 6.
You need to edit your boot rom. The boot rom is lokified and needs to be unlokified, unpacked, repacked and re-lokified with your mods. You can use a Loki tool

You will need to dump the boot image from a recovery screen like TWRP. Any recovery with terminal and boot image dumping is great. Save the image somewhere safe like on your PC or the second smaller partition of the ExternalSD card. Don't save it on the large external partition because that's going to get overwritten anyways.
Example: Partition 1 will be called /dev/block/mmcblk1p1 can be large
Partition 2 /dev/block/mmcblk1p2 can be small, save tools and images here
you can make these partitions from a Linux PC and card reader or using AParted in the Google Play store.

the extra partition will be handy for future but not really needed if you use the internal phone memory to store the tools and images to do the unpacking and repacking of the boot image we saved.

http://rootzwiki.com/topic/41841-lo...tom-boot-image-on-att-and-verizon-galaxy-s-4/ to do the unlokify and relokify proceedure.

You can use Carliv Image Kitchen for Android
http://forum.xda-developers.com/android/development/tool-cika-carliv-image-kitchen-android-t3013658

The boot image cannot be unpacked and edited if it is lokified.
so you need to unlokify it.

you need a Micro SD card (Class 10) or better, whatever fits your preferences. I used a Sandisk 64Gig Ultra (10) with two partition. One is 15 gig that it reads as FAT. The rest is 43ish which is the boot ext drive.

boot to a recovery on your Optimus F3 that has a terminal, I'm using TWRP

in the terminal you will find using the command mount that /data is mounted as something like /dev/block/mmcblk0p15
this means that the data directory is mounted on the internal device 0 and partition 15.

we want to change that to mount from the external SD card, but only after we have done a dd copy of the /dev/block/mmcblk0p15 to the external SD card. Doing this will copy all of your data needed for boot and file structure over to the ExtSD card.

you can do this many different ways, from terminal in recovery, or you can dump the Data partition into a file to do this on a PC/Linux PC using a card reader. Whatever you decide.

Example: from TWRP Recovery terminal: dd if=/dev/block/mmcblk015 of=/dev/block/mmcblk1p1

this will copy the /Data partition to the external SD card partition 1. (Assuming all phones mount at the same partition, mine may be different so use caution and research of your own.)

Now that the data is copied, I like to put the ExtSD card into a linux PC and shrink, then grow the partition just to update the size difference in case the partition info is inaccurate from the copy. I don't think this is necessary but I did it anyway. You decide if you want to or not.


You can do this next part in Windows, Linux or from the TWRP Terminal. I did it on Linux for convenience of typing and editing :

use the loki tool to de-lokify the boot image you copied in TWRP.

use carliv image kitchen to unpack the delokified boot

edit the fstab.qcom in the extracted files so that Data is mounted from your external SD card that we DD the data to. So if you see /dev/block/mmcblk0p15 /Data change it to/dev/block/mmcblk1p1 /Data or whatever your individual requirements are. It could be that you partition many partitions on the ExtSD card, then the number may be different according to your desires. If you don't know the partition number, in terminal from TWRP use command blkid and look for it.
use the loki tool to re-lokify the boot image

This following part needs to be done from the recovery mode of your phone.
boot into your TWRP recovery on the phone and open terminal. in Terminal find the Loki tool (you may have saved it on the phone internal memory. Or if you made multiple partitions on the ExtSD card you can save the loki tool and files there, and mount that partition, then use the tools. use it to flash the new boot image.

when done you should be able to reboot the phone. It will boot from External SD card if done properly.
if it is broken, you have saved a backup of the data partition and boot image. Just use TWRP to re-flash the backups and try again, maybe there's something you missed.

Finally, enjoy extra storage.

memory.jpg
 
  • Like
Reactions: Drickon
Very interesting solution.

I have edited boot files before in Linux and Windows, as well as set up partitions on drives to boot Linux and Windows. But don't know anything about Linux commands and the whole Linux directory structure is very confusing to me. So I would probably need to learn more before attempting this.

Just one quick question though... when you say "in the terminal you will find using the command mount that /data is mounted as something like /dev/block/mmcblk0p15" I tried to find this in TWRP but didn't know where to look or what to do.
 
Upvote 0
I have TWRP 2.8.0.0
When you boot into TWRP go to Advanced.
then Terminal Command
it'll ask which directory you want to be in. Any is ok for this so press Select

from here type in mount and return/enter

it will list all the mounted partitions and where the data directory is mounted.
for me it was /dev/block/mmcblk0p15 on /data


the following isn't important, but might be useful to note that even though you edit the fstab.qcom in the boot image, recovery is a different image and still uses the original mounting sources, but this doesn't affect booting from the extsd, so even though my true /data is now on my external card and boots from external, TWRP recovery boots up and mounts the original internal mmcblk0p15 as data. This isn't a problem for me and if I need to I can use terminal to mount it correctly. Someone could probably edit the recovery image too so that it sees the extsd as /data but I didn't want to risk bricking it as I don't have an original rom.
 
  • Like
Reactions: Drickon
Upvote 0
If this works like it sounds, it must be a major breakthrough! So, once this is done, the phone's system and apps and even hardware thinks that the external SD is the internal? And, at class 10 SD would there be any slow down compared to using the real internal? Are SDXS cards compatible? (I thought 32G was max for the external in this phone) Can all of this be done with the latest Clockworkmod Recovery?

I have had this phone for a long while and I have rooted and tweaked and linked and blah blah, and I love it, but the storage issue hurts my soul.

I am SO excited to try this! I have never bricked a phone and I have played with a lot of root stuff, but never messed with terminal or linux before..
 
Last edited:
Upvote 0
I have TWRP 2.8.0.0
When you boot into TWRP go to Advanced.
then Terminal Command
it'll ask which directory you want to be in. Any is ok for this so press Select

from here type in mount and return/enter

it will list all the mounted partitions and where the data directory is mounted.
for me it was /dev/block/mmcblk0p15 on /data
Thanks. Mine is the same. But then for some reason while I was scrolling the text in terminal, my phone locked up and I had to pull the battery to reset it. :eek:
 
Upvote 0
If this works like it sounds, it must be a major breakthrough! So, once this is done, the phone's system and apps and even hardware thinks that the external SD is the internal? And, at class 10 SD would there be any slow down compared to using the real internal? Are SDXS cards compatible? (I thought 32G was max for the external in this phone) Can all of this be done with the latest Clockworkmod Recovery?

I have had this phone for a long while and I have rooted and tweaked and linked and blah blah, and I love it, but the storage issue hurts my soul.

I am SO excited to try this! I have never bricked a phone and I have played with a lot of root stuff, but never messed with terminal or linux before..

I've only used TWRP, but it should theoretically work with CWM. I can't say for sure.
There isn't a big slow down in performance with a class 10, but even a slight slowdown wouldn't stop me, the extra space is worth it. One issue I ponder about is the technology, is a micro SD card less stable or capable of less writes than the phone's internal memory? If so this may pose a problem in the future after many writes and rewrites, but so far so good and it's been a couple months with the phone "upgraded" this way.
I believe when they say max supported is 32G, it just means the max they've tested, so it's more like maximum theoretical.
the 64G is working in mine

Thanks. Mine is the same. But then for some reason while I was scrolling the text in terminal, my phone locked up and I had to pull the battery to reset it. :eek:

That's strange, did you get it to work finally?
 
  • Like
Reactions: Drickon
Upvote 0
my bad not a script the sd swapper.
Oh, OK. I dunno. That's my question too actually. I read somewhere that people using SD Swapper are still needing to use Link2SD, so it's like not a real solution? This seems like a more "hard-coded" solution but a bit out of my "comfort zone". Especially since I have experienced crashes while in TWRP on my phone.:cool:
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones