I take a backup of my stock ROM through TWRP (3.6.2.9) in MI A1. For some reason, I wanted to restore it back, but it's taking too long to boot the phone after the completion of restoring. Even if it boots, then it misbehaves quite often and is not able to use the phone. When I checked the internal storage in the phone, it's saying 0B free although through TWRP recovery it's showing 40GB free from the PC. What's the wrong I'm doing in the process of restoring. I'm restoring all the available partitions such as Boot, System, System Image, Data, EFS, and Android secure. Do I have to leave some of the partitions in restoring process?
I appreciate any kind of help in this regard.
This is a duplicate thread, I request to delete this post.
Related
So I made a backup in TWRP and stupidly selected the "encrypt backup" button... now when i restore this backup the data partition takes 600+ seconds to restore and i boot into an empty ROM, like i had flashed the rom after a full wipe. no gapps either. any ideas?
Not stupid. However, we expected the feature to work, which it does not. I just encountered this with TWRP 2.8.5.0, so clearly this feature has not been tested.
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
I just got a s5. And I got it succesfully rooted and also got TWRP working on it.
All the data from my previous phone was transfered to the s5.
Now I made some backups with TWRP with the default settings: Partitions boot, system and data.
With the backups in mind I was thinking I could easily restore it to a previous state.
Thinking I backed up all the data and wanted to make it fresh again, I wanted to restore it.
In the menu I chose the restore option with the same settings as the backup: Partitions boot, system and data.
And it gives a message restoring system succesfull.
But when rebooting, it keeps hanging and at the moment of loading the android system every bit of the system keeps 'hanging'
It keeps saying
'Unfortunately touchwiz startup unsuccesfully'
'Unfortunately youtube startup unsuccesfully'
'Unfortunately greenify startup unsuccesfully'
'Unfortunately app whatever startup unsuccesfully'
And so on and so on
Eventually it starts with a black screen with nothing loaded. Complete blackout.
So this backup doesn't work. And I try my second backup.
Unfortunately also the second backup gave these errors.
And also the third backup!
So the backup files seem the right size, it's some gigabytes, and it alway's keeps saying backup/restore succesfully.
But now it fails to restore and boot the backup
The things I tried.
-Trying three different backups
-Wiping cleaning data/dalvik/cache etc etc
-Restoring a part of the backup. First system, then data, then boot, no succes.
So i'm totally lost! Does somebody know how to fix this? Or have some tips to try??
You can't restore system and boot from a different model phone
That would be like trying to flash a ROM for one model phone to another without porting it
If it was an S5 you backed up, was it the exact same model (ie: G900F etc?)
Flash back to stock, then try restoring only DATA
Or use TiBu to restore your apps from the TWRP backup
*Detection* said:
You can't restore system and boot from a different model phone
That would be like trying to flash a ROM for one model phone to another without porting it
If it was an S5 you backed up, was it the exact same model (ie: G900F etc?)
Flash back to stock, then try restoring only DATA
Or use TiBu to restore your apps from the TWRP backup
Click to expand...
Click to collapse
Thanks for the reply! It was a backup and restore on the same phone. So that is why I thought it was supposed to be a easy restore.
But I found the solution hidden somewhere in one message on XDA:
"Originally Posted by Dr. Fed
Would you happen to know why, when restoring a TW 4.4.2 nandroid using TWRP 2.8.1 or 2.8.4, after running an AOSP lollipop ROM like CM12, the TW ROM boots but then the whole system force-closes? Before restoring the nandroid, I advance wipe system, data, cache, and dalvik. Then I restore the nandroid. It boots, but then some daemon crashes. Then all processes and apps. The screen goes black after a few crashes.
So, what I do is pull out the battery, boot into recovery, advance wipe system, data, cache, dalvik, flash a CM11 ROM, reboot. I let CM11 start up, skip the set-up, then I boot back to TWRP (2.8.1 and now 2.8.4), advanced wipe, restore TW nandroid, and now it works just fine.
It seems like TWRP doesn't fully wipe."
Here the steps for if other people will run into the same problem:
Problem: Android 5 is running, with twrp 2.7 performed a back up = Restoring the backup is difficult because it problably doesn't do a clean wipe somehow.
1. I downloaded a cyanogen 11 rom, a Android 4 version.
2. Installed it with TWRP. Somehow it 'wipes' it more efficiently.
3. From cyanogen 11 back to booting TWRP.
4. In TWRP trying the Android 5 restore.
And Amazingly this worked!! = Celebrate!!
chokolademan said:
Thanks for the reply! It was a backup and restore on the same phone.
Click to expand...
Click to collapse
Confused me with this line
chokolademan said:
All the data from my previous phone was transfered to the s5.
Click to expand...
Click to collapse
Good to see you solved it
If I backup my system on tw recovery, and flash a new rom, will wiping my phone delete the tw recovery backup in case I have to restore my phone? Feel free to correct me on this, but to my understanding teamwin has it's own partition, and wiping does not mess with this partition?
matthewbhass said:
If I backup my system on tw recovery, and flash a new rom, will wiping my phone delete the tw recovery backup in case I have to restore my phone? Feel free to correct me on this, but to my understanding teamwin has it's own partition, and wiping does not mess with this partition?
Click to expand...
Click to collapse
I think TWRP backups are normally stored on your internal storage partition, so if you perform a (EDIT full factory reset doesnt wipe this, thanks Silesh) or wipe your internal storage, your backups will be erased too. The TWRP itself does install to the recovery partition (which will only be affected by a flash to the recovery, which a wipe will not perform), you're correct on that but the backups are held separately to that. You can copy your backups to another computer or SD card, I found my backup under /SDcard/TWRP/BACKUPS - you could either copy the folder with a root browser or use the ADB pull command (with the ADB terminal), though the TWRP backup may not show on a Windows desktop even if it's been copied correctly. However, if copied back to your phone, the TWRP backup should function.
Edit: thanks Silesh for correcting me, I was thinking of app data rather than user data!
echo92 said:
I think TWRP backups are normally stored on your internal storage partition, so if you perform a full factory reset or wipe your internal storage, your backups will be erased too. The TWRP itself does install to the recovery partition (which will only be affected by a flash to the recovery, which a wipe will not perform), you're correct on that but the backups are held separately to that. You can copy your backups to another computer or SD card, I found my backup under /SDcard/TWRP/BACKUPS - you could either copy the folder with a root browser or use the ADB pull command (with the ADB terminal), though the TWRP backup may not show on a Windows desktop even if it's been copied correctly. However, if copied back to your phone, the TWRP backup should function.
Click to expand...
Click to collapse
Thanks for replying. I can't transfer files from my computer to my phone, but I have thought about using the ADB sideload option from recovery. Is there a way that I can move my backup from my phone to my computer (and to my phone from my computer) using the sideload option, just in case I need the backup? I refuse to flash a new ROM without access to my complete backup, lol.
Internal storage is not formatted during a normal wipe. You have to specifically go into the advanced wipe and select internal storage to wipe it completely. So there is no issue while flashing a new rom if you don't choose the advanced wipe option.
You could also create the twrp backup in your external sdcard. That way your backup stays even if you wipe your phone using a factory reset or by mistake.
Strange. What's the problem of making backups to external SD? The function is right there (as Silesh mentioned). BTW: the very last version of TWRP is able to make backups straight to pc. This needs to be done FROM a pc though. TWRP is capable to work with fastboot now (using special command though, or with this GUI for pc: https://forum.xda-developers.com/android/software-hacking/tool-twrp-backup-restore-tool-pc-t3572241 )
You can choose whether you want to use internal storage or SD card when making a backup. It doesn't matter which you choose as long as you (and I learned this the hard way) pay attention to what you are doing and DO NOT WIPE internal storage or your SD card. Advantages of SD card is you won't lose your backup if you decide to flash stock. Disadvantage: if your card craps out on you backup is lost unless you have copied to PC or saved on cloud.
My Solution
I solved my problem by using the pull command in adb. Now if I decide to flash a new ROM, I can push my TWRP recovery back to my phone using adb and then recover it in my TWRP recovery.. I also backup using adb backup which backs it up directly to my computer anyways.
I knew about storing my TWRP backup on an sd card, but I haven't made time to get one. . I recently switched to the Motorola G4 Plus after my iPhone 6s decided to turn off and not turn back on. I eventually grew tired of the iPhone anyways due to lack of accessibility and freedom. Back in the day I owned androids but never rooted one or had one that was rooted. I did jailbreak my 4th generation iPod a few years ago. But I went through an iPhone 5s, and upgraded to a 6s and had that for a few months. I eventually just switched back to android after the longest time and I can't say that I regret it.
My Moto G4 Plus has been an amazing phone. I've only had it for a few weeks now, but I rooted it the day after I got it . So I'm a bit of a noob in the rooting community, . Since then it's been a pretty smooth transition. I've only got root access and xposed framework as of now. I was thinking about flashing a ROM so I made backups just in case, but I don't plan on making any major changes to the kernel or flashing another ROM. I'm satisfied with the stock ROM since Motorola pretty much made it as minimal as possible. I would recommend this phone to anyone. It's the most solid phone I've had yet.
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: