[GUIDE] How to Remove SD-EXT Via ADB {Create EXT / Swap Via ADB} [05/03/2013] - HTC Pico (Explorer)

This article is for people with rooted Android phones. Everyone else please ignore. There are dozens of ways to remove SD-EXT Partition your SD card and I would like to share the one that has worked for me every time.
Requirements before getting started:
Custom Recovery (TWRP/ CWM etc).
SD Card (Any Class).
Android Device Bridge(ADB): Comes with the Android SDK.
These instructions apply to both the Windows command prompt and the Mac terminal.
As you can see from my screens, I was using Windows Vista. You can Remove/ Delete your SD-Ext Partition at any time, but you might as well do it before you flash a new build of Android and You want a different size SD-EXT Partition.
IMP: As always, back up your data when performing any hacks.
Formating your SD card will erase all data on it.
I split this guide into 5 steps, but it is not as difficult as it looks. Read the whole thing before starting.
Step 1: Connect your phone to your computer via USB. Reboot into recovery mode.
Command: adb shell reboot recovery
(this will reboot your phone into Custom recovery image.
Command: adb shell
(type this after your phone has booted and on the recovery screen. it should take you to a # prompt)
Step 2: Open parted to partition your SD card.
Command: parted /dev/block/mmcblk0
(opens parted and mounts your SD card)
Step 3: Check the size and partitions of your SD card.
The print command will display this info. You can see the size of my SD card is 7969 MB (8 GB). I have 1 partition which is fat32. If your SD card is blank and no partitions are listed, you can skip to Step 5.
Command: print
(displays SD card information)
Step 4: Remove all existing partitions. If you have multiple partitions, remove each one at a time.
Command: rm 1
(deletes partition number 1)
Command: rm 2
(if needed. keep going till all partitions are removed)
Command: print
(check when you are done to make sure all partitions are removed)
Step 5: Check the sizes of your SD Card.
Use the command print again to display the partition sizes (There should be no partition).
If you made any mistakes you can return to Step 4 and remove them.
Command: print
(displays your partition information)
IMP: Now Remove USB Cable from Phone and go to WIPE Menu in Recovery and Format/ Cleat SD Card..
Now Go to Advance Menu and Partition SD Card with What Size / Swap / ext You Want..
[Additional GUIDE]
How to manually Partition your SD CARD {EXT 2/ 3/ 4 And Swap / Linux} Via ADB.
For SD-EXT Partition Please Continue After Step 5 (Don't Remove USB cable from PC).
Step 6: Create your new partitions.
You can make these any size, but the most common setup is
32 MB linux-swap partition,
512 MB ext2 partition, and
remaining free space as a fat32 partition.
In order to work properly, the partitions must be created in this order:
fat32,
ext2,
linux-swap.
The linux-swap partition is used for a swap file on some builds. Not all builds use linux-swap, but I create one just in case I ever need it.
The ext2 partition is where your apps will be installed. I use 512 MB which gives me plenty of room but you can go larger like 1024 MB if you want.
IMP: Parted only creates ext2 partitions and we can convert them to ext3 or ext4 later.
When using the Linux command mkpartfs, you must tell it where to start and and end each partition. This can be done by taking the total SD card size and subtracting the linux-swap then ext2 partition sizes. See the following example for my 8 GB card.
Command: mkpartfs primary fat32 0 7425
(start is 0 and end is Total C)
Command: mkpartfs primary ext2 7425 7937
(start is Total C and end is Total B)
Command: mkpartfs primary linux-swap 7937 7969
(start is Total B and end is Total A)
For Example
7969 Total A
-32 Linux-Swap
7937 Total B
-512 EXT 2
7425 Total C
* If You Don't want Linux-Swap partition follow this
7969 Total A
-512 EXT 2
7457 Total B
IMP: Kindly Change Values for EXT / Linux-Swap Accordingly if You want more or less space for Partitions.
Step 7: Check the sizes of your partitions.
Use the command print again to display the partition sizes.
If you made any mistakes you can return to Step 4 and remove them.
Command: print
(displays your partition information)
Step 8: Exit parted and upgrade your ext2 file system to ext3.
For most users this is the final step.
I suggest all users upgrade to ext3.
Its main advantage over ext2 is journaling which improves reliability and eliminates the need to check the file system after an unclean shutdown.
Command: quit
(exit parted and return to # prompt)
Command: upgrade_fs
(script to upgrade from ext2 to ext3)
Step 9 (Optional): If you wish, you can upgrade your ext3 partition to ext4.
Skip to Step 10 is you wish to use ext3.
The file system (EXT 4) offers enhancements like delayed allocation.
Command: tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2
(enter this command from the # prompt)
Command: e2fsck -fpDC0 /dev/block/mmcblk0p2
(run e2fsck after tune2fs. wait for the file check to finish)
Step 10: Finished.
Check your work with print
Command: parted /dev/block/mmcblk0
(open parted again)
Command: print
(check all your system partitions and their sizes)
Command: quit
(exit parted)
Command: reboot
(reboot your system to the operating system)
[Guide] How to Install SDK / ADB..
http://forum.xda-developers.com/showthread.php?p=37805872
Credits:
akshat.shenoy (For SDK / ADB installation GUIDE).
XDA.
Screen Shots Added in Second Post.

Re: [GUIDE] How to Remove SD-EXT Via ADB
For Step 1 to 5:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
For Step 6 to 10:
Sent from my LIL RDX using XDA premium

Re: [GUIDE] How to Remove SD-EXT Via ADB
Awesome man. Thanks ..
Didn't know of this method.. us there a way to partition via adb?
Sent from my HTC Explorer A310e using xda app-developers app

Re: [GUIDE] How to Remove SD-EXT Via ADB
akshat.shenoy said:
Awesome man. Thanks ..
Didn't know of this method.. us there a way to partition via adb?
Sent from my HTC Explorer A310e using xda app-developers app
Click to expand...
Click to collapse
Yes there is a simple method..
If u wanna know I ll post that too..
Sent from my HTC Explorer using Tapatalk 2

Re: [GUIDE] How to Remove SD-EXT Via ADB
R. SAINT said:
Yes there is a simple method..
If u wanna know I ll post that too..
Sent from my HTC Explorer using Tapatalk 2
Click to expand...
Click to collapse
Nice tutorial.
Screenshots are really helpful for me (as I know nothing about adb).
Thanks bro..
And yeah post it too.. :thumbup:
Edit
Some questions
1. So wiping SD ext comes under rm2 right... and it does nothing to partition fat32(1)
2.parting with Adb... will it cause erasing all data in SD card? And partition of any type ext3 ext4 ..?
Sent from my HTC Explorer A310e using xda app-developers app

Re: [GUIDE] How to Remove SD-EXT Via ADB
ptcpayme said:
Nice tutorial.
Screenshots are really helpful for me (as I know nothing about adb).
Thanks bro..
And yeah post it too.. :thumbup:
Edit
Some questions
1. So wiping SD ext comes under rm2 right... and it does nothing to partition fat32(1)
2.parting with Adb... will it cause erasing all data in SD card? And partition of any type ext3 ext4 ..?
Sent from my HTC Explorer A310e using xda app-developers app
Click to expand...
Click to collapse
rm 1 - SD Fat32
rm 2 - SD-EXT (if available)
rm 3 - Swap / Linux (if available)
Partition via ADB delete all ur SD data.. I hv mentioned that in Guide already.
I ll add tutorial for Partition ext 2/ 3/ 4 and swap partition ASAP..
Sent from my LIL RDX using XDA premium

Or else, we can directly do it with Mini partition tool..!(duh!)

unknown_anonymous said:
Or else, we can directly do it with Mini partition tool..!(duh!)
Click to expand...
Click to collapse
U can.
Basically This guide is for ppl who r nt depended on different softwares.
Sent from my HTC Explorer using xda premium

Related

[REF] manual partition of sdcard w/parted,goto ext3/4 from adb. no liveCD req'd

i needed a way to format my sdcard & install swap capable rom with no card reader...grrr...my gray hair is your gain!
READ THIS FIRST: i wrote a script that automagically partitions the sdcard. get it here.
if you still want to partition manually, read on.
i did this with a BLANK 8gb card and a fresh rom install, so i had no data to lose..be careful. i take no responsibility for what happens to your phone, sdcard, data, sanity, etc if you follow these instructions. remember to backup your sdcard to your pc before you begin.
technically, you don't need adb for this, as you can partition your card in the recovery console on the g1(...not the terminal app) using the commands in this post. however, once you wipe your sdcard, you may want some way of getting a new rom onto the phone. ;p
these instructions apply to both, the windows command prompt and the mac terminal.
just about any size and/or class of sdcard will work, but you will want to use a class 6 cause it's wicked fast. 16gb transcend sdcards seem to be giving some people trouble and throwing "ERROR: input/output error during write on /dev/block/mmcblk0" when trying to partition. use them at your own peril.
the example in this thread is for MY sdcard...YOUR sdcard will be different and the partition sizes may vary. apply ur information(sdcard size, partition size) when appropriate. following the instructions in this post will erase ALL DATA on the sdcard before creating new partitions.
read the ENTIRE post VERY carefully BEFORE proceeding or asking questions...
#####
note #1: all typed commands are in bold. adb/console commands in black. windows prompt commands in green.
note #2: if all else fails...remove all partitions and create new. this seems to solve 99.9% of non-hardware related problems.
note #3: if note #2 fails...try 'mklabel msdos'. see below for more info.
note to ext3/ext4 fs users: parted does NOT support CREATING ext3/ext4 partitions..you MUST create with ext2 and upgrade. also, parted CAN RESIZE ext3 partitions, but with restrictions. check out the table on the features page, of their website. i will NOT go into resizing partitions in this post as there are many variations...
#####
need to backup your ext partition?
note: these backup commands must be run while phone is booted, not recovery.
to backup your ext partition to your current directory: adb pull /system/sd/ %CD%\sdbackup
to restore back to sdcard: adb push %CD%\sdbackup /system/sd
#####
having issues? please post the following when asking for help:
output from the following commands
parted /dev/block/mmcblk0 print
parted /dev/block/mmcblk0 check 1, if any.
parted /dev/block/mmcblk0 check 2, if any.
parted /dev/block/mmcblk0 check 3, if any.
what rom are you using?
what brand/size/class sdcard?
can you see fat32 partition on the phone? ie. through andExplorer or similar..
#####
materials:
g1 with cm-recovery-1.4
sdcard <--class 6 recommended(adata makes good ones...they max out the g1 hw in terms of speed)
rooted rom with ext3/4 support & swap capability <--recommend CyanogenMod
adb
fingas(or toes if you're this guy)​
part i - prepare the sdcard:
boot your g1 into recovery (using home + power)
drop to console (alt + x)
open windows command prompt and enter:
adb shell
now at the # prompt enter:
parted /dev/block/mmcblk0
you are now in parted...hopefully. if not, check your typing, start over, do more research, or give up.
to find out the size of your sdcard & the partitions that it contains, enter:
print
you may receive a message from the program:
Code:
"No Implementation: Partition 1 isn't aligned to cylinder boundaries. This is
still unsupported."
the error says it all.. ;P
not sure what this means exactly(besides our partitions being out of alignment), but it is not good for our purposes.
also, if your "Partition Table" is reported as being "loop", i suggest repairing with the following procedure as well since it seems to be causing some problems too.
to fix, type:
mklabel msdos
it may give you some guff about:
Code:
Warning: The existing disk label on /dev/block/mmcblk0 will be destroyed and all data on
this disk will be lost. Do you want to continue?
parted: invalid token: msdos
answer y to the 'yes/no'..
and then:
Code:
New disk label type?
confirm with: msdos
re-enter: print​
you should get something like:
Code:
print
print
Model: Unknown (unknown)
Disk /dev/block/mmcblk0: 7969MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 512B 7469MB 7469MB primary fat32 lba
2 7469MB 7969MB 500MB primary ext2
or, if your sdcard is new/empty you'll get:
Code:
print
print
Model: Unknown (unknown)
Disk /dev/block/mmcblk0: 7969MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
if no numbered partitions come up, move onto next step. if not, delete ALL partitions that you see with the rm command. it has the format: rm <partition number>.
in this case:
rm 1
rm 2
the fourth line in the 'print' command output shows you the total size of sdcard in MB(or GB if you card is large)..mine says: Disk /dev/block/mmcblk0: 7969MB
use this number(XXXXMB) and do some simple math to get the size of your partitions.
7969MB - 32MB linux-swap = 7937MB
7937MB - 500MB ext2 = 7437MB fat32​
32MB seems to be alright size for swap, though it can be lower depending on your sdcard size.
500 MB is a good round number for the ext2 partition...no need for more.
that leaves us with 7437MB for fat32 storage.​
part ii - create partitions:
for a2sd & swap to work properly, partitions MUST be created in this order: fat32, ext2, linux-swap
the command to create partitions is mkpartfs...command format is:
mkpartfs <partition type> <fs type> <start> <end>
note#1: the <start>/<end> numbers in the following section correspond to the italicized numbers above. your partition information will most likely be different.
note#2: by default parted assumes ur using MB as the units in commands. say you have a card that is LARGE(like 16GB) and want a partition of 12GB...all you do is use the proper units(ie. mkpartfs primary fat32 0 12GB) and parted will oblige. you can use decimals as well...if you want a similar setup to my calculations above, you would have a fat32 partition of 15.4GB(ie. mkpartfs primary fat32 0 15.4GB), 500MB ext2, and 32MB swap
now we create the partitions:
mkpartfs primary fat32 0 7437
mkpartfs primary ext2 7437 7937
mkpartfs primary linux-swap 7937 7969
to check out our handy work, enter:
print
output should be similar to:
Code:
print
print
Model: Unknown (unknown)
Disk /dev/block/mmcblk0: 7969MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 512B 7437MB 7437MB primary fat32 lba
2 7437MB 7937MB 500MB primary ext2
3 7937MB 7969MB 32.2MB primary linux-swap(v1)
to exit parted type:
quit
after quitting you may receive a message containing:
Code:
Information: You may need to update /etc/fstab.
no need to worry. fyi, fstab is a file that keeps track of disks & partitions in *nix. more info on fstab can be found here.​
part iii - convert ext2 to ext3/ext4:
parted will not create ext3/ext4 partitions...see beginning of post
to upgrade, enter:
upgrade_fs
you now have journaling(aka ext3)! if ext3 is all you want, skip next two commands.
you want ext4?
enter:
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2
e2fsck -fpDC0 /dev/block/mmcblk0p2​
part iv - copy rom to sdcard and install, enable swap:
open another win cmd prompt, enter:
adb shell mount /sdcard
adb push /update-path/update.zip /sdcard
exit
in original cmd prompt, enter:
reboot recovery
after reboot:
wipe data (alt + w) <--this one is optional, but i like fresh installs
install rom (alt + s)
to enable swap, see this page.
note: you do not need to enable swap if your rom does it automagically.​
#####
all told, i end up with:
~7.5GB fat32
~500MB ext4
~32MB swap
cyanogen-v3.6.8.1 running faster than ever!
hope this wasn't too painful.
btw, you could use a live cd, but i think this is easier and maybe a little more fun!
very nice guide! I will have to test it out later on! Thanks! .
does this damage the sd card in anyway? i was running jac hero with swapper and it killed my sd card...but nice tut..might try it
wow... I never knew you were allowed to partition straight from terminal or I wouldn't have wasted a CD on g-parted... =/ nice guide, next time I need to partition, I'll use this method.
jay22are, partitioning the card will not damage it, but if you use it for swap you will always run the risk of corrupting your card, however, I read that someone calculated that it would still take 2yrs for your card to start having problems using swapper. So good luck.
Is their a noticeable increase in speed when running a non hero rom with swapper?
marixsmith said:
Is their a noticeable increase in speed when running a non hero rom with swapper?
Click to expand...
Click to collapse
extremely noticeable. apps run & transition much smoother than without the swap partition. although, i must say that most of the speed & stability in my setup is cyanogen's rom...it's awesome.
now i have a question...
does anyone know if there are speed/reliability differences between using the swapfile(like with the swapper app) and the swap partition? i did the partition b/c that's how i've always configured linux installs and it let's me mount the sdcard w/o issues.
when i'm trying to do the commands I run into this:
(parted) mkpartfs fat32 0 7584
mkpartfs fat32 0 7584
mkpartfs fat32 0 7584
parted: invalid token: fat32
Partition type? primary/extended?
doesn't seem like the guide covers all of the steps.
same problem as engaged...
Was wondering when someone would write this guide!
h.nocturna said:
wow... I never knew you were allowed to partition straight from terminal or I wouldn't have wasted a CD on g-parted... =/ nice guide, next time I need to partition, I'll use this method.
Click to expand...
Click to collapse
I just built and included Parted on the new recovery image (1.3.1). I was just waiting for someone to do a writeup about it because I'm lazy
engagedtosmile said:
when i'm trying to do the commands I run into this:
(parted) mkpartfs fat32 0 7584
mkpartfs fat32 0 7584
mkpartfs fat32 0 7584
parted: invalid token: fat32
Partition type? primary/extended?
doesn't seem like the guide covers all of the steps.
Click to expand...
Click to collapse
Should be "mkpartfs primary fat32 0 7584".
Parted can also resize your existing partitions without erasing data.
cyanogen said:
Parted can also resize your existing partitions without erasing data.
Click to expand...
Click to collapse
I'm gonna try when I get home always wanted to resize my partition without apps and data being loss
cyanogen said:
Parted can also resize your existing partitions without erasing data.
Click to expand...
Click to collapse
I'm gonna try when I get home always wanted to resize my partition without apps and data being loss. By the way great job with the roms, recovery's, and all the rest of the hard work you guys do. You guys are genious
cyanogen said:
Was wondering when someone would write this guide!
I just built and included Parted on the new recovery image (1.3.1). I was just waiting for someone to do a writeup about it because I'm lazy
Should be "mkpartfs primary fat32 0 7584".
Parted can also resize your existing partitions without erasing data.
Click to expand...
Click to collapse
@engage & others: fixed my mistake in original post
thanks cyanogen!
guess that's what i get for typing too fast... ;p
what am i doing wrong?
Im using a 2gb card.
following the guide after i use the print command it tells me my card is 2033MB in size
and it lists my start point at 32.3kB
i typed: mkpartfs primary fat32 32.3kB 1458MB
it states it cant make the partition and the closest it can do is 31.7kb to 31.7.
is it something im doing?
CC CEO said:
Im using a 2gb card.
following the guide after i use the print command it tells me my card is 2033MB in size
and it lists my start point at 32.3kB
i typed: mkpartfs primary fat32 32.3kB 1458MB
it states it cant make the partition and the closest it can do is 31.7kb to 31.7.
is it something im doing?
Click to expand...
Click to collapse
i believe the reason it is not exactly 0 is because it needs room for the partition information. mine was similar...i believe 31.9kb.
you don't need to use the 'kb' / 'mb'...i just use whole numbers and the prg figures out the hard stuff..
hmm...maybe remove all partitions (using the rm command) and start from scratch.
check out this site
can you paste/link to the console output to the forum?
What about ext4
I got brave and decided to "resize" my ext4 partition down 32MB to create a swap space.
First, I backed up everything using windoze after mounting.
But then it occured to me perhaps I should do a complete backup of my sd card first, including my ext4. But HOW?
Also, cyanogen said parted will resize with no data loss, so I assume you just use the "resize part# start stop" ??
Anyway, when I did my print command, it listed my FAT32 and an ext3. When I try and do anything to ext3, I get a "Error: File system has an incompatible feature enabled" message. I am guessing this is the ext4 stuff?
Will just sit tight for now, before I blow my entire SD card and have to start from scratch till someone can tell me safest way to backup sd card to pc completely and what to do about the ext4 errors.
Thanks in advance for the help!
very cool, I feel like such a dork doing it this way and it feels good! When i put in my command for the partition I got this error:
Warning: You requested a partition from 0.00B to 7216MB.
The closest location we can manage is 512B to 31.7kB. Is this still acceptable
to you?
Click to expand...
Click to collapse
not sure why I think its because the disk already had partitions. I couldn't remove them because parted said the disc was mounted. So I still couldn't avoid booting to the live cd and reformating though :*(
edit: actually rebooting the phone allowed me to use the rm command and remove my partitions and follow your instructions. Worked great thank you! this is going to save me loads of hassle in the future
edit2: spoke too soon when I run upgrade_fs I get this message
e2fsck 1.41.6 (30-May-2009)
/sbin/e2fsck: Superblock invalid, trying backup blocks...
/sbin/e2fsck: Bad magic number in super-block while trying to open /dev/block/mm
cblk0p2
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
Click to expand...
Click to collapse
so i use the repair ext filesystems on the recovery image and it says
Checking filesystems. Error checking filesystem! Run e2fsck manually from console.
Click to expand...
Click to collapse
any help?
edit3: deleted the partitions and did it again, worked this time
This is exactly what i was looking for, thank you so much for this!
51dusty said:
extremely noticeable. apps run & transition much smoother than without the swap partition. although, i must say that most of the speed & stability in my setup is cyanogen's rom...it's awesome.
now i have a question...
does anyone know if there are speed/reliability differences between using the swapfile(like with the swapper app) and the swap partition? i did the partition b/c that's how i've always configured linux installs and it let's me mount the sdcard w/o issues.
Click to expand...
Click to collapse
first, IMHO and research, the swap partition does nothing to cyanogen's roms because of his magic touch, however, it does work wonders with the browser, and with all other builds besides cyan's
second, The swap file is placed on your fat32 partition, when you mount your sd card to your pc, the swap file disappears and your rom crashes...
stick with a linux-swap partition. you shouldn't go over 32mb tho, it gets glitchy after that.
yes you DO HAVE remove pre-existing partitions with rm command... obviously if you don't want to resize them.
genez
jklong03 said:
I got brave and decided to "resize" my ext4 partition down 32MB to create a swap space.
First, I backed up everything using windoze after mounting.
But then it occured to me perhaps I should do a complete backup of my sd card first, including my ext4. But HOW?
Also, cyanogen said parted will resize with no data loss, so I assume you just use the "resize part# start stop" ??
Anyway, when I did my print command, it listed my FAT32 and an ext3. When I try and do anything to ext3, I get a "Error: File system has an incompatible feature enabled" message. I am guessing this is the ext4 stuff?
Will just sit tight for now, before I blow my entire SD card and have to start from scratch till someone can tell me safest way to backup sd card to pc completely and what to do about the ext4 errors.
Thanks in advance for the help!
Click to expand...
Click to collapse
to backup ext partition just cp /system/sd it has the apps dirs and dalvik-cache
this ver of parted does not handle ext3/4...that's why you have to upgrade after partitioning. as far as resizing goes...i would imagine it can't do that to ext3/4 either.
maybe cyanogen can provide complete explanation of ext3/4 support...?
my advice would be to delete all and start fresh..i'm not a huge fan of resizing partitions...it seems to let gremlins into the fs. ;p

Apps2SD version 2.5

Note: Newer version of Darktremor Apps2SD can be found here: http://forum.xda-developers.com/showthread.php?t=670087
Okay...since I ended up rebuilding the Apps2SD 2.0 due to improvements and to allow moving the dalvik-cache automatically (per request), I figured I better just release this.
Apps2SD version 2.5
Warning: Do not use this version if you are partitioning your SD card with ext4. This version is not compatible with that partition layout.
Apps2SD is a script that runs when you phone boots. Many of the ROM developers include the script in one form or another. Originally based on Cyanogen's Apps2SD, this script will allow a user to free up more storage space on their phone.
How does it do it? It uses an ext2 or ext3 partition (if one exists) to move all your free and purchased apps (not core apps) to the ext2/ext3 partition on your SD card. It also tricks Android into thinking it is storing your programs in the internal storage space by linking the install directories (/data/app and /data/app-private) to similar directories on the sd card.
Here's the program:
http://www.darktremor.com/files/misc/a2sd-2.5-signed.zip
Requirement: An ext2 or ext3 partition on your SD Card.
HOW TO INSTALL:
Since you are flashing this version to your phone, do a nandroid backup of your phone before starting these instructions.
1. Download the program above.
2. Determine if you have setup your SD Card with an ext partition
If you have setup your SD card already (existing users of A2SD...any version):
a. Copy the program to your SD card. One way of doing that is to use ADB by typing this command: adb push a2sd-2.5-signed.zip /sdcard/a2sd-2.5-signed.zip
b. Reboot into recovery
Click to expand...
Click to collapse
If you have not setup your SD card (for those new to A2SD):
a. BACKUP YOUR SD CARD TO YOUR COMPUTER. Can't stress this enough, as partitioning will wipe the entire card.
a. Reboot into recovery
b. In Android System Recovery, select Partition sdcard
c. In the Partition sdcard menu, select Partition SD
d. Follow the instructions on the phone to partition your SD card. You can optionally set a swap file while you are partitioning your SD card.
e. In the Partition sdcard menu, select SD:ext2 to ext3. Follow the instructions on the screen. Do not select the option SD:ext3 to ext4 after this step completes, otherwise A2SD will not work.
e. Press the back button on the phone to go back to the main menu.
f. Put the A2SD file on the SD card (and all your other files you backed up earlier) by selecting USB-MS toggle and transfer the files to your computer.
Click to expand...
Click to collapse
3. In recovery, select Flash zip from sdcard.
4. In Flash zip from sdcard, select a2sd-2.5-signed.zip. Press HOME to flash.
5. Reboot phone.
NOTE: The first time your phone is booted after installing a2sd, you may experience a long delay before your phone completely boots. This is due to the dalvik-cache being redirected to your sd card. The contents of dalvik-cache are recreated on your SD card, which can take up to 10 minutes to complete.
Click to expand...
Click to collapse
NOTE: If you experience force closes or random reboots after you apply A2SD version 2.5, this could be that your SD card is not fast enough to handle the dalvik-cache. Perform the following steps to move your dalvik-cache back to your SD card:
1. Switch your phone into read-write mode by typing: adb remount
2. Enter your ADB shell by typing: adb shell
3. In the ADB shell, type /system/bin/a2sd nocache
4. Reboot phone by typing the following command: reboot
If that doesn't work, follow these commands:
1. Switch your phone into read-write mode by typing: adb remount
2. Enter your ADB shell by typing: adb shell
3. In the ADB shell, type rm /data/dalvik-cache/*
4. Reboot phone by typing the following command: reboot
If you have a swap partition and you suspect this may also be an issue, follow these instructions:
1. Enter your ADB shell by typing: adb shell
2. In the ADB shell, type /system/bin/a2sd noswap
Click to expand...
Click to collapse
What does this program do:
1. Moves applications to the sd card
2. Moves dalvik-cache to the sd card
3. Activates swap partition if one exists
4. Allows the user to deactivate a2sd without removing the ext2/ext3 partition (a2sd remove to deactivate, a2sd install to activate)
5. Allows the user to restore dalvik-cache back to the main memory (a2sd nocache to deactivate, a2sd cache to activate)
6. Allows the user to deactivate swap (a2sd noswap to deactivate, a2sd swap to activate)
7. Creates the /system/sd mount if one doesn't exists.
How to tell if it is working:
1. On your computer in the Android SDK Tools directory, type adb shell
2. In the adb shell, type ls -l /data
3. Look for the entries app and app-private. The entries should look like the following:
app -> /system/sd/app
app-private -> /system/sd/app-private
If they don't, follow these instructions:
1. Enter the ADB Shell by typing adb shell
2. In the ADB shell, type /system/bin/a2sd install
If you have any issues, you can PM me for assistance.
Thanks for this.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Can this be done?
Can this be done with phone on?
Which mode: charge; htc sync; ect...
Thanks! I am finally going to take the plunge and go Apps2SD!
Can this be used with any 2.1 Rom?
thanks for the share big improvement...
Flash and partition from recovery. As always nandroid first and also backup sd card before partitioning as it will wipe the card.
jjjjayd13 said:
Can this be done with phone on?
Which mode: charge; htc sync; ect...
Click to expand...
Click to collapse
help
how do you reverse this im getting alot of apps FC on me please help
METHOD1911 said:
how do you reverse this im getting alot of apps FC on me please help
Click to expand...
Click to collapse
reinstall the apps
dont
this totally f**ked my phone up
i did something simliar last night, damage will have it in his rom shortly. Didn't check the download but the current way a2sd was implemented in the ramdisk on dc was wrong and has potential to hang the phone on boot (expecially moving dalvik)
wow, this worked beautifully, took a little while to boot, but now showing 138 free up from 79.
using fresh rom
METHOD1911 said:
this totally f**ked my phone up
Click to expand...
Click to collapse
Restore your Nandroid and try again. Also, what ROM are you using?
before i had 110mb used with 45 apps.After installing this now i have 24mb used..loving this upgrade...
puertoblack2003 said:
before i had 110mb used with 45 apps.After installing this now i have 24mb used..loving this upgrade...
Click to expand...
Click to collapse
It would beautifully for me. First I nandroid, converted my ex2 to ex3 (partitioned sd card), ran this script and it has worked wonders for me
works perfectly for me as well. everything s on the card and my phone is as smooth as silk
METHOD1911 said:
how do you reverse this im getting alot of apps FC on me please help
Click to expand...
Click to collapse
Ran this last night and same thing happened to me. It happens because your phone is on and suddenly all of your apps have moved to your SD card. Simply reboot and everything will be back to normal.
Running perfectly for me on Fresh 2.0d. Going entirely app crazy as a result.
luftwaffles86 said:
Ran this last night and same thing happened to me. It happens because your phone is on and suddenly all of your apps have moved to your SD card. Simply reboot and everything will be back to normal.
Running perfectly for me on Fresh 2.0d. Going entirely app crazy as a result.
Click to expand...
Click to collapse
lol or even better use titanium and backup up all apps and restored them back...
jjjjayd13 said:
Can this be done with phone on?
Which mode: charge; htc sync; ect...
Click to expand...
Click to collapse
It can if your phone is already setup with an ext3 partition. If not, you'll need to go to recovery first and do that.
It's easier to flash this via recovery, but if you want to do this manually, here's what you do:
1. Unzip the contents of the zip to a folder
2. Open a command prompt and type adb remount
3. Push the system/bin folder to the /system/bin directory on the phone by typing adb push <folder>/system/bin /system/bin where <folder> is the folder you extracted the zip to.
4. Push the system/lib folder to the /system/lib directory on the phone by typing adb push <folder>/system/lib /system/lib where <folder> is the folder you extracted the zip to.
5. Type adb shell "chmod 777 /system/bin/a2sd"
6. Type adb shell "chmod 777 /system/bin/e2fsck"
If you already have the ext2/ext3 partition, type /system/bin/a2sd to activate.
even though i entered the command on the first page and it says its active I still dont have all my space back? is that to do with the stock apps?

[REF] Fix internal SD partitions

DISCLOSURE: Not responsible for you being retarded and breaking what doesn't need fixed.
DISCLOSURE 2: Do not use this on the O2x as it has a slightly different partition table.
Here is my step by step for repairing the internalsd Partitions... I don't think I've forgotten anything in this. If anyone knows how to write this into a .zip for flash via CWR it would be great. Credit goes to TeamWhiskey for helping me out when I screwed my partition table up...
WARNING: This can destory your internalSD card partitions. If it's not broke don't fix it!
ALL ENTRIES ARE IN RED
I am not responsible for any damage you do to your phone.
I did this same thing to my phone... I was still able to get into recovery though. You can repair the internal partitions through ADB if you can still get into recovery.
Steps to recreate partitions.
Boot into recovery
from your PC open cmd prompt
change to your ADB directory
run adb shell
mkfs /dev/block/mmcblk0
fdisk -H 1 /dev/block/mmcblk0
if the above fails try fdisk -l /dev/block/mmcblk0
then fdisk -H 1 /dev/block/mmcblk0
once in the fdisk of ../mmcblk0 you might as well delete all the partitions if you believe that they are corrupted
d
1
repeat for partition 2-8
one all of your partitions are gone you now have a blank internal SD and will need to execute the following to restore all the proper partition sizes
Partition 1
n
p
1
First Cylinder start 129
First Cylinder stop 55168
We will repeat this for partitions 2 and 3
Partition 2
n
p
2
Start 55169
Stop 63360
Partition 3
n
p
3
Start 63361
Stop 63616
On to partition 4 which will be extended (this is the last partion you will choose primary or extended)
Partition 4
n
e
4
Start 63617
Stop 975424
Now onto partition 4-8 which are automatically selected as logicall partions (no option is given)
Partition 5
n
Start 63681
Stop 64704
Partition 6
n
Start 64769
Stop 65088
Partition 7
n
Start 65153
Stop 261760
Partition 8
n
Start 261825
Stop 975424
Once you have done this the partitions are ready to be written to the internalSD
I would recommend choosing the command p to verify that all of your start and stop blocks are correct.
From this point you have the option to either quit without saving changes "q" or to write the partition table itself "w". Once you are sure that you have entered all of your partitions correctly you can choose the command w
At this point you have recreated all the partitions on your InternalSD card. If you have a nandroid backup at this point you should be able to restore it without a problem once you copy it over to the internal or external (depending on which CWR you are running).
I didn't have to go through the format portion of the fdisk as I had a nandroid backup which formats all the partitions itself.
If I've forgotten any steps please feel free to comment and include them.
Thanks to TeamWhiskey for helping me resolve this issue when I had it...
Don't forget to click the Thanks button if this helped...
When i get to
Code:
fdisk -h 1 /dev/block/mmcblk0
I get
Code:
unknown option -- hBusyBox v1.16.2androidminimal (2010-03-28 22:34:51 EDT) multi
-call binary.
Did i do anything wrong ?
exPos3D said:
When i get to
Code:
fdisk -h 1 /dev/block/mmcblk0
I get
Code:
unknown option -- hBusyBox v1.16.2androidminimal (2010-03-28 22:34:51 EDT) multi
-call binary.
Did i do anything wrong ?
Click to expand...
Click to collapse
My apologies it is the correct code but should be
Code:
fdisk -H 1 /dev/block/mmcblk0
"I sometimes forget linux commands are case sensitive"
After doing all the steps
When its time to write the tables by executing the "w" command i get this error
Code:
Command (m for help): w
w
The partition table has been altered!
Calling ioctl() to re-read partition table
fdisk: WARNING: rereading partition table failed, kernel still uses old table: D
evice or resource busy
exPos3D said:
After doing all the steps
When its time to write the tables by executing the "w" command i get this error
Code:
Command (m for help): w
w
The partition table has been altered!
Calling ioctl() to re-read partition table
fdisk: WARNING: rereading partition table failed, kernel still uses old table: D
evice or resource busy
Click to expand...
Click to collapse
seems as if I may have forgotten a step but I don't think that I did....
before doing the fdisk command try
Code:
mkfs /dev/block/mmcblk0
if that doesn't work goin into your adb shell and do an
Code:
fdisk -l /dev/block/mmcblk0
and
Code:
fdisk -H 1 /dev/block/mmcblk0
p
and paste the output
It worked thanks but now my sdcard still wont mount for any of my apps, or camera. I can add items to my sd card and install to it, but it still wont mount
I'm not in this area so i do not know where to find files ADB on my computer. If you have time, can you be more detailed instructions to help me ? thank you very much . I waiting for your answer,.
chulun9999 said:
I'm not in this area so i do not know where to find files ADB on my computer. If you have time, can you be more detailed instructions to help me ? thank you very much . I waiting for your answer,.
Click to expand...
Click to collapse
Please use the search function....
http://www.xda-developers.com/android/adb-easy-tutorial/
So I can boot into CWM, but when I try to use ADB it says "Device not found" ...
The phone will boot into the o2x OS, but I get no cell signal. When it boots into the OS, ADB finds it no problem.
Any suggestions?? Does ADB work with all versions of CWM??
Thanks so much for the partition table info!
Try this ... Stock nandroid
Command in windows
Can you post the command you mentioned for linux , to do it in windows . Am using windows 7 . LG update tool screwed my mobile and i have to proceed only with restoring the partition tables .
casper200519 said:
DISCLOSURE: Not responsible for you being retarded and breaking what doesn't need fixed.
DISCLOSURE 2: Do not use this on the O2x as it has a slightly different partition table.
Here is my step by step for repairing the internalsd Partitions... I don't think I've forgotten anything in this. If anyone knows how to write this into a .zip for flash via CWR it would be great. Credit goes to TeamWhiskey for helping me out when I screwed my partition table up...
WARNING: This can destory your internalSD card partitions. If it's not broke don't fix it!
ALL ENTRIES ARE IN RED
I am not responsible for any damage you do to your phone.
I did this same thing to my phone... I was still able to get into recovery though. You can repair the internal partitions through ADB if you can still get into recovery.
Steps to recreate partitions.
Boot into recovery
from your PC open cmd prompt
change to your ADB directory
run adb shell
fdisk -h 1 /dev/block/mmcblk0
once in the fdisk of ../mmcblk0 you might as well delete all the partitions if you believe that they are corrupted
d
1
repeat for partition 2-8
one all of your partitions are gone you now have a blank internal SD and will need to execute the following to restore all the proper partition sizes
Partition 1
n
p
1
First Cylinder start 129
First Cylinder stop 55168
We will repeat this for partitions 2 and 3
Partition 2
n
p
2
Start 55169
Stop 63360
Partition 3
n
p
3
Start 63361
Stop 63616
On to partition 4 which will be extended (this is the last partion you will choose primary or extended)
Partition 4
n
e
4
Start 63617
Stop 975424
Now onto partition 4-8 which are automatically selected as logicall partions (no option is given)
Partition 5
n
Start 63681
Stop 64704
Partition 6
n
Start 64769
Stop 65088
Partition 7
n
Start 65153
Stop 261760
Partition 8
n
Start 261825
Stop 975424
Once you have done this the partitions are ready to be written to the internalSD
I would recommend choosing the command p to verify that all of your start and stop blocks are correct.
From this point you have the option to either quit without saving changes "q" or to write the partition table itself "w". Once you are sure that you have entered all of your partitions correctly you can choose the command w
At this point you have recreated all the partitions on your InternalSD card. If you have a nandroid backup at this point you should be able to restore it without a problem once you copy it over to the internal or external (depending on which CWR you are running).
I didn't have to go through the format portion of the fdisk as I had a nandroid backup which formats all the partitions itself.
If I've forgotten any steps please feel free to comment and include them.
Thanks to TeamWhiskey for helping me resolve this issue when I had it...
Click to expand...
Click to collapse
Can you post the commands to do it from windows ?
bibinkalarikkal said:
Can you post the commands to do it from windows ?
Click to expand...
Click to collapse
Read and go step by step, these are for windows
Sent from my LG-P999 using XDA Premium App
Is there a way to use this app to create one partition just for user app storage? I don't want or need an internal sdcard partition!
Sent from my LG-P999 using xda premium
DUDE!!
Thanks to your instructions and one hour of simple restoration work and my G2X was back in the game. This is for those not faint of heart, but if you've made it far enuff to delete your Internal partitions...Then you could handle these instructions...
PROPZ!!!!
I couldn't do it.When I wrote fdisk -h 1 /dev/block/mmcblk0 to adb shell there was 4 different options.
Usage:fdisk [-ull] [-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b DISK
Change partition table
-u Starts and End are in sectors <instead of cylinders>
-l Show partition table for each DISK, then EXIT
-b 2048 <for certain MO disks>use 2048-byte sectors
-C CYLINDERS Set number of cylinders/heads/sectors
-H HEADS
-S SECTORS
~ #
I don't know what to do.Can you please help me with this?
I tried this because my device was failing while OneClickRecoveryFlash. NVError 0x120000
I'm about to get a g2x, however I have a question..
What causes bad partitioning table? Or messed up partition table?
nitrogen618 said:
I'm about to get a g2x, however I have a question..
What causes bad partitioning table? Or messed up partition table?
Click to expand...
Click to collapse
Flashing a G2X or WIND Optimus 2X which are the same LG-P999 handset with anything for the Optimus 2X (O2X) which is the LG-P990. They use the same internal hardware except for the cell radio modem and use different partition tables so their firmware and ROMs are incompatible. When the LG-P999 is flashed with LG-P990 stuff the LG-P999 will boot as an LG-P990 but there won't be any cell services.
Another reason is an incomplete flashing with LG-P999 firmware.
Core Memory said:
Flashing a G2X or WIND Optimus 2X which are the same LG-P999 handset with anything for the Optimus 2X (O2X) which is the LG-P990. They use the same internal hardware except for the cell radio modem and use different partition tables so their firmware and ROMs are incompatible. When the LG-P999 is flashed with LG-P990 stuff the LG-P999 will boot as an LG-P990 but there won't be any cell services.
Another reason is an incomplete flashing with LG-P999 firmware.
Click to expand...
Click to collapse
Ah, so basically they flashed a p990 rom on a p999.
Another question, when flashing a new rom on cwm you do
-clear data/factory reset
-clear cache partition
-clear dalvik cache
-install rom from sd
Right?

[GUIDE][ROOT] Resizing emulated SD card and userdata partitions

I originally created this guide for Sony Xperia T/TL/TX/V and have since discovered that the method works for other devices, too. So I present the universal guide to getting rid of that annoyingly tiny allocation of space for internal storage in devices that have plenty of it.
Kudos to @teidus for pointing me to this long-forgotten method.
Screenshots of proof are attached to my original post.
WARNING: You will lose a lot of data if you don't follow this guide!
WARNING: These operations require a rooted device. If you are running unrooted Android 4.3 or newer, you cannot proceed.
NOTE: All of these changes will be reversed if you flash a factory image that contains a partition table.
DISCLAIMER: I'm not responsible for bricked devices and data loss from power surges, hardware damage, or changes to the linked software. Always check the native manuals for all the tools listed here!
I'm also not responsible for your curiosity and desire to resize other partitions. I haven't tried that because messing with /system and /cache can lead to unexpected results.
Requirements:
1. Your device must currently have root access, CMW recovery v6.0.4.6 or later, less than 50% allocated to internal storage, emulated SD card (usually, it's /storage/sdcard0), and at least 8GB of total onboard memory. If you answered "No" to at least one of these, this guide won't help you. To check whether you have an emulated SD card, remove your physical SD card, go into a file manager app, and see whether you still have some sdcard listed.
2. A factory image flashing software for your device unzipped and/or installed on your computer. Look in the relevant forums for downloads.
3. ADB from either Android SDK or your device's flashing tool. Look in the relevant forums for instructions.
4. For locked bootloaders, factory firmware image with Android v4.1.2 or v4.0.x saved on your computer (consult your flashing tool's manual for the default location) - nearly 100% of these have root exploits. Look in the relevant forums for downloads.
5. Root exploit with Superuser or SuperSU installer for your device unzipped on your computer. Look in the relevant forums for downloads.
6. CMW recovery installer v6.0.4.6 or later compatible with your device and the factory firmware version obtained in step 4 unzipped on your computer. Look in the relevant forums for downloads.
7. File system utilities (attached) unzipped to a folder on your device's physical SD card you'll remember (I'll be using /fs-utils in this guide).
8. For Windows 8 users, ADB drivers for your device.​
The Guide (skip all the way to the bottom for the short list of ADB commands):
1. Back up all data stored on internal storage:
Option 1: Connect your device to the computer and save it to a computer drive.
Option 2: Open a file manager on the device and copy it to a physical SD card (/sdcard1).​2. Back up your current installation with either Online Nandroid or your current recovery and remove the SD card for safety.
3. Flash your device with basic 4.1.2 install.
Refer to the documentation for your tool.​4. Connect your device to the computer and let the computer recognize it.
5. Enable USB debugging.
5.1 Go to (System) Settings -> Developer options and flip the switch in the top-right corner of the screen.
5.2 Look a bit down (toward the middle of the screen) and check USB debugging.​6. Root your device.
Refer to the documentation for your tool.​7. Install recovery on your device.
Refer to the documentation for your tool.​8. Boot into CMW recovery.
Depending on the device, reboot into recovery may be available in the power menu, or you'll need to press/hold a button during the power on sequence. Refer to the documentation for your recovery.​9. After the device boots into recovery, connect it to the computer.
10. Start ADB shell in command prompt.
Navigate to the folder where adb.exe resides, hold SHIFT, right click the mouse, and select Open command window here, then type adb shell in the command prompt and press ENTER.​11. Execute the following commands one-by-one (you can copy & paste, hit enter, and wait for the output):
Code:
umount /storage
parted /dev/block/mmcblk0
print
These commands unmount all drives, launch parted utility for mmcblk0 (onboard flash storage), and display the partition table on your screen.​12. Write down the info from the following columns for partitions Userdata and SDCard (or Media). Usually, they are the last 2 partitions.
Column 1 - Number, Column 2 - Start, Column 3 - End, Column 5 - File system, Column 6 - Name. The start of the first partition and the end of the second partition are the limits, within which your new partitions will be created. The numbers are in megabytes (MB) unless specified. Make sure the name is recorded just as it appears in the partition table - Andorid is case-sensitive.​13. Remove the 2 partitions by executing the following commands:
Adjust the numbers according to your system.​
Code:
rm 14
rm 15
14. Calculate the new start and end point for both partitions.
For the first partition, the start point will be the same. For the second partition, the end point will be the same. The end point of the first partition is the start point of the second partition.
Take the end number for the first partition you recorded in step 12, add more space to get the new end. Alternatively, if your first partition is actually the emulated storage, subtract the reallocated space to get the new end point. I advise to add at least 2GB (2048MB) to Userdata feel safe about having enough storage for apps. DON'T TRY TO REMOVE EMULATED STORAGE ALTOGETHER BY ALLOCATING ALL OF THE AVAILABLE SPACE TO USERDATA! Emulated storage is coded into OS environment and requires additional modifications to work properly.​15. Create and name new partitions by executing the following commands (don't copy the text in parentheses):
The system might throw several errors in the process. When prompted, just type ignore and hit ENTER.​
Code:
mkpartfs logical ext2 OLD_START NEW_END (change ext2 to fat32 if the first partition had that file system)
name 14 Userdata (change the number and the name according to your environment)
mkpartfs logical ext2 NEW_START OLD_END (change ext2 to fat32 if the second partition had that file system; make sure to include GB as the designation of the end point in order to stretch the partition to the end of the onboard storage)
name 15 SDCard (change the number and the name according to your environment)
quit
These commands create the partitions with ext2 file system and given beginning and end parameters, rename them as required, and close parted.​16. "Damage" the internal, emulated SD card so that it could be formatted properly later. REMOVE YOUR PHYSICAL SD CARD BEFORE THIS STEP TO AVOID WIPING THE WRONG CARD!!!
Tap Mounts and storage -> Format /storage/sdcard0 -> default and confirm the operation.​17. Insert the physical SD card (sdcard1) that you removed in step 2 back into the device.
Make sure it's mounted by going to Mounts and storage and checking its status (it should say unmount /storage/sdcard1/). If not, mount it by executing on the appropriate option.​18. Execute the following commands one-by-one in the ADB command prompt:
Code:
cd /storage/sdcard1/fs-utils (the directory name will be different if you didn't follow my conventions)
tune2fs -j /dev/block/mmcblk0p14 (change the number in mmcblk0pXX according to your environment - that's the partition that need to have file system ext4 - refer to your notes from step 12)
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p14 (change the number in mmcblk0pXX according to your environment)
e2fsck -fpDC0 /dev/block/mmcblk0p14 (change the number in mmcblk0pXX according to your environment)
These commands convert Userdata partition into the appropriate ext4 filesystem, which is not supported natively in the recovery environment. If you receive any errors while executing these commands, reboot recovery.​19. Reboot the device into full Android.
19.1 Remove the physical SD card for safety.
19.2 Go to the top menu level of recovery. Then select the top option Reboot the device.​20. When Android loads fully, you'll notice a notification about storage file system. Tap it and follow the prompts to format it.
21. Insert the physical SD card and reboot into the recovery to restore the backup from step 2.
Backup and Restore -> Restore from /storage/sdcard1.​22. Reboot back into full Android and copy the files saved from internal storage back into it. Then reboot again so that apps recognize the data.
DONE!​
Short guide/list of ADB commands and other events (*enclosed in asterisks*) if you know the safety drill & bash-based parted utility:
Code:
*flash 4.1.2 & install recovery*
*boot recovery*
adb shell
umount /storage
parted /dev/block/mmcblk0
print
*record start point of Userdata and end point of SDCard*
rm 15 (change the number according to your environment)
rm 14 (change the number according to your environment)
mkpartfs logical ext2 1621 7865 (change the numbers according to your environment)
name 14 Userdata (change the number and the name according to your environment)
mkpartfs logical ext2 7865 15.6GB (change the numbers according to your environment)
name 15 SDCard (change the number and the name according to your environment)
*remove physical SD card*
*Mounts and storage -> Format /storage/sdcard0 -> default -> confirm*
*insert physical SD card*
*Mounts and storage -> Mount /storage/sdcard1*
cd /storage/sdcard1/fs-utils
tune2fs -j /dev/block/mmcblk0p14 (change the number in mmcblk0pXX according to your environment)
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p14 (change the number in mmcblk0pXX according to your environment)
e2fsck -fpDC0 /dev/block/mmcblk0p14 (change the number in mmcblk0pXX according to your environment)
*remove physical SD card*
*reboot*
*format emulated SD card*
*reboot recovery*
*restore backup*
*reboot*
*restore sdcard0/*
*reboot*
FAQ
Will it work with Android 4.2/4.3/4.4 or an older version of recovery?
So far I have tested with the versions mentioned in the guide. You can test whether this method will work for your setup without jeopardizing any data by completing step 7 of requirements and executing the following commands in ADB shell after booting into your recovery:
Code:
parted /dev/block/mmcblk0
print *wait for output*
quit
cd /storage/sdcard1 *change if your physical sdcard is sdcard0*
tune2fs *no parameters*
e2fsck *no parameters*
No errors indicate the method works for you. Please make sure to tell me about your setup in the comments - I'll update the compatibility list.
Tested devices
Did it work on your device or did you fail? Leave a comment and I'll update the list!
Barnes & Noble
- Nook Tablet 16GB
Sony
- Xperia T/TL/TX
Links to tools and recoveries
Reserved
Sorry for bumping an old thread, but is there any way to remove the emulated SD card ? Or, at least point the physical SD Card as the primary SD Card.
I have searched everywhere but I can't seem to do it. If you know a way, it will help a LOT of people, because a lot of people have this problem and the solutions is not working. I tried to use the app from playstore, didn't work. Tried to find vold.fstab, no vold.fstab available in CM11. My device is XIaomi Redmi 1s running CM11.
derpotato said:
Sorry for bumping an old thread, but is there any way to remove the emulated SD card ? Or, at least point the physical SD Card as the primary SD Card.
I have searched everywhere but I can't seem to do it. If you know a way, it will help a LOT of people, because a lot of people have this problem and the solutions is not working. I tried to use the app from playstore, didn't work. Tried to find vold.fstab, no vold.fstab available in CM11. My device is XIaomi Redmi 1s running CM11.
Click to expand...
Click to collapse
As far as I could understand in Xperia environment settings, "internal storage" is a required location for OS. I think it's possible to emulate that access on an SD card but it would require decompiling and recompiling environment data or something else with a high risk of failing since you'd need to modify the OS instead of just the partition table.
bsined said:
As far as I could understand in Xperia environment settings, "internal storage" is a required location for OS. I think it's possible to emulate that access on an SD card but it would require decompiling and recompiling environment data or something else with a high risk of failing since you'd need to modify the OS instead of just the partition table.
Click to expand...
Click to collapse
Oh I see.. that's too bad. Well, thanks for the information
ignore this
does this method work on Xperia ZR stock 4.4.4 with NUT's dual recovery installed?
in the step where phone has to be booted in recovery mode n connected to pc via USB, nothing happens as I connect. when I type adb shell, error message returns as device not found.
Is there any work around or guide for this?
sourabhp said:
does this method work on Xperia ZR stock 4.4.4 with NUT's dual recovery installed?
in the step where phone has to be booted in recovery mode n connected to pc via USB, nothing happens as I connect. when I type adb shell, error message returns as device not found.
Is there any work around or guide for this?
Click to expand...
Click to collapse
I think there are separate drivers for ADB to work in recovery mode. Sorry that I forgot about them and I'm not sure whether they're included with FlashTool. My best suggestion is to search the forums.
bsined said:
I think there are separate drivers for ADB to work in recovery mode. Sorry that I forgot about them and I'm not sure whether they're included with FlashTool. My best suggestion is to search the forums.
Click to expand...
Click to collapse
I searched with google for ADB drivers in recovery mode and found one but even after that device was not detected in recovery mode.
I tried uninstalling and re-installing drivers but no luck. may be need more research
bsined said:
Code:
cd /storage/sdcard1/fs-utils (the directory name will be different if you didn't follow my conventions)
tune2fs -j /dev/block/mmcblk0p14 (change the number in mmcblk0pXX according to your environment - that's the partition that need to have file system ext4 - refer to your notes from step 12)
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p14 (change the number in mmcblk0pXX according to your environment)
e2fsck -fpDC0 /dev/block/mmcblk0p14 (change the number in mmcblk0pXX according to your environment)
These commands convert Userdata partition into the appropriate ext4 filesystem, which is not supported natively in the recovery environment. If you receive any errors while executing these commands, reboot recovery.​[/code][/hide]
[/size]
Click to expand...
Click to collapse
Thanx bro. I have successfully partitioned my device (Xperia L).
But when I checked the file system, it is ext3 not ext4.
Still my device is running well.
Will it effect the performance of my device?
Is it possible using this method to shirk down the size of SYSTEM partition too?
Any extra caution need to take k?
jjiiaa said:
Is it possible using this method to shirk down the size of SYSTEM partition too?
Any extra caution need to take k?
Click to expand...
Click to collapse
First off, SYSTEM partition isn't that big - less than 1GB, so you won't gain much from shrinking it. Secondly, I'm not sure where recovery is written. You're risking bricking your phone. Lastly, if you shrink the partition too tightly, you'll effectively remove the ability to upgrade your device's firmware because all ROMs have various sizes.
I have installed Bliss Pop Lollipop 5.0.2 ROM on my Xperia L, will this make any difference? Should this work?
israfild said:
I have installed Bliss Pop Lollipop 5.0.2 ROM on my Xperia L, will this make any difference? Should this work?
Click to expand...
Click to collapse
I think Android 4.4+ utilizes the entire internal storage as a single block, so the guide is pointless. If that's not the case on your device and you're willing to be the guinea pig, please do attempt the repartitioning and report on the results.
Sent from my LT30p using XDA Free mobile app
@bsined i follow the steps but now i stay with a corrupt table and ia cant start my phone XPERIA L i follow the step i dont know what i did bad can you help me?
zero995 said:
@bsined i follow the steps but now i stay with a corrupt table and ia cant start my phone XPERIA L i follow the step i dont know what i did bad can you help me?
Click to expand...
Click to collapse
Just double-checking that you had downgraded to 4.1 before resizing. You should be able to recover your device by flashing any FTF with Flashtool.
i try with 4.1 and 4.2.2 by ftf but no my phone doesnt start now i'm tired i got leave that perhaps i'm gonna buy a new phone pfff :c
zero995 said:
i try with 4.1 and 4.2.2 by ftf but no my phone doesnt start now i'm tired i got leave that perhaps i'm gonna buy a new phone pfff :c
Click to expand...
Click to collapse
If the phone doesn't start at all, that doesn't sound like it's related to partition tables. If the screen, the vibrator, and the LED turn on, the phone is in a soft brick and should be recoverable. You should ask in the FTF threads if you get any errors in flashtool.

[GUIDE] [21/03/2015] How to flash CyanogenMod 12

How to flash CyanogenMod 12
Code:
[CENTER]Neither I nor any other member of the forum not responsible for bricked devices and dead
SD cards. Whatever you do, you do it at your own risk![/CENTER]
What we need:
1. Last build of CyanogenMod 12
2. Last version of this recovery
3. HTC USB Drivers v4.0.1.001
4. MiniTool Partition Wizard
5. View attachment ADB.zip
How to do:
1. First you need to install HTC USB Drivers on your PC.
2. Now install MiniTool Partition Wizard.
Make a backup copy of the files on your SD-card. If you have any partitions on your SD-card you must delete them. Now insert your SD-card in card reader (don't use "Mount USB Storage" in recovery) and format it in file system FAT32 (note: all files will be deleted).
You must create two ext4 partitions on your SD-card.
Launch MiniTool Partition Wizard. You must delete partition on SD-card and create three new.
First partition SD with file system FAT32. Second partition SD-DATA with file system ext4 and size minimum 1Gb. Third partition SD-SYSTEM with file system ext4 and size 1.2Gb. All partitions must be Primary.
Partitions should look like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
More instructions how to use MiniTool Partition Wizard you can find HERE.
3. Insert your SD-card in phone and boot it in recovery (use power button + volume down). In recovery go to "Wipe" menu [1] then in "Advanced Wipe" and do all wipes except sdcard and SD-Ext [2]. Now reboot your phone in Bootloader --> fastboot mode [3, 4].
Connect your phone to your PC using the cable.
Download ADB.zip and extract it on your PC. Download new recovery and rename it as "recovery.img". Put recovery.img in ADB folder and run recovery.bat from this folder.
After flashing recovery you must see cmd window like this:
4. Reboot your phone in recovery again. You need to convert your partitions from ext4 to f2fs.
Go to "Wipe" menu then in "Advanced Wipe" [1]. Now select "Data" and click on "Repair or Change File System" button [2], then click on "Change File System" button [3], choose "F2FS" [4] and swipe to change.
Go back and do the same with "System" [5].
After converting do all wipes except sdcard [6].
5. Download ROM and copy it on SD-card. Flash ROM. Flashing will take long so just wait.
6. After flashing ROM reboot your phone in Bootloader --> fastboot mode. Connect your phone to your PC using the cable.
Take out boot.img from ROM zip and put it in ADB folder on your PC. Run boot.bat from this folder.
After flashing boot.img you must see cmd window like this:
7. Now you can reboot your phone. After first boot you can back to recovery and flash Gapps if you need it.
Done!
Created 21-03-2015
Last Updated 21-03-2015
BCCCPCEKCAHET said:
How to flash CyanogenMod 12
Code:
[CENTER]Neither I nor any other member of the forum not responsible for bricked devices and dead
SD cards. Whatever you do, you do it at your own risk![/CENTER]
What we need:
1. Last build of CyanogenMod 12
2. Last version of this recovery
3. HTC USB Drivers v4.0.1.001
4. MiniTool Partition Wizard
5. View attachment 3220931
How to do:
1. First you need to install HTC USB Drivers on your PC.
2. Now install MiniTool Partition Wizard.
Make a backup copy of the files on your SD-card. If you have any partitions on your SD-card you must delete them. Now insert your SD-card in card reader (don't use "Mount USB Storage" in recovery) and format it in file system FAT32 (note: all files will be deleted).
You must create two ext4 partitions on your SD-card.
Launch MiniTool Partition Wizard. You must delete partition on SD-card and create three new.
First partition SD with file system FAT32. Second partition SD-DATA with file system ext4 and size minimum 1Gb. Third partition SD-SYSTEM with file system ext4 and size 1.2Gb. All partitions must be Primary.
Partitions should look like this:
More instructions how to use MiniTool Partition Wizard you can find HERE.
3. Insert your SD-card in phone and boot it in recovery (use power button + volume down). In recovery go to "Wipe" menu [1] then in "Advanced Wipe" and do all wipes except sdcard and SD-Ext [2]. Now reboot your phone in Bootloader --> fastboot mode [3, 4].
Connect your phone to your PC using the cable.
Download ADB.zip and extract it on your PC. Download new recovery and rename it as "recovery.img". Put recovery.img in ADB folder and run recovery.bat from this folder.
After flashing recovery you must see cmd window like this:
4. Reboot your phone in recovery again. You need to convert your partitions from ext4 to f2fs.
Go to "Wipe" menu then in "Advanced Wipe" [1]. Now select "Data" and click on "Repair or Change File System" button [2], then click on "Change File System" button [3], choose "F2FS" [4] and swipe to change.
Go back and do the same with "System" [5].
After converting do all wipes except sdcard [6].
5. Download ROM and copy it on SD-card. Flash ROM. Flashing will take long so just wait.
6. After flashing ROM reboot your phone in Bootloader --> fastboot mode. Connect your phone to your PC using the cable.
Take out boot.img from ROM zip and put it in ADB folder on your PC. Run boot.bat from this folder.
After flashing boot.img you must see cmd window like this:
7. Now you can reboot your phone. After first boot you can back to recovery and flash Gapps if you need it.
Done!
Created 21-03-2015
Last Updated 21-03-2015
Click to expand...
Click to collapse
One last question which is best cm12... is it Glade or cm12... performance wise ....
and thanks a lot for the guide......great post.
Doing many things wrong...
already pressed thanks button.
Pr.haddimal said:
One last question which is best cm12... is it Glade or cm12... performance wise ....
Click to expand...
Click to collapse
Performance in CM12 and Glade is identical.
1. For best performance you must use class 10 SD-card.
2. After booting ROM you can activate development settings and set up CPU governor as "ONDEMAND". You can find it in Settings --> Performance --> Processor. With this setting ROM working faster.
BCCCPCEKCAHET said:
Performance in CM12 and Glade is identical.
1. For best performance you must use class 10 SD-card.
2. After booting ROM you can activate development settings and set up CPU governor as "ONDEMAND". You can find it in Settings --> Performance --> Processor. With this setting ROM working faster.
Click to expand...
Click to collapse
ya hav this sdcard class 10
thanks
for assistance
How to take out boot.img from the ROM.zip in bootloader mode
Sent from my HTC Explorer A310e using Tapatalk 2
It is not possible to do so and it is not even required. The Dev means to say that you have to take out the boot.IMG from the zip ON YOUR computer and then use fastboot flash boot boot.img to flash the boot image as told by @kirmaniarslan.
help
i can't flash Rom, long wait
Same here.
Sent from my HTC Desire 616 dual sim using Tapatalk
Hi. Where i could find twrp 2.8 version? Link are broken
Regards
jmaa009 said:
Hi. Where i could find twrp 2.8 version? Link are broken
Regards
Click to expand...
Click to collapse
@Black_Eyes posted a new link in the ROM thread. Look for it
Sent from my Explorer A310e using Tapatalk
please help me my sd card has got corrupted how to revert back from f2fs to ext4 again
djmacpro said:
please help me my sd card has got corrupted how to revert back from f2fs to ext4 again
Click to expand...
Click to collapse
Use this guide : http://forum.xda-developers.com/showthread.php?t=2532212 and try again
MSF Jarvis said:
Use this guide : http://forum.xda-developers.com/showthread.php?t=2532212 and try again
Click to expand...
Click to collapse
Its for partition right?
My problem is my SD is corrupted and I can't do any thing add/delete files in SD card even if I add/delete files the SD card again becomes as previous I need to delete all f2fs partition
After you enter parted, type print. You'll see a list of partitions present. Just keep typing rm followed by the partition numbers like : rm 1 && rm 2
Do this till print returns no partitions. Then you can use the rest of the guide from that point onwards with required modifications for your specific use case. Be sure to thank @thewisenerd over there as well.
Sent from my HTC Desire 616 dual sim customised for Puchki using Tapatalk
MSF Jarvis said:
After you enter parted, type print. You'll see a list of partitions present. Just keep typing rm followed by the partition numbers like : rm 1 && rm 2
Do this till print returns no partitions. Then you can use the rest of the guide from that point onwards with required modifications for your specific use case. Be sure to thank @thewisenerd over there as well.
Sent from my HTC Desire 616 dual sim customised for Puchki using Tapatalk
Click to expand...
Click to collapse
i tried this thing still it didnt work, even after several rm 1 its showsing all the partition when typed print.
i think the sd card is gone and of no use as it not branded of any company
djmacpro said:
i tried this thing still it didnt work, even after several rm 1 its showsing all the partition when typed print.
i think the sd card is gone and of no use as it not branded of any company
Click to expand...
Click to collapse
That's the only logical explanation brother.
how copy ROM in SD-card? with card-reader? computer don't see my card.what to do next?
kesha_nsk said:
how copy ROM in SD-card? with card-reader? computer don't see my card.what to do next?
Click to expand...
Click to collapse
Use a card reader
Sent from my HTC Explorer A310e using XDA Labs
Do not work in TWRP - Change Filesytem to F2FS.... How to fix this ?
alidarkstone said:
Do not work in TWRP - Change Filesytem to F2FS.... How to fix this ?
Click to expand...
Click to collapse
What is the size of your /system ?

Categories

Resources