[Q] Best way to backup and restore kernel only - Nexus One Q&A, Help & Troubleshooting

Curious what the best way to backup just the kernel of a ROM is, to potentially restore it after experimentation with other kernels?
Something more elegant than nandroid the whole ROM, then wiping and restoring everything.
My prior understanding was that the kernel is the boot.img of a nandroid backup. So I suppose making a nandroid backup of just the boot section could do this. I forget though if a nandroid restore automatically wipes other parts (system/data/etc.) if it's just restoring a small part of it. I don't think so?

waylo said:
Curious what the best way to backup just the kernel of a ROM is, to potentially restore it after experimentation with other kernels?
Something more elegant than nandroid the whole ROM, then wiping and restoring everything.
My prior understanding was that the kernel is the boot.img of a nandroid backup. So I suppose making a nandroid backup of just the boot section could do this. I forget though if a nandroid restore automatically wipes other parts (system/data/etc.) if it's just restoring a small part of it. I don't think so?
Click to expand...
Click to collapse
Problem is that dependant WiFi modules are stored on /system - so to get a proper backup you'd need to grab the boot.img, and the modules and then create an update.zip.

Try Kernel Manager from the market. I've never used it, but I believe that is the intent behind it...

Thanks for the replies. Good to know that there are some /system files that aren't included on boot.img--that saves a lot of potential havok that would have been caused by my misinformed tweaking.
No, kernel manager doesn't have kernel backup ability. Just the ability to download and flash supplied kernels. If there's a 'stock' kernel supplied, yes, it's easy to reflash that. But no way I can find to make your own kernel from what's already installed.

waylo said:
Thanks for the replies. Good to know that there are some /system files that aren't included on boot.img--that saves a lot of potential havok that would have been caused by my misinformed tweaking.
No, kernel manager doesn't have kernel backup ability. Just the ability to download and flash supplied kernels. If there's a 'stock' kernel supplied, yes, it's easy to reflash that. But no way I can find to make your own kernel from what's already installed.
Click to expand...
Click to collapse
Well that's easy... just grab the boot.img and contents of /system/lib/modules from your rom zip and make your own update.zip. You can surely find how to do that.

djmcnz said:
Well that's easy... just grab the boot.img and contents of /system/lib/modules from your rom zip and make your own update.zip. You can surely find how to do that.
Click to expand...
Click to collapse
Haha, thanks for the vote of confidence =P
Sounds simple enough. Thanks for pointing out the modules directory location.

Related

[SOLVED] Nandroid restores on two different phones? [UPDATE 7/26/09]

Hey all,
Are nandroid restores specific to one particular device or can they be interchanged between two G1's? I have a spare G1 that I play around with that has root while my other G1 doesn't have root. I am thinking about rooting the other one and wanted to know if I could just go through the rooting process, (radio, spl, cyanogen recovery etc) throw on a cyanogenmod or JF, then do a nandroid restore from the spare device with all my settings on it. I know that nandroid creates a unique numerical folder that has your latest backup in it so I wasn't sure if this folder would be seen by nandroid on a different phone.
Any thoughts?
EDIT:
Just wanted to update this thread in case anyone else wanted/needed to do this. As I suspected, I ran into folder name problems when trying to copy one nandroid restore to my spare phone and trying a restore. There is a simple fix however....
1) Perform a nandroid backup on the phone you WANT to backup.
2) Copy that nandroid folder from the phone to your PC.
3) Perform a nandroid backup on the phone you DON'T WANT to backup.
4) Copy that nandroid folder from the phone to your PC.
5) Compare the nandroid subfolder name (should be alpha-numeric starting with HT) of the backup you want to the name of the one you don't.
6) Change the name of the nandroid subfolder on the backup you want to restore to the same name of the folder you don't want. This way you fool nandroid into thinking that the backup was originally done on that phone.
7) Copy the entire nandroid folder (with the newly changed subfolder name) to the sdcard of the phone you want to restore.
8) Boot into recovery (power+home) and perform the nandroid restore. If the restore fails, you probably don't have the correct subfolder name. Return to step 5 and 6.
9) If the restore is successful, reboot and you should be all set!
Good question. I wouldn't have thought there would be issues with it bar of course your settings etc but then a wipe before would resolve that. Just make sure to do what you've said though (upgrade radio, SPL, recovery etc) first.
DirectMatrix said:
Hey all,
Are nandroid restores specific to one particular device or can they be interchanged between two G1's? I have a spare G1 that I play around with that has root while my other G1 doesn't have root. I am thinking about rooting the other one and wanted to know if I could just go through the rooting process, (radio, spl, cyanogen recovery etc) throw on a cyanogenmod or JF, then do a nandroid restore from the spare device with all my settings on it. I know that nandroid creates a unique numerical folder that has your latest backup in it so I wasn't sure if this folder would be seen by nandroid on a different phone.
Any thoughts?
Click to expand...
Click to collapse
It won't upgrade your SPL, radio, and recovery. If you look in the nandroid folder, you'll see exactly what is backed up. I think its the /system folder and the /data folder as well as something else. But if you have another phone that is already rooted and has the correct SPL, radio, and recovery, this will work.
Should be fine then as he's planning on doing the usual steps up until flashing the desired ROM of choice. Tell us how it goes DirectMatrix and if it works, please change your thread title to include [SOLVED] so we all know ^_^
NeoBlade said:
Should be fine then as he's planning on doing the usual steps up until flashing the desired ROM of choice. Tell us how it goes DirectMatrix and if it works, please change your thread title to include [SOLVED] so we all know ^_^
Click to expand...
Click to collapse
Gonna start rooting the other phone now so I'll keep this thread updated with whether nandroid backups are swappable between phones. I hope so as that will save me quite a bit of settings/data calibrations.
@h.nocturna... LOL, you have been dealing with n00bs too long in the Q&A section....of course nandroid won't upgrade my radio, SPL, and recovery, but I had a good laugh anyways. Thanks all for the advice

[Question]:zImage and modem binary swaps

I like to tweak my ROMs before a flash. i.e. make changes to /system apps; framwork tweaks... etc.
However, whenever I try to replace a kernel zImage or modem binary(using 7z, so as not open archive), I get stuck at a bootloop.
I can replace .apks and .pngs no problem using this method.
Can zImage and .bin be replaced as well? Does redbend also need to be copied? Since .bin and zImage reside in same folder in ROM... which redbend to use if needed?
Thank you?
Whenever I use a new kernel in Loki, or test one personally, I use the version of redbend that the dev included with their kernel initially. Modem does not seem to matter. Are you using a kernel that is meant for the version of Android that matches your rom? If you want to, specifically, what are you using?
This is interesting to me as well, as I did not know you could flash a zip that had been added to, so can you briefly explain how this is done? I would much rather inject my apps than do the titanium backup dance.
I also noticed that SGS Kernel flasher flashes the zImage by simply copying it, and rebooting.
If you are about to tell me I can manipulate my FS to add anything i want, in an update.zip, then sir, I love you.
BTW, if its a simple explanation, whats the redbend file do?
Br1cK'd said:
Whenever I use a new kernel in Loki, or test one personally, I use the version of redbend that the dev included with their kernel initially. Modem does not seem to matter. Are you using a kernel that is meant for the version of Android that matches your rom? If you want to, specifically, what are you using?
Click to expand...
Click to collapse
Exactly what Br1cK'd said. Use the redband that's with the kernel. If pulling the kernel from a rom and a modem from a different one same deal. Also be careful which kernels you use ie: right kernel for phone and version of Android.
d33dvb said:
This is interesting to me as well, as I did not know you could flash a zip that had been added to, so can you briefly explain how this is done? I would much rather inject my apps than do the titanium backup dance.
I also noticed that SGS Kernel flasher flashes the zImage by simply copying it, and rebooting.
If you are about to tell me I can manipulate my FS to add anything i want, in an update.zip, then sir, I love you.
BTW, if its a simple explanation, whats the redbend file do?
Click to expand...
Click to collapse
No sir it is not quite that simple. Proper settings have to be in the update script for everything to install properly. Replacing one file for another of the same name usually works and some files can be added but system apps and additional folders need to be in the update script.
Br1cK'd said:
Whenever I use a new kernel in Loki, or test one personally, I use the version of redbend that the dev included with their kernel initially. Modem does not seem to matter. Are you using a kernel that is meant for the version of Android that matches your rom? If you want to, specifically, what are you using?
Click to expand...
Click to collapse
Br!ck'd, fan of your work and EDT as a whole... great dev team! It happens on any kernel/ROM combo I have tried, which is interesting. Update.zips just carry signed certs and simple copy bash scripts, essentially pushing new files to correct directories, correct? I definitely check for kernel compatability before, I am noobish, not noobtacular
d33dvb said:
This is interesting to me as well, as I did not know you could flash a zip that had been added to, so can you briefly explain how this is done? I would much rather inject my apps than do the titanium backup dance.
I also noticed that SGS Kernel flasher flashes the zImage by simply copying it, and rebooting.
If you are about to tell me I can manipulate my FS to add anything i want, in an update.zip, then sir, I love you.
BTW, if its a simple explanation, whats the redbend file do?
Click to expand...
Click to collapse
1. I believe redbend is samsung tool for flashing volatile memory (NAND).
2. You can use 7zip to explore archives/apks without extracting them and breaking signings. Thus you can simple copy paste .apks/.pngs to appropriate directories without extracting
Most update zips are the actually apk and simple scripts in a flashable container. Roman form EDT has an excellent tool for creating flashable zips if interested... but yes you can manipulate file system of phone and archives. I use adb from recovery. Or android commander is a useful tool as well
EDIT: Explodingboy gives better explanation above
I use untermench's modified redbend. It's the same thing except it removes that ugly blue splash screen every time it is run. That said, I've simply copied over OS and CW into the trigger zips to override the stock kernel. And I never received any reports if it not working from anyone (and I've had releases with both).
Point being, in my experience it doesn't really matter (so long as everything matches). I've done the same for previous modems.
And as you said, all it's doing is copying them to the proper partitions.
Sent from my SGH-T959 using Tapatalk
birgertime said:
I use untermench's modified redbend. It's the same thing except it removes that ugly blue splash screen every time it is run. That said, I've simply copied over OS and CW into the trigger zips to override the stock kernel. And I never received any reports if it not working from anyone (and I've had releases with both).
Point being, in my experience it doesn't really matter (so long as everything matches). I've done the same for previous modems.
And as you said, all it's doing is copying them to the proper partitions.
Sent from my SGH-T959 using Tapatalk
Click to expand...
Click to collapse
Very cool... thanks.
Also, you are going to think I am crazy... but that ugly blue splash screen can tell me if it is a bad flash or not. When it happens on the top of screen= good flash, on bottom = gonna need to flash again, cause behavior goes wonky. Maybe just bizarre coincidence???
Poser said:
Br!ck'd, fan of your work and EDT as a whole... great dev team! It happens on any kernel/ROM combo I have tried, which is interesting. Update.zips just carry signed certs and simple copy bash scripts, essentially pushing new files to correct directories, correct? I definitely check for kernel compatability before, I am noobish, not noobtacular
Click to expand...
Click to collapse
I've seen you around, you're not noobtacular, but hell I'm still way noobish about a lot of things. Dig the avatar btw. I don't know if I can give an intelligent enough answer to your question, would probably have nobody running Loki by tomorrow, lol. Have you grabbed any logs, or tried to, while its looping?
I have no issues doing this with winrar.
Sent from my Amazing Captivate using the XDA Premium App Infused with Tiger Blood
Br1cK'd said:
I've seen you around, you're not noobtacular, but hell I'm still way noobish about a lot of things. Dig the avatar btw. I don't know if I can give an intelligent enough answer to your question, would probably have nobody running Loki by tomorrow, lol. Have you grabbed any logs, or tried to, while its looping?
Click to expand...
Click to collapse
<Palm to forehead> Probably should logcat... duh.
Just flashed with with custom kernel/modem combo... seems to be booting fine, will report any anomalies.
Only thing I did different was copy zImage and redbend from Kernel.zip
Thanks peoples!

Script request - snap and swap CWM backup

I don't see any threads or scripts that quite describe the thing I'm looking for, so I'm just going to toss this out and see if anyone has any ideas on how to make this work.
Here's the scenario: I have a rom that I enjoy using, and it's my daily driver that I keep updated. However, I want to see if any other roms have any features I like (or whatever), but I don't want to have to do the legwork of Tibu backups and restores.
So what do I do? I make a full CWM backup of my current rom, clear and flash the new rom, and get it set up to try out. I decide it's fun to use, but I want to go back to other rom's setup. Not a problem, as I made the CWM backup.
However, to keep this other rom option open, I make a CWM backup of this setup, too. I now head to recovery, clear, and flash my original rom back, and restore the CWM backup.
All this equals a lot of steps to basically swap which rom setup I'm loading.
So here's my question/request: Would it be possible to write some sort of script that will do these steps:
1. Make / update a CWM backup of my current setup.
2. Select a different CWM backup as the destination, along with the Rom installer file associated with it (if necessary).
3. Jump to CWM, do the necessary clearing/cleaning, flash the destination rom, and restore that rom's setup.
4. Reboot to new setup.
I don't know if this is easy or makes sense, but I have rarely seen ease or logic stop things from happening in the XDA community.
(Also, if this should be in development, please move it there - I assumed that since it's more of a feature request that it should go in Q&A.)

[Q] Convert Nandroid backup in update.zip

I searched i bit but i cant find solution. Is there an easy way to create a update.zip(flashable custom zip) of a Nandroid backup.
Thx for Answers
luisniklas said:
I searched i bit but i cant find solution. Is there an easy way to create a update.zip(flashable custom zip) of a Nandroid backup.
Thx for Answers
Click to expand...
Click to collapse
Huh!? What are you trying to achieve? Explain more!! This cant be done by the way. Nandroid backup uses a direct image of your system. If you want to restore your Nandroid backup use clockworkmod. I don't understand WHY you would want to flash an "update.zip" of your Nandroid backup. This doesn't make any sense!
i want to modify a rom on the phone by instaling apps etc. and then convert it to an update.zip to share it on xda.
luisniklas said:
i want to modify a rom on the phone by instaling apps etc. and then convert it to an update.zip to share it on xda.
Click to expand...
Click to collapse
There is ways of flashing a load apps in 1 go. You don't modify a Rom to do this. This would be a separate update.zip or flash-able .zip file. I haven't seen anyone to do this on X8. I have seen this on other forums by developers. I have no clue how to do this myself. Goodluck!!
I will send you a PM of where i saw this?
Oh by the way your signature is UNREAL!!
bahmonkeys said:
There is ways of flashing a load apps in 1 go. You don't modify a Rom to do this. This would be a separate update.zip or flash-able .zip file. I haven't seen anyone to do this on X8. I have seen this on other forums by developers. I have no clue how to do this myself. Goodluck!!
I will send you a PM of where i saw this?
Oh by the way your signature is UNREAL!!
Click to expand...
Click to collapse
was just an idea. i wanted to build a modified rom for me with apps and themes i like. an i thought i can share it here as an update.zip. because i love the work off the devs here and i wanted to share my personalized rom, because i am not a dev.
thx
why is ma signature unreal?
luisniklas said:
was just an idea. i wanted to build a modified rom for me with apps and themes i like. an i thought i can share it here as an update.zip. because i love the work off the devs here and i wanted to share my personalized rom, because i am not a dev.
thx
why is ma signature unreal?
Click to expand...
Click to collapse
This is just an idea... You could get a simple version of all your apps and themes on a ROM. Make an Nandroid backup of it. Get the Nandroid back put it into a .zip or .rar file so you can upload it in 1 go. Get people to extract your personal Nandroid backup to clockworkmod folder and restore it. What do you think?
Where did you get that signature? It shows my IP and the name of my ISP looks cool
bahmonkeys said:
This is just an idea... You could get a simple version of all your apps and themes on a ROM. Make an Nandroid backup of it. Get the Nandroid back put it into a .zip or .rar file so you can upload it in 1 go. Get people to extract your personal Nandroid backup to clockworkmod folder and restore it. What do you think?
Where did you get that signature? It shows my IP and the name of my ISP looks cool
Click to expand...
Click to collapse
i would make it more simple for the users but i think i will do it so.
you can create such a signature at danasoft.com. many users i this forum have one like that

No more backups possible in CWM 5.0.2.1 [Solved]

Hi,
Since 4 days I cannot make valid backups. The last good one is from October 12 and has a size of ~ 1000MB.
Now all backups have a size of ~13 MB. You can see the sizes on the attached hardcopy.
There is a \blobs\-subdirectory with many many files.
I tried to de- and reinstall the Rom Manager, checking permissions and so on, rebooted several times...
I restored the "good" backup, did a new backup and got other sizes of the files but always some with the extension .dup.
Even I installed an older version of RomManager without success.
The recovery system is v6.0.1.4 installed within the RomManager.
I have a LG-P970 with Zeus ROM 7.03.
tramp20 said:
Hi,
Since 4 days I cannot make valid backups. The last good one is from October 12 and has a size of ~ 1000MB.
Now all backups have a size of ~13 MB. You can see the sizes on the attached hardcopy.
There is a \blobs\-subdirectory with many many files.
I tried to de- and reinstall the Rom Manager, checking permissions and so on, rebooted several times...
I restored the "good" backup, did a new backup and got other sizes of the files but always some with the extension .dup.
Even I installed an older version of RomManager without success.
The recovery system is v6.0.1.4 installed within the RomManager.
I have a LG-P970 with Zeus ROM 7.03.
Click to expand...
Click to collapse
You might wanna flash this: http://forum.xda-developers.com/showpost.php?p=22121547&postcount=22
Follow the instructions give there. The new CWM v6 doesnt make full backups anymore everytime, but just backs up the parts, that have been changed. The dup files only contain the information about the files that have been changed and a link to them I think. Look in /sdcard/clockworkmod/blobs. There you can find a lot of folders with the made changes Just check the size of that blob folder.
N00BY0815 said:
You might wanna flash this: http://forum.xda-developers.com/showpost.php?p=22121547&postcount=22
Follow the instructions give there. The new CWM v6 doesnt make full backups anymore everytime, but just backs up the parts, that have been changed. The dup files only contain the information about the files that have been changed and a link to them I think. Look in /sdcard/clockworkmod/blobs. There you can find a lot of folders with the made changes Just check the size of that blob folder.
Click to expand...
Click to collapse
Thank you for answering.
So is it correct that I have a blobs subdir with ~ 1GB files and a small backup directory?
What happens to the \blobs\ dir if I make new backups? I assume then only changed files etc. will be added here?
Do I really need to flash your link if I don't need touch? I read the whole thread
I did not understand all.
tramp20 said:
Thank you for answering.
So is it correct that I have a blobs subdir with ~ 1GB files and a small backup directory?
What happens to the \blobs\ dir if I make new backups? I assume then only changed files etc. will be added here?
Do I really need to flash your link if I don't need touch? I read the whole thread
I did not understand all.
Click to expand...
Click to collapse
The link I provided is for CWM touch 5 only. This version will make the "normal/full-sized" backups. I think you're right about the new update, but I gotta confess, I dont really understand it myself yet... I also didnt yet try to restore such a backup and dont really know, how to delete old ones, if you dont need them anymore, but I hope it all should work fine
If your not sure about the old version, just install the one from the link I provided.
Hope it helped you, if not, you may also PM me.
N00BY0815 said:
I also didnt yet try to restore such a backup and dont really know, how to delete old ones, if you dont need them anymore, but I hope it all should work fine
Click to expand...
Click to collapse
To test:
I made a backup, installed a new app, then after another backup I looked in the blobs dir: only a few subdirs are new, all other remain unchanged.
So all files in blobs are cumulative and important for a restore, but bad for a later extern backup on my pc.
The old method of CWM was better.
Perhaps I will try the link from you.
I was trying a backup and found under "choose backup format" the following points:
- dup (default)
- tar
-
-
So I can choose
I did a backup (dup format) and all is working again.

Categories

Resources