|
|||||||
| Register | FAQ | XDA-Portal | XDA-Wiki | Device database | Donate! | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Changelog:
This script does two things: 1. Store and tag a ROM's nandroid backup and its apps data. You can provide any name for tagging while storing. 2. Restore a tagged ROM's app data and its latest nandroid backup. The nice side effect of this is that you have complete environments you have created nicely bookmarked with easy to understand names and version numbers, ready to be restored easily. Requirements: 1. Two partitions in order: fat32, ext2/3 2. cyanogen's recovery image 1.4. 1.3.1 will not work with V1.0. 3. Attached script called switchrom.txt downloaded and stored in folder /system/sd/ and renamed as switchrom.sh Usage: 1. Boot into recovery using Home + End buttons together. 2. To bookmark and tag current ROM, Go into console with Alt+X (or do adb shell from PC) mount /system/sd sh /system/sd/switchrom.sh -s <name> e.g. I am backing up soulife-1.2.3 with sh /system/sd/switchrom.sh -s soulife-1.2.3 3. To restore a ROM, Go into console with Alt+X (or do 'adb shell' from PC) mount /system/sd sh /system/sd/switchrom.sh -r It will give you a list of available ROMs to restore and you can choose the one you want to restore using the corresponding number. e.g. I am restoring soulife-roger-new-3.9.1-latest with Code:
sh /system/sd/switchrom.sh -r 1. JACMyTouchSkiV2-mod 2. JACxROM-1.3r3 3. cm-3.9.7-best-setup 4. drizzy-hero-2.8-best 5. soulife-ion-1.2.3-mod 6. soulife-roger-new-3.9.1-latest Choose a ROM (type in the number and press enter)...6 Restoring ROM soulife-roger-new-3.9.1-latest, proceed? (y/n) y Cleaning up /system/sd ... Restoring soulife-roger-new-3.9.1-latest app data in /system/sd ... Restoring nandroid backup... Done restoring the ROM soulife-roger-new-3.9.1-latest. Note that options have changed since last version. Make sure to read the help with '-h' or '--help' option. Compression (-c option) is supported for both the apps partition and the nandroid but the way it is done in nandroid is dumb and takes like 17 minutes, so I would not recommend it at this time but you can definitely try it. I will post patches for nandroid script to fix that. Code:
# sh /system/sd/switchrom.sh -h
Usage: /system/sd/switchrom.sh OPTIONS <rom_name>
Options are:
-h --help
-c --compress, only used with -s
-d --delete
-l --list
-r --restore
-s --store
-v --version
Always specify options as separate words
e.g. -c -r instead of -cr. Its required!
Don't use blanks or special characetrs in rom_name.
Compress will take longer but image will be smaller.
<rom_name> is optional with -r and -d. Choose from a list.
Note that this is not storing the whole backup of your EXT2/3 partition. This is just storing app* and dalv* folders needed to restore the ROM behavior, apps and settings only. If you wipe your EXT2/3 partition with a formatter or manually with 'rm -rf /system/sd/*', you will loose everything on that partition and won't get it back from this backup. This backup will only restore app* and dalv* folder. It was reported that certain versions of 'adb' hangs in the sub-shell created and it doesn't pass through the commands that are typed. Make sure to upgrade the SDK to 1.5r3. Last edited by devsk; 8th August 2009 at 06:59 AM.. |
| Sponsored Links |
|
#3
|
|||
|
|||
|
added to my collection of scripts
|
|
#4
|
||||
|
||||
|
This may sound like a silly question but please forgive me as I have not yet flashed the haykuro spl.
Once you've flashed the new spl, instead of flashing the update.zip of the cyanogen rom, can't you use nandroid restore? Or will that restore the previous spl as well (in my case HARD SPL)? I ask because I would like to try the spl, but I'm so comfortable with my rom and settings that I would hate to wipe just to try Hero which is still in development. Call me crazy, but I like stable and finished builds. But I am curious and with a lot of time on my hands but not so much that I'm willing to lose everything just to try something that I'm not going to keep. With this script, it would make it so much easier and would allow us to switch roms on the fly... but would it work from Hero builds and non-Hero builds?
__________________
{Carrier}T-Mobile {Phone}MyTouch 1.2 (rooted) {ROM}port_Stokes_Eclair {SPL}1.33.0013 {RECOVERY}RA-sapphire-v1.6.2G {Theme}CHM-Binary100100 Version {Phone}HTC G1 {ROM}Cyanogen 4.2.15.1 swappiness=32 or {ROM}xRom 1.1 with CHM-Binary100100 theme {RECOVERY}RA-dream-v1.6.2 {SPL}1.33.2005 (aka DANGER) with 2.22.23.02 Radio {Theme}CHM-Binary100100 Version {Storage}16gb Class 6 card (14gb/1gb ext4/96mb swap) Twitter = Binary100100 |
|
#5
|
|||
|
|||
|
I don't think I know enough about the SPL image contents to comment on this. But as far as I know SPL is not touched by nandroid restore. I upgraded the radio and SPL (haykuro) first, and then went with updating my ROM. I will never flash radio and SPL unless and until I really need to.
This script is just taking the pain out of switching between ROMs (whether Hero or Cyano or official) and nicely organizes your ROM backups. So, to answer your question: Quote:
|
|
#6
|
|||
|
|||
|
Considering the most amount of bricks come from radio/spl updates, I dont think this script would integrate backing up and restoring them. Same reason why rom's themselves dont include the latest radio/spl in the update.zip when it is required by the rom.
__________________
Phone: Black HTC Dream ROM: Cyanogen 4.2.5 Recovery: Ra-dream-1.3.2 SD: A-DATA 8GB Class 6 miniSDHC Partitions: 500MB EXT3 7500MB Fat32 64MB linux-swap SPL: 1.33.2005 Radio: 2.22.19.26I |
|
#7
|
||||
|
||||
|
Quote:
I back it up and lable it "Cyan 3.9" I install the Haykuro spl (I already have the radio) I install a Hero rom. I try the Hero rom. I backup the Hero rom and lable it "Hero" I can then restore "Cyan 3.9" and still have the Haykuro spl. Correct?
__________________
{Carrier}T-Mobile {Phone}MyTouch 1.2 (rooted) {ROM}port_Stokes_Eclair {SPL}1.33.0013 {RECOVERY}RA-sapphire-v1.6.2G {Theme}CHM-Binary100100 Version {Phone}HTC G1 {ROM}Cyanogen 4.2.15.1 swappiness=32 or {ROM}xRom 1.1 with CHM-Binary100100 theme {RECOVERY}RA-dream-v1.6.2 {SPL}1.33.2005 (aka DANGER) with 2.22.23.02 Radio {Theme}CHM-Binary100100 Version {Storage}16gb Class 6 card (14gb/1gb ext4/96mb swap) Twitter = Binary100100 |
|
#8
|
|||
|
|||
|
Quote:
|
|
#9
|
|||
|
|||
|
Quote:
Prior to flashing the haykuro spl I made a nandroid backup of the cyanogen rom I was using. I tested a hero rom and restored a nandroid backup of the cyanogen rom I was running and the new radio/spl were in place.
__________________
Phone: Black HTC Dream ROM: Cyanogen 4.2.5 Recovery: Ra-dream-1.3.2 SD: A-DATA 8GB Class 6 miniSDHC Partitions: 500MB EXT3 7500MB Fat32 64MB linux-swap SPL: 1.33.2005 Radio: 2.22.19.26I |
|
#10
|
||||
|
||||
|
I think you need to dump all of mtd6ro and extract radio/spl by hand if you need to. Nandroid doesn't touch either of them.
__________________
Nexus One - CyanogenMod-5.0.5 Google ION - CyanogenMod-4.2.15.1 Twitter: cyanogen Website: http://www.cyanogenmod.com Forum: http://forum.cyanogenmod.com Issue Tracker: http://code.google.com/p/cyanogenmod/issues/list Wiki: http://wiki.cyanogenmod.com GitHub: http://github.com/cyanogen If you like my stuff, buy me a beer! |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|