Can TWRP backup encrypted phones?
Because since it has been encrypted, it is failing. I'd like to make a backup before I try installing a new ROM.
automatism said:
Can TWRP backup encrypted phones?
Because since it has been encrypted, it is failing. I'd like to make a backup before I try installing a new ROM.
Click to expand...
Click to collapse
Same here. TWRP cannot access /data
Would it be possible with CWM recovery?
If encrypted, you need to make sure you enter your encryption password right when it asks in TW recovery. This will allow TeamWin to decrypt the drive and be able to back it up.
thehayk said:
If encrypted, you need to make sure you enter your encryption password right when it asks in TW recovery. This will allow TeamWin to decrypt the drive and be able to back it up.
Click to expand...
Click to collapse
It's never asked me for a password
automatism said:
It's never asked me for a password
Click to expand...
Click to collapse
It depends on which TWRP version you have.
Sent from my GT-I9001 Gadget of Mass Destruction with CM11 using XDA Developers App.
What version of TWRP would I need? I have v2.8.1.0 and I've never been asked for the password.
hnkotnis said:
It depends on which TWRP version you have.
Sent from my GT-I9001 Gadget of Mass Destruction with CM11 using XDA Developers App.
Click to expand...
Click to collapse
Mersine said:
What version of TWRP would I need? I have v2.8.1.0 and I've never been asked for the password.
Click to expand...
Click to collapse
At backup screen where you select the partitions (system, data etc). There is options called as encrypt backup.
This is available for TWRP v2.8.1.0 on my Samsung Galaxy S Plus GT-I9001.
Press Thanks if helped.
Since Googling "twrp backup encrypted phone" puts this thread as the number one result, I'd like to offer up that this doesn't work. The encryption password looks to me to be for encrypting the backup file itself, not for decrypting /data. As near as I can tell, the only way to back up /data is to use a tool such as Titanium Backup, although I haven't tried that yet myself, I am about to.
hnkotnis said:
At backup screen where you select the partitions (system, data etc). There is options called as encrypt backup.
This is available for TWRP v2.8.1.0 on my Samsung Galaxy S Plus GT-I9001.
Press Thanks if helped.
Click to expand...
Click to collapse
This is NOT what OP requested. He (we) want to backup an encrypted device, that is our /data is encrypted and twrp is unable to mount it (confirmed by the dev themselves.) to be clear: there is no twrp or cwm version able to mount encrypted /data so far.
Is this available?
Stopgap ways of backing up encrypted phones?
So I've been researching this problem for some time now, and I've got a couple suggestions.
CAVEAT: I haven't tried any of this yet.
First, there is Online Nandroid Backup. Since it backs up while the phone is running, the encrypted partitions should be available to it. But I suspect it restores while the system is running, which kind of defeats the purpose -- with a Nandroid backup, you can take a non-working phone and flash it back to the same condition when it did work. That's the whole point of wanting it, because testing ROMs is a lot easier.
Second, I'm experimenting with a way to do this with a dd command in an ADB shell. Basically you would execute a command like this:
dd if=/dev/block/mmcblk0p32 of=/storage/sdcard1/userdata.img
Then that could, theoretically, be flashed back using fastboot flash userdata userdata.img. This is tricky, though, because you have to manually find your partitions and their equivalent names, etc. Also, fastboot doesn't work on all phones....
The one thing that is certain: CWM/Philz/TWRP all fail at event mounting the /data partition, much less backing it up. And (I think) an ADB backup is not going to work because it only applies to apps and their data, not the system itself, or its settings.
It makes you wonder how people with encryption make whole-phone backups in case something goes wrong (or if they do it at all). Sure, there's Titanium Backup, but that's one app at a time. Anyway, if I find out anything more useful while testing these ideas, I'll post it here.
Thanks for pointing me in the right direction. I just did that in the TWRP console.
You can find out your device partitions with
Code:
cat /etc/fstab
.
Then use dd as previously specified, but use an external sd card as the target:
Code:
dd if=/dev/block/mmcblk0p36 of=/external_sd/userata.img
.
This will take a while. Depending on the size of your /data partion quite a while. And there is no progress indicator.
Edit: Actually you can monitor the progress over adb. Just open an adb shell and do a
Code:
ls -al /external_sd/userdata.img
. The current size of the file gives an indication for the progress. In the end the file will have the same size as the data partition.
You can also enter the commands through adb to begin with... makes typing much easier.
I'll get around to testing these idea at some point, but for now I've had to (re)build this phone 4 times since August... so once it started looking solid again, I decided on Online Nandroid as my solution for now. It should give a workable restoration no matter what (but it will need a full wipe to clear encryption beforehand).
I'm curious as to what will happen when you fastboot flash that image file back on to the phone, though. I wonder if it's still encrypted and works, or isn't encrypted and works, or doesn't work at all.
There's also the disparity between the state of the filesystems on /system and /data if they're backed up at times too far apart. That one won't be apparent until something breaks, I think.
via XDA Mobile (D415)
I haven't gotten around to restore the image yet. I don't know whether this will work through fastboot, but it should definitely work with dd again from the recovery, this time from the image to the /data partition.
And the file system is certainly still encrypted, it wasn't ever decrypted.
I have to go back to the stock ROM on my phone for a moment, I'll report back if I could restore the dd image file.
BubuIIC said:
I haven't gotten around to restore the image yet. I don't know whether this will work through fastboot, but it should definitely work with dd again from the recovery, this time from the image to the /data partition.
And the file system is certainly still encrypted, it wasn't ever decrypted.
I have to go back to the stock ROM on my phone for a moment, I'll report back if I could restore the dd image file.
Click to expand...
Click to collapse
Theoretically, a dd image is an exact copy of the partition, and can just be dropped right in there. So yes, it should still be encrypted... unless flashing it back somehow munges the footer on /userdata, which the phone needs for encryption (I've seen this happen, and it actually caused a bootloop; thankfully, I was able to fix it). But I am hopeful it works when you try it.
Also, I spoke to a guy today who said his phone has no problem backing up encrypted partitions. In fact, his recovery asks for a password before running. I had him specifically confirm that his whole phone is encrypted, not just the backup file. He says his version is 2.7.1.0 running on a Nexus 4 (mako).
So now I've gotta find that version, and I think it has to be customized for the L90 too. I'll post request in that thread and see if I can get ahold of it.
via XDA Mobile (D415)
Bump
Last post in here made it seem like yes for some phones, and no for others. I'd love to encrypt my phone, but not if it means I can't make a nand backup in TWRP. Anyone want to chime in and see if this answer has become more definitive in the last 9 months?
jfsat said:
Last post in here made it seem like yes for some phones, and no for others. I'd love to encrypt my phone, but not if it means I can't make a nand backup in TWRP. Anyone want to chime in and see if this answer has become more definitive in the last 9 months?
Click to expand...
Click to collapse
I have Cyanogenmod cm-12.1-20150901 and TWRP 2.8.5.0
Once I encrypted the device, TWRP prompts for a password when it starts. However, when I type the passphrase, it says:
Password Failed, Please Try Again
forrestgump2000 said:
I have Cyanogenmod cm-12.1-20150901 and TWRP 2.8.5.0
Once I encrypted the device, TWRP prompts for a password when it starts. However, when I type the passphrase, it says:
Password Failed, Please Try Again
Click to expand...
Click to collapse
Did you ever find a solution for/to this?
Nandroid backups using TWRP Works with Nexus 7
I had an issue with this, too. I'm using CM 12.1.
First, make sure that you've flashed the latest TWRP for your device.
The issue was that the whole disk encryption is tied to the lock screen password/PIN/pattern.
So, I changed my lock screen to a password ensuring that it must also be used to start up Android. This changed both the lock screen and the whole disk encryption password to the same password. Now, when I reboot into recovery, TWRP requests a password and I supply the password that I changed my lock screen to. This allows /data to be mounted. A backup can be done on the internal storage or you can mount a USB storage device backing up the Nandroid images there instead.
Hope this helps.
****Confirmed this works with Android 6.0 from Google.
cableghost said:
Did you ever find a solution for/to this?
Click to expand...
Click to collapse
Nope. But I also don't use an Android phone anymore, so I haven't been looking.
Related
If one enables full device encryption in Ice Cream Sandwich, am I correct in assuming that that the internal SD of that device is now not going to be available in the CWM recovery mode? And even if it was, the root fs would not be available? If so, this pretty much would make CWM flashing your device near impossible?
Does CWM even work if you use FDE? Or is it planned/
The question I guess is, when do you input your encryption password? Is it some pre-boot step?
I really want to enable device encryption but I can't find enugh details on how it works.
I did read this post on it., but it doesn't really answer my questions. And it is unclear if it encrypts the internal SD, or just the root FS?
http://source.android.com/tech/encryption/android_crypto_implementation.html
No one knows anything about this?
I got a Gnex today from Verizon in the US and I encrypted my phone after I unlocked the bootloader but before rooting. As a result I don't think I will be able to root because it doesn't seem that the modified boot.img that the instructions tell me to use can mount the encrypted system (it sat at the Google logo w/ the unlocked icon for 10 minutes before I pulled the battery and let it boot the stock boot.img) which came up fine.
It seems the only way to decrypt the phone is by doing a factory reset.
That's all I know. That being said, while a custom recovery may work for wiping partitions (such as cache), it would probably be mostly useless until the custom recovery is updated to support the encrypted file systems. I'm a *NIX user and an engineer, but don't have a lot of experience with Android's internals, so take all that with the appropriate sized grain of salt.
Regards,
Chris
Bump.
Anyone experimented with full device encryption / ROM flashing / SD Card? I'm curious about this as well, but not curious enough to experiment.
I dident try it myself, so i dont exactly know, how this works. But i think device encryption shouldent completly block clockworkmod recovery.
I think it could be a problem to make a backup while your device is encrypted. But i think it shouldent be a problem to recover a old system over an encrypted one. Encryption keeps people without the key away from reading data. This dosent mean you cant wright something over it and replace the locked data with some new one. But then you defenitly loose the old data. I dont think you can flash a new ROM or a recovery without a full wipe. You probably gona loose all the data you had on the old system.
But i general i think this is anyway a good think to do when you flash a new ROM.
I think you could give it a try, without briking your phone. But i dident try it, so i cant take any responsibility.
Would any of you happen to know how to get to the diagnostic mode?
ryfly65 said:
Would any of you happen to know how to get to the diagnostic mode?
Click to expand...
Click to collapse
I sonst exactly know hat diagnostic Mode you mean. Depends hat Diagnose you want to run. Do you want to read the logfiles in your phone, wher you can see what ist doing? You could use the app alogcat. An other way would be to run logcat over Eclipse.
Sent from my HTC Desire HD using XDA App
Hilmy said:
I sonst exactly know hat diagnostic Mode you mean. Depends hat Diagnose you want to run. Do you want to read the logfiles in your phone, wher you can see what ist doing? You could use the app alogcat. An other way would be to run logcat over Eclipse.
Click to expand...
Click to collapse
I need to edit modem information and enable a diag port for QPST, essentially allowing me to flash it to another carrier.
Is there any new information on this? Any help would be very appreciated!
Sent from my Galaxy Nexus using XDA App
I encrypted mine after flashing the stock ICS 4.0.3 image and rooting. CWM still loads, but when I try to use USB mass storage, windows tells me it needs to be formatted before the SD card can be used.
You can use titanium backup to make backups of your stuff, and restore them to a non-encrypted phone. I have found no other way to unencrypt the phone than factory reset either. When you encrypt, then go to settings > security > encryption, it just has a greyed out area saying "Phone is encrypted", which is stupid and needs to be fixed.
nevarDeath said:
I encrypted mine after flashing the stock ICS 4.0.3 image and rooting. CWM still loads, but when I try to use USB mass storage, windows tells me it needs to be formatted before the SD card can be used.
You can use titanium backup to make backups of your stuff, and restore them to a non-encrypted phone. I have found no other way to unencrypt the phone than factory reset either. When you encrypt, then go to settings > security > encryption, it just has a greyed out area saying "Phone is encrypted", which is stupid and needs to be fixed.
Click to expand...
Click to collapse
So if I factory reset the device from CMW I will not loose my pictures or TB in the internal SD?
What about flashing a new ROM?
Thanks!
I have been playing with ICS + FDE for several days doing different things. First off this is:
Nexus S 4G, running Pete's crespo4g OTA ROM
I flashed with CWM which is still on there and runs fine.
However: /data and /sdcard and /system (?) are encrypted and CANNOT be mounted.
To restore you have to 1) make a full backup over USB to a PC of the whole SDcard (or at least the important folders).
2) wipe and reformat everything. This isn't just a factory reset, this kills the sdcard as well.
3) mount (hopefully) the newly reformatted /sdcard and blow your backup from the PC onto the /sdcard
4) use CWM to restore a previous ROM.
That's pretty much it, give or take. Not for the faint of heart. However, if you are concerned enough to want encryption, you don't want to just say reboot recovery and voila all your files are belong to us, right?
---------- Post added at 03:58 PM ---------- Previous post was at 03:34 PM ----------
Also, the backup to PC part is just your sdcard. It doesn't back up the whole system. There might be a way to do that via adb, I don't know.
So i am running rooted runnig miui.us rom. I just tried to encrypt phone.. It ran for 2 and a half hours and I got impatient. thinking maybe i shouldnt have done it... Then after a little bit of panic i said **** it if i lose data i lose data... so i powered off and back on hoping i didnt and the rom booted back up with all my data intact..... •••••• Wish I had more to report but im not doing that again until someone can confirm that it works fine...... I have tried booting into cwm yet.. If i have an issue when i need to boot illl report back but if you dont hear from me here then assume I was able too.
Pete's to CM9 - still encrypted
IT does indeed take a fairly long time to encrypt. If I understand correctly it will build the encrypted partition on a loopback (or something like) before erasing the original (by overwriting?).
I've got more to report. I followed my plan (couple posts back) for unencrypting and reflashing my phone. (Nexus S 4g).
The first bits of this worked fine. I was able to flash CM9 onto my phone (works like a champ btw). While the phone was in recovery I mounted the SD and copied my backup back onto it.
However...
When CM9 booted I STILL got the "unlock your device" screen, still the same password, and it decrypted and booted. That was surprising, but not as much as when I looked for the SD card, it said it was incorrectly formatted! The only thing to do was reformat and copy with the phone on and unlocked.
So lessons learned: 1) a factory reset from _inside_the_ROM_ doesn't remove the encrypted partition at all and
2) As far as I can tell, the SD card _is_ encrypted along with /data
I'd be very interested to hear other's experiences, especially someone who can remove their SD storage.
Undoing FDE
First off - Lacking a device with removable storage to test with all I can tell you is that the sdcard is not accessible by any normal means after FDE is enabled without booting into the encrypted system.
"Removing" FDE required three steps beyond normal:
-Factory reset from within the ROM
-factory reset/wipe at recovery and/or format /data
-once into a running ROM, reformat the sdcard
Once all that is done (in addition to normal setup for ROM) you should be able to operate normally again.
problem with encryption on sgs2 with android 4.0.3
I really want to enable my device encryption too, but I can't !!!
the phone start encrypting after he ask me for a new secure password, rebooting and asking again for my password and surprise!!!.... the password is not match ?!?!
I repetead these steps for 3 times but the same result...the password does not match!!! ?
Please, if someone found a trick to repair this inconvenient, tell us in this post steps to be followed.
Regards!
SGS2, Android Icecream 4.0.3
leech2082 said:
So i am running rooted runnig miui.us rom. I just tried to encrypt phone.. It ran for 2 and a half hours and I got impatient. thinking maybe i shouldnt have done it... Then after a little bit of panic i said **** it if i lose data i lose data... so i powered off and back on hoping i didnt and the rom booted back up with all my data intact..... •••••• Wish I had more to report but im not doing that again until someone can confirm that it works fine...... I have tried booting into cwm yet.. If i have an issue when i need to boot illl report back but if you dont hear from me here then assume I was able too.
Click to expand...
Click to collapse
I did exactly what you did, and so far everything seems to be intact Thanks!
Hello Everyone,
I have not play with any android devices since android 2.0 and even back then found self rooting tools. I got my Kid Nabi2 tablet. Runs Android 4.0.4 currently. Nice little tablet. Problem is only have 8GB or storage. About 4gb after all system partitions and recoveries. So my question is can I safely back up my recovery partition to external source to free up some space? I assume recovery partition has complete recovery files when I do restore to factory option. I I remember correctly android has few partitions. /boot, /system, /recovery, /sd. is there a way just to have your operating system and whatever apps. Have recovery mode but have files on like sd card. If I decide to root this device dose that changes anything in my recovery partition. If device is rooted can I just go back to completely stock by doing factory reset? I just want to make sure that if I root it and want to go back to complete stock for any reason I can do that.
You can restore from your backup that gets made after you flash the custom recovery.
Here is the original script for using on Windows:
http://forum.xda-developers.com/showthread.php?p=32207344
Though you should use the gapps package from http://forum.xda-developers.com/showthread.php?p=35888524 as it gets rid of the 'android upgrading' messages on every boot.
If you want a more manual method, or are on linux, see http://forum.xda-developers.com/showthread.php?t=2016463
t499user said:
You can restore from your backup that gets made after you flash the custom recovery.
Here is the original script for using on Windows:
http://forum.xda-developers.com/showthread.php?p=32207344
Though you should use the gapps package from http://forum.xda-developers.com/showthread.php?p=35888524 as it gets rid of the 'android upgrading' messages on every boot.
If you want a more manual method, or are on linux, see http://forum.xda-developers.com/showthread.php?t=2016463
Click to expand...
Click to collapse
T499user, thank you for replaying. I do run windows. I did look at the section you direct me to me before. What I don't understand is when you root with his program do I use option 1 or 2. Where dose the back up go and how do I restore it later? when I restore dose that bring it back completely to stock, meaning just like it was when i got it? I'm currently running new nabi software do I have to worry about losing wifi?
Also is there a way of freeing up space on my nabi 2 by keeping a back up somewhere else. I think now there is recovery/back up partition. that works when I do factory reset. is that is how that works?
By installing new custom recovery would other recovery still be there?
Sorry trying to get back after many Apple years..
skull791 said:
T499user, thank you for replaying. I do run windows. I did look at the section you direct me to me before. What I don't understand is when you root with his program do I use option 1 or 2. Where dose the back up go and how do I restore it later? when I restore dose that bring it back completely to stock, meaning just like it was when i got it? I'm currently running new nabi software do I have to worry about losing wifi?
Also is there a way of freeing up space on my nabi 2 by keeping a back up somewhere else. I think now there is recovery/back up partition. that works when I do factory reset. is that is how that works?
By installing new custom recovery would other recovery still be there?
Sorry trying to get back after many Apple years..
Click to expand...
Click to collapse
I prefer to do it manually, but if you are going to use the script, use option 2. Then you can install gapps from TWRP using http://forum.xda-developers.com/showthread.php?t=2065878.
The backup that gets created is of the current system state. It is stored in /sdcard/TWRP/backups/*serialnumber*/backupname
No worries about wifi as long as you did all of the OTA updates.
t499user said:
I prefer to do it manually, but if you are going to use the script, use option 2. Then you can install gapps from TWRP using http://forum.xda-developers.com/showthread.php?t=2065878.
The backup that gets created is of the current system state. It is stored in /sdcard/TWRP/backups/*serialnumber*/backupname
No worries about wifi as long as you did all of the OTA updates.
Click to expand...
Click to collapse
Now do I have to install TWRP or when i root it will do it for me?
It will be done with the script.
t499user said:
It will be done with the script.
Click to expand...
Click to collapse
What dose exactly gets back up?
also do you know why nabi2 only has about 4.45gb of free storage when total is 8gb? 3.55gb seems a lot for system files???
skull791 said:
What dose exactly gets back up?
also do you know why nabi2 only has about 4.45gb of free storage when total is 8gb? 3.55gb seems a lot for system files???
Click to expand...
Click to collapse
The system, boot, and data partitions get backed up. That is the way they set it up for the partitions.
All of your questions have already been answered in the other threads, might want to do a search for 'Nabi' and have a read.
t499user said:
The system, boot, and data partitions get backed up. That is the way they set it up for the partitions.
All of your questions have already been answered in the other threads, might want to do a search for 'Nabi' and have a read.
Click to expand...
Click to collapse
T499user trust me I been reading crazy and still cant find an answer. Want to point me to the right place ?
No problem, I would start with the following:
http://forum.xda-developers.com/showthread.php?t=1905674
http://forum.xda-developers.com/showthread.php?t=2016463
t499user said:
No problem, I would start with the following:
http://forum.xda-developers.com/showthread.php?t=1905674
http://forum.xda-developers.com/showthread.php?t=2016463
Click to expand...
Click to collapse
Thank you. I did read all of them. Do you know where I can find something about android system file. Mostly why I have only 4.45gb out of 8. Is thereba way to move back up patition? To external source to free up some space?
I have a OnePlus 3 and I was thinking of encrypting it for additional security & privacy reasons. But since I flash various ROM level mods / use xposed modules on my phone, I was wondering about the negative consequences I have to face after encrypting an android phone.
I have a few doubts which need to be cleared.
1) Since my android phone would be encrypted, would I absolutely not be able to flash any new files/make nandroid backup from the recovery?
2) If 1) is true, which means, let's say I install an xposed module which causes a bootloop. Now I would have no way to disable all the active xposed modules from recovery since the files are encrypted, which means I would have to restore everything from scratch?
3) Is there absolutely no known way of decrypting android/access files unencrypted from recovery if we know the master PIN/password?
Can somebody who has dealt/dealing with an encrypted android phone please answer these questions? Thanks.
Deleted
Hi, thanks for your reply.
Just Passing By said:
1. When you access recovery on an encrypted phone, you have to decrypt your phone. After that, your recovery can do anything it normally could do. This would of course include flashing ROMs, zip files, and making nandroid backups.
.
Click to expand...
Click to collapse
2 things to say about that.
1)Decrypting just to flash files is a huge problem. TWRP/CWM should have a feature when it asks for the master PIN/password on the recovery, then after I enter it, it should decrypt the data on the fly and then mount the system and data partitions unencrypted so that I can flash files without going though all the decryption process.
2)Correct me if I'm wrong, but all android decryption processes I read online require wiping all data/doing a factory reset. That's again a huge problem. Why? In case I flash a mod/install a xposed module which causes a bootloop, I would have no way to decrypt my data, even if I have my master password. Which would mean I would lose all my files which I haven't backed up.
Problems like these could be avoided if TWRP provided permanent decryption/on the fly decryption using the master PIN. Comparing this with veracrypt on windows for e.g. , let's say my windows is encrypted with veracrypt and a hardware failure occurs at some point in the future & windows refuses to boot, but I'm able to load a live ISO. In this case, veracrypt offers a rescue ISO which I could use to decrypt the data without losing all my files after I enter the master PIN. So in this case, I can have security of encryption & also the convenience of decrypting it without losing all my files with the master password in case my main OS refuses to boot.
If I can't decrypt android from the recovery using the master PIN, that would mean in any case my android refuses to boot, I have lost all my files.
3. I'm assume you meant to say "... If we don't know the master PIN/Password?" And the answer to that is yes. If you can't decrypt your phone, you'll lose everything in it, so making periodic backups is a must. Otherwise, there'd be no point if you could just decrypt things right?
Click to expand...
Click to collapse
No, I did not say that wrong, sorry if I wasn't clear enough on my first post. I just wanted to know if there was a way to permanently decrypt android from recovery using the master PIN so that i would be able to recover my files to a USB in case my android refuses to boot.
Deleted
i have two huge problems like i mention in thread title. Whenever i restore my TWRP backup it gives error and says "Extractfork 255 error" and nothing in internet solved my issue.
My other and biggest problem is phone info says "encrypted" how to disable force encrypt?
Not even a single answer??
You can only disable force encrypt by flashing "patch no fde" file available on most rom threads.
But you will have to format data which will wipe your whole phone and flash the file before rebooting.
The reason your getting the other error is most likely twrp can't decrypt your data seeing as force encrypt is enabled.
And don't expect an answer, nobody here on xda is entitled to get questions answered. Alot of this information could have been accessed online if you just researched yourself instead of waiting over a week for a reply. It's not hard to type into a search engine
You haven't provided much information. Which TWRP version, what are you trying to restore, which steps have you tried and failed, what do you see in the TWRP logs etc. We do not have a crystal ball to guess the answers.
To decrypt the data, flash verity disabler and format data partition from TWRP. https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389
Edit: garylawwd was a bit faster in reply
garylawwd said:
You can only disable force encrypt by flashing "patch no fde" file available on most rom threads.
But you will have to format data which will wipe your whole phone and flash the file before rebooting.
The reason your getting the other error is most likely twrp can't decrypt your data seeing as force encrypt is enabled.
And don't expect an answer, nobody here on xda is entitled to get questions answered. Alot of this information could have been accessed online if you just researched yourself instead of waiting over a week for a reply. It's not hard to type into a search engine
Click to expand...
Click to collapse
Of course i did search of course i didnt sit and wait for a response but as you can clearly see i flashed no fde patch even though it say succesfull but it always getting encrypted by itself again. Thanks for reply by the way
_mysiak_ said:
You haven't provided much information. Which TWRP version, what are you trying to restore, which steps have you tried and failed, what do you see in the TWRP logs etc. We do not have a crystal ball to guess the answers.
To decrypt the data, flash verity disabler and format data partition from TWRP. https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389
Edit: garylawwd was a bit faster in reply
Click to expand...
Click to collapse
Correct me if im wrong but we have just 1 really working twrp and its 3.3.1.2 by Nikesh and im using it. I was really thinking its very simple question. i didnt get why it looks like so complicated ) i tried to restore my nandroid backup and all of sections are succesfull exept /data partition. when it comes to /data partition it gives "extracttark error 255 ". Im still confused why you didnt get my question
sasukeob said:
Of course i did search of course i didnt sit and wait for a response but as you can clearly see i flashed no fde patch even though it say succesfull but it always getting encrypted by itself again. Thanks for reply by the way
Click to expand...
Click to collapse
What you mean that you flashed patch no fde because no where have you mentioned that you had flashed anything. You won't be able to restore the backup now because your data is encrypted and this twrp can't restore encrypted data.
You need to format data and then flash patch no fde like both of us already said. Then you can make a backup that you can restore later. You can't do anything about your encrypted data now
sasukeob said:
Correct me if im wrong but we have just 1 really working twrp and its 3.3.1.2 by Nikesh and im using it. I was really thinking its very simple question. i didnt get why it looks like so complicated ) i tried to restore my nandroid backup and all of sections are succesfull exept /data partition. when it comes to /data partition it gives "extracttark error 255 ". Im still confused why you didnt get my question
Click to expand...
Click to collapse
You are right, the answer to your question is very simple and obvious, I don't get why do you find it so complicated that you must ask here in such a nice manner.
---------- Post added at 07:18 PM ---------- Previous post was at 07:10 PM ----------
garylawwd said:
What you mean that you flashed patch no fde because no where have you mentioned that you had flashed anything. You won't be able to restore the backup now because your data is encrypted and this twrp can't restore encrypted data.
You need to format data and then flash patch no fde like both of us already said. Then you can make a backup that you can restore later. You can't do anything about your encrypted data now
Click to expand...
Click to collapse
From what I read, once you enter the correct password in TWRP and it can read data correctly, backup of /data is unencrypted. After the restore, data gets encrypted by system upon the first boot. This can be verified easily with Titanium backup app, which can read and use TWRP backups. At least that's the theory, but I'm too lazy to verify it
If you perform data backup with incorrect password (or TWRP doesn't support decryption), then your backup remains encrypted and is useless as you said.
_mysiak_ said:
You are right, the answer to your question is very simple and obvious, I don't get why do you find it so complicated that you must ask here in such a nice manner.
---------- Post added at 07:18 PM ---------- Previous post was at 07:10 PM ----------
From what I read, once you enter the correct password in TWRP and it can read data correctly, backup of /data is unencrypted. After the restore, data gets encrypted by system upon the first boot. This can be verified easily with Titanium backup app, which can read and use TWRP backups. At least that's the theory, but I'm too lazy to verify it
If you perform data backup with incorrect password (or TWRP doesn't support decryption), then your backup remains encrypted and is useless as you said.
Click to expand...
Click to collapse
Ya I apologise this twrp does in fact support data decryption it must have been the older version that didn't support it.
Without twrp logs I doubt there is anything we can do.
But like you suggested it may very well be a password error..but we will never know :silly:
i dont understand what im doing wrong. I installed havocos flashed no fde patch. i tried 3 times installed rom and tried. still encrypted
_mysiak_ said:
You haven't provided much information. Which TWRP version, what are you trying to restore, which steps have you tried and failed, what do you see in the TWRP logs etc. We do not have a crystal ball to guess the answers.
To decrypt the data, flash verity disabler and format data partition from TWRP. https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389
Edit: garylawwd was a bit faster in reply
Click to expand...
Click to collapse
gary thanks for reply but i flashed it and it caused bootloop
sasukeob said:
gary thanks for reply but i flashed it and it caused bootloop
Click to expand...
Click to collapse
Tell us what actions exactly did you do, step by step, in chronological order.
_mysiak_ said:
Tell us what actions exactly did you do, step by step, in chronological order.
Click to expand...
Click to collapse
Ok. I have twrp 3.3.2.0 by nikesh installed. i format data and wipe dalvik cache and data. and i tried to restore my twrp backup. It restoring good but when it comes to restoring /data partition. it gives "Extracttrakfork Error 255" in red characters. I format data flashed nofde.zip but device encrypts itself again. So i tried to instal HavocOs and flash gapps and flash nofde patch. Havocos install succesfull but gapps flash gives error " Unmounting /vendor update process ended with error 25" :/
i flashed Orangefox recovery problem is still same :/
sasukeob said:
Ok. I have twrp 3.3.2.0 by nikesh installed. i format data and wipe dalvik cache and data. and i tried to restore my twrp backup. It restoring good but when it comes to restoring /data partition. it gives "Extracttrakfork Error 255" in red characters. I format data flashed nofde.zip but device encrypts itself again. So i tried to instal HavocOs and flash gapps and flash nofde patch. Havocos install succesfull but gapps flash gives error " Unmounting /vendor update process ended with error 25" :/
i flashed Orangefox recovery problem is still same :/
Click to expand...
Click to collapse
Oh boy, you're doing too many things at once First of all, what do you want to achieve? Restore stock data? Install custom ROM? Just fooling around?
Data restore -
Are you sure that your data backup is decrypted and functional? Try to restore data from nandroid backup in Titanium backup or simply open the twrp backup files (they are tar archives) and check if you see individual files or just garbage.
You mentioned that you tried "everything", but you haven't mentioned this workaround https://forum.xda-developers.com/oneplus-6/how-to/255-error-twrp-backup-restore-999-t3801632
Provide full twrp.log after failed restore.
Data encryption -
Have you followed steps described here? https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389
Provide full twrp.log after zip installation.
Custom ROM -
Find support in the specific ROM topic (and provide twrp.log after failed installation).
_mysiak_ said:
Oh boy, you're doing too many things at once First of all, what do you want to achieve? Restore stock data? Install custom ROM? Just fooling around?
Data restore -
Are you sure that your data backup is decrypted and functional? Try to restore data from nandroid backup in Titanium backup or simply open the twrp backup files (they are tar archives) and check if you see individual files or just garbage.
You mentioned that you tried "everything", but you haven't mentioned this workaround https://forum.xda-developers.com/oneplus-6/how-to/255-error-twrp-backup-restore-999-t3801632
Provide full twrp.log after failed restore.
Data encryption -
Have you followed steps described here? https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389
Provide full twrp.log after zip installation.
Custom ROM -
Find support in the specific ROM topic (and provide twrp.log after failed installation).
Click to expand...
Click to collapse
I dont know how i did but after 1 month of try and fail im not quite sure but it seems i succeed now @_mysiak_ I really appreciate bc you spend time for replying my thread. Thank you so much man When you need help about anything just pm me i will try to help you bc you spend your time for me
my only problem is dm-verity now i guess. i dont know how to solve it but i will try
I am a bit of a scaredy cat, and I don’t want to pollute the GSI thread with this question.
OnePlus is not offering fast boot flash images for their Nord 2. And the only way to get a custom rom is by flashing a custom vbmeta image and a system image for GSI.
The question now arises, how could one come back from a GSI into stock? I would assume I would need to do ADB push/pull and copy the whole system NAND to a file, then restore that if needed.
Would that be true? Or are there better / faster / safer ways to turn the phone to stock?
I have not yet received my unit, but i want to start tinkering with it as soon as I get my hands on it. So I want to know if there are any ways to undo any and all modifications i would do to the system.
Cheers
Can't twrp backup as system.img
ajaz35 said:
Can't twrp backup as system.img
Click to expand...
Click to collapse
I am unsure if this is being worded as a factual statement, or as a question.
I am telling that TWRP Backs up system as System.img in most Phones.
Same should apply to Nord 2.
ajaz35 said:
I am telling that TWRP Backs up system as System.img in most Phones.
Same should apply to Nord 2.
Click to expand...
Click to collapse
It should apply, but there's the issue of backups needing to be bit-perfect to ensure not to upset dm-verity
I have however found a bunch of commands that i will be testing in about 6 days, once i receive the terminal. I will be placing them for future reference, and for any poor souls who may need this:
Code:
adb backup --twrp -f /directory/to/save/dump.db
Not exactly my cup of tea, but this should combine bit-perfect system and vendor images with space-saving regular file copies of other lesser i mportant partitions, and ignoring the /data/media partition. Should be good enough.
Code:
adb root
adb shell 'dd if=/dev/block/mmcblk0 2>/dev/null' > mmcblk0.img
These two commands should, on an ideal world, with debugging enabled on the target device, and from within TWRP, create a bit-perfect copy of the entire nand and leave them on the CWD. however, the path may differ from what i've found, different chipset and all. However, that's nothing that a good old
Code:
lsblk -l
won't solve. The tricky bit will be actually pulling the file back. Since redirects can seemigly be used to copy the image file to the CWD, redirects may be able to be used to write to disk remotely. This one requires more research.
Alternatively, i will need to buy an OTG cable, get a large enough flash drive, and mount it for the purposes and DD'ing the file out and into the device. If all else fails, with 8GB of RAM it should be able to store 1/16 of the total NAND flash onto ram and slowly stitch the nand in chunks. Not shore how well would that go, too many points of failure. But keeping this for my own musings.
Another possible answer would be to boot into TWRP, running
Code:
lsblk -l
to see all the mount points, and using
Code:
adb push / adb pull
on each of them. Research indicates one can't copy the whole NAND this way, but individual partitions. Should suffice as long as the subsequent coopies are bit-perfect. Assuming one can push the generated image back, this may be the most satisfactory answer.
I will attempt to perform these tasks when i receive the phone and see if it can successfuly restore it's own backup.
ajaz35 said:
I am telling that TWRP Backs up system as System.img in most Phones.
Same should apply to Nord 2.
Click to expand...
Click to collapse
Additionally, one should note that i intend on fully backing up the NAND of the device. Just the system partition is insufficient. as there may be updates on the way that may make restoring the system partition from an OTA image impossible. Therefore, a full NAND copy is needed. altnernatively, if a low-level copy cannot be achieved, individual bit-perfect copies of individual partitions will need to suffice, and hoping no GSI or custom rom maniulates any of the protected partitions.
Do you flash the system.img from my backup?
Oneplus Nord 2 Oxygen 11.3 DN2103 EEA ROM
Flash at your own risk. I am not responsible for any damage or data loss to the device during this process! Downloads: The Fastboot restoration file can be downloaded in here: DN2103_11_A.07 DN2103_11_A.10 *deleted DN2103_11_A.11 *deleted...
forum.xda-developers.com
sakarya1980 said:
Do you flash the system.img from my backup?
Oneplus Nord 2 Oxygen 11.3 DN2103 EEA ROM
Flash at your own risk. I am not responsible for any damage or data loss to the device during this process! Downloads: The Fastboot restoration file can be downloaded in here: DN2103_11_A.07 DN2103_11_A.10 *deleted DN2103_11_A.11 *deleted...
forum.xda-developers.com
Click to expand...
Click to collapse
As I stated previously. I have yet to receive my terminal. So I haven’t flashed anything yet.
however, disabling dm-verity, installing your system image, see it it fails, and if it fails, backing up, will be a great way to test if my backups are effective.
I want to toy around with your image and PHH’s once I get the terminal. So I’m just trying to preemptively have backups in place for when I inevitably flash something without paying attention and bricking the device.
that reminds me, were you the one who needed a full system dump a few weeks ago on another thread? I can upload my image once I get it working
Edit: just checked it was phhusson who needed the dump. Sorry about the mix up
ZanaGB said:
As I stated previously. I have yet to receive my terminal. So I haven’t flashed anything yet.
however, disabling dm-verity, installing your system image, see it it fails, and if it fails, backing up, will be a great way to test if my backups are effective.
I want to toy around with your image and PHH’s once I get the terminal. So I’m just trying to preemptively have backups in place for when I inevitably flash something without paying attention and bricking the device.
that reminds me, were you the one who needed a full system dump a few weeks ago on another thread? I can upload my image once I get it working
Edit: just checked it was phhusson who needed the dump. Sorry about the mix up
Click to expand...
Click to collapse
I tested rhe gsi Versions, but not good i flash my system.img, dtbo, persist and vbmeta and go back to stock
Just got notified that the phone arrived. So this evening i will get it up and running then worry about backing up later.
Hi. How return the device to stock and lock bootloader? Is there manual?
shnailcheg said:
Hi. How return the device to stock and lock bootloader? Is there manual?
Click to expand...
Click to collapse
Assuming you didn't install any custom ROM, all you have to do is boot onto fastboot and type fastboot OEM lock or fastboot flashing lock. Forgot which exactly.
I have root installed
shnailcheg said:
I have root installed
Click to expand...
Click to collapse
restore your full NAND backup and godspeed
have you tried this method on nord 2?
shnailcheg said:
have you tried this method on nord 2?
Click to expand...
Click to collapse
I made a nand copy but never backed it up.I ended up not needing root for anything and I won't install any ROMs until there's any good ways to have a failsafe for backups. So to all effects I have a backup I haven't tested. I am not gonna risk losing my IMEI or having a zombified phone due to missing blocks on the backup.
To be specific. I have ways to get data OUT of the phone. But I don't have a reliable way to get the data IN and ensure nothing critical is missing or overwritten in the process. And I am too afraid to lose my phone just testing if backups ACTUALLY work.
K
ZanaGB said:
I am a bit of a scaredy cat, and I don’t want to pollute the GSI thread with this question.
OnePlus is not offering fast boot flash images for their Nord 2. And the only way to get a custom rom is by flashing a custom vbmeta image and a system image for GSI.
The question now arises, how could one come back from a GSI into stock? I would assume I would need to do ADB push/pull and copy the whole system NAND to a file, then restore that if needed.
Would that be true? Or are there better / faster / safer ways to turn the phone to stock?
I have not yet received my unit, but i want to start tinkering with it as soon as I get my hands on it. So I want to know if there are any ways to undo any and all modifications i would do to the system.
Cheers
Click to expand...
Click to collapse
Keep nandroid backup evry time you want to go back just restore that nandroid backup using twrp if you gets data restoration error just deselect data emmc win file in backup and restore.
Remember on android 12 gsi twrp data encryption issue so u can't able to access internal storage to restore the backup so first go back to android 11 gsi, now transfer that backup to twrp folder and then boot back to twrp and restore
I personally done this when I stuck on android 12gsi
pankspoo said:
K
Keep nandroid backup evry time you want to go back just restore that nandroid backup using twrp if you gets data restoration error just deselect data emmc win file in backup and restore.
Remember on android 12 gsi twrp data encryption issue so u can't able to access internal storage to restore the backup so first go back to android 11 gsi, now transfer that backup to twrp folder and then boot back to twrp and restore
I personally done this when I stuck on android 12gsi
Click to expand...
Click to collapse
One thing i have been reading from the TWRP Nandroid backups, is that people who install the GSI and then restore, lose their IMEI data and other baked-in addresses.
Is that the case? I would imagine that since TWRP backups aren't bit-for-bit it could cause problems. Have you tested for that?
EDIT: additionally, i guess i absolutely need an OTG adatper to properly restore the backup, since the mere ac of restoring the backup would destroy the backup in the process, wouldn't it?
ZanaGB said:
One thing i have been reading from the TWRP Nandroid backups, is that people who install the GSI and then restore, lose their IMEI data and other baked-in addresses.
Is that the case? I would imagine that since TWRP backups aren't bit-for-bit it could cause problems. Have you tested for that?
EDIT: additionally, i guess i absolutely need an OTG adatper to properly restore the backup, since the mere ac of restoring the backup would destroy the backup in the process, wouldn't it?
Click to expand...
Click to collapse
No if u r on android 12 gsi u need OTG there twrp will not work.
No issue in Restoration on android 11gsi
pankspoo said:
No if u r on android 12 gsi u need OTG there twrp will not work.
No issue in Restoration on android 11gsi
Click to expand...
Click to collapse
So. The way i understand it.
1: Full backup from the stock ROM ( Android 11 Based ) using TWRP
2: Install a GSI, for example, Android 12 GSI
3: In need of going back, first install the Android 11 GSI
4: Once with the 11 GSI installed, recover the TWRP Backup
Would that be correct?