Recently I started trying out a few custom nougat roms, and as the title says, if I choose to backup my current rom with TWRP (official 3.0.3), and reboot back to system, the password will have changed and some system settings will be reset (hardware keys swap)
As far as I can tell, data/data still has my app folders in it, so I'm not sure if all the apps are reset too. One thing to note is that the backup size for data partition was only 70mb.
I can't really tell if it was caused by rebooting or initiating the backup process.
Data is not encrypted.
Anyone have any ideas?
https://forums.oneplus.net/threads/fix-wrong-pin-pattern-when-restoring-twrp-nandroid-backup.452384/
I can't say anything about your backup,
but this is probably the solution for your password issue.
It is a known issue when restoring rom backups on the OP3.
So far I don't know a fix for this other than following the linked method.
For the future It is best you disable password / fingerprint before making a TWRP backup.
Be careful. It will delete the function of your Home Button (secon methode) and its not able to restore this function. So if youre going to delete the key.files you have the chance to enter the System but also have to go back to oos after back up your files -> the mega unbrick-thread
Its the best way to Backup your files before you restore the whole System if nothing's working.
www.howtogeek.com/240657/how-to-fix-pin-errors-after-restoring-from-twrp-android-backups/amp/
Hello
This is a TWRP recovery for Motorola Moto G5 Cedric for arm64 ROMS, with encryption support, backup support for persist and efs partitions and possibility to flash/backup logo boot image.
I need review and test, especially for the storage decryption and/with LineageOS fingers-crossed. I was able to test it on my device (XT1676 3Go).
It is my first ROM so it is possible that there are bugs.
- Be carefull, there are problems with the backup system :
Just wish to come here and tell you guys to AVOID using this recovery, it seems to have a serious bug.
I just backed up my entire data partition (and enable digest verification) and restored the partition afterwards and the phone didn't boot.
Then I tried restoring it with verification enabled and the hashes didn't match.
In other words, for some reason, the generated backup was corrupt.
- freeZbies
Click to expand...
Click to collapse
Changelog
TWRP 3.2.3-2
add sdcardfs
add FB2PNG for screenshot
fix brightness path and define it at 160
fix time zone error
fix incorrect lun path for USB
You can download it here :
TWRP 3.2.3-2 (md5: 0dbd3846593ae907d3391596876c1f35)
TWRP 3.2.3-1 (md5: 404b54d27653b5a1ec5b59023f53d3cb)
TWRP 3.2.3-0
Sources :
https://github.com/Akipe/twrp_android_device_motorola_cedric
https://github.com/Akipe/twrp_android_device_motorola_msm8937-common
Manifest :
https://github.com/Akipe/android_development_manifest
Would it be possible for you to compile a version capable of backing up all partition, including persist and efs? see here: https://forum.xda-developers.com/showpost.php?p=78695191&postcount=95
Guttergorm said:
Would it be possible for you to compile a version capable of backing up all partition, including persist and efs? see here: https://forum.xda-developers.com/showpost.php?p=78695191&postcount=95
Click to expand...
Click to collapse
Hi!
Sorry for the delay, I added the functions you wanted. Can you try and tell me if everything is ok?
Hi,
tested your recovery image with my installed LOS 15.1. (32bit) Device: XT1676 16GB P5
- storage decryption: OK
- backup support for persist and efs partitions and possibility to flash/backup logo boot image: OK
nice work, thx for you effort
mikefive said:
Hi,
tested your recovery image with my installed LOS 15.1. (32bit) Device: XT1676 16GB P5
- storage decryption: OK
- backup support for persist and efs partitions and possibility to flash/backup logo boot image: OK
nice work, thx for you effort
Click to expand...
Click to collapse
Thx for testing :good:
Akipe can u help us to build treble rom for cedric???
Works nicely, thanks.
I just tested it and it decrypts my internal storage normally.
Just wish to come here and tell you guys to AVOID using this recovery, it seems to have a serious bug.
I just backed up my entire data partition (and enable digest verification) and restored the partition afterwards and the phone didn't boot.
Then I tried restoring it with verification enabled and the hashes didn't match.
In other words, for some reason, the generated backup was corrupt.
Of course I could make another test but it'll take just a long time to backup everything again, so if anyone wants to test it, feel free, but beware, you could have a hell of a headache finding out the backups you made were useless.
freeZbies said:
Just wish to come here and tell you guys to AVOID using this recovery, it seems to have a serious bug.
I just backed up my entire data partition (and enable digest verification) and restored the partition afterwards and the phone didn't boot.
Then I tried restoring it with verification enabled and the hashes didn't match.
In other words, for some reason, the generated backup was corrupt.
Of course I could make another test but it'll take just a long time to backup everything again, so if anyone wants to test it, feel free, but beware, you could have a hell of a headache finding out the backups you made were useless.
Click to expand...
Click to collapse
Hello ! Thank you for your test and sorry for your backup
I will test the backup system and add a warning
freeZbies said:
Just wish to come here and tell you guys to AVOID using this recovery, it seems to have a serious bug.
I just backed up my entire data partition (and enable digest verification) and restored the partition afterwards and the phone didn't boot.
Then I tried restoring it with verification enabled and the hashes didn't match.
In other words, for some reason, the generated backup was corrupt.
Of course I could make another test but it'll take just a long time to backup everything again, so if anyone wants to test it, feel free, but beware, you could have a hell of a headache finding out the backups you made were useless.
Click to expand...
Click to collapse
I have backup up data partition from my TWRP, reboot one time to recovery, restore the data backup with digest verification, and reboot to LineageOS, with no problem (my rom is LineageOS 16.0 without encryption.)
I think there may be 2 errors (maybe more) :
1) There is a problem with data restore when encryption is enable. I can not test this scenario for now, but i will do it as soon as i can
2) Was your backup stored on your SD card? if so, it is possible that the sd card may be damaged, because it is too old or of poor quality (more info here : https://photo.stackexchange.com/questions/40489/what-causes-an-sd-card-to-go-corrupt )
if you have other information or other ideas, do not hesitate to share it!
if people want to participate, try to save the data partition and restore it, especially with the encrypted partition :good::good:
be careful, make a backup of your data before test
Akipe said:
I have backup up data partition from my TWRP, reboot one time to recovery, restore the data backup with digest verification, and reboot to LineageOS, with no problem (my rom is LineageOS 16.0 without encryption.)
I think there may be 2 errors (maybe more) :
1) There is a problem with data restore when encryption is enable. I can not test this scenario for now, but i will do it as soon as i can
2) Was your backup stored on your SD card? if so, it is possible that the sd card may be damaged, because it is too old or of poor quality (more info here : https://photo.stackexchange.com/questions/40489/what-causes-an-sd-card-to-go-corrupt )
if you have other information or other ideas, do not hesitate to share it!
if people want to participate, try to save the data partition and restore it, especially with the encrypted partition :good::good:
be careful, make a backup of your data before test
Click to expand...
Click to collapse
I agree it may be any of the 2 problems.
My data partition was indeed encrypted, and yes, my SD card is not what I would call genuine, though I think that's not the case since the card is relatively new and I never had any problem related to data corruption.
Anyways, thanks for your effort.
freeZbies said:
I agree it may be any of the 2 problems.
My data partition was indeed encrypted, and yes, my SD card is not what I would call genuine, though I think that's not the case since the card is relatively new and I never had any problem related to data corruption.
Anyways, thanks for your effort.
Click to expand...
Click to collapse
I have test backup the data partition with encryption on LineageOS 16 (arm64), backup and restore work without issue
What ROM did you use when you made the backup, and with what arch (arm or arm64) ?
Akipe said:
I have test backup the data partition with encryption on LineageOS 16 (arm64), backup and restore work without issue
What ROM did you use when you made the backup, and with what arch (arm or arm64) ?
Click to expand...
Click to collapse
I was on stock oreo, so its arm, not arm64
freeZbies said:
I was on stock oreo, so its arm, not arm64
Click to expand...
Click to collapse
Oh ok, there are chances that's why the backup did not work .
This recovery is mainly intended for arm64 rom !
Just wanted to say that everything worked well for me in backing up and restoring the OmniROM, on both decrypted and encrypted phone.
Thanks @Akipe for the great job
Can you update it to latest TWRP?
Sent from my cedric using XDA Labs
forgot password to decrypt??
hi,
first, sorry if this is the wrong place to post this. right now, when i install the 64 bit twrp i am asked for a password to decrypt my data. i have tried some passwords i think i would have used, but those don't work and i get a message also saying that the default password didn't work - i haven't typed a default password, though, so i assume there is a default one that twrp tries automatically. in the past, i did try a rom requiring 64 bit twrp and i am guessing i set a password other then the default to encrypt/decrypt, but i went back to stock without issues so have not thought about the password and cannot remember what i would have used. i wanted to try dotos on my phone, which i assume requires 64 twrp because i got error 255 when i tried to flash without twrp64. so i installed twrp64 but cannot get any further. so here are my questions:
is there any way to decrypt the data if i forgot my password?
if not, can i format the data while encrypted to install the new rom? if i can do that, what should i back up? i have pictures and other necessary files backed up, so i am not worried about completely wiping the phone to start over. however, should i back anything else up before formatting? do i need to worry about losing imei or losing any partitions that would make phone inoperable or not have any signal? should i back up with twrp64 or the non-64 bit twrp currently installed? any help or point in the right direction is greatly appreciated.
tia,
nurvus
nurvus said:
hi,
first, sorry if this is the wrong place to post this. right now, when i install the 64 bit twrp i am asked for a password to decrypt my data. i have tried some passwords i think i would have used, but those don't work and i get a message also saying that the default password didn't work - i haven't typed a default password, though, so i assume there is a default one that twrp tries automatically. in the past, i did try a rom requiring 64 bit twrp and i am guessing i set a password other then the default to encrypt/decrypt, but i went back to stock without issues so have not thought about the password and cannot remember what i would have used. i wanted to try dotos on my phone, which i assume requires 64 twrp because i got error 255 when i tried to flash without twrp64. so i installed twrp64 but cannot get any further. so here are my questions:
is there any way to decrypt the data if i forgot my password?
if not, can i format the data while encrypted to install the new rom? if i can do that, what should i back up? i have pictures and other necessary files backed up, so i am not worried about completely wiping the phone to start over. however, should i back anything else up before formatting? do i need to worry about losing imei or losing any partitions that would make phone inoperable or not have any signal? should i back up with twrp64 or the non-64 bit twrp currently installed? any help or point in the right direction is greatly appreciated.
tia,
nurvus
Click to expand...
Click to collapse
You need to format data
Push back button when it asks for decrypt
Goto wipe and select the option on the right to format data
This will erase everything on internal storage so copy any files you want to keep to pc first (pictures music etc)
Once formatted data restart back to recovery to check encryption has been removed and data partition is mountable
TWRP backups do not save personal files (pictures music etc) They only backup data and system files (and other named partitions)
Once you have flashed a new rom you can encrypt again if you want to via the security settings menu in phone settings
TheFixItMan said:
You need to format data
Push back button when it asks for decrypt
Goto wipe and select the option on the right to format data
This will erase everything on internal storage so copy any files you want to keep to pc first (pictures music etc)
Once formatted data restart back to recovery to check encryption has been removed and data partition is mountable
TWRP backups do not save personal files (pictures music etc) They only backup data and system files (and other named partitions)
Once you have flashed a new rom you can encrypt again if you want to via the security settings menu in phone settings
Click to expand...
Click to collapse
thanks for the quick response! and just for clarification and for me to be sure, should i back up any partitions before formatting? right now i have 32 (or non64 i guess) bit twrp installed, stock rom and bootloader unlocked. do i need to take any precautions with data/imei/signal before reinstalling twrp64, formatting data, and installing a new rom? if it matters any i have the international version of the moto g5. thanks again!!
nurvus
nurvus said:
thanks for the quick response! and just for clarification and for me to be sure, should i back up any partitions before formatting? right now i have 32 (or non64 i guess) bit twrp installed, stock rom and bootloader unlocked. do i need to take any precautions with data/imei/signal before reinstalling twrp64, formatting data, and installing a new rom? if it matters any i have the international version of the moto g5. thanks again!!
nurvus
Click to expand...
Click to collapse
Backup efs if you want to preserve your current emei state or need to restore it in future
Since upgrading from my Pixel, I've had the hardest time finding a reliable full system backup and restore method. Here's what I've tried so far:
TWRP backup and restore - the backup procedure works great, but I have not once been able to successfully boot back to the operating system after restoring. Usually get caught in some form of boot loop and I'm forced to wipe and start over.
ADB backup and restore - the backup command only works 50% of the time and the restore procedure hangs and fails each time I've tried.
Titanium backup and restore - great solution for apps and data, but requires more setup after the restore process than I'd prefer. Also, I can't seem to figure out how to backup directly to my Google Drive to avoid losing the backups during a wipe.
So, do you guys have any recommendations on a reliable full system backup and restore method?
Really, nothing?
PuffDaddy_d said:
Since upgrading from my Pixel, I've had the hardest time finding a reliable full system backup and restore method. Here's what I've tried so far:
TWRP backup and restore - the backup procedure works great, but I have not once been able to successfully boot back to the operating system after restoring. Usually get caught in some form of boot loop and I'm forced to wipe and start over.
ADB backup and restore - the backup command only works 50% of the time and the restore procedure hangs and fails each time I've tried.
Titanium backup and restore - great solution for apps and data, but requires more setup after the restore process than I'd prefer. Also, I can't seem to figure out how to backup directly to my Google Drive to avoid losing the backups during a wipe.
So, do you guys have any recommendations on a reliable full system backup and restore method?
Click to expand...
Click to collapse
After restoring the backup in twrp if it doesn't boot reflash what ever room the backup was on, ie. Stock, scorpion and so on. I had to reflash the stock img after I did a twrp restore and it booted back up with everything still there. Just make sure you get rid of the -w in the flash all.
I bought a USB-C drive (SanDisk 256GB Ultra Dual Drive USB Type-C FOR $53) from Amazon which connects directly to phone USB-c port. I am able to save backups from both TWRP and Titanium here and recover from it as well. One thing that I did notice like you said, when recovering from a TWRP backup, sometimes it boot loops. (It did this when trying to go back to stock from Scorpion OS). When it bootlooped, I flashed Magisk afterwards and that fixed the bootloop. Then it booted up properly. All the apps were there. I also save my Titanium backups to the USB drive and recover any apps from there (If/when needed). I keep the Titanium backup updated by running it every few days to update any apps that may have updated info. I recommend getting this drive, its fast and has a huge capacity. https://www.amazon.com/gp/product/B06XC1WGQR/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1
Eudeferrer said:
I bought a USB-C drive (SanDisk 256GB Ultra Dual Drive USB Type-C FOR $53) from Amazon which connects directly to phone USB-c port. I am able to save backups from both TWRP and Titanium here and recover from it as well. One thing that I did notice like you said, when recovering from a TWRP backup, sometimes it boot loops. (It did this when trying to go back to stock from Scorpion OS). When it bootlooped, I flashed Magisk afterwards and that fixed the bootloop. Then it booted up properly. All the apps were there. I also save my Titanium backups to the USB drive and recover any apps from there (If/when needed). I keep the Titanium backup updated by running it every few days to update any apps that may have updated info. I recommend getting this drive, its fast and has a huge capacity. https://www.amazon.com/gp/product/B06XC1WGQR/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1
Click to expand...
Click to collapse
Another reason why I miss expandable storage slots...
Hi together,
just as a disclaimer, I don't really have knowledge in this field (custom roms etc), but I'm willing to learn and understand what is going on.
I have the Moto G5 as my daily phone with the unofficial lineage 17 from the xda-forum. It's not rooted. Now i saw that the g5 got official support for LOS18, so I wanted to upgrade. However, I had some important files on my phone, so I wanted to do a backup (with twrp), which i did on a different sd-card than the one I was using as storage. Or so i thought. The upgrade itself wasn't really a problem, at first i forgot to wipe the phone, but i realized right after the installation, wiped it accordingly to the instructions and did the installation again. The phone booted without a problem and everything seemed fine. I encrypted the phone accidently, i thought it was the lockscreen pin. But it wouldnt recognize the sd i used as storage on the previous version. Because i had pictures, music etc on the card, i wanted to restore my backup to use the phone as before. Well... to my surprise, on the sd i used to back up i couldn't find it, but strangely there were now two versions of a backup i made some months ago, only different in the timestamp (not the date) in their filename. I didn' know if one of them was the one i made, or if i had made two backups back in the days. I was confused, but i chose on of them at random and restored it. It seemed to have worked, it booted to the familiar lockscreen i set up a while ago. But then: it wouldnt accept the pin, even though i knew it was the right one - at least for the system i have used the same morning. I had to delete the lockpin.db (or how it was called) via twrp to acces the phone again. The former uncompatible storage sd now got recognized and worked, the phone showed all the apps i had before, i was still logged in in all of them etc. But: i made a photo, wanted to look at it in my gallery app, and i briefly saw my albums - then they vanished and only the photo i had taken was there. So now all the pictures, music are gone from the sd. Some funky things are different, the swipe directions for the "recent apps" and "back" buttons on the fingerprint sensor are switched and i cannot find the menu to change them. That's the story.
Here are my questions:
The backup i made - why wasn't it called with the proper date and time? Or have i deleted it somehow due to my wiping mistake? but it was on the sd... ?
I now assume i restored the old backup with a different lockscreen pin, and thats why the pin i thought was correct didn't work. But some apps which i hadn't installed at the time i made the backup where there and with all the recent data. Doesn't that mean the sd has some kind of image of the system or rather the apps themselves stored? but why are the pictures and the music gone? Is there any chancce to get it back? Can I upgrade to LOS18 and use the same sd as storage without the need to format it?
I'd like to learn what the mechanisms behind all these happenings are and would be glad if someone could explain it! Thanks in advance!
Twrp backups do no backup personal files - This includes music pictures and documents. These must be backuped up yourself to a pc, external device or the cloud.
TWRP backups do backup the following for example
System - your current rom
Data - apps and their data of your current rom, phone settings
Boot - Kernel
Never restore data on a different rom. The data contains apps and settings for your current rom and restoring this on a different rom will likely lead to a bootloop or an unstable device. This is why you had issues with passwords.
In regards to personal files - if you have formatted data of an encrypted device then it removes encryption and thus formats internal storage. Anything on this will be lost.
If you are changing roms you need to format data and then install everything again via the playstore (or manually via apk)
You can use 3rd party apps that backup apps and data but I advise against this as what it restore may be unstable on a different OS
As with the twrp date I assume twrp assigns the correct date. The file would be lost if you backup up to internal storage and your formatted data. I don't know what happened to it if you backed up to an external device.
Everytime I have to change my rom, My apks , music, books get wiped. Is there a possibiltiy to not wipe internal storage, just format , like it used to happen on a only devices?
Switching roms would require you to wipe, you may use some software to backup and restore your apps if you have root access. I don't flash roms now, but when I use to I used Titanium Backup for this, you can try it if it still works.
The OxygenOS @Funk Wizard? Lol
Bupreno said:
Everytime I have to change my rom, My apks , music, books get wiped. Is there a possibiltiy to not wipe internal storage, just format , like it used to happen on a only devices?
Click to expand...
Click to collapse
If you are going between custom ROMs of the same base version (meaning they all use the same OOS base like C.62), you do not have to do the wipe operation and can just dirty flash, but it's highly recommended to do a wipe so you don't have weird issues. If you do decide to dirty flash, at least do the dev the courtesy of holding off any bug reports until after you factory reset because if you have a weird problem nobody else is reporting, there's a pretty good chance it's because you dirty flashed.
If you're going between stock ROMs, that's a bit more complicated. I have successfully used Fastboot Enhance to upgrade, downgrade, and crossflash between different versions and it generally works as long as I'm not trying to downgrade or upgrade between Android 11 and 12 and I make sure to delete all the cow partitions in the partition screen before starting the flash. Trying to go from ColorOS 13 beta back to C.62 didn't work either but I have flashed between various C builds of OOS for different regions as well as ColorOS 12.1 and they've all worked.
That said, you should always do a full backup because things do go wrong. I have done it so many times on this phone that I have it down to a science now. I hook my phone up and use adb pull -a /sdcard to grab everything, do a system backup to Google Drive using the backup option in settings, back up my Signal messages, and when I'm on a stock ROM, I use the OnePlus backup to grab all my apps and settings. When I restore, I skip the initial Google account setup, I delete the Android folder from the adb pull folder and drag and drop the rest of it to the root of the storage, then I use the OnePlus backup to restore (if it's a stock ROM), then I log into my Google account and run that restore and the rest of the setup process, then I restore my Signal messages. Doing it in this order, I end up with the least amount of data loss. I don't even have to reconfigure my battery settings for my apps on the stock ROM doing it this way, it's all carried over, which saves me about 15 minutes of turning off optimizations for everything so my notifications work right.