Sudo-App2SD (IE: How to install /DATA to SD Card EXT2 Partition) - Touch CDMA Android Development

For those of us who want more space but want to use Myn's Warm Donut, here is how you install your data into the SD card Ext2 Partition.
First you must have your SD card formatted correctly, If you wish to format it a different way then use the following partition layout:
1: Fat32
2: Swap
3: Ext2 (512mb recomended)
You have to have all 3, otherwise it may not work.
Pro's
- More space
- Can still mount the card through the phone on the computer
- easy to switch between NAND and haret.exe
Con's
- Slower Access
- Can't remove the SD card
Required
- Micro SD card, obviously, any size.
- ADB Shell or if your VERY persistant you can do formatting all through the terminal on the phone
- Basic knowledge on how to use your computer, phone, and adb, i'm not here to hold your hand
FORMATTING
*WARNING*
BACK UP ALL DATA ON SD CARD, THIS WILL DELETE EVERYTHING ON IT.
Here's how to access adb shell and such http://forum.xda-developers.com/showpost.php?p=5544939&postcount=568
If you want to do it through adb with the phone booted or with the on phone console then skip steps 1 & 2, else skip step 2B
1 - Boot into the install console and go into recovery mode
2 - Connect your phone to your computer and go into ADB Shell
2B - Type 'su' [enter]
3 - Type the following
Code:
parted /dev/block/mmcblk0 [enter]
print [enter]
4 - Find the line that says "Disk /dev/block/mmcblk0: xxxxMB". Write this down!
5 - Delete all partitions then check to make sure they were deleted.
Code:
rm 1 [enter]
rm 2 [enter]
print [enter]
6 - Once the SD card is blank, create the primary partition. (This is the amount of space you want for your music, pictures, etc.)
Code:
mkpartfs primary fat32 0 XXXX [enter]
(XXXX = How many MB of storage you would like. Remember to leave 256-512 MB for your app partition, and about 64 MB for swap. You may need to put the number you wrote down for start in place of the zero if you are having trouble.)
7 - Create a swap partition. (Large sizes are unlikely to be useful, try 64MB or so.)
Code:
mkpartfs primary linux-swap XXXX YYYY [enter]
(XXXX = This will be the same XXXX number from step 6)
(YYYY = XXXX + [256 or 512] (or whatever size you want to make this partition)
8 - Create the ext2 (application) partition.
Code:
mkpartfs primary ext2 YYYY ZZZZ [enter]
(YYYY = This will be the same YYYY number from step 7)
(ZZZZ = The end of your SD card (the initial size you wrote in step 6)
9 - Exit parted and reboot then re-enter the install console.
Code:
quit [enter]
INSTALLING DATA
Once you have your card partitioned correctly then do the following to change /data
You must have space on the fat32 partition, 300~mb
1 - If you had the third option selected "( ) Data on Ext2 Data.img" then restore your Data.img to an andboot folder on your sd card.
2 - Load phone into the kernel install console.
3 - Ensure that your current data location is selected.
4 - Select option "5. Backup /data" and hit enter and wait for it to finish with no errors.
5 - Move up and select "( ) Data on SDCard Partition" and hit enter.
6 - Select option "6. Restore /data" and hit enter and wait for it to finish with no errors.
7 - Reboot phone and check the phone storage in the settings.
8 - Go on an installing spree with the market.
Note:
Formatting instructions taken from http://wiki.cyanogenmod.com/index.php/Apps2SD

Nice work man!!!
Thanks for documenting this.
I've linked this from Post 1 in the Warm Donut thread.

How do you enter the recovery console??

thebulletfromhell said:
How do you enter the recovery console??
Click to expand...
Click to collapse
Hold down the center button or vol up when you see the prompt while booting

That just say press enter to quit recovery mode. I just use that to mount the SD card.

thebulletfromhell said:
That just say press enter to quit recovery mode. I just use that to mount the SD card.
Click to expand...
Click to collapse
yeah when that message is on the screen just connect it to the computer and go into the adb shell

i've created fat32, swap and data partition |10k,3k,3k (roughly) is it ok?

Is there a way to do this in Windows using my card reader? This seems overly complicated.

slow88lx said:
Is there a way to do this in Windows using my card reader? This seems overly complicated.
Click to expand...
Click to collapse
no, it won't allow you to create multiple partitions on removable media.

mrkite38 said:
no, it won't allow you to create multiple partitions on removable media.
Click to expand...
Click to collapse
Windows doesn't support ext formatted partitions

mrono said:
Windows doesn't support ext formatted partitions
Click to expand...
Click to collapse
Right, but the installer will format them for you. You just need partitions. You could use diskpart to create the right structure on a hard disk, but not on a removable disk.

I don't even know where to begin with these instructions. What is "recovery mode"? What is "adb shell"?

slow88lx said:
I don't even know where to begin with these instructions. What is "recovery mode"? What is "adb shell"?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=5544939&postcount=568

mrkite38 said:
http://forum.xda-developers.com/showpost.php?p=5544939&postcount=568
Click to expand...
Click to collapse
First post updated

mrono said:
yeah when that message is on the screen just connect it to the computer and go into the adb shell
Click to expand...
Click to collapse
thanks. I just did it with the builtin term emu.

I used gparted to create the partitions, and I'm not sure if I did it right.
First I simply resized my existing Fat32 partition. Second, I created a 512MB ext2 partition. Third I created a 64MB ext2 partition.
I'm trying to install Android sys on NAND and data on SD ext2 partition. How will I know if it's using the 512MB ext2 partition instead of the 64MB one?
Also, any reason not to use ext3 or ext4?

Dukenukemx said:
I used gparted to create the partitions, and I'm not sure if I did it right.
First I simply resized my existing Fat32 partition. Second, I created a 512MB ext2 partition. Third I created a 64MB ext2 partition.
I'm trying to install Android sys on NAND and data on SD ext2 partition. How will I know if it's using the 512MB ext2 partition instead of the 64MB one?
Also, any reason not to use ext3 or ext4?
Click to expand...
Click to collapse
The installer looks at the partitions in order, from the 'left' side of the card. system can only go to the 2nd partition and data can only go to the third partition.
we don't have drivers for ext3/4 iirc

So, in gparted it was 6gig Fat32>512 ext2>64 ext2. Does that mean that the data is going onto the 64 MB ext2? Does having sys on NAND even use the 3rd ext2 for swap file?

Dukenukemx said:
So, in gparted it was 6gig Fat32>512 ext2>64 ext2. Does that mean that the data is going onto the 64 MB ext2? Does having sys on NAND even use the 3rd ext2 for swap file?
Click to expand...
Click to collapse
1. yes.
2. i'm not sure, i don't ever use swap.

mrkite38 said:
The installer looks at the partitions in order, from the 'left' side of the card. system can only go to the 2nd partition and data can only go to the third partition.
we don't have drivers for ext3/4 iirc
Click to expand...
Click to collapse
If install app is hardcoded for...
- Partition-1 is for Fat32
- Partition-2 is for EXT2 (System installation)
- Partition-3 is EXT2 (Data installation)
What partition number is for the Linux Swap?
Thanks...

Related

[GUIDE] Downgrade, Root, Partition, Update SPL, and Install CyanogenMOD

This is a Detailed Guide on Rooting your phone and installing the new CyanogenMod Roms!
Like My Guide(s)? Donate
I am not responsible for any damage that is done to your phone. You have chosen to follow and read this guide.
Here we go!
Check if you have RC29 or RC7 (UK)
1. Go to settings
2. Press on "About Phone"
3. Scroll Down to "Firmware Version" if you have RC29 or RC7 please skip the downgrading part of this Guide. If you have RC30 or higher please follow the downgrading part of the Guide.
-----------------------------------------------------------------------------------------------------
Downgrade Your phone from RC30 or up to RC29 OR RC8 and up to RC7
1. Make sure you SD CARD is formated to FAT32. If it is FAT or FAT16, this will not work. So, if your SD Card is not FAT32, please format it now.
NOTE: Formating your SD Card removes all files. Please backup your files first!
2. Download the RC29 DREAIMG.nbh (USA) - HERE or RC7 DREAIMG.nbh (UK) - HERE
3. Unzip the file and place the DREAIMG.nbh in the root of your SD Card (root = not in any folder)
4. Unmount your phone from USB
5. Turn off your phone
6. Boot into your bootloader by holding the CAMERA button and the POWER button.
7. A gray screen should appear. Press POWER to start the downgrading process
8. Once its done, Press the Track Ball to continue
9. Reboot your phone by pressing Talk + Menu + Power
10. Go through the Setup Wizard as normal to setup your phone
11. Congrats! You have now Downgraded your phone to Firmware RC29/RC7. Please verify it in the "About Phone" section in your settings menu.
-----------------------------------------------------------------------------------------------------
Rooting Your Phone
1. Go to Settings > Applications and make sure Unknown Sources is checked
2. Open your browser on your phone and go to www.g1upgrade.com/root.apk
3. Once its down downloading, Long press on the apk and choose to install
4. Open the Root.apk app that we have just installed and Press on Download IMG and HardSPL files
5. Once it finished downloading, press on Home
6. Press Enter, Enter, and then type telnetd, then press Enter again
Note: Ignore the Contact search
7. Go back to the Root.apk and click on "Protect my Root"
Note: If it doesnt work, please reboot and try Step 6 again
8. Once you successfully protected your root Turn OFF your phone
9. Hold Home + Power to enter recovery, You will see a yellow sign.
10. Type Alt+l then Alt+s. Your phone will reboot a couple of times.
There you go! Your phone has now been successfully rooted!
-----------------------------------------------------------------------------------------------------
Install CyanogenMOD 4.0.1 (Stable)
1. Download CyanogenMOD 4.0.1 - HERE
2. Rename update-cm-4.0.1-signed.zip to update.zip and place it at the root of your sd card
3. Boot into recovery by pressing Home + Power
4. Type Alt+l then alt+w then alt+s
5. When its done it will ask you to reboot with Home + Back, if not reboot with Talk+Menu+Power
6. Done! You should now have a rooted G1 Phone with a custom Rom!
-----------------------------------------------------------------------------------------------------
Installing the CyangenMod Recovery IMG
1. Open up the Terminal App on your phone
2. Type in su then press on "Always Allow"
3. Type in the following:
Code:
cd /sdcard
wget http://n0rp.chemlab.org/android/cm-recovery-1.4.img
flash_image recovery /sdcard/cm-recovery-1.4.img
4. Done! Easy as Pie
-----------------------------------------------------------------------------------------------------
Partition your SD Card with EXT3 and Fat32 and Enable auto apps2sd
Note: This will erase everything on your SD Card!
1. Turn off your phone
2. Enter recovery by holding Home + Power
3. Scroll Down and press on Enter Console or press alt+x
4. Press enter
5. Type the following according to your sd card:
1 GB
Code:
parted /dev/block/mmcblk0
print (to verfiy we know what size card we are dealing with, the details should be straight forward)
rm 1
rm 2
mkpartfs primary fat32 0 600
mkpartfs primary ext2 600 996
quit
upgrade_fs
reboot recovery
2 GB
Code:
parted /dev/block/mmcblk0
print (to verfiy we know what size card we are dealing with, the details should be straight forward)
rm 1
rm 2
mkpartfs primary fat32 0 1500
mkpartfs primary ext2 1500 1996
quit
upgrade_fs
reboot recovery
4 GB
Code:
parted /dev/block/mmcblk0
print (to verfiy we know what size card we are dealing with, the details should be straight forward)
rm 1
rm 2
mkpartfs primary fat32 0 3500
mkpartfs primary ext2 3500 3996
quit
upgrade_fs
reboot recovery
8 GB
Code:
parted /dev/block/mmcblk0
print (to verfiy we know what size card we are dealing with, the details should be straight forward)
rm 1
rm 2
mkpartfs primary fat32 0 7500
mkpartfs primary ext2 7500 7948
quit
upgrade_fs
reboot recovery
16 GB
Code:
parted /dev/block/mmcblk0
print (to verfiy we know what size card we are dealing with, the details should be straight forward)
rm 1
rm 2
mkpartfs primary fat32 0 15500
mkpartfs primary ext2 15500 15948
quit
upgrade_fs
reboot recovery
OPTIONAL: Upgrade EXT3 Partition to EXT4 (Thanks david1171)
Code:
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2
e2fsck -fpDC0 /dev/block/mmcblk0p2
6. Reflash your Cyanogen 4.0.1 Rom
-----------------------------------------------------------------------------------------------------
Flash the New RADIO and SPL
NOTE: Please read carefully before flashing! This could BRICK your phone!!!
1. Check if you have a PVT or DVT board
a. Power off your phone and enter bootloader (Camera + Power)
b. Check look at the top and see if it says PVT of DVT
2. If you have a DVT board YOU CANNOT CONTINUE BECUASE THIS WILL BRICK YOUR PHONE!
3. For all you luck PVT board people Download the following:
OTA Radio Update - HERE
Danger SPL - HERE
CyanogenMod 4.0.1 - HERE
4. Rename ota-radio-2_22_19_26I.zip to Radio.zip. Rename spl-signed.zip to SPL.zip. Rename update-cm-4.0.1-signed.zip to ROM.zip
5. Place the 3 renamed files at the ROOT of your SD Card
6. Enter Recovery (Home + Power)
7. Scroll down and press on "Apply any zip from sd"
8. Press on Radio.zip
9. Let it install. Once done it will tell your to reboot to finish the update. Press on Reboot System now in the recovery menu.
10. It will reboot back to recovery. Once it does, Scroll down and press on "Apply any zip from sd"
11. Press on SPL.zip
12. Let it install. Once done it will tell your to reboot to finish the update. Press on Reboot System now in the recovery menu.
13. It will NOT reboot into recovery. Your phone will be stuck on the G1 screen. Once it gets there, reboot your phone by pressing Talk+Menu+Power and then hold the HOME button to enter back into recovery.
14. Scroll down and press on "Apply any zip from sd"
15. Press on ROM.zip and let it install.
16. Reboot your phone to finish.
17. Congrats! You are all done! Enjoy your Rooted phone!
-----------------------------------------------------------------------------------------------------
Credit:
Cyanogen
Haykuro
youneek
saved for future posts
Very nice to have everything in one place and an updated guide for all the people who post on the forums thinking that all the stickied guides are outdated. I think I'm gonna unroot my spare g1 and follow this guide just for fun. Thanks again for your dedication to the n00bs and attempting to keep the threads uncluttered.
I vote for yet another sticky for nephron!!!
Thanks for the support hahahah . Im glad u like it
Great guide!
alritewhadeva said:
Great guide!
Click to expand...
Click to collapse
thanks bro! Glad u like it hahah
AUS htc dream
this doesnt work on the aus htc dream
when i press camera and power
i get error and Not Allow
how do i fix that?
tigerhalsey said:
this doesnt work on the aus htc dream
when i press camera and power
i get error and Not Allow
how do i fix that?
Click to expand...
Click to collapse
o dude use this DREAIMG.nbh
http://koushikdutta.blurryfox.com/G1/DREAMIMG-RC7.zip
Added UK DreamIMG.nbh to Guide
mkpartfs
Hello all,
I have had my phone rooted for about a month now and have been doing the basic hings like Tethering my phone. But i want to add the Hero Rom to my G1.-Everything works when i go through the steps except when you have to put in the mkpartfs... command-it comes back and says sh: mkpartfs: not found
does anyone know how to make this work or how to add mkpartfs to the phone or how to make it recognize it?
Thanks
usafunderdog said:
Hello all,
I have had my phone rooted for about a month now and have been doing the basic hings like Tethering my phone. But i want to add the Hero Rom to my G1.-Everything works when i go through the steps except when you have to put in the mkpartfs... command-it comes back and says sh: mkpartfs: not found
does anyone know how to make this work or how to add mkpartfs to the phone or how to make it recognize it?
Thanks
Click to expand...
Click to collapse
did you type parted /dev/block/mmcblk0 first?
david1171 said:
did you type parted /dev/block/mmcblk0 first?
Click to expand...
Click to collapse
ya make sure u type that first. Also make sure u are running this in the recovery console not in terminal. U need CM Recovery 1.3.1 and above for it to work...
parted /dev/block/mmcblk0
Yes, i typed parted /dev/block/mmcblk0 first-but still nothing.
What is cm recovery1.3.1 and im not typing it into terminal, im typing after you hit Alt-X.
I am obviously new at this but I recently rooted my US T-Mobile G1 phone and flashed CyanogenMod 4.0.1 and have Cyanogen's Recovery 1.4.
I formatted my 2GB SD card in FAT32 and I have backed up all my data.
I tried making a partition on my SD card and had messed up and had to format the card to make it work again.
I am having a few problems following the "Partition your SD Card with EXT3 and Fat32 and Enable auto apps2sd" guide...
#1 - When typing the code do I hit enter after every line I input?
#2 - Where it says "print (to verfiy we know what size card we are dealing with, the details should be straight forward)" do I type whats in parentheses?
Again I am new to this whole process so if anyone could help I'd greatly appreciate it.
vidac1rca139 said:
I am obviously new at this but I recently rooted my US T-Mobile G1 phone and flashed CyanogenMod 4.0.1 and have Cyanogen's Recovery 1.4.
I formatted my 2GB SD card in FAT32 and I have backed up all my data.
I tried making a partition on my SD card and had messed up and had to format the card to make it work again.
I am having a few problems following the "Partition your SD Card with EXT3 and Fat32 and Enable auto apps2sd" guide...
#1 - When typing the code do I hit enter after every line I input?
#2 - Where it says "print (to verfiy we know what size card we are dealing with, the details should be straight forward)" do I type whats in parentheses?
Again I am new to this whole process so if anyone could help I'd greatly appreciate it.
Click to expand...
Click to collapse
1) Yes hit enter after every line of code
2) Sorry for this, but LOL.....anyways, no you don't type whats in parentheses. The print command will tell you what partition format your sdcard has before you begin. If it looks like this....
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
then your sdcard is virgin and has no partitions.
If it looks like this......
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
then you have a fat32 and a ext2 partition
Refer to this guide for any supplementary information that isn't included in nephron's guide (although his is pretty comprehensive)
http://forum.xda-developers.com/showthread.php?t=534714
usafunderdog said:
Yes, i typed parted /dev/block/mmcblk0 first-but still nothing.
What is cm recovery1.3.1 and im not typing it into terminal, im typing after you hit Alt-X.
Click to expand...
Click to collapse
Typing it after you hit Alt+X is only the correct place to execute the command providing you have Cyanogen's recovery image which replaces the default recovery image that comes with the phone. (when you boot up while holding down power+home) If you boot while holding those key combos and you get a yellow triangle with an exclamation point, you don't have cyanogen's recovery image. If you do have it, then you will see a ghostly android bot in the background and green text on the screen.
If you have cyanogen's recovery, I'm not sure what your doing wrong. If you don't have it, get it by following the steps entitled Installing the CyangenMod Recovery IMG in the OP of this thread. More info about cyanogen's recovery can be found below.
http://forum.xda-developers.com/showthread.php?t=523558
When I input "print" my card looks like this...
Code:
print
print
Model: SD SD2GB (sd/mmc)
Disk /dev/block/mmcblk0: 1996MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 66.0kB 1996MB 1996MB primary fat32 boot
Do I continue with the guide?
vidac1rca139 said:
When I input "print" my card looks like this...
Click to expand...
Click to collapse
Yes, you have a 2 gb card that has one fat32 partition.
Code:
parted /dev/block/mmcblk0
rm 1
mkpartfs primary fat32 0 1500
mkpartfs primary ext2 1500 1999
quit
upgrade_fs
reboot recovery
Also note that if you are using a recent CM build, which you are because you stated you have 4.0.1, then you don't need to do apps2sd, it is done automatically when you have a properly formatted ext2 or ext3 partition, which you are going to have after you follow the above steps
I went all the way through with the guide but when i did
"mkpartfs primary ext2 1500 1999"
I recieved the following -
Error: The location 1999 is outside of the device /dev/block/mmcblk0.
Is that ok or should I start over and try something else?
vidac1rca139 said:
I went all the way through with the guide but when i did
"mkpartfs primary ext2 1500 1999"
I recieved the following -
Error: The location 1999 is outside of the device /dev/block/mmcblk0.
Is that ok or should I start over and try something else?
Click to expand...
Click to collapse
sorry typo on my part....you should use 1996
You should really do some more reading into partitioning. It is quite clear that you are completely lost and just blindly following my responses which isn't a good thing. You should have some idea of the general commands we are doing here. These commands are fairly self explanatory. You should take a minute to look at the original output of the print command....This is exactly what you have according to your print command output...
Code:
Disk /dev/block/mmcblk0: 1996MB
1996mb means you have 1996mb available on your sd card, I inadvertently told you to input 1999mb because I simply copied it from the original post without paying much attention assuming you would figure it out. You really need to have a slightly better handle on this stuff before you continue.

converting? help..

what does it mean to convert ext 2 to 3 or ext 3 to i dont understand what that means? what does it do? is it necessary?
Basically it helps against your second partiton from getting corrupted during shutdown. Its a good thing to do and if you have cyanogen's recovery image just boot into recovery, go to the recovery console hit enter and type "upgrade_fs" without quotes then wait for the # prompt to appear again and type "reboot" without quotes and you are set. Sorry for the bad format i'm using my g1 to type
so do i do it when i have an ext3 linux swap?or do i do it when theres only an ext and ext2?
k1293 said:
so do i do it when i have an ext3 linux swap?or do i do it when theres only an ext and ext2?
Click to expand...
Click to collapse
is your sdcard partitioned as so fat32, ext2, linux-swap or either fat32, ext2? it will only apply to the ext2. it doesn't matter if you have 100 partitions upgrade_fs targets /dev/block/mmcblk0p2 which is your second partition.

Unsure on procedure for partitioning SD/flashing new rom

So i have JACheroski installed and it looks great.. but god is it slow. I probably didnt partition my sd card correctly.... so help me out here guys.
I dont know what exactly i want either..(fat32/ext 2 or 3/linux-swap)
Now can i just go into recovery, type in the 5 or 6 lines of code givin in the guide on here and have my card partitioned the way i want? Or do i have to download the apps2sd app and install it and THEN go type in the code.
Or lets say I use http://forum.xda-developers.com/showthread.php?t=534714 do i have to install apps2sd then follow his guide and my phone will be set up for all these hero roms??
And do i really need adb?
You need all 3 (fat32/ext2 or 3/linux-swap) this is the guide I used because it gives you they way to do it for each card size (8gb,4gb,2gb) Just make sure you follow it exactly as described, make sure when you do the linux-swap you do the - inbetween the numbers, not just a space like with the fat32 and ext2.
justanothercrowd said:
You can use the recovery console and parted to format SDcards with 1.31 folks, no more going through hassles you have the tools on you G1!...here is an example of how to do this in recovery console using parted. DO NOT USE MORE THAN 32MB SWAP!!!
Example for 8GB card (this example plays it safe and will leave a small amount leftover regardless of the 8GB card)
Reboot and enter recovery
Enter console
#parted /dev/block/mmcblk0
#print (to verfiy we know what size card we are dealing with, the details should be straight forward)
rm 1
rm 2
mkpartfs primary fat32 0 7200
mkpartfs primary ext2 7200 7700
mkpartfs primary linux-swap 7700 7732
#print (to verify we have the 3 partitions)
Example for my 4GB card
#parted /dev/block/mmcblk0
#print (to verfiy we know what size card we are dealing with, the details should be straight forward)
rm 1
rm 2
mkpartfs primary fat32 0 3420
mkpartfs primary ext2 3420 3932
mkpartfs primary linux-swap 3932-3964
Example for a 2GB card playing it safe
#parted /dev/block/mmcblk0
#print (to verfiy we know what size card we are dealing with, the details should be straight forward)
rm 1
rm 2
mkpartfs primary fat32 0 1200
mkpartfs primary ext2 1200 1700
mkpartfs primary linux-swap 1700-1732
"End?" you need to place the last value for the linux swap eg.3964 for my 4GB card
#print (to verify we have the 3 partitions)
Next we need to "quit" parted and upgrade our ext2 partition to ext3
#upgrade_fs
Swap value is set to 30 currently, you can change this by modifying the "echo" value for swappiness in the a2sd.sh script
For a longer more detailed parted turorial read this
Click to expand...
Click to collapse
Now do i need apps2sd installed now? or after i partition everything?
that rom does apps2sd automatically so dont install any script for it or you will screw it up. Making the ext2/3 partition is what makes it work, basically no you dont need to do anything other then partition correctly, maybe wipe and reflash after but you shouldnt have to.
Thanks man!
Ill do it right away and see what happens.
Ignore that last bit.
Ok... it takes me to GNU parted 1.8.8.1.179.
i typed print and it gave me a huge list of info but i type rm 1 and it says unrecognised disk label
Actually its not recognizing any of my disk labels
prolly because you didnt make any partitions yet, and when you type print dont put a # just type print then you will see if you have any partitions, if it doesnt show any you dont need to do the rm 1 or rm 2
crpercodani said:
prolly because you didnt make any partitions yet, and when you type print dont put a # just type print then you will see if you have any partitions, if it doesnt show any you dont need to do the rm 1 or rm 2
Click to expand...
Click to collapse
Awesome i got it i think.
So now my phone should just run faster? Or is there more i need to do? And im i safe to swap to any other hero rom now?
nevermind.... it says damaged sd card now...
If i format will i have to repartition it?
It wont format now... this is frustrating haha
Yea you can switch roms but you need to wipe the ext2/3 partition, it says how to somewhere, hold on I will find it and edit it into here. Damn that sucks, when did it say damaged? Was it on the phone or when you mounted it to your pc? If you format it from your windows it will only find the fat32 partition, you need to go back into console and do rm 1
rm 2
rm 3
then re-do the partitions.
when you switch roms goto console and type this (hit enter after each line)
mount -o rw /dev/block/mmcblk0p2 /system/sd
cd /system/sd
rm -r *
My windows f's up sometimes when I mount it so if it is working on the phone I would just try a diff usb port, try unplugging it a few times.
Its on the phone, after i rebooted from partitioning. The phone will not reformat it, i go through the steps but nothing happens.
I cant format from console can i?
what happens when you do the rm commands? you when into gnu first right? (parted /dev/blcok/mmcblk0)
yeah it welcomes me to gnu but then tells me all commands are invalid, including print and rm1 rm 2 rm 3 etc.
when i start the phone up it first says the card is blank, then damaged.
hmmm you know I really have no idea, do you have any type of linux distrto like debian or ubuntu/kubuntu?
Nope... I dont even know what that is lol.
Weird.. I took it out and put it back in and it read it.. 3,882 mb left.
So do i format....or go into console and make sure all partitions are still there or what?
Im not lookin to ruin my new card
Oh its a OS for your computer. My only idea is to google for a program that will find linux partitions on a sd card cuz windows only sees the fat32 one so you cant format it on there. Hopefully someone else on here might have another idea for how to do it from console but if it is giving you invalid commands then I have no clue.
How many gb is your card? 2,4,8?

Re partition Question.

i am currently runnning HERO ROM , if i back Up my sd card and re partition my sd card for 96MB linux swap , do i have to re flash the rom over ?
also im doing this because i hear runninq a 96MB linux swap , makes the Hero rom run smoother nd faster , any truth to this before i re partition ?
also any inputs?
thnx
96 from what i hear is good but starts to lag after a while. also if you just re-partition the linux-swap then you shouldn't have to flash the rom, but if you do ext3 as well then you should re-flash the rom
i vee been reading and relize i have to try a couple of settings , question bro if i repartion the linux swap dont i have to re partition everything else as well ?
GangstaThug420 said:
i vee been reading and relize i have to try a couple of settings , question bro if i repartion the linux swap dont i have to re partition everything else as well ?
Click to expand...
Click to collapse
it depends on how big your current ext3 and linux-swap partitions are.
if the ext3 partition is between 500 and 600mb then you should not have to touch the fat32 partition. what i would recommend doing though (do this once and it will give the ability to easily try out different sizes for linux-swap)
in recovery console in cyanogen's 1.4 recovery image. use this formula for your partition sizes
total size of card=xx linux-swap=96mb ext3=500mb (thats what recommend by most everyone)
xx-96=y
y-500=z
substitute the actual numbers in for the variables in below
back up anything on your sdcard that you do not want to lose!!!
Code:
parted /dev/block/mmcblk0
print (look for the number by disk size /dev/block/mmcblk0)
rm 1
rm 2 (if it exists)
rm 3 (if it exists)
mkpartfs primary fat32 0 z
mkpartfs primary ext2 z y
mkpartfs primary linux-swap y xx
quit
upgrade_fs
ums_enable (while plugged to computer will mount sdcard, now put rom on phone)
ums_disable (will unmount sdcard)
reboot recovery
now you can wipe and flash your rom
whenever you want to change the size of your linux-swap to something less then 96mb. again this in the recovery console
x=some number in previous linux-swap boundaries (can be start point)
y=some number in previous linux-swap boundaries (can be end point)
Code:
parted /dev/block/mmcblk0
resize 3 x y
quit
reboot
there you go.
in case you are wondering, yes i like math

How to remove Apps2sd or ext partition

Hey guys first off I'd like to apologize if this thread is already up somewhere but I couldn't find anything in the search
I'm selling my secondary G1 to a non tech savvy user but I'm leaving CM on there, I have an ext partition on the SD card and I was wondering if there was a way I could get rid of the Apps2SD so there wouldn't be a risk of them messing up the phone by switching the card
Thanks
You cann just reformat the whole card to FAT32
or you can delete the ext partition through parted and increase the size of the FAT32 to fill the unused space
How would I reformat the card from adb or recovery console?
AimanF said:
How would I reformat the card from adb or recovery console?
Click to expand...
Click to collapse
you can format with your pc or to format in phone settings either should work for you.
The format option in the phone settings is grayed out, and my sd card reader doesn't seem to be working, is there another way to do it through the phone?
AimanF said:
The format option in the phone settings is grayed out, and my sd card reader doesn't seem to be working, is there another way to do it through the phone?
Click to expand...
Click to collapse
recovery mode
parted dev/block/mmcblk0
print
rm 2
You can use AmonRA's recovery image and format the sdcard with that. You can install it from the terminal in the phone.
su
flash_image recovery/sdcard/recovery-dream-RA-v1.3.2G.img
Yes h/o
adb shell
parted /dev/block/mmcblk0
print
rm 1
rm 2
rm 3
Click to expand...
Click to collapse
This will remove all the data on the SDcard
Go to where it says Disk /dev/block/mmcblk0: XXXXMB
use the number in place of XXXX
mkpartfs primary fat32 0 XXXX
Click to expand...
Click to collapse
type "print" w/o quotes and see if it worked
type quit to exit parted
that should be all
EDIT: all this is while in recovery mode. Ace's method will only remove ext partition but it will not fill the empty space, wasting it
alright cool parted did the trick! Thanks alot everyone!
Tempestrs4 said:
You can use AmonRA's recovery image and format the sdcard with that. You can install it from the terminal in the phone.
su
flash_image recovery/sdcard/recovery-dream-RA-v1.3.2G.img
Click to expand...
Click to collapse
Make sure that there is a space between flash_image recovery and /sdcard
thank you. was a lot of help.
Hey guys, how do I get into the ADB shell?
you just answered your own question.
"adb shell"
After used "rm 1" I typed "print" and shows me same things. I can't format the microSD or delete the partitions, any help?.

Categories

Resources