Help Decrypt an encrypted dd Image of userdata ( On Resurrection Remix GSI ) - Nokia 7 Plus Questions & Answers

This is my first ever post on XDA forum. So please excuse me if it's not the right place. I have a Nokia 7 plus (TA-1055). TWRP (Nokia7plusv3.2.1.0-noflash-decrypt.img) doesnot backup my data partition and hence I choose to do a raw dd backup of mmcblk0p81(system) & mmcblk0p85 (userdata) .
I tested dding back these two partitions and it seems to have worked well before some time (at least once).
I'm on Resurruction Remix GSI (may 2019 Pie version) and had flashed Magisk with "Preserve encryption" unticked, before taking the backup.
It does not seem to work anymore and I always end booting into recovery with error "enablefilecrypto_failed". Am I missing something? Is there any better way to backup and restore Data partition in Nokia 7 Plus and is there any chance of recovering the encrypted data. Thanks in advance.

Related

Why custom ROMs not friendly with encryption?

Hi to all!
It seems custom ROMs are not supports encryption of user data... Why?
After stock MIUI on Xiaomi Redmi 4X I try sevral custom ROMS, and from all of it I cannot encrypt user data partition.
Custom ROMs are (all latest official): Resurrection Remix, AOSP Extended and LineageOS 14.
My steps:
0) flash phone with stock recovery via MiFlash (to restore "innocent state");
1) install latest TWRP (v3.1.1);
2) wipe all partotions except SD card and insstall custom ROM from SD card;
3) new system initial setup without "ask password on boot";
4) go to Settings -> Security -> Encrypt User Data;
Phone performs reboot and data still not encrypted.
All three custom ROMs behave the same at this point.
If perform initial setup with "boot password prompt", user data is whown as encrypted in Security settings, but TWRP still not asks password on booting to recovery mode. And I can unpack backup archive produced by TWRP (it seems not encrypted).
So, my question: if I not produce mistake, it seems custom ROMs are not friendly with data encryption, why? And is it possible to fix it?
p.s.
Also I try to erase data with "fastboot format userdata" and configure phone again. It not helps to solve problem.
Hi. Perhaps anybody can bring some light into this encryption issues?
My situation is a little different:
I installed LineageOS 14.1 from TingyiChen. But did not format /data. So it is still encrypted. I did not try to restore an backup from data within twrp yet. But I have read that there can occure problems?
The official version of twrp (3.2.1.0) is not able to decrypt /data. But there is an inofficial version (3.1.1) that works with encrypted data? Please tell me what's the difference? Is it only the switch "TARGET_HW_DISK_ENCRYPTION "? Why did TingChen remove encryption feature two weeks ago in his github repo (Sorry, I'm not allowed to post links yet)?
Fingerprint unlock is not working after reboot anymore. I have read that this also is because of encrypted data. partition. Please tell me what's the problem here or point me to a thread which covers this topic. I was unable to find one yet.
If I do a backup of my data partition in twrp and format it to disable encryption. Can I then restore this backup or what do I need to do for disabling encryption without loosing my data?
Thank you for your answers.
Regards,
Oliver
olistudent said:
Hi. Perhaps anybody can bring some light into this encryption issues?
My situation is a little different:
I installed LineageOS 14.1 from TingyiChen. But did not format /data. So it is still encrypted. I did not try to restore an backup from data within twrp yet. But I have read that there can occure problems?
The official version of twrp (3.2.1.0) is not able to decrypt /data. But there is an inofficial version (3.1.1) that works with encrypted data? Please tell me what's the difference? Is it only the switch "TARGET_HW_DISK_ENCRYPTION "? Why did TingChen remove encryption feature two weeks ago in his github repo (Sorry, I'm not allowed to post links yet)?
Fingerprint unlock is not working after reboot anymore. I have read that this also is because of encrypted data. partition. Please tell me what's the problem here or point me to a thread which covers this topic. I was unable to find one yet.
If I do a backup of my data partition in twrp and format it to disable encryption. Can I then restore this backup or what do I need to do for disabling encryption without loosing my data?
Thank you for your answers.
Regards,
Oliver
Click to expand...
Click to collapse
Wipe Internal Data & perform Clean flash, you will have to dothis everytine you flash ROM. Some says Custom TWRP (redwolf port) Have solved the issue, but Better wipe Internal everytime you flash a ROM
---------- Post added at 08:10 PM ---------- Previous post was at 08:06 PM ----------
it's very easy for anyone with just a little bit of knowledge to get around any kind of security that TWRP might have. All they have to do is flash one of the other recoveries that's available that doesn't have password protection to get around it. You can Still flash a Custom Recovery by PC without prompting a pass again. And you're Internal is already Encrypted. Stay at MIUI with Unlocked bootloader if you're too much concerned with the security.... But an expert will use test points to Unlock that too...

[HELP] [URGENT] ONLY OxygenOS not Booting up !!!!

Hi guys
I am having a weird issue , I am able to flash ANY custom ROM ( mark my words "any") be it skydragon os, havoc os, lineage os but I am unable to flash OxygenOS (tried 5.0.7 and 5.0.8) . When I start the first boot after flashing the OOS zip file, it always get stuck on boot animation and the animation goes on forever. Please Help !!!!!
Note:
- Have tried with different versions of TWRP but no success
- Always Did a clean install
- When after being stuck at boot animation for 40 mins , i FORCE restarted my phone to recovery and found that all system files and folders have been made as normally so i think there was no error in flashing process but still ROM not booting up.
Also:
- If someone has successfully booted the latest OOS from scratch ( I mean clean install) so please can you provide your ( links !)
1. TWRP file
2. OOS zip file
PreciousPulkit said:
Hi guys
I am having a weird issue , I am able to flash ANY custom ROM ( mark my words "any") be it skydragon os, havoc os, lineage os but I am unable to flash OxygenOS (tried 5.0.7 and 5.0.8) . When I start the first boot after flashing the OOS zip file, it always get stuck on boot animation and the animation goes on forever. Please Help !!!!!
Note:
- Have tried with different versions of TWRP but no success
- Always Did a clean install
- When after being stuck at boot animation for 40 mins , i FORCE restarted my phone to recovery and found that all system files and folders have been made as normally so i think there was no error in flashing process but still ROM not booting up.
Also:
- If someone has successfully booted the latest OOS from scratch ( I mean clean install) so please can you provide your ( links !)
1. TWRP file
2. OOS zip file
Click to expand...
Click to collapse
If you're coming from a decrypted data partition and then flash stock OOS and nothing else, it will re-encrypt your data. This could take a long time.
I recently did some testing of TWRP for fixing formatting and decryption (see https://forum.xda-developers.com/on...al-twrp-touch-recovery-t3742894/post78339714) and I did a totally clean install of OOS including formatting the data partition.
I used a TWRP version from this post https://forum.xda-developers.com/on...al-twrp-touch-recovery-t3742894/post78332159. The one I used is the very last one which is described as:
-----update2
This one fixes ext4 encryption on Pie: https://androidfilehost.com/?fid=11410963190603866112
PS: you can get the OOS 5.0.8 zip from https://www.oneplus.com/au/support/softwareupgrade
Sent from my OnePlus3T using XDA Labs
BillGoss said:
If you're coming from a decrypted data partition and then flash stock OOS and nothing else, it will re-encrypt your data. This could take a long time.
I recently did some testing of TWRP for fixing formatting and decryption (see https://forum.xda-developers.com/on...al-twrp-touch-recovery-t3742894/post78339714) and I did a totally clean install of OOS including formatting the data partition.
I used a TWRP version from this post https://forum.xda-developers.com/on...al-twrp-touch-recovery-t3742894/post78332159. The one I used is the very last one which is described as:
-----update2
This one fixes ext4 encryption on Pie: https://androidfilehost.com/?fid=11410963190603866112
PS: you can get the OOS 5.0.8 zip from https://www.oneplus.com/au/support/softwareupgrade
Sent from my OnePlus3T using XDA Labs
Click to expand...
Click to collapse
Exactly How Much Time can the re-encryption process could take?? Cause I gave it good 1 hour
Also to make sure i am getting it right , you mean to say that i should use the TWRP file you mentioned below your statement
"-------update 2" or is it some (img file) that i need to flash through TWRP
BillGoss said:
If you're coming from a decrypted data partition and then flash stock OOS and nothing else, it will re-encrypt your data. This could take a long time.
I recently did some testing of TWRP for fixing formatting and decryption (see https://forum.xda-developers.com/on...al-twrp-touch-recovery-t3742894/post78339714) and I did a totally clean install of OOS including formatting the data partition.
I used a TWRP version from this post https://forum.xda-developers.com/on...al-twrp-touch-recovery-t3742894/post78332159. The one I used is the very last one which is described as:
-----update2
This one fixes ext4 encryption on Pie: https://androidfilehost.com/?fid=11410963190603866112
PS: you can get the OOS 5.0.8 zip from https://www.oneplus.com/au/support/softwareupgrade
Sent from my OnePlus3T using XDA Labs
Click to expand...
Click to collapse
To Avoid Any Further Confusion , Could You Give me step by step instructions for what to do , please?
Please also give me details to which TWRP to use and all the configurations ( like ext4 or f2fs on system or data , whether to use format button, or advanced wipe) all that! Thanks in advance
Issue solved !!
How I solved ?
1. Using TWRP 3.2.2-0 I first Formatted data.
2.Then used advanced wipe to clean everything.
3.Then using change file system option in WIPE category changed my "data" partition from whatever to f2fs.
4.Then changed back to ext4.
5.Then changed back to f2fs.
6.Using PC transferred OOS zip file (5.0.8) to internal storage.
7.Flashed The file
8.Bingo !!! Phone booted up without a problem
Thanks @BillGoss , your provided links helped alot, though i used nothing from it but they helped me to recognize what the problem was, it was i think an encyption as well as changed file system format issue due to my previous flashing of pie roms.:good:
PreciousPulkit said:
How I solved ?
1. Using TWRP 3.2.2-0 I first Formatted data.
2.Then used advanced wipe to clean everything.
3.Then using change file system option in WIPE category changed my "data" partition from whatever to f2fs.
4.Then changed back to ext4.
5.Then changed back to f2fs.
6.Using PC transferred OOS zip file (5.0.8) to internal storage.
7.Flashed The file
8.Bingo !!! Phone booted up without a problem
Thanks @BillGoss , your provided links helped alot, though i used nothing from it but they helped me to recognize what the problem was, it was i think an encyption as well as changed file system format issue due to my previous flashing of pie roms.:good:
Click to expand...
Click to collapse
Well done. And because you worked this out yourself, you've learnt a lot.
Sent from my OnePlus3T using XDA Labs

TWRP: persistent decryption of /data

Hello and thanx for your attention. Can't fix my problem. Or I read the wrong threads. Anyway, i would appreciate your help.
Installed twrp r20, rebooted in recovery, flashed magisk 19.1 or su 2.82. First everything's fine, twrp's backup shows some Mb in /data (caused by magisk or su). So decryption is working at that point. Then, after booting into system and doing some settings, root is still there (rootchecker), but back to twrp there will be /data again with 0MB.
As i understand booting re-encrypts /data from f2fs to emmc. Anyone a hint? Main purpose of twrp for me is taking backups (before trying custom roms)
Running stock oreo 8.1.0 Europe with 01.02.19 sec patches
Thanx in advance
Found solution. Maybe it's for interest of TWRP newbies like me...
TWRP decrypts just in time, if you use the PIN of your android's LOCK SCREEN (settings-safety) at start. You will see full /data and can run a nandroid backup. Rebooting to system then will encrypt /data again.
A had issues using a password for lock screen, so better use PIN.

Oneplus 3T Restore Issue after Pie Update - HELP

So, quick explanation. Pie update showed up on my OP3T and I have an unlocked bootloader, TWRP 3.3.0-1 and Magisk 18.1 on OOS 5.0.8 (Oreo). Additionally I had a second user account and a Work Profile on my main account.
After reading on the decryption issues (and against my better judgement), I decided that maybe it could work through System Updates since it detected root and was going to install the full package. Big mistake. Got a "Decryption unsuccessful" and sadness.
I had of course taken a full TWRP backup to be safe.
I'm going to put the detailed explanation below (hidden) because it's quite long.
Now in more details. Along with the TWRP back up, I had an oandbackup -backup- of all apps (main and secondary account, but not work) and manually copied all internal storage files on my PC. After the "Decryption unsuccessful" message, I pressed the "Reset Phone" button (probably a stupid decision) thinking I'm good since I have a backup. Phone rebooted, with TWRP replaced (as expected), and I'm in the new OS. Played around a bit in Pie [added my account, registered a fingerprint and PIN, connected to WiFi and checked a few apps] and then I thought, "ok, time to go back", and then it happened.
I rebooted the device and it asked for password to boot (which was the PIN I added in the OS), and then rebooted again in Fastboot to flash TWRP again in order to restore the backup.
TWRP flashed successfully and I copied over my backup. Restored System, Data and Boot, wiped Dalvik & Cache, rebooted, shows the Oneplus logo, gets stuck for a bit and then goes to Fastboot. Ok...probably messed up somewhere, let's try again. Same thing.
I guess the notion that I had the TWRP backup made me feel safe, because I continued to experiment.
After a full 24hours awake trying to restore my phone to its previous state, I have the following:
Restoring System, Data and Boot results in the device booting and showing the Oneplus logo and then after a few seconds, going to Fastboot.
Restoring EFS, Recovery and/or Cache makes no apparent difference.
Restoring Data and Boot, but System Image instead of System makes the device boot and start a lengthy process (possibly of encrypting the entire Data partition) lasting about 2hours, during which the device becomes hot enough (~45C / ~113F) that holding it for more than a couple of seconds is very uncomfortable. After it finishes the lockscreen has my wallpaper, app notifications (like VPN) show up and the second account is there, however my old PINs for either accounts don't work and the Data partition can no longer be accessed in TWRP
Code:
Data successfully decrypted, new block device: '/dev/block/dm-0'
Updating partition details...
...done
[COLOR="red"]Unable to mount storage[/COLOR]
Successfully decrypted with default password.
Updating partition details...
...done
[COLOR="red"]Unable to mount storage
Failed to mount '/data' (No such file or directory)[/COLOR]
Full SELinux support is present.
[COLOR="Red"]Unable to mount /data/media/TWRP/.twrps[/COLOR]
MTP Enabled
When Data is inaccessible in TWRP, only formatting it can bring it back (empty, of course). And then it needs to be formated to F2FS again as well (Oneplus uses F2FS for the Data partition).
Flashing the Oxygen OS 5.0.8 zip file after restoring System works the same as restoring with System Image.
The closest I've come to restoring my device to how it was before is either:
Restoring System, Data and Boot , in which case booting ends up in Fastboot.
OR
Restoring Data and Boot, and System Image, and then not being able to login (plus, no access to Data from TWRP).
I have literally no idea what else to do. If anyone has any idea or suggestion, it would be greatly appreciated.
I'd rather wait for some suggestions before trying to flash other zip files that deal with encryption, since I never had to do that when I first rooted with Magisk.
------------------------------------------------------------------------------
How the device is supposed to be:
Bootloader unlocked
TWRP Recovery 3.3.0-1
OxygenOS 5.0.8 (Oreo)
Magisk 18.1
Main user account
Secondary user account
Work Profile (with Shelter) on Main user account
What I have available:
Full TWRP backup of all partitions [Data, System, Cache. System Image, EFS, Recovery, Boot]
oandbackup backups of Main & Secondary user accounts (apps and APKs)
Manual file backup of Main user account's Internal Storage
All OxygenOS Oreo zip files that Oneplus was releasing over time
TWRP images (3.2.1-0 and up)
Stock OxygenOS recovery (they used to have it available)
Magisk Installer/Uninstaller/Manager APK
Time on my hands
Sleep deprivation points
Enough will to live

TWRP FOR P9 EMUI8 Supports Encryption and Decryption

Is there any TWRP for P9 EMUI8 which supports Encryption and Decryption ?
md sabuj said:
Is there any TWRP for P9 EMUI8 which supports Encryption and Decryption ?
Click to expand...
Click to collapse
There is no TWRP properly supporting Chinese Oreo encryption on P9 in a way that:
- you don't need to format Data and make changes to Vendor partition
- you just need to enter your Android unlock pin/pass whenever you boot to TWRP
- with that that TWRP can properly read/write to Data and Internal memory
However, there is a Chinese TWRP (language can be switched to English) that you can for one time remove encryption from Data (it is not enough to format Data but it must be also edited an fstab file on Vendor partition)
After that encryption is removed and you can fully use TWRP for e.g. Nandroid backups, installations from Internal memory, installations to Data partition, editing on Data partition (in case of e.g. bootloops with Magic modules), etc.
Also, once encryption was removed you can switch back to your preferred TWRP from that Chinese TWRP (that TWRP has some other issues)
It was long ago couple of us experimented with, you can start from the following post and follow the links (but always compare the dates, newer posts from the same pearson mean they were written with more experience and understanding of the matter):
https://forum.xda-developers.com/showpost.php?p=80029346&postcount=1843
Good thing is that (once you don't want it anymore), stock Oreo can be fully reinstalled and encryption reinstated. E.g., eventually I did it on two my P9s (almost a year ago), but I was no more updating the posts about
Of course, once Data is decrypted, it can be also used for TWRP when working with GSI/AOSP ROMs (not only with stock Oreo)

Categories

Resources