Howto: Using larger SD cards, or 'no more storage woes'

Delphis

Well-known member
Mar 21, 2011
86
12
0
Visit site
I thought I would post here about my experiences with setting up a new and larger SD card so that I could install whatever I liked and not run out of space.

For starters, this is on an LG Optimus V that has been flashed with a custom recovery. It is possible to modify the SD card without using the custom recovery but that makes it very simple. Since you need root to do this anyway, my as well just use a custome recovery. I am using the Xionia CWMA 12518.6.

PLEASE DO BACKUP YOUR DATA BEFORE YOU DO THIS. I feel that needs to be shouted since it's very important.

To do the backup:

The Titanium Backup program is ideal for this. Just set a schedule to back up all apps+data and hit 'Run'.

Once your phone is backed up, connect the USB cable, enable data storage and copy the TitaniumBackup folder to your computer. Of course, if there are other things you want to keep, like pictures etc. on your card, copy the whole lot.

Change the card (optional)

Now, you may well want to use a larger card. I am now using a Class 6 8GB card. Not noticed a lot of speed difference but the space is nice not to worry about.

Turn the phone off, and pop the little hatch on the SD card. It is latched in place by a spring, you need to push down and it will pop back up so you can remove it. Place the new card in and push it down carefully util it re-latches. Replace the SD card hatch.

Prepare the SD card

Boot phone to recovery (Press power, volume down and home and keep them there until the LG symbol shows up). Your phone should be in the recovery mode now.

Using the recovery menu, go to 'Advanced' and the 'Partition SD card'. You will want to use the 1024MB(1GB) setting. Set swap as 0. It'll sit there for a bit but it's working, be patient. Once done, reboot your phone. Apps that were on the SD card will not show up, don't worry, we'll fix that soon!

Restoring your stuff

Attach the USB cable again and enable data storage. Copy the contents of your backup folder on your computer to the new SD card area.

Load Titanium Backup and restore those applications and their data which were on SD card (e.g. Angry Birds :))

Your phone should be back where you were, but you have this 1GB ext2 partition.. now what? Well..

Using Link2SD to move things

Go to the market and download Link2SD. Using that program you can choose to move the less important apps (actually won't let you move system stuff) to the 1GB ext2 partition (which will effectively be 'hidden' from you). That way you can install what you like, link it to the SD's ext partition and save space. Your phone should also be able to boot up without the SD card present since nothing that important is on the SD card.

Once you link all applications you feel like, then reboot your phone (power off, power on). Then you should see your internal storage be more along the lines of 100MB or so.
 

aeroseek

Well-known member
Feb 11, 2011
66
10
0
Visit site
Yup I've done this using instructions on some other thread. My question though is, if your new "linked" SD card decides to crap out on you suddenly, what's the process to put everything back on a new card? Just format the new one the same way and links2sd will do the rest?

I also assume one would get all sorts of errors on bootup if the card were removed.
 

Kreatur3

Well-known member
Mar 2, 2011
660
40
0
Visit site
You would have to format and redo the apps for the new card. I don't think you would get that many errors as you dont have the system files on it. I imagine the launcher and widgets and such just wouldn't load. I use this method but haven't tested using no card...guess I could. :)

After trying the boot without the card in there are no errors. The phone boots fine and anything you had linked to the card simply doesnt show up in the app drawer. Shows stock launcher, whatever wallpaper you had on it.
 
Last edited by a moderator:

Delphis

Well-known member
Mar 21, 2011
86
12
0
Visit site
After trying the boot without the card in there are no errors. The phone boots fine and anything you had linked to the card simply doesnt show up in the app drawer. Shows stock launcher, whatever wallpaper you had on it.

Indeed. That's why I prefer this method to the 'everything' method of data2ext (which didn't work for me anyway). As we said, since no system files are on there then it will be okay.

Yup I've done this using instructions on some other thread. My question though is, if your new "linked" SD card decides to crap out on you suddenly, what's the process to put everything back on a new card? Just format the new one the same way and links2sd will do the rest?

I also assume one would get all sorts of errors on bootup if the card were removed.

I would certainly do the app backups with titanium as per usual. I don't know about link2sd putting everything back by itself though, it's likely you will have to restore the backups once the newly prepared card is in place.
 
Last edited by a moderator:

Kreatur3

Well-known member
Mar 2, 2011
660
40
0
Visit site
Update to my removing card and booting up. After replacing my card and booting up. It booted to the lock screen and then self rebooted again. Once it was back up everything was fine, all the apps showed on the drawer again. Only thing wrong was that it couldn't put my widget back on the homescreen but I expected that anyway. The launcher and its settings were all back too.

Before trying link2sd I tried Darktremor flash method which is supposed to do the commands for you to make data2ext work. It said everything installed correctly but looking at my internal storage (supposed to say whatever you added) was still small and was being eaten up by my apps, switched to link2sd and wont ever look back :D

Edit: Not trying to imply that Darktremors apps2sd doesnt work...just didn't work for me.
 
Last edited by a moderator:

aeroseek

Well-known member
Feb 11, 2011
66
10
0
Visit site
Update to my removing card and booting up. After replacing my card and booting up. It booted to the lock screen and then self rebooted again. Once it was back up everything was fine, all the apps showed on the drawer again. Only thing wrong was that it couldn't put my widget back on the homescreen but I expected that anyway. The launcher and its settings were all back too.

Yup, I tried to break it myself :) Just did a custom rom update, which of course didn't have link2sd enabled by default. I installed the link2sd app, rebooted and voila! All the apps are back :)
This was just an update so I didn't have to wipe, but it's nice to know that this method is pretty resilient.
 

Kreatur3

Well-known member
Mar 2, 2011
660
40
0
Visit site
Yeah, I change my ROMs ALL the time so I didn't mind doing a test on it. At this point it takes longer for me to flash the new rom than it does for me to put everything back on it lol...I need a new hobby.

PS: Has anyone gotten darktremors method to work?
Did you like it? I personally like having the interface you get from Links
 

Delphis

Well-known member
Mar 21, 2011
86
12
0
Visit site
Hey,

How can I do the partitioning manually?

If you need to ask, then I strongly suggest getting the recovery to do it for you (advanced/partition SD card). :)

All the partitioning is is a FAT (FAT32) (0x0c) partition for the most part of the card and then the last 1GB is Linux ext (0x83). Numbers in parentheses are the partition number, in cfdisk, for example. Just set those partitions and make filesystems in them. *Should* work, but I've not tried it on a phone. I never say something WILL work unless I've proved it myself :)

My 8GB card, partitioned with the Xionia recovery shows this when I view it with fdisk (by placing the microSD card in a USB reader)

/dev/sdc1 1 851 6835626 c FAT32 LBA
Warning: Partition 1 does not end on cylinder boundary.
/dev/sdc2 851 975 996030 83 Linux
Warning: Partition 2 does not end on cylinder boundary.

Don't worry about cylinder boundary warnings.

Anyway, just use the phone's custom recovery to do it and save headaches.
 

Delphis

Well-known member
Mar 21, 2011
86
12
0
Visit site
Link2SD does not move /data/data entries

Something I noticed is that despite linking different applications I was still noticing a reduction in the free space on the /data partition (the main phone data area). I have realized that Link2SD does not link the entries in /data/data, some of which can be quite large. My phone's 'com.android.browser' one was 28M (!). UPDATE: Phone didn't like me moving /data/data/com.android.browser for some reason

In order to combat that I went in and made a 'data' directory under /data/sdext2 and then set about copying the large and unimportant entries to the SD card. Then you delete the directory in /data/data and set a symlink.


mkdir /data/sdext2/data

Then for each application you wish to move:

cd /data/data
cp my.app.directory /data/sdext2/data/
rm -r my.app.directory
ln -s /data/sdext2/data/my.app.directory my.app.directory


If you're familiar with the above command line commands it's not a problem to do. If you don't know what you're doing with that then it's probably best left alone. To find out the 'worst offenders', when you're in the /data/data directory type

du -sh *

Hope that helps, but if you hose your phone it's not my fault. :D Do a nandroid backup first!

Also, if you have QuickSSHd, it makes things MUCH easier since you can rattle these off in a regular shell and copy/paste the directory names.

Update:
For some programs, you will have to link a subdirectory of their directory in /data/data for it to work. It's outlined here http://androidcommunity.com/forums/f4/updated-move-caches-to-sd-card-11167/ .. now of course you can use the /data/sdext2 partition instead of your main FAT32 area.
e.g.


cd /data/data/com.android.browser/
cp -a cache /data/sdext2/
cd cache
rm -r webviewCache
ln -s /data/sdext2/cache/webviewCache webviewCache


This seems to work just fine.

I was able to move some other apps' complete /data/data directory and symlink as above and they run fine as well, and phone boots as normal.

Before doing all this: Phone free space was 70MB, now it is 130MB
 
Last edited:
  • Like
Reactions: xabbott

bswann

Well-known member
Mar 9, 2011
107
2
0
Visit site
I tried this and used the recovery to partition the sd card ( which I assume is ext2 ) but, when I open up link2sd and select the ext2 or any of them I get this error-Mount script cannot be created, mount: no such device, ext2 may not be supported on your device. try fat32 on the second partition. I am running Rodimus v1.2.3 with picasticks kernal. Should I try and partition it to fat 32 or am I doing something wrong?
 

bswann

Well-known member
Mar 9, 2011
107
2
0
Visit site
I just tried to set the second partition to fat32 and then I chose the fat32 when I opened link2sd and it still is giving me the error message.

Edit: I finally got it to work, I had to set the second partition as FAT and it worked. Will I have any problems with it being FAT and not ext
 
Last edited:

duke3273

New member
Jun 27, 2011
1
0
0
Visit site
HELP I've been trying this for a couple of days and I can't get the advanced menu 'partition sd card' on my optimus v. attached are the screen pics of what I get when I press 'pwr, vol dwn and home button'.

Any help is greatly appreciated.
 

Raul720

Well-known member
May 7, 2011
167
11
0
Visit site
HELP I've been trying this for a couple of days and I can't get the advanced menu 'partition sd card' on my optimus v. attached are the screen pics of what I get when I press 'pwr, vol dwn and home button'.

Any help is greatly appreciated.

What recovery are you using?

Sent from my LG-VM670 using Tapatalk
 

nascar2428

Active member
Feb 12, 2011
34
1
0
Visit site
HELP I've been trying this for a couple of days and I can't get the advanced menu 'partition sd card' on my optimus v. attached are the screen pics of what I get when I press 'pwr, vol dwn and home button'.

Any help is greatly appreciated.

That looks like a stock recovery, if it is I don't think it will work. You will need to check out the how to root threads and install a custom recovery in order to do this using recovery as stated in the first four sentences of this thread.
 

slimeberto

New member
Mar 28, 2011
1
0
0
Visit site
So my question is this, is there any reason for 1 gb for the ext partion? I mean if I wanted more apps to appear as if they were in system memory via link2sd, can I make a 2 gb partition. Or is it a system limitation of no more than 1 GB.
 

mngl1500

New member
Jul 18, 2011
4
0
0
Visit site
OK guys since gingerbread is on its way for the opti s I did not want to mess arround and install a custom rom and mess arround with recovery mode to make a 1 gig partition on my 32 gig memory card.

Steps I did:
0) backup your apps using titanium
1) on your windows computer install EaseUS Partition Master home edition (since this version is free)
2) connect driod to the computer in usb storage mode
3) backup your memory card to the computer just in case
4) leave the driod connected to the computer and launch EaseUS Partition Master home edition and create a new PRIMARY partion on the end of your existing partition and make it fat32. It needs to be fat32 because I did not install a custom rom!
5) disconect the driod from the computer
6) install from market place link2sd
7) make sure you reenable usb debug mode
8) you may or may not need to reboot the driod I can not remember even how many times I rebooted it trying ext2 and not creating the new partition as primary
9) start link2sd and tell it your partion is fat32 and let it reboot your driod so it makes the mount script
10) start link2sd and move an app and test it. The first app I moved was facebook.

Again this was done on a stock rom opti v that was rooted and the only other thing I have done was remove some of the bloat crapware.
 

Vishwar

Well-known member
Jun 20, 2011
54
17
0
Visit site
Is it normal for it to take so long?

Partitioning an 8GB card, and I've been waiting for almost an hour now.
 
Last edited: