How to backup or make stock recovery - Zenfone 2 Laser Q&A, Help & Troubleshooting

I've been doing some research to understand rooting, unlocking, and other Android stuff, but one thing I still haven't figured out is how people "make" a stock recovery image, so that for example after flashing TWRP you can go back to the stock recovery (which I read is one way to install future updates). I think in general it would be possible if rooted, but for ZE551KL, so far I'm pretty sure the only way to root is to unlock and install TWRP. So, how would one make a backup of the stock recovery? If it can't be backed up without root, do people get it from somewhere else, firmware releases maybe? I looked but seems to be mostly a giant system.new.dat file...
Past that specific question, where can I learn more about the partition structure of my phone? Like where is the recovery in the file system?
Thanks for the help!

Related

[Q] Revert to Factory Image

Hi all, I just wanted to ask this before I start flashing custom ROMs:
If I want to restore the factory image, would I be able to just flash the zip from the google dev website for the Nexus 10 (https://developers.google.com/android/nexus/images#mantaray) In recovery?
I noticed that in the contents of the file it has a new recovery image and all so I would imagine that I can't do this but thought I would ask. If no, what is the best way to get back to stock? I know there are some guides with several fastboot commands to erase everything you've got and then build it back up from scratch, but is there no other way?
Thanks in advance!
Personally, I used the [Nexus 10 Toolkit]. It really can't get much easier than that.
It provides everything you'll need to download and flash the stock image/recovery, re-lock bootloader, etc. Not to mention all the other fun stuff you can do with it.

[Q] Regarding TWRP and Custom ROMs

Hi, I am not too sure if I posted this in the right place or not but please let me know if it is posted in the wrong place. I am actually relatively new towards rooting of an android device so i need to clear my doubts.
I used Wugfresh toolkit to root my Nexus 10. The toolkit also have an option to install TWRP. But the version of TWRP is not the most updated one. So, can I just download the latest one and flash it or i need to remove the current one before I can update the version.
Also, I am interested in flashing a custom ROM. But my question is if a new stock firmware is out, how am i going to update to the latest stock firmware when I am in a custom ROM.
Please let me know if you don't understand my question. I will try my best to explain further and also thank you in advance.
iOrdinary said:
Hi, I am not too sure if I posted this in the right place or not but please let me know if it is posted in the wrong place. I am actually relatively new towards rooting of an android device so i need to clear my doubts.
I used Wugfresh toolkit to root my Nexus 10. The toolkit also have an option to install TWRP. But the version of TWRP is not the most updated one. So, can I just download the latest one and flash it or i need to remove the current one before I can update the version.
Also, I am interested in flashing a custom ROM. But my question is if a new stock firmware is out, how am i going to update to the latest stock firmware when I am in a custom ROM.
Please let me know if you don't understand my question. I will try my best to explain further and also thank you in advance.
Click to expand...
Click to collapse
TWRP typically recommends installing and updating their recovery via Goo's app thing, but if you know where to look (openrecovery on goo + manta), you can get the .img and then flash it with fastboot. I usually do fastboot erase recovery and then fastboot flash boot TWRP-IMAGE.img. But if you don't feel too comfortable with fastboot, then Goo's program should take care of it I think.
If you want to try the latest stock when you're using a custom ROM, you'll need to flash the latest factory image from Google to go back stock, and then update it (unless the factory image is updated to the latest, which doesn't usually happen till days later). Just want to make sure you backup anything important.
espionage724 said:
TWRP typically recommends installing and updating their recovery via Goo's app thing, but if you know where to look (openrecovery on goo + manta), you can get the .img and then flash it with fastboot. I usually do fastboot erase recovery and then fastboot flash boot TWRP-IMAGE.img. But if you don't feel too comfortable with fastboot, then Goo's program should take care of it I think.
If you want to try the latest stock when you're using a custom ROM, you'll need to flash the latest factory image from Google to go back stock, and then update it (unless the factory image is updated to the latest, which doesn't usually happen till days later). Just want to make sure you backup anything important.
Click to expand...
Click to collapse
So, for TWRP, it means that I can restore the stock recovery before I flash the TWRP img right? Because I am using the Wugfresh toolkit to run all these fashboot commands and they only have the options to either flash a custom recovery or to restore the stock recovery.
As for the custom ROMs, every time I flash a ROM, all my stuff in my Nexus 10 will be gone right? For example my game progress etc. Because if I were to backup, I will make a nandroid backup which means every single thing in my nexus. So, correct me if I am wrong. Every time I flash a ROM, my nexus will be back to a clean state right?
Thank you in advance for your answers. ^^

How to backup current kernel and modem!?

Hello, before doing anything I will be glad to know how to backup Kernel and Modem with adb or any other way, is there anyone that could help me!?
Thanks!
Use TWRP or CWM to backup the kernel, you also *need* to backup your EFS just in case it ever gets deleted but I have never once had an issue with that. I dont know of a way to backup your modem but I dont see why it is necessary. You can download any and all modem files online.
http://downloads.codefi.re/autoprime/LG/LG_G2/G2_modems
EniGmA1987 said:
Use TWRP or CWM to backup the kernel, you also *need* to backup your EFS just in case it ever gets deleted but I have never once had an issue with that. I dont know of a way to backup your modem but I dont see why it is necessary. You can download any and all modem files online.
http://downloads.codefi.re/autoprime/LG/LG_G2/G2_modems
Click to expand...
Click to collapse
I think is a better way to do it by ADB commands, suppose you mess up something when installing TWRP or CWM?... for I think knowing the way with ADB is better.
So then look up the ADB commands for it. If you use ADB though you NEED a computer to fix your phone. Having a flashable recovery kernel on your phone means you can recover any time. If you are so broken that you cant flash a kernel in recovery then you will need far more ADB help than a kernel backup anyway.
EniGmA1987 said:
So then look up the ADB commands for it. If you use ADB though you NEED a computer to fix your phone. Having a flashable recovery kernel on your phone means you can recover any time. If you are so broken that you cant flash a kernel in recovery then you will need far more ADB help than a kernel backup anyway.
Click to expand...
Click to collapse
I have experience with my Samsung Galaxy S2, I'm asking this because this G2 seems a bit more complicated, for example people having bootloops when install TWRP and I want to avoid that...
G2 isnt complicated at all compared to any modern phone, besides a Nexus. As long as you root and flash your first recovery properly then there are no issues. It is all the people being dumb and wanting to use just some app to try and do everything that are having problems. Use ADB to root your phone and use ADB to run loki and flash your recovery and you will have no issues. People are just forgetting about their locked bootloader and needing to use Loki to bypass the lock, then they complain about a screwed up device because they didnt do anything properly.
Flashify, which makes installing recoveries, etc super easy, has an option to back those up.
Barsky said:
Flashify, which makes installing recoveries, etc super easy, has an option to back those up.
Click to expand...
Click to collapse
HOPE THIS WORKS:fingers-crossed::fingers-crossed::fingers-crossed::fingers-crossed:
flashing a custom kernel and hopefullly this does the job of backing it and restoring it the original one!!:fingers-crossed::fingers-crossed:

I'm a nervous noob.

This is a pretty specific question and i'm not sure this is the correct place to ask this but i recently installed the stock rom (Via Zip) on this thread: http://forum.xda-developers.com/showthread.php?t=2527806 . I flashed just the rom NOT including the bootloader (Because i don't know what it does) and the .97 radio because there seems to be some issues with it. Now, everything is working perfectly as it did before. What i'm wondering is after today's random new 4.4 factory image and ota update from Google (I think its krt16s); i know they are probably going to compile a flashable zip, and if they do what exactly do i need to do?
I'm extremely weary when i do these kind of things, the last time i flashed any sort of rom was on my OG RAZR. Would i have to install that new bootloader? (Also what exactly does it do) And would i have to wipe?
I can make the radio judgement on my own but i'm just not entirely sure.
If anyone could answer my questions that would be wonderful, i'm also sorry for posting this here, i'm not allowed to post in that thread because i'm "new" to the site.
Thanks!
you dont have to sorry as you are in the right section for asking questions.
You can either wait for a day or two for someone to post a flashable zip file. If someone do post it; all you have to do is copy it to your phone. Reboot to recovery mode; make sure you have cwm recovery installed. From there choose "install zip" > install zip from sdcard, choose the flashable zip. Once it finishes installing, clear cache partition and reboot. You will not lose anything in the phone.
If you want to install the new krt16s stock update. First, copy all of your files (pictures/music/data etc...) to your computer. This will wipeout everything. Download the image file. Open it with winrar or 7zip. Extract all the files to a folder. Connect your phone to the computer and reboot it to bootloader. Run the "flash-all.bat" file from the extracted files. Wait for it to finish. It will update everything (kernel, bootloader and the new 4.4)
You should know what something is before flashing them wildly, that's the easiest way for people to brick their phone by flashing something incompatible with their devices. Bootloader is the main program that boot first when you turn on to phone to make selftest and boot normally into the operating system kernel, with Nexus you can use it boot into recovery and flash images to partitions as well. It's very recommended to update it along with new Android version or you may run into issues. You should already know this since you had to access the bootloader screen to boot into the CWM recovery.
Stick with using CWM for now and flash the flashable zips. Just make a full backup of your device you can always restore it later. Just know that unless you flash radio separately (aka baseband), roms generally and should not come prepackaged with the baseband, so it is not affected when you flash a different rom, you have to upgrade it manually.
When you flash a new Android version, usually its recommended to do a factory reset in your recovery to avoid issues.
Installing factory image takes a few more steps and required using fastboot, but if you want to check the link in my sig. Also I recommend switching to TWRP recovery, but that's just me.
badboy47 said:
you dont have to sorry as you are in the right section for asking questions.
You can either wait for a day or two for someone to post a flashable zip file. If someone do post it; all you have to do is copy it to your phone. Reboot to recovery mode; make sure you have cwm recovery installed. From there choose "install zip" > install zip from sdcard, choose the flashable zip. Once it finishes installing, clear cache partition and reboot. You will not lose anything in the phone.
If you want to install the new krt16s stock update. First, copy all of your files (pictures/music/data etc...) to your computer. This will wipeout everything. Download the image file. Open it with winrar or 7zip. Extract all the files to a folder. Connect your phone to the computer and reboot it to bootloader. Run the "flash-all.bat" file from the extracted files. Wait for it to finish. It will update everything (kernel, bootloader and the new 4.4)
Click to expand...
Click to collapse
I see, me personally, I'm not very fond of using adb; I haven't used it at all prior to yesterday. I may try this out, but should someone post the new kernel, boot loader, 4.4 and radios would that be the same as flashing the factory image?
This probably seems like a really stupid question but I wouldn't be smart to try to download the ota directly from the phone (via check for updates) would it?
joshvader8 said:
I see, me personally, I'm not very fond of using adb; I haven't used it at all prior to yesterday. I may try this out, but should someone post the new kernel, boot loader, 4.4 and radios would that be the same as flashing the factory image?
This probably seems like a really stupid question but I wouldn't be smart to try to download the ota directly from the phone (via check for updates) would it?
Click to expand...
Click to collapse
You need to learn to use adb and fastboot if you want to be able to do advance things with the phones, or just avoid flashing too much, because once you run into trouble (especially due to using toolkits), you will not know how to recover your device.
If you want your device to be stock and able to receive OTA updates, in addition you also need your stock rom to be an "odexed" version, some roms are "deodexed" which will not receive OTA. You also need to have stock recovery, which CWM isn't.
eksasol said:
You need to learn to use adb and fastboot if you want to be able to do advance things with the phones, or just avoid flashing too much, because once you run into trouble (especially due to using toolkits), you will not know how to recover your device.
If you want your device to be stock and able to receive OTA updates, in addition you also need your stock rom to be an "odexed" version, some roms are "deodexed" which will not receive OTA. You also need to have stock recovery, which CWM isn't.
Click to expand...
Click to collapse
Thank you! One more question, let's say I revert back to my nandroid back up. I backed my ROM up on Android 4.3 rooted and unlocked with CWM. If I flashed the 4.4 factory i image what exactly would happen? Would I boot into 4.4 absolutely stock? Or would I end up with 4.4 unlocked etc...?
Thank you for the help I really appreciate it. ☺
joshvader8 said:
Thank you! One more question, let's say I revert back to my nandroid back up. I backed my ROM up on Android 4.3 rooted and unlocked with CWM. If I flashed the 4.4 factory i image what exactly would happen? Would I boot into 4.4 absolutely stock? Or would I end up with 4.4 unlocked etc...?
Thank you for the help I really appreciate it. ☺
Click to expand...
Click to collapse
When you flash factory image (using fastboot method), it will wipe your entire device and all user data, and you will boot into stock. Except if you do it manually you can prevent datas from wiping, follow these steps and pay attention to the red texts.
Sometimes apps data from older version can cause issues with newer version though, so a clean install is always best.
But if you have custom recovery, you can flashable stock roms, such as this one by fireb33, it's essentially the same as stock. Get the "odexed" version which is required to get OTA updates. Some peolpe say they can get OTA with custom recovery, but I have never tried that. The safest bet is to use fastboot to restore to stock recovery. You could also use custom recovery to flash OTA update packages to update versions that way.
As for backing up, people tends to call the backup "nandroids". After you do backup, if you're doing something that required the device to be wiped, you need to copy the backup to your pc. The CWM nandroids are usually located in 'clockworkmod' folder, but if you don't see it, search in "/data/media". I do not use CWM so I don't know what it allows you to back up, but generally "boot" (which is the kernel), system, and data partitions. It will not restore everything to stock such as your radio (baseband) or recovery.
I highly recommend switching to TWRP recovery, it will make flashing a lot easier.

Can we survive without a custom Recovery?

There seems to be a lot of concerns about being able to flash roms in the future without using recovery and tripping knox. Why do we really need a recovery to do this? Sure it's easier. The recovery simply extracts and archive and runs an updater-script to add/delete/update modded files and set proper permissions etc. These are basically shell commands. Why can ADB be used on a rooted device to accomplish the same?
I have written a few mods and deodexed my fair share of roms. This can all be done through ADB by extracting the files.. deodexing/modding them and putting them back. and change a few permissions.
This works great for quick edits but to do a complete rom this way would require quite an installer script.
I can see a rom package being uploaded to the device and an installer script executed via ADB to put everything in it's place.
And do we know exactly what trips knox? (other than trying to write an image file directly to the recovery partition?) Can dd be used to write a prepared image to the system partition without blowing things up?
I'm not trying to make all this sound like it's easy...it's not! just trying to change the "We can't do anything without a recovery" mindset.
I understand a program called fireflash is in development. I'm not sure of it's intended purpose other than a Mobile Odin replacement (which it is). I hope it evolves into a complete package flashing application and we can put all this fear of tripping knox and losing potential features to rest.
I encourage responses and expect these ideas to be blown full of holes. I'm used to it.
OK, but how to nandroid/restore?
Because you need a pc otherwise to do everything. Recovery can do it all on the phone.
You have to be outside the Android OS to flash anything of significance, recovery makes the most sense since that's what it's designed to do.
gpvecchi said:
OK, but how to nandroid/restore?
Click to expand...
Click to collapse
I look for the same answer. Nandroid online works fine. To restore it , we need something like dd command.
doesn't using Flashfire eliminate the need for a custom recovery? it can flash zip files and do backups.
Yup, if phone boots...
This link might help you to understand what, and why, Knox gets tripped;
http://www.samsung.com/uk/business/solutions-services/mobile-solutions/security/samsung-knox

Categories

Resources