Changing a SDCard - G1 Q&A, Help & Troubleshooting

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

Related

Need some advice. Simple problem you guys can assist with.

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?

how to backup app partition

is there a way for me to backup my ext2 app partition on my sdcard with a windows machine? im running cyans 4.0.2 and i love it! but i would like to be able to backup the partition 'just in case' but i only have a xp desktop. thank you!
need to backup your ext partition?
the following commands will backup/restore your ext partition to/from a folder named sdbackup in your current directory. these must be run while phone is booted, not recovery.
to backup your ext partition: adb pull /system/sd/ %CD%\sdbackup
to restore back to sdcard: adb push %CD%\sdbackup /system/sd
When you star a thread with "How..." in the title you must start this thread in Dream Q&A sub forum !
Thread moved
You can also use Ubuntu.
title sounds more like this thread would be instructions rather than a question.
Another way that does not require adb would be to enter the following in terminal emulator
Code:
cd system
cp -r sd /sdcard/(name of folder you wish to backup to)
Than just plug the usb into your windows box, mount the sd card, and copy the folder.
hcphs said:
need to backup your ext partition?
the following commands will backup/restore your ext partition to/from a folder named sdbackup in your current directory. these must be run while phone is booted, not recovery.
to backup your ext partition: adb pull /system/sd/ %CD%\sdbackup
to restore back to sdcard: adb push %CD%\sdbackup /system/sd
Click to expand...
Click to collapse
Will this allow me to move my partition to a different SD card without re-installing all my apps (via nandroid)?

Switching SD Cards

I just received my new class 6 SD card in the mail today, and I was wondering how I can transfer all my files over to it. I don't mean like music and stuff like that, but like my Apps2SD. I don't exactly know what all I have to transfer over, but if someone can give me the adb commands and what I'm trying to transfer, that would be great.
Go to the recovery console
mount /sdcard
mkdir /sdcard/ext
cp /system/sd/* /sdcard/ext/
the copy the ext folder to your new card, put it in your phone and go back to recovery
mount -o rw /dev/block/mmcblk0p2 /system/sd
cp /sdcard/ext/* /system/sd/
I've probably made a couple of mistakes with mounting the partitions correctly, so you may have to mount /sdcard on the second batch of commands.
Anartic said:
I just received my new class 6 SD card in the mail today, and I was wondering how I can transfer all my files over to it. I don't mean like music and stuff like that, but like my Apps2SD. I don't exactly know what all I have to transfer over, but if someone can give me the adb commands and what I'm trying to transfer, that would be great.
Click to expand...
Click to collapse
Use Adrian's method
awesome, i've been wanting to know how to do this myself so this will definitely come in useful.
B-man007 said:
pretty sure the adb command is
adb pull /system/sd/*
then use adb push to get it back on the new one.
that should get everything on your ext partition. (note: do this while phone is booted into the rom. else you will need to mount the ext partition)
(if you need clarification, dont mind asking)
Click to expand...
Click to collapse
What? Pushing apps to the ext is not a good idea when the phone is in the ROM (when I tried half of them showed and half of those FCed)
You can easily mount your ext - mount -o rw /dev/block/mmcblk0p2 /system/sd
AdrianK said:
What? Pushing apps to the ext is not a good idea when the phone is in the ROM (when I tried half of them showed and half of those FCed)
You can easily mount your ext - mount -o rw /dev/block/mmcblk0p2 /system/sd
Click to expand...
Click to collapse
i don't push i use adb install that way all of them get installed and i don't have the problem with certain apps not showing up right.
you say that like i want to type a really long command, i just use adb remount, or if i am forced to use my phones keyboard for command i just go to the recovery console and use mount system or mount system/sd depending on how specific i feel . (i hate typing commands on the g1s keyboard, and its and epic fail if you mess a long one up.)
david1171 said:
i don't push i use adb install that way all of them get installed and i don't have the problem with certain apps not showing up right.
you say that like i want to type a really long command, i just use adb remount, or if i am forced to use my phones keyboard for command i just go to the recovery console and use mount system or mount system/sd depending on how specific i feel . (i hate typing commands on the g1s keyboard, and its and epic fail if you mess a long one up.)
Click to expand...
Click to collapse
easiest way i have done this is do a switchrom backup, make sure its saved to your old sd, get your new sd partitioned correctly, and copy the switchrom folder from your old sd to your new one, then do the normal steps to restore a switchrom backup... this will restore your rom to the exact moment it was when you saved it. had me back up and running in 10 minutes after a new sd was here.
Thanks so much for the help guys, I just noticed that I left my USB cord at work :/, so tomorrow I'll get back to you guys about this.
AdrianK said:
What? Pushing apps to the ext is not a good idea when the phone is in the ROM (when I tried half of them showed and half of those FCed)
You can easily mount your ext - mount -o rw /dev/block/mmcblk0p2 /system/sd
Click to expand...
Click to collapse
ya i started my response and saw you already answered so i was like mehhhh
i wrote my own script to do all this stuff below for me, and its done through the recovery.
Back up apps
Remove app_s folder
Reformat ext3 partition
Restore apps
Enter Recovery
SwitchRom Backup/Restore
Clear Dalvik-Cache
adb push while booted works fine for me, it just slows the crap outta the phone for a good 2-3 minutes, but it works fine. i use push because adb install hasnt always worked 100% for me (i have ~130 apps, and some of them don't install.)
anyways ill edit out my post to stop confusion
i have no more then 40 apps so adb install doesn't really flunk out on me
the only thing i don't like is the protected apps that show up in the fugly system default app icon and the long name.

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?.

mount -a errors?

can anyone tell me why when i try the
Code:
mount -a
command i get the error
mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: No such file or directory
Click to expand...
Click to collapse
Do you have an ext partition on your sdcard?
im sorry im mostly a noob when it comes to this... i just installed cyanogens mod, did not touch the sd card, let alone part it.
gooberguy said:
im sorry im mostly a noob when it comes to this... i just installed cyanogens mod, did not touch the sd card, let alone part it.
Click to expand...
Click to collapse
Then that is the reason you are getting that error, it is trying to mount the ext partition, which you do not have. Just ignore it and carry on
should i be ignoring though?
my cirucumstance is i'm trying to install apps2sd as well as deleting a battery stats file, both which instruct to use mount -a beforehand
gooberguy said:
should i be ignoring though?
my cirucumstance is i'm trying to install apps2sd as well as deleting a battery stats file, both which instruct to use mount -a beforehand
Click to expand...
Click to collapse
There is nothing to install for apps2sd, once you parition your sd card it's automatic
And as already mentions yes you can ignore the error, becuase it's telling you it can't mount /dev/block/mmcblk0p02 which means it can't access the 2nd partition on your sdcard, because you don't have one, so to delete batterystats.bin just use adb or console and
Code:
cd /data/system (enter)
rm batterystats.bin (enter)
and you're done

Categories

Resources