[HOW TO] Keep all your stuff after flashing hero. - G1 Android Development

Ok, so this is my first Informative thread..so bear with me.
Im a VERY regular hero flasher, and to me, it always seems frustrating to do the whole routine of
Backup>Wipe>Format>Flash>Setup Process>Restore Backup.
especially after you get used to a Rom and you have some stuff that cant be backed up.
Well, i came up with a solution-type thing.
Some people might have tried it out..not sure.
You need:
Nandroid
Android SDK ---> Get it Here
First, do a nandroid backup..(you need it for this to work)
type this into adb
adb shell
echo /dev/block/mmcblk0 > /sys/devices/platform/usb_mass_storage/lun0/file ---->to mount SD in recovery..(or you could just reboot and mount or use an SD reader..whatever)
go to the nandroid folder, and recover the data.img file from your most recent backup. copy it somewhere on your computer.
Start up adb and type
adb shell
rm -r /system/sd/app_s
rm -r /system/sd/app-private -->to prevent bootloops
then wipe, and flash new Rom.
reboot and let the device go into setup process, then power off.
boot device into fastboot mode by holding the camera button + Power button.
open cmd, and cd to your android sdk directory. (or however you do it in linux)
now, type in
fastboot flash userdata <chosen path>/data.img
fastboot reboot
Thats it..all done. Now you have all your stuff from previous hero..and dont have to re-enter loadz of information...and also the benefit of having new stuff like "secret optimized apk's" and what-not.
if you have problem with touch-flo force-closing, go to
settings>applications>manage applications.
choose touch flo
choose clear data.
you should have ahome or some other type of home rplacement program because it seems touchflo DEFINATELy force-closes. and you'll need other home replacement to go into settings.
Or you could just assign a shortcut to settings by going to settings>applications>quick launch selecting what u like.

Hey, I really like the idea behind this approach, but being not as savvy as I'd like, lemme ask this:
Could I achieve the same thing by:
1. performing a nandroid backup.
2. Go thru all the steps to flash a new Hero rom.
3. perform another nandroid backup.
4. copy the data file from the first backup to the appropriate location in the new backup, replacing the newer data file with the old.
5. Perform a nandroid restore with the the newly modified backup file. Et voila!
Or not? If not, would someone mind explaining to me the difference in as layman's terms as possible. A clear explanation could likely go a long way towards teaching me alot about many things that I'm not quite clear on.
Thanks!

would this work with a non-Hero ROM? Or going from a Hero back to a cupcake (or whatever it's called?!)
Thanks!

kjdiehl said:
Hey, I really like the idea behind this approach, but being not as savvy as I'd like, lemme ask this:
Could I achieve the same thing by:
1. performing a nandroid backup.
2. Go thru all the steps to flash a new Hero rom.
3. perform another nandroid backup.
4. copy the data file from the first backup to the appropriate location in the new backup, replacing the newer data file with the old.
5. Perform a nandroid restore with the the newly modified backup file. Et voila!
Or not? If not, would someone mind explaining to me the difference in as layman's terms as possible. A clear explanation could likely go a long way towards teaching me alot about many things that I'm not quite clear on.
Thanks!
Click to expand...
Click to collapse
Yeah, that would work, because it's the same thing but rather than just flashing data.img with fastboot, you're reflashing data + everything from your current setup. If that makes sense. You could just use fastboot...

sorry double post..

jomtones said:
would this work with a non-Hero ROM? Or going from a Hero back to a cupcake (or whatever it's called?!)
Thanks!
Click to expand...
Click to collapse
Dont think so, dont think there is a data partition in google based ROMs, all your apps are in the system partition. I'm not entirely sure about that, but I expect you'll get a bootloop.

kjdiehl said:
Hey, I really like the idea behind this approach, but being not as savvy as I'd like, lemme ask this:
Could I achieve the same thing by:
1. performing a nandroid backup.
2. Go thru all the steps to flash a new Hero rom.
3. perform another nandroid backup.
4. copy the data file from the first backup to the appropriate location in the new backup, replacing the newer data file with the old.
5. Perform a nandroid restore with the the newly modified backup file. Et voila!
Or not? If not, would someone mind explaining to me the difference in as layman's terms as possible. A clear explanation could likely go a long way towards teaching me alot about many things that I'm not quite clear on.
Thanks!
Click to expand...
Click to collapse
yes, that should work. sems abit more straight forward...especially for those who dont use adb

kjdiehl said:
Hey, I really like the idea behind this approach, but being not as savvy as I'd like, lemme ask this:
Could I achieve the same thing by:
1. performing a nandroid backup.
2. Go thru all the steps to flash a new Hero rom.
3. perform another nandroid backup.
4. copy the data file from the first backup to the appropriate location in the new backup, replacing the newer data file with the old.
5. Perform a nandroid restore with the the newly modified backup file. Et voila!
Or not? If not, would someone mind explaining to me the difference in as layman's terms as possible. A clear explanation could likely go a long way towards teaching me alot about many things that I'm not quite clear on.
Thanks!
Click to expand...
Click to collapse
Dude that's perfect! I like your style of thinkin!

kjdiehl said:
Hey, I really like the idea behind this approach, but being not as savvy as I'd like, lemme ask this:
Could I achieve the same thing by:
1. performing a nandroid backup.
2. Go thru all the steps to flash a new Hero rom.
3. perform another nandroid backup.
4. copy the data file from the first backup to the appropriate location in the new backup, replacing the newer data file with the old.
5. Perform a nandroid restore with the the newly modified backup file. Et voila!
Or not? If not, would someone mind explaining to me the difference in as layman's terms as possible. A clear explanation could likely go a long way towards teaching me alot about many things that I'm not quite clear on.
Thanks!
Click to expand...
Click to collapse
Sounds kinda round-about to me... You'd have to make a nandroid... flash... then nandroid again... those nandroid backup/restores take much longer than flashing a simple userdata from fastboot. Using fastboot, you could flash it in what... a minute vs another 7-8minutes, but I guess its alright for those terrified of a command prompt...
EDIT: Forgot. Instead of doing the long echo command to mount your sdcard in recovery, you can just type:
Code:
adb shell ums_enable
to start the service and
Code:
adb shell ums_disable
to unmount it from your computer

Thanks for the responses, folks. It's much appreciated.
Yeah, I'm still getting the hang of adb. I don't typically mess around in Terminal, (I'm on a Mac,) so I'm not used to it or the lingo. That doesn't stop me from trying very clear directions, and I do learn a little bit, but the drag-n-drop world makes more sense to me, at least for now.
For instance, when given instructions like this:
"open cmd, and cd to your android sdk directory. (or however you do it in linux)
now, type in
fastboot flash userdata <chosen path>/data.img
fastboot reboot"
I THINK I understand most of it, but I don't know what "cmd" or "cd" means or if it's a typo or what. Also, I think most instructions don't make it clear after what lines I should hit enter and what not. I know that stuff is old hat to most of you guys, but I'm still trying to get the hang of it.
Anyway, thanks for the help!

Drizzy NewVision
Does this work for Drizzy's NewVision? Does it back up the ext3 partition so you dont have to wipe it and get rid of all your apps??

Related

nandroidbackup - full NAND backup tool

This version is outdated, please get the latest version here: http://forum.xda-developers.com/showthread.php?t=459830
Hi,
In light of the fastboot flash method I was thinking of a way to be able to keep my current setup as a backup while i experiment with other images. For that I wrote a script that uses adb to dump the data for the boot, recovery, system and data partitions.
When this script is ran, it will dump these images in your current dir.
Boot into recovery mode (home+power) to use.
Requires RC30 v1.2 recovery.img - due to a bug the RC8 v1.2 there is no adb shell. (this script needs adb shell as root + busybox in recovery mode to work).
PLEASE NOTE: I haven't actually flashed the dumps back yet, I will be trying that tomorrow. Brave souls willing to test that do so at their own risk!
Bug reports or own improvements welcome.
infernix, how do i go about running this script from mac terminal?
Pretty interesting stuff.Two questions for you:
1. Where is the restore script...
2. Did you try restoring the created backup?
Thanks,
devsk
korndub said:
infernix, how do i go about running this script from mac terminal?
Click to expand...
Click to collapse
On MacOS 10.5 I had to compile md5sum from http://www.microbrew.org/tools/md5sha1sum/ and then modify the script to replace the call for md5sum --check --status with md5sum --check - --status (note the additional - to specify stdin). After that everything seemed to work properly. Haven't tried flashing it back, however.
nand?
what is nand?
i'm thinking this must be huge because its getting a lot of attention from the big dogs such as JF. from reading, is it like the master software so you can completely wipe the phone then in a sense put everything back on or is that too drastic of a guess?
just curious...
hbguy
http://tinyurl.com/6cb6k8
but in all seriousness NAND is just the flash memory upon which all the system software is installed. This script lets you take a full backup copy of all the various partitions and then, in theory, restore them.
very cool
This is a big advancement wish I had this when I pooched my market app trying to move the cache, I got it to d/l 1 app using the sd as my cache but nuthin but force close on a few dozen attempts, I dunno what I did but I couldn't get the onboard caches to work so I had to hard reset and d/l 33 apps from the market before I went to bed and I'm still fixing sh1t, this would have made my restore much easier, was suprised when I got it that there was no type of backup other than syncing with goog.
I can't wait to see who has the biggest balls and will try to flash one back.
Thanks, I bet the OTA RC30s will be rerooted pretty soon at thus rate.
This is a great contribution.
(Hey google, why not get some of these xda guys on the payroll, this is where all the news about the G1 gets made, I don't think I have seen any G1 hack yet that didn't have its roots right here at xda-dev)
Bhang
Stupid part is I'm so egocentric I think somebody at google/android is gonna read it...duh

Request: Guide to Backup and Restore Everything

Seems like it would be a good idea to get people in the habit of backing up absolutely everything before rooting, installing roms, etc. We could perhaps avoid problems with people overwriting their 4G keys or other unforeseen consequences.
Problem is, I don't know how to do it. Could someone please write a quick guide on how to backup everything (nand, ext, wimax, radio, etc.) and also how to restore it when something goes wrong?
gthing said:
Seems like it would be a good idea to get people in the habit of backing up absolutely everything before rooting, installing roms, etc. We could perhaps avoid problems with people overwriting their 4G keys or other unforeseen consequences.
Problem is, I don't know how to do it. Could someone please write a quick guide on how to backup everything (nand, ext, wimax, radio, etc.) and also how to restore it when something goes wrong?
Click to expand...
Click to collapse
1. Reboot into recovery (Clockwork/RA)
2. Select nandroid backup
3...
4. Profit
imaxreed said:
1. Reboot into recovery (Clockwork/RA)
2. Select nandroid backup
3...
4. Profit
Click to expand...
Click to collapse
A nandroid backup will backup the wimax partition? Pretty sure radio/wimax partitions are not included.
Doesn't that put the previous rom you had when backed up back on there so if you flash a new one then restore the new rom is gone and your back to where you were?
Sent from my PC36100 using XDA App
krizno said:
Doesn't that put the previous rom you had when backed up back on there so if you flash a new one then restore the new rom is gone and your back to where you were?
Click to expand...
Click to collapse
Yes, but some things, like the radios, are not included in the backup.
So you want to be able to back up the radio too i get you I guess you would just have to download the newest radio off here or find the download for the radio you have that works for you and save it to the root of sd and just flash it over when you need it just a suggestion
Sent from my PC36100 using XDA App
gthing said:
Seems like it would be a good idea to get people in the habit of backing up absolutely everything before rooting, installing roms, etc. We could perhaps avoid problems with people overwriting their 4G keys or other unforeseen consequences.
Problem is, I don't know how to do it. Could someone please write a quick guide on how to backup everything (nand, ext, wimax, radio, etc.) and also how to restore it when something goes wrong?
Click to expand...
Click to collapse
Scratch what I had.
I guess nandroid doesn't backup radio and wimax.
My guide I wrote doesn't get this far in depth, but covers boot partition pretty well.
+1 on this request.
I'm not doing any radio changes until I can back up the originals first. (Hence my low post count.)
I found this from the broken 4G thread:
redsolar said:
Broken EVO backup
Backup your existing wimax partition on your broken EVO. We may need it some day.
Open command line window (cmd)
Make sure you have no PC36IMG.zip files in the root of your SD Card, or it will take a while to power your phone up
Power down your phone
Power it up while holding down the Volume Down key
HBOOT will attempt to scan for PC36IMG files. Let's hope you read carefully and don't have it on your SD Card root
Once HBOOT fails to find the file, use Vol Up/Down buttons to go into Fastboot mode
Connect the USB cable to your phone (and PC). You may have to install the USB drivers that come with Android SDK, but chances are if you are looking for this solution, you already have them installed and working
The FASTBOOT mode will switch to FASTBOOT USB (that's good)
Test your fastboot by typing "fastboot oem h" in command window you opened earlier (note, no adb, or adb shell anywhere, the command is "fastboot oem h". From here on all fastboot commands are issued in that window
If you see less than ~40 lines of output, you don't have a propertly rooted phone, and you need to do step 1 and step 2 (see above)
Dump your wimax data by issuing "fastboot oem saveprt2sd wimax -n wimax.bin" command (varies, anywhere between 7 to 8.5 MB, mine was 7MB)
Dump complete partition (~12MB) by issuing "fastboot oem saveprt2sd wimax -n wimax.bin -a" command
Reboot your phone
Pull the data files you dumped to a safe place ("adb pull /sdcard/WIMAX.BIN" and "adb pull /sdcard/WIMAXRAW.BIN"). Note the capitalization, it's important
SNIP
Click to expand...
Click to collapse
Edit:
Haven't tried this yet, but it would backup wimax. How do we back up radio?
krizno said:
So you want to be able to back up the radio too i get you I guess you would just have to download the newest radio off here or find the download for the radio you have that works for you and save it to the root of sd and just flash it over when you need it just a suggestion
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
The reason you would want your own backup is because it could contain wimax keys, etc. If everyone had backed up we wouldn't have tons of people running around with bricked 4G radios now. Some things you can't fix with a generic download - you need a backup.
nefas110 said:
+1 on this request.
I'm not doing any radio changes until I can back up the originals first. (Hence my low post count.)
I found this from the broken 4G thread:
Edit:
Haven't tried this yet, but it would backup wimax. How do we back up radio?
Click to expand...
Click to collapse
why do you need to backup the radio? there's a list of radio and wimax in the development section, you can always download those file and save it onto your computer or your sdcard if you ever need to use them again.
the PC36IMG.zip itself contain the wimax and the radio in it. i've downgrade from 1.47...OTA update with the new radio and wimax, and it downgraded just fine along with the radio and wimax.
if you wanna backup your wimax, try this.
in a shell,
Code:
cat /proc/mtd
you should get a list from mtd0 through mtd7. wimax should show up as mtd0.
to back up the wimax img to your sdcard,
Code:
cat /dev/mtd/mtd0 > /sdcard/mtd0.img
that should back up your wimax image to your sdcard. i'm now sure if you could flash that like you flash a radio through your recovery(i wouldn't try it) but if you wanna revert you could probably do something like
Code:
cat /sdcard/mtd0.img > /dev/mtd/mtd0
another method may be to use fastboot. i'm not sure if you can do this or not, and i can't verify it since i'm not at home, but maybe do something like
Code:
fastboot flash wimax /sdcard/mtd0.img
might work. but if you try this and something breaks... it's not my fault.
campchi said:
why do you need to backup the radio? there's a list of radio and wimax in the development section, you can always download those file and save it onto your computer or your sdcard if you ever need to use them again.
the PC36IMG.zip itself contain the wimax and the radio in it. i've downgrade from 1.47...OTA update with the new radio and wimax, and it downgraded just fine along with the radio and wimax.
Click to expand...
Click to collapse
Those don't include the unique encryption key embedded on each phone. It's too bad none of the backup solutions out there do a complete backup.
campchi said:
why do you need to backup the radio? there's a list of radio and wimax in the development section, you can always download those file and save it onto your computer or your sdcard if you ever need to use them again.
the PC36IMG.zip itself contain the wimax and the radio in it. i've downgrade from 1.47...OTA update with the new radio and wimax, and it downgraded just fine along with the radio and wimax.
Click to expand...
Click to collapse
Read that thread by redsolar: [TUTORIAL] Proof of concept solution on fixing badly broken 4G after bad MAC, etc
To summarize, each Evo comes equipped with security keys for wimax that are SPECIFIC TO THAT ONE DEVICE. If you loose those keys, there is no way to revive your bricked 4G at this time. You can lose the keys if you flash a bad image (this is what happened to people) or you can have a bad flash (can happen at random). Now do you want to backup your wimax?
As for the rest of the radio, how can we be certain a generic image will restore the device? The only way to be sure is to make a backup of that image too.
I read that nandroid used to backup the radio. That feature should be brought back as an option. Does anyone know who runs nandroid now? I would like to write to the suggestion box.
justinisyoung said:
if you wanna backup your wimax, try this.
in a shell,
Code:
cat /proc/mtd
you should get a list from mtd0 through mtd7. wimax should show up as mtd0.
to back up the wimax img to your sdcard,
Code:
cat /dev/mtd/mtd0 > /sdcard/mtd0.img
Click to expand...
Click to collapse
Thanks, this part works. I used a hexeditor to at least find and copy my encryption keys. (Search for BEGIN RSA PRIVATE KEY).
justinisyoung said:
if you wanna backup your wimax, try this.
in a shell,
Code:
cat /proc/mtd
you should get a list from mtd0 through mtd7. wimax should show up as mtd0.
to back up the wimax img to your sdcard,
Code:
cat /dev/mtd/mtd0 > /sdcard/mtd0.img
that should back up your wimax image to your sdcard. i'm now sure if you could flash that like you flash a radio through your recovery(i wouldn't try it) but if you wanna revert you could probably do something like
Code:
cat /sdcard/mtd0.img > /dev/mtd/mtd0
another method may be to use fastboot. i'm not sure if you can do this or not, and i can't verify it since i'm not at home, but maybe do something like
Code:
fastboot flash wimax /sdcard/mtd0.img
might work. but if you try this and something breaks... it's not my fault.
Click to expand...
Click to collapse
While this does work for a sheer purpose of extracting wimax key and certificate, the resulting file is not binary safe. cat appears to do some codepage interpretation, so the resulting file is not consistent between phones, even when firmware is mostly identical, and the differences are just MAC address and RSA key/SSL certificate.
So far, the only safe (and restorable) way to do a backup is described here. I verified, and backing up/rewriting image this way does work, and works correctly.

Trying to understand these instructions... (Android, SD Card default, EXT3, re-flash)

I have an LG Optimus T. Not the most ground breaking phone ever, but a heck of a deal for the money. Nonetheless, it's my phone, and I'm not really happy with the internal memory barrier I'm facing. For what it's worth, I have it rooted. I heard a way to partition your SD card (with part of it being allocated to ext3 file system) and re-flashing your phone somehow so the phone utilizes your ext3 partition on the SD card for housing applications. I heard several users in the IRC chat confirm this works well.
However, now that it's show time and I'm trying to do it, I'm a little confused. So please, be gentle, and I apologize if I'm re-hashing simple steps. I'm just trying to make sure I get what I'm supposed to do.
I'm working from this link here:
http://forum.xda-developers.com/showpost.php?p=10692249&postcount=1299
So from what I understand, the factory ROM can do fine, so I don't need to locate a custom ROM. That said, I just need to reset the phone to factory settings (thereby getting the factory ROM), run A2SD (is A2SD any different from A2SD Killer that they speak of in this post? I never heard of it), then go through the motions of the initial setup as it suggests (language choice, time zone, etc).
Then, prior to setting up my gmail account, I'm supposed to reboot to recovery. What does it mean reboot to recovery? Am I supposed to hold down the keys to do a factory reset? Is that what they mean by recovery?
I hate to ask these questions in a form of hand holding, but I just want to make sure I'm doing it right. After re-hashing this post several times and talking to 2 buddies about it without any further progress, I figured I'd just ask.
That said, can anyone help guide me in the proper direction? I'd greatly appreciate it.
Thanks!
make sure that you are looking at the right forum next time that link was for htc desire (use it only if it says its compatible for your phone)
before you start worrying about a2sd, you need a custom recovery, found here. once you flash recovery and boot into it, everything will be clear (ext, partition, flashing, etc)
for apps2sd, id suggest using ungazes data2sd (apps2sd and data2sd are basically the same thing, at least thats my understanding)
follow the steps there. if anythings unclear, post any questions and ill check back later
I did notice it was an HTC forum, but I was speaking with users who had other devices and claimed they used the same method, so I didn't think much of it. At that point I figured it was more of an Android thing vs an actual manufacturer thing.
When you speak of the custom recovery, what *exactly* does that entail? I was told Android phones have the hard factory reset that cannot be altered as long as you don't mess with /system under root terminal. That said, this phone is pretty much brand new. I have nothing on it that isn't already stored in the cloud somewhere (google contacts, gmail, work's email, etc).
What I'm trying to get at is, is a custom recovery needed only to get my phone back the way it was before I screwed with it? Or if I'm accepting to doing a hard factory reset, is that acceptable as well?
Thank you very much for the link. This seems a little more straight forward than the last one was. I'm also trying to understand the differences between handsets and Android versions here. For example, you mentioned the previous post was for HTC. It's a difficult thing for me to grasp because I come from a very heavy Linux background. If I mess with Ubuntu on one machine, then mess with Ubuntu on a top end server, then tinker with it on a laptop, it's still Ubuntu no matter what machine it's on. So it's hard for me to grasp the concept of Android acting differently on different machines (phones) and having different methods to different devices.
That said, it sounds like the link you posted to me is more of a generic "everything should work" type of scenario. After all, it's just moving /data. It would make sense that it would work that way, right? If not, please correct me, as I'd rather be wrong 1,000 times over again and be corrected than make 1 mistake and mislead someone or brick my phone.
Thanks for your response. Hopefully the recovery thing isn't too much of a hassle and I hope this ext thing can do the trick! What kind of difficulty is involved here? Is this fix, say, grandma approved? Or is that asking for a lot?
EDIT - Also, I noticed you spoke of Apps2SD. I have that installed... is that not acceptable to what I'm running? After all, it just seems to move what parts of the apps it can to the SD card. I was aiming to have the entire application base MOVED to the SD card. Is that what it does and I'm just a little confused??
i understand what you mean (how ubuntu on one machine is the same as ubuntu on another)
its the same thing with android EXCEPT that each android device is made different by the hardware (i.e. my phone is limited by the fact that its cpu is not powerful enough to run some apps; different components make up each device in contrast to lets say iphone, where each iphone is the same; my understanding is that each rom utilizes and has commands for each of these components so if they're different then youll need a rom unique for each device)
heres a general scope over recovery:
custom recovery - allows you to flash a rom, make/restore a nand backup, well it allows you to do a lot of things
stock recovery - only a hard reset (done automatically)
a hard reset wont cut it if you screw up your phone. youll need a custom recovery (which allows you to back up your entire system as a nand backup)
when you say apps2sd, i think you are talking about moving the app to the sd card in settings. thats not true apps2sd. true apps2sd moves the whole app to the sd card, giving you unlimited space to store apps (well actually you are only limited by your sd card)
if i missed anything, tell me. im multitasking right now (sorry)
Hahah, no you're doing quite well for multitasking! I understand what you mean, and it makes sense to me. I mean, after all, isn't it still the same analogy to Ubuntu? (at first I didn't think so, but now I think it may be more relevant) After all, if I'm running a dual proc 6 core system with 24gb of RAM, it'll certainly move Google Earth (aka, an app) faster than a Pentium 3 with 128mb of RAM would, even though they're both packin Ubuntu, Fedora, Debian, or whatever your flavor may be. So in theory, I suppose you can apply the same analogy from Ubuntu as you do Android. The catch is, Ubuntu (or any Linux distro for that matter) runs on old hardware great, so the gap between old computer vs super computer is less relevant than today's Android based smart phones, where 300mhz could mean whether or not you can run a certain app. Compared to real life, Ubuntu operates just as quick to me on my dual proc 6 core (12 core total) server with 24gb of RAM as it does my P4 1gb RAM box on my test bench.
Anyway, going back on topic a bit more... yeah I was thinking of the Apps2SD from the market. So I suppose the "real" Apps2SD is a true "mv -R" type of application (linux recursive move of data).
Okay, so get the market based App2SD out of my head. Gone. Done. Okay... the thing I'm still not understanding is the recovery. I mean, I'm looking at the hard factory reset as, say, a recovery "Ghost based" partition that some Windows computers often come with.
Example - Windows gets fubar'd. Reboot. F8. Recover system. And it dumps the recovery image on the main partition. Ta da! Just like it was when you bought it at Best Buy!
I mean, if I could get it back to factory, then I could just start over, right? Trying to put it into words as best I can... I was thinking of it like this.
Hard factory reset = Windows recovery image from Dell factory (back to day 1).
Nandroid custom reset = Own "self made" Clonezilla/Ghost image (customized with your stuff as a backup you made yourself)
That's what I was thinking. So that being said, am I absolutely positively required to do a custom backup? Can I not just rely on the hard factory reset to take me back to day 1 from when I got it from T-Mobile and (if I so desire) start the process over if I tank it? You see, I was told that it's nearly impossible for me to permanently brick an Android phone, as the hard reset, while inconvenient since it would wipe my stuff, would at least get me back to a bootable, functional ROM.
If I'm re-hashing unnecessary things and just need to focus on the fact I have no choice, by all means, e-slap me. Thanks for your help so far. I'm just trying to learn what I can! Your time is appreciated.
the thing is, a time may come when you cannot even boot your phone (lets say you were messing around and modding and all of a sudden you get stuck in a bootloop) and you try doing a factory reset but it doesnt work. this might be because something is corrupted. for android, a factory reset only wipes the data but does not restore anything. this is where custom recovery comes in handy. not only can custom recovery do a factory reset, it can restore a backup if your phone ever gets screwed up (unless you screw it up so much that you cant even access your recovery, then things get much more complicated). think of this backup as a system restore on windows (creating a restore point on windows is like creating a nand backup in custom recovery)
and dont worry about all the questions a few months back i never knew this myself so i understand
Well my friend, your patience is certainly appreciated. I understand a little better now. So let me throw out another analogy just to further solidify what little understanding I feel I have.
Factory reset = Windows restore point
Nandroid reset = Self made recovery image via Clonezilla/Ghost
Your point is a Windows restore point is only good as long as the system is solid. If your hard drive dies, suddenly your backed up restore point is useless. But... dump on that Clonezilla/Ghost image you have saved elsewhere and you're good to go.
That said, how should I get started? How do I make a Nand backup? Any guides you recommend? Will this back up my current apps, settings, etc?
Once done, how would I go about the actual Apps2SD method for making the SD card act as app storage? I assume it's that ungazes link you provided earlier?
Again, thanks for your help!
Figure this is where I should come in to help. You can install Amon_ra's recovery or clockworkmod onto your device (you can choose if there is both) but you should be able to do all that from a backup and restore menu in the custom recovery. You can go get the free version of rom manager and it should be able to install clock work recovery all without that much input from you, then you boot into recovery from rom manager. It shows you this simple yet amazing GUI that you never thought possible with something so small such as your android device. You are then given choices, do you want to flash a zip to mod your system such as custom roms, new keyboards, etc. Backup and restore (nandroid backup) or even mount it in USB mode which is useful if you never backed up, and didn't keep a copy of a custom rom on your SD card. (I never made that mistake of atleast the latter option. lol) So basically, the recovery is the "safemode" of android, only you don't get to access all of your stuff until you leave "safe mode"
and a bit of advice: NEVER flash anything without 50% or more battery.
It probably will atleast softbrick your device if it dies mid-flash.
oh, I see. Yeah I thought recovery was the actual PROCESS of pulling an old backup over, not so much operating in a sterile system environment such as safe mode.
About flashing, I would suspect it would best be done plugged in with AC power. I've had a laptop or two nearly die on me in my flashing days (went to the bathroom, came back, flashing red light, uh oh!) so I think I'll be good there.
So which applications do I need to get started? The problem I face is when I google something, there's no less than 600 ways to do all sorts of various tasks. So I have a hard time separating which one is best practice, which one is the old method, which one is definitely a bad idea, etc. So you say I can choose which ROM to use. Are they pre-built into whatever recovery software I need to use to get this job done? Or do I have to download them somewhere and put them on my SD card and then boot into recovery?
EDIT - hey how about this lil guy here?
http://code.google.com/p/android-roms/wiki/SPL
Came across it when I was googling for Nandroid Backup.
EDIT 2 - Or this guy. Looks to be the same step as the Nandroid step within the first link. Looks like the first link, while a bit more dated, is also a bit more thorough.
http://theunlockr.com/2010/02/06/how-to-backup-and-restore-your-android-phone/
Since you're rooted, you can run thiss https://market.android.com/details?id=com.koushikdutta.rommanager&hl=en and it will be able to install clocwork mod recovery. Then you just boot into it and whatever rom you want to use (found in the android development forum for your device) you install that zip from SD card and voila! You're golden with a new rom on your phone. It isn't completely needed though. lol
if i were you, i wouldnt use rom manager (it is known to cause problems). for now, use the recovery i posted in the second post. if you want to flash a rom, heres a list of most (if not all) roms for our phone.
as you start getting familiar things, you should start referring here
heres a general scope of things when it comes to flashing a custom rom:
1. boot into recovery
2. make a nand backup
3. you MUST wipe data/factory reset, cache, and dalvik cache. wiping the sd card is not necessary
4. flash the rom
5. boot normally (first boot can take awhile)
and remember, never flash more than one file without rebooting normally in between or else you might run into some problems
When you say wipe the dalvik, cache, etc, is that done during a factory wipe or do I need to do that in a separate step?
Edit- which rom would you suggest? I hear a lot about cm7. Thats the only one I recognize.
they are separate processes but they are found under the same category
so itll be like this:
wipe
wipe data/factory reset
wipe cache
wipe dalvik cache
wipe rotation settings
wipe battery stats
something like that (at least this is how it works for amonra recovery. for clockwordmod recovery, i believe they are categorized differently but its still the same idea)
Ahh, I gotcha. I remember reading instructions on clearing the dalvik-cache, so that's why I thought maybe I'd have to re-hash those links I found and do that in a separate step. But it sounds pretty streamlined!
Well, I'll give this a shot tonight. I'm still going back and forth on which ROM to use. I hear a lot about CM7, but I also heard of 1 or 2 users saying on CM7 they lost their Google Navigation or Google Latitude functionality, both things I utilize. I also had no idea the Opt T was supported on CM7. But then again, if it's anything like Linux distros, using one of the more popular ROMs has its benefits as those are normally the highest supported.
People weren't lying when they said stop googling and just go to XDA forums. Thanks for the help yet again, bro.
im using cm7 and both google navigation and latitude work for me. and i know that the link i gave you said optimus p500 roms, but all p500 roms work for the p509 (since they both use the same hardware). just remember not to flash any roms from any other forums, flash only from the p500 forum
glad i could help. if you need any more help, just refer to that forum or pm me (since i have the same phone as you)
Sweetnsour, I was just suggesting Rom manager to be able to flash clockwork, then he could flash amon_ra from inside clockwork. I think that's possible? It was more of a hint for a newer user. I remember being on the other side and since I don't personally own your device, I was just offering general android advice. Glad to see you corrected me though, anyway, good luck OP. Hope you enjoy your device modifications.
I come here with my tail between my legs ducking from any backlash I may get from any users here. I spent the better part of the evening Googling around, asking in IRC, and trying to get this part working.
I ran into several issues. Some of them are quite comical to me.
I Googled around, as well as utilized the links that were provided to me in this thread. I learned that Clockwork and Rom Manager are from the same dev team, but they are two separate products. Likewise, I was hearing other users confirm that Clockwork is the bees knees but that Rom Manager is kind of "ehh" with predictability and reliability.
After I ran into some road blocks I ended up asking in the IRC Android chat room. Some users in there directed me to some guides. I read through them. Of course, each one was different. So to a user like me, I have no idea which one is the better one to go with. The one guide kept talking about how I need to run a .sh script. So, of course, I download the files supplied and extract them. No .sh script. I ask in the IRC chat and I caught hell because I should read the directions more clearly. I read through them several times and got no where. Ultimately, some users in the IRC chat decided to link me to the guide they recommended. Later, I too ran into a road block there.
Moving along, I went into the XDA-Devs chat once I found myself at the next road block. There some users spoke to me about what I was trying to do. I linked to them the guides the Android users told me to use and they were wondering why I was using such old guides to do this simple task.
This is where my frustration is brewing. There are a million and one ways to do everything. There's no structure. No consistency at all. I've done a ton of reading and I still feel like I know next to nothing about doing a "simple" recovery. I know phones are different. I know ROMs are different. But holy hell. Doing "xyz" task on one Android phone vs the same task on another Android phone is as different from driving a lawnmower vs a dump truck.
At this point I installed Android SDK on my Ubuntu machine. However, "adb shell" was yielding a command not found error. It's nearly 2 am. I'm packing it up for tonight.
That said, let's back up a bit here. My goal is this. I have an LG Optimus T. I have it rooted. I would like to utilize Clockwork in order to do a recovery as Clockwork came heavily recommended by many sources I read about. Then, I would like to utilize the XDA site for a list of available ROMs for my phone and choose one of my liking.
Is this guide, right here what I should be using to get this job done?
Along with that, how exactly do I need to install SDK on Ubuntu so it works without headache?
Thank you to everybody who has been patient with helping me learn this stuff so far.
that guide works. after you flash the recovery from that guide, don't think that you are always stuck with it. you can always flash another recovery in recovery. as for sdk, do you need it to flash recovery? those commands to flash recovery can be done on the phone using a terminal emulator. (about installing sdk on ubuntu, I will check on that tmrw because I'm doing this on my phone, and over where I'm at I should be sleeping)
EDIT: and here's a list of roms for our phone http://forum.xda-developers.com/showthread.php?p=16535249
EDIT: for sdk, have you tried this?
http://forum.xda-developers.com/showthread.php?p=11823740#post11823740
Sent from my LG-P500 using XDA Premium App
Okay. I wasn't sure if it was safe to run those commands from the phone. I was tempted to but, ahh, figured I'd wait.
Now these instructions are exclusive to the Clockwork mod, correct? So if I get any other recovery (Amon Ra, for example) there will be specific instructions for that exact recovery too as well, right?
I'll give this a shot later and see where I end up. Thanks for your help!
Edit... It's a shame those commands aren't in an sh script already. Just a fun idea... What I'd add them to a blank text file and on the phone just chmod +x it and run it. Would that work??
the commands are fairly similar:
cwm (from your guide):
#mount -o remount,rw -t yaffs2 /dev/block/mtdblock5 /system
#cat /sdcard/flash_image > /system/bin/flash_image
#chmod 755 /system/bin/flash_image
#mount -o remount,ro -t yaffs2 /dev/block/mtdblock5 /system
#flash_image recovery /sdcard/recovery.img
#reboot recovery
amonra (from here):
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock1 /system
# cat /sdcard/flash_image > /system/bin/flash_image
# chmod 755 /system/bin/flash_image
# mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.bak
# mount -o remount,ro -t yaffs2 /dev/block/mtdblock1 /system
# flash_image recovery /sdcard/recovery-RA-GNM-thunderg-1.1.0.img
# reboot recovery
after you flash either cwm or amonra, you wont have to do this again when you flash another recovery. to flash another recovery, you would just have to flash the recovery zip in recovery. these zips can be found here

[Q] Nandroid backup without display

So, my wife has had a Sensation for about a year or so, and I finally got around to rooting it for her and getting 4EXT on it. A few days ago, my son dropped it in the toilet. With the help of a bag of rice and a little disassembly/reassembly, it works... kind of. No display (was able to successfully boot it with display a couple of times). In any case, it does turn on and boot. Is there a way to do a 4EXT backup or some other kind of backup to SD without having a display? I know that 4EXT can be scripted because there's the management app that can select files to flash and then reboot and perform the operations, but I don't know what to put where to make this happen.
There is another potential option, since I think I might get a SU prompt if I try to do anything root is going into recovery first. I'm fairly certain I can get it booted up blindly and do an 'adb reboot recovery' to get to recovery... so if there's a way to execute a backup from the recovery shell, that's an option as well.
The only thing I'm concerned about is backing up her SMS, MMS, and Contacts... and I really don't want to have to mess with manually copying SQLite DB's. Titanium Backup's nandroid features would be much easier to use
Asurion is sending the replacement tomorrow, so I've got limited time to do it. Worst case scenario I'll mess with the Online Nandroid Backup scripts while in recovery and see if I can get that to happen.
I'd appreciate any ideas... I'm very technical (have a kernel for the Galaxy Blaze 4G out), and had a Sensation myself for 6 months, so pretty much pointing me in the right direction would be helpful. Otherwise I'll just be taking stabs in the dark to figure it out.
Thanks!
A quick search pointed me t this. Boot to recovery, and while in recovery (I hope you have a custom one that supports adb), type the following commands:
Code:
[B]adb shell
nandroid backup[/B]
If you are not sure how the nandroid command works, just type "nandroid" and see which options you get.
You must enter shell to execute the nandroid command. Once you're in, you don't need to type adb shell anymore.
Source: http://forum.xda-developers.com/showthread.php?t=1086003
That didn't work for me, threw an error, but I downloaded onandroid and it worked like a charm

Problem with PhilZ recovery!

Hello,
I thought of myself as a pretty experienced user, but you never learn enough!
However, I flashed some roms (lollipop) that, probably due to my mistakes, screwed up my file system, to the point that my recovery (latest PhilZ) wasn't able to find its backup anymore. Eventually I solved the problem as I was able to find my backups and use them to revert my phone to the rom I wanted to run (Carbon 4.4.4). But I was really annoyed by the fact that my file system was a bit off and still I was having problems with the recovery. So I decided to begin investigating the possibility to restore my phone to factory default. Before going with it, I tried the soft approach, i.e. I used the soft factory reset available from the settings menu. It all seemed fine and I re-flashed a lollipop rom that suited me.
Now the problem is that, after all the ordeal, I decided to make a new backup and so I did. It appears all fine, my recovery can actually "see" it, but I cannot identify it using a root browser! It seems to have disappeared unless I open the recovery and then I see it there. It is located in a folder that I can, of course, access, but,when I do so, I can't find the file!
I tried to put on my phone an old backup (always a PhilZ one), but when I try to put it on the phone I can't find the Backup folder in the Clockworkmod folder!
Anyone has any idea of what is going on and can give me a suggestion on how to overcome the problem?
Thanks
Luca
PS An alternative would be suggesting how to do a restore from a sideload: I thought I saw a similar option, but I can't seem to find it anymore within the recovery's options! I tried also restoring via NRT, but although all seem to go fine and the software return no failure notice, I can't find the backup file that should have been pushed (successfully) on my device!
Its not a recovery issue. Its an L issue.
Best thing to do would be to wipe data and storage then fastboot flash userdata.IMG
http://forum.xda-developers.com/showthread.php?t=2938749
rootSU said:
Its not a recovery issue. Its an L issue.
Best thing to do would be to wipe data and storage then fastboot flash userdata.IMG
http://forum.xda-developers.com/showthread.php?t=2938749
Click to expand...
Click to collapse
Thanks a lot for your help.
How can I find the img. file to flash?
Would it be ok to just go ahead and start from 0 using this:
http://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
How can fastboot flash an image file? I've never done that before! As I said, been doing this for a while, but never done this before...I think!
Luca
Alas, after reading your post on one-click toolkits, I'm afraid I'm one of those who thinks they can do things, but rely on simple tools to do them. However, I never (almost never) forgot to make a nandroid backup before flashing a new rom and, to be honest, I'm not a flashoolic. I never, ever bricked my phone (got a few bootloops). If I find a rom that suits my need, I stick with it for as long as I can.
The changes between KK and L are such that are beyond my comprehension, but I try hard to solve the problems I have without bugging everyone at the first obstacle. But now, after fidgeting with my phone for 2 days, I had to give up. With a few words, you singled out the reason why I couldn't come on top of this: things change and I was not informed of how much they did!
Luca
Problem partially solved..I think! Now I can see the folder and found my backup!!
I used the restorecon command you suggested. I couldn't make it work using terminal emulator (just did not accept the su command: why I don't really know). Then I thought about using adb shell via pc and, I really surprised myself; I was able to pull it through. I'm not totally brain damaged as I felt when I couldn't even reproduce the command you indicated. It is probably the application that doesn't work. It was my first time with adb shell, so a new thing learned.
However, now I would like to ask you: if I place in the proper folder the backup folder I saved on my pc, will I be able to restore the nandroid backup? I just need some data that I forgot (trivial things, such as text messages and a few app data, like passwords and stuff) but it would be useful.
Thanks once more for your help.
Luca

Categories

Resources