[Q] Restoring CWM backup folders using fastboot. - Nexus 5 Q&A, Help & Troubleshooting

Is it possible and if yes then how would I restore (using fastboot) a CWM backup folder containing:
boot.img
cache.ext4.tar
cache.ext4.tar.a
data.ext4.tar
data.ext4.tar.a
nandroid.md5
recovery.img
recovery.log
system.ext4.tar
system.ext4.tar.a
I want to use fastboot and not just restore from recovery because it would be very useful to know this.
Thanks

Fastboot no way.
You can adb push the backup to your sdcard and restore it via recovery.
I wouldn't expect extracting the backup and adb pushing the contents to system or data would be a good idea
You could restore an adb backup though but with all this, I'd have to ask "why?"
Sent from my Nexus 5 using Tapatalk

rootSU said:
Fastboot no way.
You can adb push the backup to your sdcard and restore it via recovery.
I wouldn't expect extracting the backup and adb pushing the contents to system or data would be a good idea
You could restore an adb backup though but with all this, I'd have to ask "why?"
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
I wanted to see if this was possible so that after trying android L i could easily restore everything. I am assuming that installing android l using fastboot will revert my CWM recovery back to stock so then I wouldn't be able to restore my old setup. That's my reasoning.

I haven't looked at the L download but I doubt very much a developer preview of Android would contain a recovery.img
In any case you'd still be without recovery
Sent from my Nexus 5 using Tapatalk

nmushkin said:
I wanted to see if this was possible so that after trying android L i could easily restore everything. I am assuming that installing android l using fastboot will revert my CWM recovery back to stock so then I wouldn't be able to restore my old setup. That's my reasoning.
Click to expand...
Click to collapse
Yes, flashing all the L img files will replace the custom recovery with the stock one. If you want to restore, all you gotta do is flash back cwm and then restore.

vin4yak said:
Yes, flashing all the L img files will replace the custom recovery with the stock one. If you want to restore, all you gotta do is flash back cwm and then restore.
Click to expand...
Click to collapse
odd. Why do they provide a stock recovery?
Anyway yeaf flash recovery, adb push your /sdcard contents back and restore. Since you have to wipe /sdcard, you'll already be needing to push back

rootSU said:
odd. Why do they provide a stock recovery?
Click to expand...
Click to collapse
Yes, it's strange as it's a "developer's preview". Since it can be accessed by the general public as well, they thought of including the recovery as well. All the previous factory images had bootloaders, recoveries even though they weren't updated so they might have stuck on this practice in this release as well :silly:

rootSU said:
odd. Why do they provide a stock recovery?
Anyway yeaf flash recovery, adb push your /sdcard contents back and restore. Since you have to wipe /sdcard, you'll already be needing to push back
Click to expand...
Click to collapse
They provide it most likely because it's a part of AOSP. And they know not only devs will flash this. No OTA updates too..

Related

How to get back to root with stock-rom status?

Okay guys,
I know its a pretty noob-question because of multiple reasons, but anyway I need your help:
I rooted my Nexus5 with NRT and I worked without issues. After having it rooted I was playing around alot, overwrting some files (like email.apk). Now I would like to start from scratch. Staying rooted is good, but my question is: Does a "standard-factory" reset which I can select in the settings also roll-back to the original system files (like stock email.apk)?
Loosing my settings isn't a problem, but do I really need to download/flash the hammerhead factory-rom?
Thanks for your support.
quicky
quicky said:
Okay guys,
I know its a pretty noob-question because of multiple reasons, but anyway I need your help:
I rooted my Nexus5 with NRT and I worked without issues. After having it rooted I was playing around alot, overwrting some files (like email.apk). Now I would like to start from scratch. Staying rooted is good, but my question is: Does a "standard-factory" reset which I can select in the settings also roll-back to the original system files (like stock email.apk)?
Loosing my settings isn't a problem, but do I really need to download/flash the hammerhead factory-rom?
Thanks for your support.
quicky
Click to expand...
Click to collapse
doing factory reset in the rom only wipes data/settings. it does not restore the factory image.
if you want all your non-modded files gone, the easiest way is to fastboot the factory rom to your phone.
quicky said:
Okay guys,
I know its a pretty noob-question because of multiple reasons, but anyway I need your help:
I rooted my Nexus5 with NRT and I worked without issues. After having it rooted I was playing around alot, overwrting some files (like email.apk). Now I would like to start from scratch. Staying rooted is good, but my question is: Does a "standard-factory" reset which I can select in the settings also roll-back to the original system files (like stock email.apk)?
Loosing my settings isn't a problem, but do I really need to download/flash the hammerhead factory-rom?
Thanks for your support.
quicky
Click to expand...
Click to collapse
You dont need to use any type of Rooting program / script to root a nexus phone. Get ADB and Fastboot working. Factory reset your phone from the settings. Download TWRP or CWM recovery and save to the folder you have fastboot / adb in.
1. fastboot flash recovery (name of recovery).img
2. boot in to recovery
3. flash zip from SD-Card (superuser.zip)
4. reboot phone
5. enjoy factory image with root.
I'm running TWRP already and I can boot into recovery. But as I've overwritten the email.apk for example I was wondering if a "original" apk is still accessible from my phone.
dabbill said:
You dont need to use any type of Rooting program / script to root a nexus phone. Get ADB and Fastboot working. Factory reset your phone from the settings. Download TWRP or CWM recovery and save to the folder you have fastboot / adb in.
1. fastboot flash recovery (name of recovery).img
2. boot in to recovery
3. flash zip from SD-Card (superuser.zip)
4. reboot phone
5. enjoy factory image with root.
Click to expand...
Click to collapse
quicky said:
I'm running TWRP already and I can boot into recovery. But as I've overwritten the email.apk for example I was wondering if a "original" apk is still accessible from my phone.
Click to expand...
Click to collapse
Factory reset might restore the apk. If it does not you can always download the factory image and extract the email.apk from that and push it to your device.
dabbill said:
Factory reset might restore the apk. If it does not you can always download the factory image and extract the email.apk from that and push it to your device.
Click to expand...
Click to collapse
I can try (of course) but before doing a "standard" factory reset and reinstall everything to see if it got me the original email.apk back I thought there should be a clear definition about which system-files will be restored and which will be kept.
dabbill said:
Factory reset might restore the apk. If it does not you can always download the factory image and extract the email.apk from that and push it to your device.
Click to expand...
Click to collapse
sigh... no it wont.
ALL FACTORY RESET DOES IS WIPE YOUR DATA/SETTINGS NOT MODIFICATIONS YOU MAKE TO THE SYSTEM APPS.
Zepius said:
sigh... no it wont.
ALL FACTORY RESET DOES IS WIPE YOUR DATA/SETTINGS NOT MODIFICATIONS YOU MAKE TO THE SYSTEM APPS.
Click to expand...
Click to collapse
Thats what i thought, but was not 100% sure thats why I said it might. Not worth yelling about it. :good:
dabbill said:
Thats what i thought, but was not 100% sure thats why I said it might. Not worth yelling about it. :good:
Click to expand...
Click to collapse
In his defense, he already stated *EXACTLY* what a factory reset does....
If you delete anything from a partition that is not normally user accessible without root, it simply does not come back magically with a factory reset. Your device does not have a hidden partition with the original os on it.
Sent from my Nexus 5
Pirateghost said:
In his defense, he already stated *EXACTLY* what a factory reset does....
If you delete anything from a partition that is not normally user accessible without root, it simply does not come back magically with a factory reset. Your device does not have a hidden partition with the original os on it.
Sent from my Nexus 5
Click to expand...
Click to collapse
When I first read this thread the #2 post was not listed. I replied to the first post. Then when i came back to the thread i skipped down to my last post and continued reading so I never seen the #2 post on this thread. My apologizes.

Failed Flash?

I was trying to go back to stock before testing out eduardog131's deodexed rom. I tried my backup boot.img and it failed, so I grabbed the default from here, ADB console says the write is successfulm but it hangs at the splash screen when I try to boot I can get into the bootloader and recovery, and have the PLlIMG.zip I saved long ago (from which I extracted the same boot.img I've used before), but can't copy it over without booting. What on Earth could I have done?
zomgitsanoob said:
I was trying to go back to stock before testing out eduardog131's deodexed rom. I tried my backup boot.img and it failed, so I grabbed the default from here, ADB console says the write is successfulm but it hangs at the splash screen when I try to boot I can get into the bootloader and recovery, and have the PLlIMG.zip I saved long ago (from which I extracted the same boot.img I've used before), but can't copy it over without booting. What on Earth could I have done?
Click to expand...
Click to collapse
I bet the 'PL80IMG.zip' that you have is for 4.1.2
And you updated to 4.2.2
It's 4.2.2
I made it after upgrading so I'd be able to restore system.img , boot.img , and android-info.txt easily
zomgitsanoob said:
It's 4.2.2
I made it after upgrading so I'd be able to restore system.img , boot.img , and android-info.txt easily
Click to expand...
Click to collapse
You are aware that when you go to restore your device with your backup that you don't have to restore everything, right? You can uncheck everything and just leave the boot.img checked. Then swipe to restore in your custom recovery. The boot.img will be put back.
Sent from my C525c using Tapatalk
zomgitsanoob said:
It's 4.2.2
I made it after upgrading so I'd be able to restore system.img , boot.img , and android-info.txt easily
Click to expand...
Click to collapse
So the system.img that you have in the PL80IMG.zip is from a TWRP/CWM backup....it won't flash through bootloader unless you used dd to pull the system.img.....
Other words, you will not be able to flash PL80IMG.zip with a TWRP and or CWM backup of the system.img.....it's not the correct format
Only recovery.img and boot.img from TWRP/CWM backup will flash through bootloader PL80IMG.zip style......
Why not just click 'restore'? While in recovery...
zomgitsanoob said:
I was trying to go back to stock before testing out eduardog131's deodexed rom. I tried my backup boot.img and it failed, so I grabbed the default from here, ADB console says the write is successfulm but it hangs at the splash screen when I try to boot I can get into the bootloader and recovery, and have the PLlIMG.zip I saved long ago (from which I extracted the same boot.img I've used before), but can't copy it over without booting. What on Earth could I have done?
Click to expand...
Click to collapse
You didn't have to go stock to flash his Rom. Its a Rom lol. Its not like an OTA where it does checks on the system files and then patches them.
Take note of that for any future roms down the road.
Sent from my C525c using Tapatalk

[Q] Adb backup > unlock bootloader > adb restore. Will it work?

My question is this: I want to take an adb backup, then unlock my bootloader, then restore the adb backup. Will it work (and not brick my device like I've done before!), and if so, will my bootloader still be unlocked or will it be locked again ?
Thanks for advice. If it's really necessary I know I can lose my data and restore everything, but it's a time-wasting pain so I thought I'd try it this way!
Currently I'm on 05Q official stock, no root/busybox, stock recovery and kernel. I.e. everything stock.
pmedwards25 said:
My question is this: I want to take an adb backup, then unlock my bootloader, then restore the adb backup. Will it work (and not brick my device like I've done before!), and if so, will my bootloader still be unlocked or will it be locked again ?
Thanks for advice. If it's really necessary I know I can lose my data and restore everything, but it's a time-wasting pain so I thought I'd try it this way!
Currently I'm on 05Q official stock, no root/busybox, stock recovery and kernel. I.e. everything stock.
Click to expand...
Click to collapse
What about
fastboot boot (twrp) recovery.img
And then make a backup in recovery
And copy the backup somewhere safe
I'm not sure if that works on 5Q though
waterdaan said:
What about
fastboot boot (twrp) recovery.img
And then make a backup in recovery
And copy the backup somewhere safe
I'm not sure if that works on 5Q though
Click to expand...
Click to collapse
Isn't that the same as adb backup?
pmedwards25 said:
Isn't that the same as adb backup?
Click to expand...
Click to collapse
A backup in recovery backs up
System
Data
It won't backup your sdcard
I don't know what adb backup does, I think it backs up your apps and data
waterdaan said:
A backup in recovery backs up
System
Data
It won't backup your sdcard
I don't know what adb backup does, I think it backs up your apps and data
Click to expand...
Click to collapse
You can add parameters to make it backup system, apks, app data, sdcard and others. Should this work in theory?
waterdaan said:
What about
fastboot boot (twrp) recovery.img
And then make a backup in recovery
And copy the backup somewhere safe
I'm not sure if that works on 5Q though
Click to expand...
Click to collapse
You can't boot a recovery with a locked bootloader anymore, they patched that way back in the 30O update I believe.
Transmitted via Bacon

How to make a flasheable backup

I've been using my Moto G3 without problems, It's bootloader unlocked, rooted and with custom recovery; I have been read about hardbricks after updates and bootloops after OTA updates... so I have a question:
Is it possible to make a flasheable backup of my entire system so I can use it to rescue after any problem?
All that can help would be well received
If your system is working, just make a Backup via Twrp and place it on your pc or a sd card
so you can acces it even when you did a factory reset
(Edit: i know what you mean here is a link to do that, didn't test it but i think it will work)
(i recommend just flashing to factory firmware files)
HelpMeruth said:
If your system is working, just make a Backup via Twrp and place it on your pc or a sd card
so you can acces it even when you did a factory reset
(Edit: i know what you mean here is a link to do that, didn't test it but i think it will work)
(i recommend just flashing to factory firmware files)
Click to expand...
Click to collapse
Thanks HelpMeruth .
I already have the TWRP backup, but I'm looking for a way to "fully backup" my phone and that can be flasheable via fastboot.exe in case of emergency ...
I'll read the link you share me :good:
If its any help, Titanium Backup will make a flashable zip of all your apps and data that can be flashed with TWRP.
Sent from my GT-P5210 using Tapatalk
Tel864 said:
If its any help, Titanium Backup will make a flashable zip of all your apps and data that can be flashed with TWRP.
Sent from my GT-P5210 using Tapatalk
Click to expand...
Click to collapse
thanks for the advice Tel864 .

[N_7.0][NPJ25.93-14][TWRP][Boot]TWRP Backup of Stock Boot Partition

DISCLAIMER: I AM NOT LIABLE TO ANY DAMAGE THAT HAPPENS TO YOUR DEVICE BECAUSE OF DOING ANYTHING WRONG.
MOTO G4 PLUS [XT1643]
This is for those who had flashed a custom kernel on their stock ROM and now want to revert to stock.
REQUIREMENTS:
1. TWRP 3.0.3-n2 by @Shreps .
https://forum.xda-developers.com/mo...covery-twrp-3-0-2-r3-moto-g4-g4-plus-t3494337
This one is more updated/maintained than the official 3.0.2 version.
2. 7Zip Compression Utility:
Download and install on your PC. I use this as it gives the maximum ultra level compression. See Downloads below.
PROCEDURE:
1. Download and extract the TWRP.7z using 7Zip.
2. Place the TWRP folder it in the root directory of your INTERNAL STORAGE.
2. Just reboot TWRP once and choose Restore and then choose this: athene_93-14_boot
3. Swipe to restore.
NOTE: As a general recommendation for all zip installations and backup/restore using twrp, Wipe Cache and ART Cache before you Reboot to System.
4. You're DONE
DOWNLOADS:
Google Drive Link for the file:
https://drive.google.com/open?id=0B25DpDahxm52MDlBRlVqNElkaUE
7-ZIP Download Link:
http://www.7-zip.org/download.html
IF YOU WANT ENTIRE STOCK ROM ( TWRP BACKUP) VISIT THIS THREAD BY @Greekgodmerwyn .
https://forum.xda-developers.com/moto-g4-plus/how-to/android-7-0-moto-g4-plus-npj25-93-14-t3544601
HIT LIKE IF I HELPED YOU! :fingers-crossed: :good:
Hey I need the file bit it is in bin so give a alternative link
Can i install this to xt1644 retus?
Dont know bro I just want the 1643 one
dedik46 said:
Can i install this to xt1644 retus?
Click to expand...
Click to collapse
Not tried. Make additional backups and try. :good:
https://drive.google.com/open?id=0B25DpDahxm52MDlBRlVqNElkaUE
Not Found
Error 404
Please re-upload.
nextheart said:
https://drive.google.com/open?id=0B25DpDahxm52MDlBRlVqNElkaUE
Not Found
Error 404
Please re-upload.
Click to expand...
Click to collapse
Oh wait. Try this, @nextheart
https://www.androidfilehost.com/?fid=745425885120722570
@tywinlannister7 Thanks for quick reply.
As far as I can understand, this file should be flashed (restored) after restoring my TWRP back up of nougat stock rom taken in January-2017. Currently I am on RR-MM.
Shall I able to take OTA then?
nextheart said:
@tywinlannister7 Thanks for quick reply.
As far as I can understand, this file should be flashed (restored) after restoring my TWRP back up of nougat stock rom taken in January-2017. Currently I am on RR-MM.
Shall I able to take OTA then?
Click to expand...
Click to collapse
For OTA updates to work, you'd need a stock recovery on your device too; TWRP is a no go. Once you've restored your TWRP backup of your Nougat stock ROM (which hopefully may have the stock boot still), you can flash the stock recovery linked here https://forum.xda-developers.com/moto-g4-plus/how-to/how-to-ota-rooting-nougat-npj-25-93-14-t3601747
I imagine the easiest option is to flash the recovery in fastboot (same as you did with TWRP) using 'fastboot flash recovery recovery.img', then rebooting into recovery.
I think, though I've not tried it with a stock recovery, that you should be able to flash the recovery image in TWRP:
tap Install in the TWRP menu
Select 'install image's
Find your stock recovery image and select
Choose recovery as the image type
Flash and reboot to recovery.
Then, provided your system has a stock kernel, no modifications to your system and a stock recovery (bootloader doesn't matter), you should be able to update via OTA.
@echo92 Thanks for detailed guide.
I had flashed SuperSU on Nougat stock ROM, so stock boot might be affected. Am I right?
In short, I want to sell the device, so I want to return to stock.
nextheart said:
@echo92 Thanks for detailed guide.
I had flashed SuperSU on Nougat stock ROM, so stock boot might be affected. Am I right?
In short, I want to sell the device, so I want to return to stock.
Click to expand...
Click to collapse
You could have directly flashed the latest March 1 Security firmware via fastboot and lock your bootloader too.
tywinlannister7 said:
You could have directly flashed the latest March 1 Security firmware via fastboot and lock your bootloader too.
Click to expand...
Click to collapse
Thank you for pointing out.
Will I lose my IMEI or WIFI MAK or any thing else by fastboot method? Because I have read that some users are losing such things by fastboot method.
nextheart said:
Thank you for pointing out.
Will I lose my IMEI or WIFI MAK or any thing else by fastboot method? Because I have read that some users are losing such things by fastboot method.
Click to expand...
Click to collapse
Shouldn't create any such issues. Anyways, you can make an entire backup of the fsg and other partitions in twrp.
Yes, your data will be wiped though.

Categories

Resources