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?.
Related
Hey guys,
I have a problem that I know you can assist with. I recently rooted my G1. I installed the CryogenMod 4.2 OS. I then decided to give the Dizzy's White Champion V2 OS a whirl. I wasn't too impressed with it due to the lag and slowness. I then did a wipe and installed the CryogenMod 4.2 OS again. This time around I am stuck on the G1 screen. I can enter the recovery mode by pressing home and power. I know I am missing something easy. Can you guys tell me what I should do? I can supply more information if needed.
I appreciate you guys.
Ira
iraqmilner said:
Hey guys,
I have a problem that I know you can assist with. I recently rooted my G1. I installed the CryogenMod 4.2 OS. I then decided to give the Dizzy's White Champion V2 OS a whirl. I wasn't too impressed with it due to the lag and slowness. I then did a wipe and installed the CryogenMod 4.2 OS again. This time around I am stuck on the G1 screen. I can enter the recovery mode by pressing home and power. I know I am missing something easy. Can you guys tell me what I should do? I can supply more information if needed.
I appreciate you guys.
Ira
Click to expand...
Click to collapse
Sounds Drizzy's ROM left some crud on your ext partition..
Open the command line in recovery..
Code:
mount -o rw /dev/block/mmcblk0p2 /system/sd
cd /system/sd
rm -r /dalvik-cache/*
reboot recovery
then wipe and reflash. That should fix it, otherwise you will need to delete your apps too :-(
Code:
mount -o rw /dev/block/mmcblk0p2 /system/sd
cd /system/sd
rm -r /app/*
rm -r /app-private/*
reboot recovery
Thank you brother, Adrian.
I will give that a shot right now and I will let you know how it goes.
Thanks again
Ira
Alright,
I just followed the steps that you provided. My G1 said that I couldn't remove the following files because they weren't there. Something along those lines. I reformatted my sd card right before I attempted to reinstall cryogenmod. Maybe that has something to do with it. Any other ideas?
Thanks again.
iraqmilner said:
Alright,
I just followed the steps that you provided. My G1 said that I couldn't remove the following files because they weren't there. Something along those lines. I reformatted my sd card right before I attempted to reinstall cryogenmod. Maybe that has something to do with it. Any other ideas?
Thanks again.
Click to expand...
Click to collapse
Ah, right, I assumed your card had an ext partition which was set up for Apps2SD and some files got left behind. Sorry, I really should have asked before making suggestions >< Not really sure in that case :-/
I believe I did do that. I followed these steps originally:
#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
Then I installed Champion V2. I am at a loss right now. If you have any questions please fire away.
did you format the entire ext3 partition or just folder like was already suggested? if you just did folders then try rm -r /app_s/*. non hero roms will not boot up if you still have all the hero apps on your ext2/3/4.
I think the problem is that I had to create the 3 partitions in order to run the Hero rom. I am trying to return to the CyanogenMod now and that isn't needed. So, how I can I delete the partitions that I created for Hero. I think once those guys are gone then I will be good to go. Any ideas how I can do that?
Problem solved!
This is what I did:
I loaded the recovery flasher and entered the terminal. Keyed in the following:
parted /dev/block/mmcblk0
print
rm 1
rm 2
rm 3
rm 4
rm 5
quit
upgrade_fs
recovery
Wiped the data, reinstalled OS and she loaded up like a charm.
Seeing as you removed your ext3 partition and are now only using Fat, there must have been something left on your ext3. As David said, I think it was the /app_s/ folder which I forgot to mention. Oh well, you should be able to remake all your partitions and have all the apps on your internal memory moved to ext3.
iraqmilner said:
This is what I did:
I loaded the recovery flasher and entered the terminal. Keyed in the following:
parted /dev/block/mmcblk0
print
rm 1
rm 2
rm 3
rm 4
rm 5
quit
upgrade_fs
recovery
Wiped the data, reinstalled OS and she loaded up like a charm.
Click to expand...
Click to collapse
Just out of curiosity, why did you have 5 partitions?
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?
I have a Kingston 8Gig Class 4 and i just bought a Transcend 8Gig Class 6 SDCard.
Can someone please tell me step by step how to backup my class 4 to and restore it to my new Class 6.
Thanks in advance!
ubuntu is the easiest way believe it or not as it is the only o that will see ur partition when u mount ur sd card. check out the wubi installer. or u can use adb.
adb remount
adb pull system/sd/app to pull the apps off, just replace pull with push when u want to put them back on the ext.
i can't recall the exact thread in this Q&A section but there was one that showed how to backup /system/sd to your sdcard then you could pull those files off on a computer and put them on the new sdcard then copy them back over to the second partition.
i think they were something like
Code:
mkdir sdcard/ext2 (the directory name doesn't matter just whatever is easiest for you to remember)
cp /system/sd /sdcard/ext2
someone correct me if something is wrong with those. then put those files on your new sdcard and go to the recovery console so you won't have to worry about any force closes with the new sdcard. make sure you do this after partitioning your new sdcard
Code:
mount /system
mount /sdcard
mkdir /system/sd
cp /sdcard/ext2 /system/sd
i think the commands were something like that. but if you have adb then the way posted above is the easiest for me.
jedinyt said:
I have a Kingston 8Gig Class 4 and i just bought a Transcend 8Gig Class 6 SDCard.
Can someone please tell me step by step how to backup my class 4 to and restore it to my new Class 6.
Thanks in advance!
Click to expand...
Click to collapse
Why don't you just use backup(for root) users application? just copy the folder it creates on your sdcard to your drive, and place into the new sdcard.
@David, I think those commands would work, but here's what I always do (and can verify it works).
Code:
rm -r /system/sd/dalvik-cache/*
rm -r /system/sd/app_s/*
cd sdcard
mkdir ext
cp /system/sd/* /sdcard/ext/
Then to push back
Code:
mount -o rw /dev/block/mmcblk0p2 /system/sd
rm -r /system/sd/*
cp /sdcard/ext/* /system/sd/
reboot
Its best to do all that in the recovery console, or adb shell when the phone is in recovery. Don't do it while the phone has booted in the ROM.
Thanks for all the help/reply...
one more question... how do i do it? do i do it in the terminal? console? or adb?
What they just gave you would be done in terminal.
jedinyt said:
Thanks for all the help/reply...
one more question... how do i do it? do i do it in the terminal? console? or adb?
Click to expand...
Click to collapse
I said at the bottom of my post. Recovery console is best, if you do it when your phone is actually running you could have issues.
supremeteam256 said:
What they just gave you would be done in terminal.
Click to expand...
Click to collapse
or adb shell
JJbdoggg said:
or adb shell
Click to expand...
Click to collapse
Well yeah, ideally when the phone is in recovery...
i have a Desire and im wondering if there's a easier way to clone the sd card to another bigger. Any idea ? Cloning softwares ?
What about just dd the SD card. something like:
1. Turn off the phone
2. dd sd card to img file
3. dd img to new file
4. New sd in slot and reboot
Hi, ive searched around but cannot seem to find a complete answer, but basically is there a way to just repartition my linux swap from 32MB to 96MB.
I dont have a linux cd and so if theres a way to do it through ADB or recovery, that would be great.
Thanks.
D3NNY said:
Hi, ive searched around but cannot seem to find a complete answer, but basically is there a way to just repartition my linux swap from 32MB to 96MB.
I dont have a linux cd and so if theres a way to do it through ADB or recovery, that would be great.
Thanks.
Click to expand...
Click to collapse
i'll give you the short answer then i will edit this post with the long answer
short answer.
you use the resize command in parted on your ext3 and linux-swap partition. if you have used parted from the recovery console a few times before this will be easy but i will post through instructions in a minute
Long answer
go into the recovery console. (recovery screen then last option)
then type (if you want to use adb just type adb shell then do the commands)
Code:
parted /dev/block/mmcblk0
print (you will need the start and end points for your ext3 and linux-swap partitions)
resize 2 [start point] [end - 64mb]
resize 3 [start - 64mb] [end]
print (to verify it worked)
quit
upgrade_fs
reboot
there you go.
I have not tested the resize command on an ext3 partition but i do not think (key word think) it will destroy your data on ext3, but back up just to make sure.
to back up your ext3
with adb (since i assume you have it from the first post)
Code:
adb pull /system/sd [dir on computer]
to restore on empty card
Code:
adb shell mkdir /system/sd
adb push [dir on computer] /system/sd
thanks for the great reply. Will test out now and see what happens!
Can anyone verify if this works?
My only concern is the resizing of ext3. Will it cut out any data since I am shortening the partition?
mr_roboto said:
Can anyone verify if this works?
My only concern is the resizing of ext3. Will it cut out any data since I am shortening the partition?
Click to expand...
Click to collapse
Yes, it works. And yes it *can* corrupt/delete some data from the ext3 depending on how much extra space you have. To be safe, just back-up. The easiest way is doing a BART or switchrom backup (Which backs up you ext) move the backup from the FAT partition to a computer (not necessary but you seem worried about your ext, so just to be safe) resize the partitions and restore your backups.
or just use amon recovery
Thanks for the response guys, I went and started reading about switchrom.
I am planning to do the following steps:
switchrom.sh -s // to store my rom
resize my partitions
switchrom.sh -r
The thread says it stores the nandroid and the app data, I am assuming that means nandroid and ext partition right?
D3NNY said:
Hi, ive searched around but cannot seem to find a complete answer, but basically is there a way to just repartition my linux swap from 32MB to 96MB.
I dont have a linux cd and so if theres a way to do it through ADB or recovery, that would be great.
Thanks.
Click to expand...
Click to collapse
I don't think this is the same, but I am running a hero rom and was wondering what "swappiness" is? I keep reading stuff like "swappiness of 96mb", etc. Is this just referencing the linux swap file size? and with me running a hero rom, what is the best setup for my SD card? I am currently running simply a fat32 partition and an ext3- thanks
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...