[GUIDE] How to back up your ZenFone - ZenFone 2 General

WHY THIS GUIDE?:
As users try out different ROM's, or otherwise back up their devices for the purposes of (if it comes to that) restoring them at a later time, it is important to have a proper backup. A lot of it is common sense, but there is a quirk that is buried in the TWRP thread that if not followed could provide headaches, and a factory reset, in the long run.
BACKGROUND:
As CM 12.1 has been released, I have been trying my hand at building CarbonROM. I had two successful builds at that point, but neither get to to the setup screen (first stuck at "Starting apps", the other, froze at the splash screen). Naturally, I would want to go back to SuperZen using my backup-of-the-day. The first time I restored, the system started up fine, but something funny was happening. I couldn't get the SIM card to detect. Looking around online, I found that the only way around it is to factory reset, then take the time to set everything back up (I didn't TiBu, so that made the process even longer).
After explaining the problem to @TheSSJ, he opened up some more backup options in TWRP so the next time I tried my ROM, I did a little trial-and-error to know which partition was needed to restore and thus what needs to be backed up at least.
THE HOWTO:
First, you need TheSSJ's TWRP v20 or higher. (I never tried this with official TWRP, maybe someone can let me know if it has the same backup options?)
Reboot to TWRP. This can be done a few ways:
From ADB shell or Terminal Emulator, gain SU and type "reboot recovery" (without the quotes).
Select Reboot form the power menu. When the screen goes black, hold down Vol-Up until you get to fastboot mode. From there, press Vol-Dn twice (until "Recovery" is displayed), and press the Power button.
Use an app or Xposed module to do this for you.
Once in TWRP, select Backup. You will be presented with nine or so backup options:
Boot
Cache
config
Data
Misc
Recovery
Splashscreen
System
System Image
A minimal, effective backup should consist of:
Boot
config
Data
System
...but you can select as many partitions as you like. Cache is a good idea as well, and is typical in a backup. Remember, when you restore, you can pick and choose which partitions you want.
Personally, I back up everything but System Image and restore all of what was backed up except recovery.
Set the Backup Name, to something friendly (if desired) and change the backup destination to MicroSD (hope you got one, especially if you have one of the 16GB models).
When ready, swipe to backup. That's all there is to it!
CREDITS:
I would like to thank TheSSJ for all his hard work bringing over TWRP to our device and troubleshooting when things don't work as expected.

Related

[Q] Bootloop after low-battery auto-shutdown

Hey guys,
So my N7 had gone into this auto-shutdown phase before. But in the past I always managed to fix it. This time however it's different. I get stuck in bootloop.
I've left it on charge for about 1hour+, still bootloop. Reflashed ROM, still bootloop. I'm hoping I don't need to full wipe or restore the factory image to solve it, so I'm hoping there is another solution.
Thanks.
Poor Man's TiBu after bootloop occurs
TU;DBR (Toolkit Users Don't Bother Reading)
Bootloops are generally caused by stuff that lives in the /data partition, not in the /system partition.
So, if you did a dirty flash of the ROM that won't change anything.
If your /data filesystem is healthy (can be mounted by the recovery), make a nandroid backup using TWRP and pull it off the tablet.
The TWRP <partition>.ext.win backup files are just .tar images, so there is always the possibility of recovering your market apps & data with a little bit or learning and effort on your part. But no kidding, it's not for the faint of heart. The basic outline of the idea is to:
- nandroid & get copy off tablet for safety sake
- manually delete everything in /data excepting /data/media, /data/app, and /data/data
- go in to /data/data and manually delete all folders not associated with your market apps ( stuff like com.android.* or com.google.*)
- go into /data/app and delete any .apks which are updates to system apps (gmail, etc) [*1]
- nandroid backup again - call this "nandroid2"
- boot OS and configure minimally.
- boot back into TWRP
- (manually using tar? [**2]) restore the TWRP data backup (data.ext.win) without wiping
- perform "fix permissions" in TWRP
- boot up and profit
Note that "manually" here means using the command line (via adb shell to custom recovery).
If something goes wrong with this procedure, you can always restore the first nandroid backup (the bootlooping condition) and iterate until you get things right. (That right there shows you what freedoms you get by making backups.)
If you read this far you can see that what this process does is very similar to what TiBu does - except you are doing it *after* a boot loop has occurred.
[*1] optional - might not be needed
[**2] it might be possible to just "dirty flash" the data partition from the "nandroid2" backup rather than futzing around with tar at the command line. The reason I wrote this step as shown above is because I wasn't sure if a nandroid restore to /data automatically does a factory reset of /data or whether it will allow "dirty overwrites". Note also that TWRP allows you to selectively backup/restore partitions, so you don't need to involve /system or the boot partition in any of this.
good luck

New ROM Encryption bootloop

[unnecessary background information] A while back I decided to encrypt my OnePlus 2 - mostly to compare its performance with my Nexus 6P, which is also (obviously) encrypted. Today I decided I was tired of Oxygen OS and wanted to install CM13 since Grarak had gotten the fingerprint scanner working properly. I went ahead and unlocked the bootloader, installed TWRP 3.0.0.2, and excitedly flashed the shiny new OS (without making a backup, like an idiot)[/]
After booting up into CM13 the system asks me for my encryption key (sure, whatever) and then I get this big screen that says "Decryption Unsuccessful....The password that you entered is correct but unfortunately your data is corrupt" and goes on to say that a factory reset will fix the problem and any lost data can be re-downloaded from the cloud. I said "great!" and hit the "reboot now" button that reboots back into TWRP, runs a short script, and sends me back to where I started (presumably not on purpose).
Now, I tried doing a full wipe of the entire device via TWRP, which sent me into a new panic mode when I couldn't manage to get any files to transfer over when I tried to send them over MTP - I finally went about using the ADB Sideload feature in TWRP to once again install the same (and a different) ROM all of which garnered the same result.
Finally, the point of the story: Is there a way for me to fully remove encryption from the system from within TWRP? If not, am I totally hosed or does someone have another idea? Frankly, I'd be happy to just have a booting phone at this point.
Thanks in advance!!
So following up on my own thread, I found the setting in TWRP that specifically allows you to erase the data partition (something that I thought I had done when I did a standard wipe and/or when I did the advanced wipe and specifically told it to wipe everything) and rebooted and it finally booted happily into Android. I'm not sure if this is a bug in TWRP or a bug in CM's script that is causing issues but something isn't quite right.

Soft-Bricked Nova / No system

Hello,
Today I tried to root my Nova and somehow I managed to delete the system while doing that. I don't know how or when, I did wipe the phone at some point, but left system unchecked. So now it is stuck in an endless boot, I just see the orange "Your phone is unlocked and not safe etc" message, nothing more. I can access TWRP and fastboot, and tried to use the LineageOS 13. But it failed, it told me I need a CAN-model, and mine is "generic_a53". So I figured I'll just put EMUI back on it, but I can't seem to find a working version for my phone. The huawei-website is pretty useless in that regard, they don't offer it. And the HiSuite-recovery just said that my model is not supported anymore.
So.. help? I know I screwed up and should have made a full backup, but I never figured I'd screw this up so spectacularly.
EDIT: Okay, I just clicked on "Backup" in TWRP, out of curiosity, and it said that "System" is 2516mb, but "Data" is 0mb, so maybe that's what's lacking?
Seems you are using the wrong TWRP. Use the one made for lineage. Also, what is your exact model number, you should be able to recover that way. My guess is you wiped data, factory reset, or formatted data. You could try using the backup made by bluesmoothie to restore data. You will have to search around this forum as I can't remember exactly which thread it is in.
fragee said:
Hello,
Today I tried to root my Nova and somehow I managed to delete the system while doing that. I don't know how or when, I did wipe the phone at some point, but left system unchecked. So now it is stuck in an endless boot, I just see the orange "Your phone is unlocked and not safe etc" message, nothing more. I can access TWRP and fastboot, and tried to use the LineageOS 13. But it failed, it told me I need a CAN-model, and mine is "generic_a53". So I figured I'll just put EMUI back on it, but I can't seem to find a working version for my phone. The huawei-website is pretty useless in that regard, they don't offer it. And the HiSuite-recovery just said that my model is not supported anymore.
So.. help? I know I screwed up and should have made a full backup, but I never figured I'd screw this up so spectacularly.
EDIT: Okay, I just clicked on "Backup" in TWRP, out of curiosity, and it said that "System" is 2516mb, but "Data" is 0mb, so maybe that's what's lacking?
Click to expand...
Click to collapse
Just like @wangdaning said, you're using wrong TWRP.
If you wanna flash LOS13, you gotta flash the TWRP mentioned at requirements.
It told you that your model is "generic_a53" because you're using "twrp_huawei_generic_a53.img".
To restore your phone, try to restore the backup made by bluesmoothie.
1) Download the TWRP backup (emui 4.1) made by @bluesmoothie from here: https://www.dropbox.com/sh/qrk0fbpn...ffYdia7raa/TWRP/BACKUPS/FPFDU16930014596?dl=0 . I had to download the files one by one, as I couldn't download the whole folder because dropbox was telling me that it's too big. After you've downloaded all the files from backup, put them in a folder named 1970-03-18--16-40-58_CANC432B100.
2) Download this recovery: https://www.androidfilehost.com/?fid=745425885120713827 , which is made by @Grarak.
3) Make a backup of boot.img so a folder will be created at TWRP > BACKUPS (e.g. FPFDU16A20001907).
4) Place the TWRP backup folder into the folder created at step 3). So, it'll be like this: TWRP > BACKUPS > FPFDU16A20001907 > 1970-03-18--16-40-58_CANC432B100.
5) Restore the backup.
Okay, it was the wrong TWRP, now that I flashed the recommended one, I was able to install LOS13, and now everything is working again. Thank you very much guys!

TWRP 3.1.1-0 - help me understand what to backup please

Hi,
after few soft-bricks and hours, i was able to transform my stock A2017 B16 to stock A2017U B25 and everything is working.
now the device is B25, android 7.1.1 + TWRP 3.1.1-0 and i want to make full backup as i know the need it if something goes wrong (and it probably will )
in the back up options i see the following:
Boot (64MB)
Recovery (64MB)
System (4740MB)
System Image (6144MB)
Data (excl. storage) (4001MB)
Cach (27MB)
Modem (NON-HLOS) (95MB)
Bluetooth (BTFM) (1MB)
EFS (6MB)
for now, i did backup of all of them but didn't tried to restore because i saw somewhere that i can get you brick .
can you help me understand what to backup for *complete backup* which one i can use in emergency recovery cases?
Boot - This is your bootloader. I usually back this up.
Recovery - This is twrp, you could back it up by itself once, but it isn't necessary.
System - This is your rom and stuff. This is the main thing to backup/restore if you want to keep the current ROM you are on.
System Image - I'm not positive on this, but I think its a full image of the whole system with everything.
Data (excl. storage) (4001MB) - This is all of your personal data, apps settings, call logs, etc.
Cach - no point in backing this up
Modem (NON-HLOS) - I don't back this up either as you can always flash the newest modem files
Bluetooth (BTFM) - bluetooth settings/devices I think, probably don't need to back up.
EFS - Do one backup of this and keep it forever. If you ever wipe or mess the EFS up you are in trouble.
Don't count on all that 100% as I'm not a dev, but I've been doing this for years. Besides the one time backups I mentioned, I routinely just backup the boot, system and data and have never had any problems restoring.
If you are brave and installing a rom that runs on a similar base, sometimes you can backup only the data, and flash the new rom, then restore just the data and have all your settings and apps stuff back.
Hopefully that helps.
Boot, System, Data- just like the person above me.
That's all you really need to do. Sometimes I'll even do things like wipe system only if I'm having problems with the ROM, Gapps, or some random mod, and reinstall the ROM & Gapps to bring it back to a clean slate. Say, if I tried out A.R.I.S.E. sound mod but it was acting goofy and I wanted to make sure I removed all of its remnants.
Recovery is unnecessary I'd think.
EFS - I guess backup once.
Why not backup everything? It doesn't take up much space. System image seems to be the only one I'd leave out. I still back it up anyway.
ThePublisher said:
Boot - This is your bootloader. I usually back this up.
Recovery - This is twrp, you could back it up by itself once, but it isn't necessary.
System - This is your rom and stuff. This is the main thing to backup/restore if you want to keep the current ROM you are on.
System Image - I'm not positive on this, but I think its a full image of the whole system with everything.
Data (excl. storage) (4001MB) - This is all of your personal data, apps settings, call logs, etc.
Cach - no point in backing this up
Modem (NON-HLOS) - I don't back this up either as you can always flash the newest modem files
Bluetooth (BTFM) - bluetooth settings/devices I think, probably don't need to back up.
EFS - Do one backup of this and keep it forever. If you ever wipe or mess the EFS up you are in trouble.
Don't count on all that 100% as I'm not a dev, but I've been doing this for years. Besides the one time backups I mentioned, I routinely just backup the boot, system and data and have never had any problems restoring.
If you are brave and installing a rom that runs on a similar base, sometimes you can backup only the data, and flash the new rom, then restore just the data and have all your settings and apps stuff back.
Hopefully that helps.
Click to expand...
Click to collapse
You're mostly correct except boot, which is the kernel and not the bootloader, and system image is this as mention in an old TWRP changelog:
The Team Win Recovery Project has released version 2.8.7.0 of its custom recovery, known simply as TWRP. This update brings a system read-only option that's intended to help you make a pure backup of your system image that you can later flash to receive over-the-air updates after having rooted or ROMed your device.
Cheers.
@mb0 Basic backup is system data and boot to have a working device, but I'd backup everything at least once just to be on the safe side.
The "backup all" solution sound nice to me??
At least one full backup and i keep it in safe place(es).
Let's try the restore function and hope not to be surprised
Hehe, good luck mate!
I'm back to update...
Full backup (except 'cache') --> reboot to recovery --> normal 'wipe' --> reboot (to make sure that it wiped) --> reboot to recovery --> restore everything (except 'cache') -->reboot --> ITS ALL GOOD :good:

How do you go from a custom rom back to OOS?

Love this phone, but using custom roms have been the most frustrating thing with this device. I like testing out multiple roms because you never know which one you will enjoy until you actually use it. But every time I want to go back to OOS, I find myself having to use the MSM tool and start from scratch.
TWRP Nandroid backups are pretty much useless it seems. There are probably over 20 methods here explaining how to backup and restore (don't restore vendor, don't restore system, etc...). I have tried literally every combination and every time I restore, it never works and just loops back to TWRP and leaves me w/an encrypted device. Bring in the MSM.
Flashing the full stock rom usually results in the same thing or no change at all.
Does anybody have a simple straight to the point method of going back to OOS from custom rom? Much appreciated
msmdownloadtool will 100% wipe the phone (backup!!) And return the phone to 100% stock with OxygenOS and even re-lock the bootloader. That's the fastest and easiest way and I've done it a few times.
Edit : just fully read your post and you're familiar with MSM. Just use Google cloud backup in combination with backing up files and using sms backup and restore... There is no way you can keep your data partition from a custom ROM and have it boot or work right on OOS. Even switching custom ROMs without wiping data can cause massive instability, but at least it has a chance at booting.
How to restore,I have no real clue, but to get back to at least a working version of OOS with your internal storage intact..
After you flash OOS and twrp installer, reboot back to twrp.. it will likely be encrypted.. from there go to the wipe menu, then swipe for factory reset.. wipes data, not internal storage.. then boot into OOS.. at that point you can boot back to twrp and flash magisk or whatever else you need to do.
If that fails, you'll lose all data doing this next step, but it will boot.. use the "format data" option in twrp, type yes, then reboot to system. Then you can set it up, download or transfer whatever you want to flash, then reboot to recover and flash away... All without having to use the msm tool

Categories

Resources