TWRP backup question - Moto G4 Plus Questions & Answers

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.

Related

[Q] Newbie questions (don't kill me Im new!)

Hy there I love xda and im a new user to xda nexus forum
With excelent guides I learnt how to root unlock and install custom rom (quite easy let it down into your internal storage and install from zip)
but I have few questions..
When I tried to wipe data and cache I accidentally did factory reset which ended up in no installed rom, internal storage empty and I was in custom recovery and I couldn't connect to computer, so I had to start from 0... last times I've been selecting wipe data and cache.. but I seen that in my nexus 7 some old files are still there (under a folder called 0) What should I do to make a clean install? which option of the new recovery should I choose? thankyou
mariosanoguera said:
Hy there I love xda and im a new user to xda nexus forum
With excelent guides I learnt how to root unlock and install custom rom (quite easy let it down into your internal storage and install from zip)
but I have few questions..
When I tried to wipe data and cache I accidentally did factory reset which ended up in no installed rom, internal storage empty and I was in custom recovery and I couldn't connect to computer, so I had to start from 0... last times I've been selecting wipe data and cache.. but I seen that in my nexus 7 some old files are still there (under a folder called 0) What should I do to make a clean install? which option of the new recovery should I choose? thankyou
Click to expand...
Click to collapse
Use TWRP for recovery and to do a clean install wipe all data from TWRP.
Sent from my Nexus 7 using xda premium
mariosanoguera said:
Hy there I love xda and im a new user to xda nexus forum
With excelent guides I learnt how to root unlock and install custom rom (quite easy let it down into your internal storage and install from zip)
but I have few questions..
When I tried to wipe data and cache I accidentally did factory reset which ended up in no installed rom, internal storage empty and I was in custom recovery and I couldn't connect to computer, so I had to start from 0... last times I've been selecting wipe data and cache.. but I seen that in my nexus 7 some old files are still there (under a folder called 0) What should I do to make a clean install? which option of the new recovery should I choose? thankyou
Click to expand...
Click to collapse
I'd flash a stock recovery image onto your device available here which would restore your device completely back to stock (with your bootloader unlocked) From there I'd just re root and do what you want. However I'd personally use CWM Touch Recovery myself, but I just like that recovery more (have used it and the non-touch version for ages and on many devices)
smt8544 said:
I'd flash a stock recovery image onto your device available here which would restore your device completely back to stock (with your bootloader unlocked) From there I'd just re root and do what you want. However I'd personally use CWM Touch Recovery myself, but I just like that recovery more (have used it and the non-touch version for ages and on many devices)
Click to expand...
Click to collapse
I actually have Team Win Recovery Project..
under wipe I can find
Cache
Dalvik
Factory Reset (This is the one I use.. but It leaves in my internal storage with a folder called 0 and my old data from previous roms is stored there)
System
External Storage
Int. Storage ?
Format Data (I did this and I lost everything except TWRM which I could boot at it (but I had no option to install from zip neither couldnt transferr a file through usb mount sd card didn't work))
Which one of all of this should I run before doing the install zip from sd card?
mariosanoguera said:
I actually have Team Win Recovery Project..
under wipe I can find
Cache
Dalvik
Factory Reset (This is the one I use.. but It leaves in my internal storage with a folder called 0 and my old data from previous roms is stored there)
System
External Storage
Int. Storage ?
Format Data (I did this and I lost everything except TWRM which I could boot at it (but I had no option to install from zip neither couldnt transferr a file through usb mount sd card didn't work))
Which one of all of this should I run before doing the install zip from sd card?
Click to expand...
Click to collapse
I think it would be easier and cleaner if you restored back to stock before trying to re root, flash recovery, etc. If you have no important data on your device I'd go for it. If you do have important data, then try and pull it to your computer and then flash a stock image and re root etc.
I always find that in times when my device is screwing around, or I have file dregs around the place, I find it simply easier to backup important things and flash a stock image.

[SOLVED] Cannot mount /sdcard or flash in recovery following phone encryption

Hey guys,
I recently encrypted my phone for my work e-mails (the Exchange server required it). I made a complete Nandroid backup and also entire Titanium backup before encrypting, just in case something went wrong. But the encryption went beautifully.
However, I've noticed that I cannot mount /sdcard or flash anything from recovery. I can't update my Franco kernel or CM nightlies... It's a bit annoying because I want to keep flashing! lol.
My phone asks for my password everytime I reboot (in order to decrypt sdmount and mount the ROM), so I'm assuming this is the reason I can't mount it in CWM recovery.
Anyone know of a bypass or fix for this?
I don't really feel like restoring nandroid backup or doing a factory reset everytime I want to flash a new nightly, it just doesn't make any sense (besides I haven't even tried to see if I can restore from nandroid or factory resetting, they might not even work because it can't mount /sdcard?...)
I've searched around the forums for some complex solutions such as using ADB or Odin but I'm not interested in that.
Thank you!
UPDATED:
Ok guys so basically restoring from nandroid did not work because of the sdcard mount error.
I did a factory reset, erased all data and format system. But I couldn't format sdcard or even user data as it didn't have access... Basically the phone got bricked from then on and I had to completely restore back to stock bootloader/recovery/stock rom with adb/fastboot. Instructions are found here:
http://forums.androidcentral.com/nex...e-restore.html
Hopefully this will come to use to someone else. I've heard that TWRP does not have this sdcard mount problem with encryption as does CWM, so that's what I installed this second time around.
Why don't you just transfer the files regularly without entering recovery mode?
The recovery doesn't allow mounting to the PC. It just doesn't work.
Sent from my Nexus 4 using Tapatalk 2
scream4cheese said:
Why don't you just transfer the files regularly without entering recovery mode?
The recovery doesn't allow mounting to the PC. It just doesn't work.
Sent from my Nexus 4 using Tapatalk 2
Click to expand...
Click to collapse
I've never mounted to PC in recovery. My files are backed up on my computer and nandroid as well.
My issue here is that I can't regularly flash new nightlies (and thus mount internal /sdcard to do so) following the phone encryption.
Since my internal /sdcard path is encrypted with a password, CWM recovery can't bypass this and it gives me the error "cannot mount /sdcard".
bump?
Any help would be highly appreciated!
Is this a lacking feature in CWM Recovery? Have the developers looked in it? Or is there already a fix for this without doing an entire factory reset?
Daily bump.
Anyone there? (echo...)
Ok guys so basically restoring from nandroid did not work because of the sdcard mount error.
I did a factory reset, erased all data and format system. But I couldn't format sdcard or even user data as it didn't have access... Basically the phone got bricked from then on and I had to restore back to stock using this:
http://forums.androidcentral.com/ne...3923-guide-nexus-4-factory-image-restore.html
Hopefully this will come to use to someone else. I've heard that TWRP does not have this sdcard mount problem with encryption as does CWM, so that's what I installed this second time around.
If you want to recover the data from SD card, you do not use the SD card.
You can try to recover the data from the card with some specific software.
I will try to fin one I used before.
It will take few minutes... do not use the card.
cyrus_e said:
Basically the phone got bricked from then on and I had to completely restore back to stock bootloader/recovery/stock rom with adb/fastboot. Instructions are found here: ...
Click to expand...
Click to collapse
Many thanks, this link helped me restoring my Nexus 4. I enabled "encrypted storage" and wanted to root the phone and almost bricked it.
It's also possible to flash the stock recovery with odin, then do a real factory data reset and be able to install a custom rom, after (or before) which you can reinstall a custom recovery.

[Q] TWRP/CWM deleting backups/not saving changes on reboot

Hello all,
I am currently running the latest snapshot of Cyanogenmod 11 (M12) on my GS4 and last month I used Flashify to install TWRP 2.8.4.0 over the default CWM 6.0.4.7 recovery that comes with CM11. I did a nandroid backup to my external 64 GB microSD card and it would say that the backup was successful, and I could see it within the file manager and on my PC using MTP.
However, whenever I reboot into the OS, the backup folder gets deleted. I have then tried to backup only the /system partition to my internal storage, since I do not have enough space on my internal storage for a full nandroid. This backup worked successfully as I can access the folder from the OS, however I would still like to a full backup on my SD card since it has enough space for a full nandroid
Here is what I tried:
1. While in TWRP, I copied the newly created backup folder over MTP to my computer. After I rebooted the phone, I shut it down and plugged the SD card into my computer and copied the backup back to my SD card. However, when I placed the SD card back into the phone and powered it on, it deleted the backup again.
2. I reflashed CWM (same version, but newly downloaded and flashed using Flashify) and attempted to do a full nandroid. I received an error saying that the /data partition could not be backed up. Interestingly, I deleted an old CWM backup on my SD card, and after I rebooted that old backup was still there.
3. I flashed TWRP 2.7.1.0 and 2.8.3.0, and still have the same issue.
The version of CWM that I had before I installed TWRP would backup without issues. I am not sure if this is an OS, hardware, or an SD card issue, though my guess would be that when booting into the OS, Android deletes any changes that were made to the SD card that were not made in the OS. I am not sure how to fix this issue and was hoping someone on this forum could help, and I have searched other forums for answers, but haven't found one as specific as this, and solutions for similar problems haven't worked.
The phone works fine otherwise, I'm just worried that with CM12 M releases coming around the corner that I won't be able to install it properly with these recovery issues.
Any help on this would be appreciated, and if there is a better XDA forum for me to ask this on please let me know.
I figured out the issue. Turns out my microSD card is faulty. Sandisk will send a replacement.

Backup and rom switching

Hi, this is my problem:
I want to change the rom of my zenfone from stock to a custm one. The issue i have is that every time i factory reset i have to spend 2 hours downloafing everything and changing the settings of my phone. How can i avoid that when switching rom? If i do a nandroid backup with twrp, can i restore only the data on the other rom? Or this is a problem? Should i use titanium backup? Id like to save photos and every setting too
biondo_92 said:
Hi, this is my problem:
I want to change the rom of my zenfone from stock to a custm one. The issue i have is that every time i factory reset i have to spend 2 hours downloafing everything and changing the settings of my phone. How can i avoid that when switching rom? If i do a nandroid backup with twrp, can i restore only the data on the other rom? Or this is a problem? Should i use titanium backup? Id like to save photos and every setting too
Click to expand...
Click to collapse
You can't restore just the TWRP's /data backup from Stock to, let's say CM or from CM to Stock, the system's phone won't boot.
TWRP's Data Factory Reset or flahsing a custom Rom using TWRP won't erase the internal memory, so the files you have in the internal memory will be there.
Yes, you should use Titanium Backup when possible to restore your apps or some setting/data.
TWRP's nandroid backup is usually used to restore the "hole" Rom (data, system and boot, at least).
Regards.
elperroderoke said:
You can't restore just the TWRP's /data backup from Stock to, let's say CM or from CM to Stock, the system's phone won't boot.
TWRP's Data Factory Reset or flahsing a custom Rom using TWRP won't erase the internal memory, so the files you have in the internal memory will be there.
Yes, you should use Titanium Backup when possible to restore your apps or some setting/data.
TWRP's nandroid backup is usually used to restore the "hole" Rom (data, system and boot, at least).
Regards.
Click to expand...
Click to collapse
Many thanks, I'll use Titanium then.
Anyway i want to save a nandroid backup just in case
If i have a nandroid backup saved on my phone, and i factory reset, will it stay or will be erased?
I don't have an sd now, and looks like i cant copy it on my PC
biondo_92 said:
Many thanks, I'll use Titanium then.
Anyway i want to save a nandroid backup just in case
If i have a nandroid backup saved on my phone, and i factory reset, will it stay or will be erased?
I don't have an sd now, and looks like i cant copy it on my PC
Click to expand...
Click to collapse
TWRP makes the backup in the /TWRP folder placed on the internal memory, external memory/SD and maybe (I have not tried on this device and his TWRP version), OTG USB storage, at your choice.
As I told you before TWRP´s Data Factory Reset won't erase the internal memory, so TWRP folder won't be erased neither, but maybe have a copy of the /TWRP folder from your internal memory in your PC is a good option too.
But keep in mind that the stock recovery's Data Factory Reset will erase all the internal memory (not only /data).
Regards.

Update to OxygenOS 9.0.15 - slot B encrypted

I'm on OxygenOS 9.0.14 and tried update to OxygenOS 9.0.15. Unfortunately I have some problem with slot B - which is encrypted (probably my earlier mistake - I changed TWRP with active pin lock or because I restore backup in TWRP, I'm not sure why) . Slot A is ok. When I try to update to OxygenOS 9.0.15, the phone stuck on stock recovery (because slot B is encrypted?). When I change to slot A, phone works again on OxygenOS 9.0.14.
Is there any solution to fix it (decrypt slot B?) without factory reset?
Now I haven't got any pin/pattern/fingerprint lock, my TWRP: 3.3.1-6 Unofficial by mauronofrio.
Miedzio said:
Is there any solution to fix it (decrypt slot B?) without factory reset?
Click to expand...
Click to collapse
Once it's encrypted, the only thing I know of is to format data. There's nothing the matter with doing that--you will need to back up all your personal files first.
Did you install 9.0.15 via the System Update installer? That might be better, and after the installation and successful booting of 9.0.15, be prepared to re-install TWRP via ADB etc.
Yes, I tried to install 9.0.15 via the System Update installer, via TWRP too, but the result was the same. Couple of times I had to re-install TWRP via ADB or restored nandroid backup via TWRP. I think the problem is encrypted slot B.
Summary: I need to format data (factory reset)? I have backup from Titanium Backup, but even that, it take some time to restore (it isn't 1 to 1 backup). So I need more free time to do this and now I have to stay with 9.0.14.
When you flashed 9.0.15 in TWRP did you flash the TWRP installer as well? As in flash OOS to slot a, change slots, then flash OOS AND the TWRP installer zip (not IMG), as the installer zip flashes TWRP to both slots automatically. That should remove any possibility of booting into the stock recovery. Be smart and make a backup of your data onto your computer, another phone, whatever device that's not your 6T. That way, should any encryption issues persist, it's no big deal to go ahead and format data (not factory reset) both slots, and problem should be fixed.
A small hint: i personally COPY everything I want to backup (pictures, music, Magisk modules, ROM zips, etc) to one folder then zip that folder into a single archive, use whatever compression you like, I go with none as the whole point is to just transfer one single large file instead of hundreds or even thousands of individual files and directories... It helps with transfer time.
lordcheeto03 said:
When you flashed 9.0.15 in TWRP did you flash the TWRP installer as well? As in flash OOS to slot a, change slots, then flash OOS AND the TWRP installer zip (not IMG), as the installer zip flashes TWRP to both slots automatically. That should remove any possibility of booting into the stock recovery. Be smart and make a backup of your data onto your computer, another phone, whatever device that's not your 6T. That way, should any encryption issues persist, it's no big deal to go ahead and format data (not factory reset) both slots, and problem should be fixed.
A small hint: i personally COPY everything I want to backup (pictures, music, Magisk modules, ROM zips, etc) to one folder then zip that folder into a single archive, use whatever compression you like, I go with none as the whole point is to just transfer one single large file instead of hundreds or even thousands of individual files and directories... It helps with transfer time.
Click to expand...
Click to collapse
Sorry, I didn't describe it clearly. When I flashed 9.0.15 via System Update, the phone goes to stock recovery - I need to install TWRP via ADB to back to slot A or I must do factory reset.
When I flashed 9.0.15 via TWRP, after that I install TWRP (img and zip). Unfortunately after reboot, 6T always goes to TWRP in slot B, but everything is encrypted. When I back to slot A, phone boots into 9.0.14 (no problem witch encryption).
I have all backup on my computer (all storage + Titanium Backup + TWRP backup). If I will format data, will be enough to just copy all files from computer? I'm not sure it will work. What about settings etc.?
When flashing in TWRP, there is no need to flash both the TWRP img AND the zip. Just do that how I said. Boot to TWRP, flash 9.0.15 on slot a, without rebooting, change to slot b and flash 9.0.15 again along with the TWRP installer zip. At this point, I say reboot back to recovery, whether you are going to flash Magisk or not. If everything is encrypted, go on and format data on both slots and boot, do the initial setup and all, then move your data back and flash root. Otherwise, if you can recognize your files and folders when you reboot to recovery, you can go on and either flash Magisk or boot on into OOS. If it's not just a bunch of random crap, you shouldn't even have to worry about your backup data as everything should be exactly as it was before you started, except you'll be on 9.0.15 instead of .14.
Should you end up having to format after doing what I said, there may be a way to restore all your settings, I'm not sure. Again, me personally, all I save is my titanium backup folder, anything in my download folder, and any other folders and all my Magisk modules. All my pictures and videos I have set to automatically backup to Google photos, but if you don't do that you'll want to include that too. I don't worry about my settings, call logs, messages, all that type stuff, I just go back through set it up fresh. Again, there might be a way to restore all that stuff, but I only keep the most important stuff. As far as the TWRP backup goes, I haven't had any luck restoring my TWRP data so that as well is something I don't bother saving (or even making in the first place.)
If you have to format, once whatever you want saved is backed up to another device, (computer, another phone, thumb drive, whatever) all you have to do is format both slots and reboot. You SHOULD at that point be able to boot into 9.0.15 and perform your initial setup; add Google account, fingerprint/face unlock data, etc. Once you're at the home screen and all the initial setup is complete, then you can move your data back to the device.
The most important thing is to put your data back in whatever directories it was in before the format. The only directories I backup are directories I have added something to, have downloaded to, or that I have created. Directories like Alarms, Android, Movies, any hidden directories (unless I created them and subsequently hid them) all that I just delete.
As long as you put all that back where it was before the format, everything should be just like it was before the format. Your Titanium Backup files, once placed back in internal storage/Titanium Backup will show up in Titanium Backup and you can restore it all through the app. Your pictures, if you backup any, will show up automatically in your gallery once placed back into internal storage/DCIM, etc.
You'll obviously have to reflash Magisk and any modules and relevant setup.
TL;DR
As long as you put your data back into the directories it came from, everything minus your settings will be back to how it was before formatting.

Categories

Resources