[Q] Wiping ext2 partition, then restoring it. - G1 Q&A, Help & Troubleshooting

I want to clean up my ext 2 prtition because my phone has been running funny lately. If I perform a backup using Backup for Root users (which I think backs it up on the fat32 partition), then wipe my ext2 partition using
adb remount
adb shell
rm -r /system/sd/*
Then I use Backup for Root Users to restore everything, That should work fine right?
(I also have My Backup Pro, but I think it is terrible)
Any information or opinions would be appreciated.

Um no all wrong. No app in my knowledge backups your ext2 partition. Why should you want to back it up anyways? If you restore your apps then they'll automatically go back to your sdcard and so will dalvik cache (depending on what ROMS). You can always "adb pull /system/sd/* C:\Users\xxx\Desktop" that will backup your ext2 partition and you can push it back after. Sorry for the long answer and having the answer at the end

Related

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

What is the comand to wipe ext2/3

My in installed apps stay in the /system/sd even after i do a wipe, these apps never seem to work even when i run fix_permissions from console.
Is there a command to simply clean everything out of that partition?
I have been using parted to simply reformat that partition, but i an thinking there must be an easier way.
Thank you
ekeefe41 said:
My in installed apps stay in the /system/sd even after i do a wipe, these apps never seem to work even when i run fix_permissions from console.
Is there a command to simply clean everything out of that partition?
I have been using parted to simply reformat that partition, but i an thinking there must be an easier way.
Thank you
Click to expand...
Click to collapse
Hi, click here for instructions on how to wipe.
yeah go to consol and type this
"mount -o rw /dev/block/mmcblk0p2 /system/sd" (hit enter. ps that is a zero, not an "o"
"rm -rf /system/sd/*" (hit enter. yes you need that star thingy)
"reboot recovery"
there you go! make sure to backup all your apps using Backup for Root users via market beacause wiping your ext2/3 erases all your apps!

Switchrom and Wipe ext3

I am using the Switchrom script with CY recovery. I have successfully made backups and switched between roms using the script. Now I want to try the new Drizzy Hero rom. To install the rom I will have to wipe the ext3 partition. My question is, If I wipe the ext3 partition, will I loose the script? If yes, can I copy the script in system/sd later on for it to work again?
PS: Before someone posts "search the thread" answer, I tried doing it and couldn't find anything.
Thanks
bole_to said:
I am using the Switchrom script with CY recovery. I have successfully made backups and switched between roms using the script. Now I want to try the new Drizzy Hero rom. To install the rom I will have to wipe the ext3 partition. My question is, If I wipe the ext3 partition, will I loose the script? If yes, can I copy the script in system/sd later on for it to work again?
PS: Before someone posts "search the thread" answer, I tried doing it and couldn't find anything.
Thanks
Click to expand...
Click to collapse
The only thing that is stored on your ext3 partition is your apps. So when you clear that only your apps will get cleared.
supremeteam256 said:
The only thing that is stored on your ext3 partition is your apps. So when you clear that only your apps will get cleared.
Click to expand...
Click to collapse
Thanks man. Wiping now.
To clear this up for other reader who might stumble on this thread, the above comment is not true. If you wipe you ext 2/3 you might end up wiping more stuff than just apps. I realized it the hard way lol. However you can push back switchrom.sh in /system/sd and you will be good to go. The alternate method to do this is to delete just the following folders:
mount /dev/block/mmcblk0p2 /system/sd
rm -rf /system/sd/app*
rm -rf /system/sd/dalv*
bole_to said:
To clear this up for other reader who might stumble on this thread, the above comment is not true. If you wipe you ext 2/3 you might end up wiping more stuff than just apps. I realized it the hard way lol. However you can push back switchrom.sh in /system/sd and you will be good to go. The alternate method to do this is to delete just the following folders:
Code:
mount /dev/block/mmcblk0p2 /system/sd
rm -rf /system/sd/app*
rm -rf /system/sd/dalv*[/QUOTE]
You can do that or you can wipe buy doing this
Code:
mount /system/sd
mount /sdcard
rm -rf /system/sd/*
cp /sdcard/switchrom.sh /system/sd/switchrom.sh
That's how i've been doing it. And I like to do it this way to make sure the my EXT2/3 is completely clean. I've had problems where doing a partial wipe gives me issues. But yes if you wipe your EXT2/3 drive it will get rid of everything (including the switchrom.sh)
Click to expand...
Click to collapse
when you wipe your internal phone memory and ext3 you will lose the script. once you get the rom you flashed up and running again, just repush switchrom.sh and you are good to go again. wiping the ext 3 or the internal memory WILL NOT wipe out your backups. when i use switchrom i dont even wipe all of ext3...
this is what i do... flash a new rom. get it setup the way i want. install all apps and extra settings i want. reboot into recovery, run switchrom.sh and let it do its thing. now when you have created your back up and want to flash a NEW ROM, not one of your backups, wipe internal memory of course but instead of wiping all of ext 3 drop down to recovery console and do the following
Code:
# mount /system/sd
# rm -rf /system/sd/app*
# rm -rf /system/sd/dalv*
this will prepare your ext3 for a new install of a new rom. when you are going back and forth between your backups you do not need to wipe ext3 at all. the script takes care of all of that. if you have any more questions PM me or hit me up on gtalk - palosjr
NOTE- this script is case sensitive as i found out the hard way... when bookmarking and tagging ROMs be sure to use all lowercase. if you use uppercase the script will fail. hope this helps bro.
thanks guys, i got it to work.

Switchrom -s / Re-Parition SD / Switchrom -r

So if I have a few roms that I save with switchrom and then I decide to backup my sd to my computer.....
Then format my sd card in a different way (ie used to be ext2, now I want ext4)
And then I copy the files back onto my sdcard after the repartition....will I be able to restore those switchroms?
Because from what I have tried...it usually doesn't work...(I forget the exact error message) is there some command I am forgetting in between?
I have done this with BART, which is basically switchrom with a few modifications...
Here is what I did just the other day:
Reboot into recovery (Amon-RA)
Drop down into console
Run :
Code:
bart -s myRomName
After completed, type
Code:
reboot recovery
Then choose to Mount the SD card and copy everything over to your PC
Once completed, un-mount the SD card and then move onto partitioning...
I went from 128MB swap to 256MB swap
I went from 640MB ext2 to 1024MB ext2
After that, I upgraded to ext3... I have heard that ext2 is better, but every
time I use that format, my SD card gets corrupted in a matter of days.
(Hence the reason why I sent through this process recently.) I will "three
finger salute" the phone at times due to a hanging app, from the countless
ones that I download to try out, so this might be causing the problem.
After the upgrade, mount the SD card and copy your FAT32 section back.
Drop down into the console and type
Code:
bart -l
You should see the ROM that you just stored...
Type
Code:
bart -r myRomName
Once completed type
Code:
reboot recovery
Then go the Wipe section and Clear the Dalvik cache...
Finally reboot...
I have done this numerous times on both my and my wife's G1... I have also
done the above steps keeping the same sizes of the partitions and moving
from ext2 -> ext3 -> ext4 to give each of them a try...
Using BART will only back up the files on the ext partition, not the filesystem...
It is like a fresh install... At least that has been my experience with it...
Cool well I might use Bart then instead of switchrom since it seems to have worked for you without any hiccups.
Essentially I am doing the same process as above except with switchrom rather than bart (although i have used all 3 forms of backup in Amon Ra's Recovery)
Just wanted to make sure there wasnt some special command in console to fix something outta whack.
I figured my method would work but for some reason it doesn't like the repartitioning of the sdcard in between switchrom -s and switchrom -r
Thinking it might have been a fluke.....
Yep, I had to migrate my switchROM folder when I got my new SD Card and had no issues.

[Q] ext4 problems when changing ROM's

So I like to switch ROM's quite frequently, the only problem is that I seem to have to format my sdcard and set up the partitions each time I switch. I feel like nandroid either doesn't restore data to the ext4 properly or messes up the partition when I do a factory reset, since it formats the ext4 partition. Whatever the case, I am unable to move apps to the ext4 after a flash.
Whenever I want to switch to another ROM I have to backup my sdcard to my computer, format the card using diskpart, create the partition again in recovery mode, restore sdcard contents, and then finally flash the ROM I want. This can take forever and makes trying new ROM's out a huge hassle.
If I don't restore a nandroid and flash a ROM from scratch, I'll install s2e, reboot, and navigate to /sd-ext using root explorer and there will be no files.
I mainly use s2e with CM7, but I have tried a2sd with similar results. As far as I know though, they both use the same technique to move apps so it shouldn't matter.
Am I doing something wrong? I use nandroid and everything, but once I do a factory reset it refuses to restore the ext4 backup, and I get an error relating to space limitations.
Thanks a lot.
I've changed ROMs a few times, and everytime I've done so, the ext4 partition has remained fine. Although, it is seriously recommended that you flash the latest darktremor a2sd script as the incorporated ones don't seem to work well.
Flash darktremors, then enter the command line emulator on your phone and type:
su
a2sd reinstall (your phone will reboot)
su
a2sd cachesd (your phone will reboot)
su
a2sd zipalign
This should always be done after a ROM switch.
Alright, I will try that out.
Just wondering, will this restore all the apps I have on the ext4 partition? For example, if I flash MIUI for the first time, then commands the commands you gave me, will all my apps be restored? I assume no since clockworkmod wipes the ext4 partition when doing a factory reset.
The S2E and DarkTremor's a2sd apps actually use different ways of utilizing the ext partition, so the two are incompatible (although, S2E includes a way to convert from DT's to its own).
And as long as you didn't wipe the ext partition (which a Factory Reset does), using those commands should restore your apps.
But with what you are doing, it may be easier to use Titanium Backup to restore your apps back rather than nandroid. This will allow you to keep all your app settings and saved info as well. Just be careful to not back up system data. Restoring those on the same ROM can cause issues, and it would probably cause a lot more if it is between two different ROMs.
Switch your Ext 4 Partition to Ext 3 and you'll notice a lot more stability when switching roms.
Some roms don't have the correct Apps2SD or Kernel installed to support ext 4 but most, if not all, support ext 3.
I recommend using AmonRa Recovery as CWM always corrupts the ext partitions.
Re-partition your SD-Card and start again.
If This Helped please Hit THANKS

Categories

Resources