OK so here is what I did, in order to factory-reset-and-then-restore-all-data a rooted Samsung Galaxy Ace GT-S5830i. I'd be happy to get marks out of 10 ;-)
WARNING: the entire process here took about 2 hours in total, and at a random point in the middle you probably have a non-working phone, so you might want to find two clear hours if you want to do this.
Start: I have a rooted Samsung Galaxy GT-S5830i running Android 2.3.6. I have a file "update.zip" on my SD card which I put there when I rooted it. I wanted to apply a factory reset and then get the phone back into pretty much the same state as before (i.e. same apps, same data (e.g. same bookmarks on my browsers, same saves on my games etc), same contacts, same text messages...).
1) I downloaded Titanium Backup and used it to make a backup of my apps + data, following instructions here:
http://androidforums.com/faqs/443075-root-terminology.html [and click on "show" a few lines down]. OK so I think I made a **minor error** here -- I should have backed up user apps *and* system data (we'll see why in step 20).
2) I downloaded MyBackup Root and used it to back up all my contacts/SMS etc.
All these backups went to my SD card.
3) I then backed up my SD card onto my computer -- just in case.
4) I downloaded ClockWorkRec5830i.zip from
http://forum.xda-developers.com/showthread.php?t=1552792 there, and put it in /sdcard [basically I am going to follow the
instructions there about Clockwork recovery, to get a nandroid backup of everything]
5) I booted into recovery mode [phone off; then vol up + home + power button, and get ready to release all three very quickly the *moment* the recovery mode screen comes up or you'll reboot and have to start step 5 again].
6) I selected "apply update.zip" (this was here because I was rooted) and then selected ClockWorkRec5830i.
7) I made a nandroid backup! This failed the first time because I only had about 200 megs free on my SD card and the backup needed more space. But I had just backed up the SD card, so I deleted a bunch of stuff, freed up a gig, and it worked fine.
8) I booted the phone up again, and copied the nandroid backup onto my computer.
9) I synced my google contacts.
10) I booted into recovery mode and restored factory settings!!
11) I switched the phone on, told it my google account.
12) I waited for about 30 minutes while the phone synced with google and magically downloaded a whole bunch of apps that had been installed before. This surprised me -- I thought TiBu was going to do this. My guess is that google remembered somehow which roms I'd downloaded from the play store. I didn't quite get all my apps back because my kids have written a couple of apps which I'd installed direct from them rather than google play. But I'd certainly got most of them. I note at this point that (as I'd hoped and expected) my SD card has survived uncorrupted, so I don't need to touch the computer backups [I'll keep them though] -- so this is great -- I can restore everything from the SD card.
13) [unlucky for some] DISASTER! I only have about 15 contacts!! Dammit, lose lots of points. Maybe I should have understood valorian's comment "Make sure all your contacts are saved as Google contacts" better before I started all this.
14) FIX! MyBackup Root had backed up all my contacts. I used MyBackup Root to restore all my contacts [this took a good 45 minutes -- around 3 seconds per contact and I have 1200 contacts :-/ that's what happens if you've had a phone for 14 years and an email address since 1988 :-/ ] and everything else. It gave me a warning about restoring my calendar -- so I just didn't bother restoring it (I have a google calendar and google will certainly have that backed up). It also gave me a warning about restoring "APNs" or something -- it said I might break stuff. So I just unticked that box too. I don't even know what these are, and they might not even have been "APN"s, I forgot what it said exactly :-(
15) After about an hour, MyBackup Root finished. All my SMS's and contacts were back. I fired up my web browser and of course I had no bookmarks etc etc. But we're not finished yet.
16) I used Titanium Backup to restore all the data for all my apps. Note that I did _not_ use it to restore all apps+data because google had somehow restored all my apps for me. I then used TB to restore all my non-market apps + data.
17) CONFUSION: I have lost a bunch of text messages.
18) UNCONFUSION: I'd used Titanium Backup to back up my text messages a couple of months ago, and had just restored the TB back-up of my text messages. I used MyBackup Root again to restore my texts to their current state [it only took a few minutes this time because I had the option of not restoring all my contacts, thank goodness].
19) My phone now vibrates when someone sends me a text!! I fixed my phone!!
20) ANNOYANCE: Turns out that "Memo", which looks like a generic note app, was in fact a system app, and I didn't back up system data, so I have lost all my memos. Actually, Titanium Backup had an old system backup, so I've got most of them back.
21) V MINOR ANNOYANCE: I've lost the widgets on my home screen. I just put them back manually, no trouble.
22) V MINOR ANNOYANCE: I've lost all the links to my non-market apps on my home screen. I just put them back manually.
Conclusion: 21 and 22 suggest that I should have somehow backed up the home screen.
However, despite losing 2 hours of my life and some memo notes, my GT-S5830i is now essentially the same phone as it was before, except that the weird phone vibrate bug I had is fixed.
In particular -- my entire life is stored in: (a) my google calendar, (b) an alarm clock app [not stock -- Alarm Clock Xtreme] and (c) an app called Life Reminders. All the data for these apps has all been successfully restored. For the google calendar I'm not at all surprised (as the data is all stored in the cloud). For the other two I am mightily relieved ;-) although I had done an independent back-up of Life Reminders just in case.