Post Reply

[TUTORIAL][Link2SD][ROOT]Updated! How to prep your SD card for it...Windoze Style

OP d33ps1x

20th April 2012, 08:57 AM   |  #151  
Senior Member
Thanks Meter: 12
 
225 posts
Join Date:Joined: Jun 2011
I've got an option to partition the SD Card via recovery including setting up sd-ext size and swap size.
it's very easy and everything is done on the phone.
21st April 2012, 11:20 AM   |  #152  
Miche1asso's Avatar
Senior Member
Flag Treviso
Thanks Meter: 58
 
199 posts
Join Date:Joined: Apr 2012
Quote:
Originally Posted by CaptainMaki

I've got an option to partition the SD Card via recovery including setting up sd-ext size and swap size.
it's very easy and everything is done on the phone.

I meant that I already have the swap partition. But when I log in the phone with adb I can't see any trace of it. It needs to be enabled. It seems it isn't automatic, the kernel doesn't check for it. Is there a (simple) way to make it available?

EDIT: never mind. It seems the paging and swapping module is disabled in most stock ROM.
Last edited by Miche1asso; 22nd April 2012 at 11:15 AM.
24th April 2012, 03:06 PM   |  #153  
hemang0000's Avatar
Junior Member
Thanks Meter: 0
 
3 posts
Join Date:Joined: Nov 2008
Thumbs up
hey thanks a lotttt, i am so happy man....before using this app i was having only 12mb free memory and now i am having 75mb free internol memory.so thanks a lot dear..u did a great job.....


Quote:
Originally Posted by d33ps1x

Rather than recreate the wheel...

Here is the developer's thread on Link2SD

Read it thoroughly!!!

Here are some links on Ext2, Ext3 and Ext4 file systems and why Ext 4 is preferable over Ext2 if you can do it with your ROM's kernel.

Ext2

Ext3

Ext4


Here's a debate over which to use. You be the judge and go with what makes sense for you.


What I'm going to take you through is creating the second partition on your SD card to be able to use it. We are going to use Minitool Partition Wizard Pro Home Edition (Freeware) to do this on a Windows machine.

There are other ways to do this including Linux, from recovery, etc, but this is a free and simple method that DOES NOT LOSE YOUR EXISTING SD CARD DATA!!!

First things first!

Repeat after me...

1/ I have a stock kernel in my ROM. My ROM only supports FAT32 and Ext2 for the second partition and I will not format it Ext4 and then come asking why it's not mounting correctly! I will format it Ext2 for best performance.

2/ I am not S-OFF or HTCDev unlocked AND rooted. I will NOT come asking if this will work or WHY it's not working at all!

3/ I WILL NOT TRY MOUNTING MY PHONE AS A HARD DRIVE TO DO THIS. I WIL READ THE INSTRUCTIONS AND USE A CARD READER!

So the prerequisites are:
1/ HTC Dev Unlocked OR S-OFF
2/ Permanently rooted
3/ A windows machine with Minitool Partition Wizard Pro Home Edition (Freeware) Installed or Hirens Boot CD which has a bootable windows version with PWPH installed on it.
4/ An SD card appropriate for the job. The faster the better! For 16 and 32 GB I really do recommend splurging on the Class 10...

Steps:
1/ Boot up your Hirens or Windows machine
2/ Make sure that Show Hidden Files and Folders is ON so you can see some of the hidden folders present on an android system's SD card
3/ Insert your Micro SD card into a reader and attach it to the computer
4/ Make a folder on your computer and back up your entire SD card's main partition to it including hidden files and folders JUST TO BE SAFE. (Remember if you do this right you won't have to lose your card's contents, unlike the recovery method.
5/ Install Partition Wizard Pro Home Edition or check that its on your Hiren's bootable windows cd
6/ Run Partition Wizard Home Edition.
7/ Look for your SD card along the bottom and identify your FAT32 Partition

8/ Right click on it and choose "Move/Resize Partition"
9/ Use the down arrow in the middle field "Partition Size:" to change the value and consequently the value of the "Free Space After: field as well until you have created around 1027 MB of free space. *Warning - Do not create free space before the first primary FAT32 partition!!! If you do discard changes and start over!
10/ Click "OK"
[IMG]http://dl.xda-developers.com/attachdl/97c7411fd1fdf03bee85f54f0203ebd8/4f4cec58/8/4/5/7/6/5/Shot_1_Resizing_FAT32.PNG/IMG]
11/ Identify the new unallocated space on the drive map.

12/ Right click on it and choose "Create"
13/ When you get the warning about the partition not being able to be used in Windows click "Yes" to continue

14/ Choose Ext2, Ext3 or Ext4 for partition type based on whether your kernel supports Ext4. If it does choose it! If you don't know choose Ext2 to be safe. I would avoid Ext3 unless you have to. 2 or 4 are preferred
*NOTE!!! You cannot resize an Ext partition after you make it. You can only move it around so choose your size wisely! I find a GB to be plenty and I have 150+ linked apps with 360 MB free on SD card partition 2 but you can have up to 2 GB.
15/ Make sure it is a primary not a logical partition
16/ Name it if you want.
17/ Click "OK" to continue
18/ Click the BIG "Apply" button in the top left of the window
19/ Choose "Yes" to continue from the pop up

20/ Let it do it's work.


Congratulations! Step 1 Complete!

Now to step 2:
1/ Eject and place your SD card back into your phone
2/ Boot up your phone
3/ Install Link2SD from the Android Market
4/ Run it
5/ On first run it will ask you the type of partition your second SD card partition is. Choose Ext2 or Ext4 depending on which you made it.
6/ Follow the directions to reboot your phone

Congratulations! Link2SD is now working on your phone!

When you click the menu button in Link2SD and choose "Storage Info" you should see three memory spaces. Internal, SD Card, and SD Card 2nd Part.

At this point I recommend you Menu click and go to Settings and choose "Autolink" to automatically link programs (.APK), dalvik cache files (.DEX) and library files (libs) to your SD Card 2'nd partition when a new program is installed.

Now for some strategy!

You say, "I've got all this external space! Why bother putting any programs on the internal space?"

Well...SPEED MAN! SPEED!

I keep Launchers, Widgets, Background processes like Titanium Backup, etc, on the internal as space allows to allow for speed when booting. The internal memory is faster than your SD card and keeping these programs here helps a lot in speeding up your boot time. This is an option with Link2SD that you DON'T have with Data2SD or Data2Whatever!

You can also keep commonly accessed programs like Tapatalk for example, on this internal fast memory.

You can also mass move by multi selecting, several programs to and from either internal, SD card, or SD card second partition. Ideal for your initial move to your new second partition of your apps pre-installed prior to link2sd.

People wanted instructions for a third swap so see post two for additional steps.

Troubleshooting:

*If you have issues with your primary SD card partition not working right or perhaps you decided to wipe the whole card and create them both/or all three from scratch, remember that this FAT32 partition 1 has to be set ACTIVE and all partitions have to be primary not logical.

*If you cannot mount Ext2 or Ext4 make the second partition FAT32. It will work for all Wildfire S Models and all ROM's. Try the others first as they are preferred for performance and stability.

*If you don't have a card reader it's been reported that you can use your phone in hard drive mode to achieve the same thing, followed by a reboot but I have heard many cases where this causes troubles so I personally don't recommend it but hey. You gotta do what you gotta do.

*Some users are reporting with MarvelC's that they needed to use Ext3 so I have updated the tutorial to reflect this.

*If you don't immediately see a change in internal memory after linking apps relax. It will show up. Sometimes it just is a little delayed.

That's pretty much it for now.

Enjoy and if this tutorial helped you or you like it, please click "THANKS"!

25th April 2012, 10:58 AM   |  #154  
Miche1asso's Avatar
Senior Member
Flag Treviso
Thanks Meter: 58
 
199 posts
Join Date:Joined: Apr 2012
In case anyone is interested I have definitively figured out what is stored where:

APPLICATIONS:
/system/app: The ROM partition. It keeps the system applications.
/data/app: The internal phone memory.
/mnt/asec: The SD (FAT32) memory.
/data/sdext2: The Ext2/3/4 memory, used by Link2SD.

Now, application XYZ in sdext2 will have a symbolic link to it in /data/app:
/data/app/XYX --> /data/sdext2/XYZ

DALVIN CACHES:
/data/dalvik-cache: Internal. It keeps the Dalvin Cache for all applications but the ones in the ext partition.
/data/sdext2/dalvik-cache: External. It keeps the the Dalvin Cache for the linked applications only.

There are no links for the Dalvin Cache.

Thus, and this is what it took me ages to figure out, for the best optimization of the internal phone memory it is better to have all applications linked. Because the applications in the SD partition do use Dalvin Caches in the internal phone. Considering that the SD partition gets unmounted when the phone is connected to the USB, to use it is the worst of all scenarios. Just make a large sdext2 partition (for now I have 2GB) and skip the SD one as if it didn't exists. Just buy a larger SD card. They are cheap anyway. I bought a Class 10 16GB for less than 20 euro.

Then one may decide to install the widgets and alike applications in the internal memory, in case, for any reason, the SD card isn't available (burned, needs reformatting with the phone alive, etc). They are usually quite small. And they can always be moved to the sdext2 if out of space.

Sorry if this is a repetions but Google didn't help at all.
Last edited by Miche1asso; 25th April 2012 at 11:02 AM.
29th May 2012, 02:39 AM   |  #155  
Member
Flag Santo Domingo
Thanks Meter: 10
 
47 posts
Join Date:Joined: Feb 2012
More
Thumbs up After many tries!
Finally got the hang of it. After I partitioned the SD card and chose ext2 on Link2SD, to reboot I chose the Quick Reboot button on the same app instead of rebooting it using the power button because I get the same message every time I reboot it that way.

Hope this helps,

Thanks!
1st June 2012, 06:35 PM   |  #156  
woprr's Avatar
Senior Member
Thanks Meter: 8
 
153 posts
Join Date:Joined: Jul 2011
Exclamation
Quote:
Originally Posted by d33ps1x

We are going to use Minitool Partition Wizard Pro Home Edition (Freeware) to do this on a Windows machine.

Sorry, Your partitioner is misconfigured or too old because it uses legacy minimal partition alignment, see the "Starting LBA 63" here:
http://dl.xda-developers.com/attachd...o_Its_Work.jpg

Modern Linux kernels need optimal at 1MB aligned partitions on block devices for optimal performance, especially if You want performance with Class 10 cards and ext4 with better than ordered data mode.

So better boot a Linux live cd and use (g)parted (which can resize ext partitions respectively).
Last edited by woprr; 1st June 2012 at 06:46 PM.
2nd June 2012, 11:29 AM   |  #157  
Miche1asso's Avatar
Senior Member
Flag Treviso
Thanks Meter: 58
 
199 posts
Join Date:Joined: Apr 2012
Great. How much in performances loss are we talking here? If it is a 10% I don't mind, but I don't understand why my Class 10 (Samsung) Micro SD is reported writing at 4-6MB/s. Reading is fine (up to 19MB/s). Do writing performances deteriorate with time (like with SSD?). If so any way to fix it?
3rd June 2012, 09:22 AM   |  #158  
Junior Member
Thanks Meter: 2
 
23 posts
Join Date:Joined: May 2012
Revert
nice tutorials sir. it really works. but my question is how do we revert the process?
i tried it and it worked. my first try was only 500mb for ext2. i found out that
500mb is not enough. i think i need at least 1gb for my ext2. that's why i want to
revert it to add more storage for ext2. my ext2 is already full. thanks.
3rd June 2012, 10:37 AM   |  #159  
Miche1asso's Avatar
Senior Member
Flag Treviso
Thanks Meter: 58
 
199 posts
Join Date:Joined: Apr 2012
Quote:
Originally Posted by denz1209

nice tutorials sir. it really works. but my question is how do we revert the process?
i tried it and it worked. my first try was only 500mb for ext2. i found out that
500mb is not enough. i think i need at least 1gb for my ext2. that's why i want to
revert it to add more storage for ext2. my ext2 is already full. thanks.

Backup all your applications in the SD (FAT32) partition (you need a backup application), backup (copy) the SD partition into the PC, reformat the Micro SD, copy back the FAT32 content, restore the applications.

Link2SD should be set to automatically link all applications. Still… that doesn't work for me, at least not on my phone (Galaxy Next Turbo/Pop Plus GT-S5570I). It seems the setting makes little influence on where the applications will be eventually stored. That means the restore may take a couple of rounds:

- Restore all missing applications
- You get the Memory full error
- Link to SD all applications
- Reboot (that should move the dalvik cache)
- Rinse and repeat.
3rd June 2012, 11:55 AM   |  #160  
Junior Member
Thanks Meter: 2
 
8 posts
Join Date:Joined: Jun 2012
thank you very much for this thread. i now have all apps on the second partition and only important apps (superuser, titanium backup...) on the internal memory.

but i still have a problem as the internal memory is still lacking (1 mb) and it changes alot (don't know why)! does the apps still have any memory on the internal memory or what??! (i have about 70 apps on the second partition)

Post Reply Subscribe to Thread

Tags
ext2, ext4, link2sd, partition
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes