Encryption issues with custom rom - OnePlus 3 Questions & Answers

Hi guys,
just today I've installed latest Dirty Unicorns v11.3, so I decided to enable encryption for more secure (like in OOS by default)... but the process ended with a bootloop.
At this point, I've geniusly done a full wipe, to keep encryption and reflash system... the system now is working even with encryption.
But I've noticed that only 24 GB are usable, because 30 GB are allocated by Android system.
According to TWRP, I'm having a 24 GB /data partition.
This is a "false trouble" until first boot (because storage will be properly seen as 53 GB), but now it's happening even after booting the system!
Can you help me?
Thanks in advance

The solution is much simple: the default encryption won't be touched until typing fastboot format userdata in Bootloader Mode.
When switching between different roms, I simply have to do all the needed wipe: encryption remains in any case without any trouble, and the storage is fully usable and recognized.
The thread is now closed.

Related

[FIX] [TWRP] [RECOVERY] /system partition not mounting in recovery

I had come across this bug in TWRP recovery where the /system partition was unable to mount.
And i wasn't able to flash any new ROM or even backup current ROM.
Hopefully I had another ROM backed up before and I simply formatted the system and VIOLA! the problem was gone.
I posted this for anyone who might get such a problem in the future and doesn't end up cursing themselves.
Its a common bug and very easy to fix. So, Happy Flashing!
This basically work for any partition not mounting error.
Hit thanks if it helped
Help me fix my twrp
Pls, I have been on this platform for some time now. I have a challenge presently with my phone Tecno LB8A. I have been trying to upgrade it to version 10. I have unlocked the bootloader, rooted it and also flash twrp into it. I downloaded Lineage 17 and havoc but I bricked my phone severally. In twrp, I discovered there is no system partition there. Pls I need your guide on how to make the system appear. What I have on the partitions there are: dalvic cache, cache, data,sdcard, otp and internal storage. The second question bis how do I flash Lineage into it without bricking the phone

Device takes 30GB with nothing installed after decryption

How do I fix this i decrypted it and now this what do I have to do?
Solution
[/IHi! So are you saying it is mandatory to "unencrypt" (hence format int. storage) in order to be able to install this ROM?
not to flash ROM. You can flash it while encrypted. But it will ask you for a password on first boot. And after that you are ****** because you will lose access to the internal storage, rendering the recovery useless at this moment... however you will still have access to the phone via bootloader. After that, the only way to decrypt will be via fastboot command "fastboot format userdata" (in which you lose all your data).
From my understanding, because of this command you may experience issues with your partition. At least I had a problem: my internal storage was "cut" in half on windows when I connected phone and checked and after booting first time finally thinking everything was solved disk info also reported that I had some 30gb used, with about high 20's gbs free. I was like wtf.
However, luckily, after formatting internal storage via fastboot command you gain access back to your storage, as the encryption (which was blocking you) is gone. This way you can format (yes, again) your storage through recovery (format, not wipe). It corrects the partition and your phone is read as having 64gb of storage again.
Bottomline, as I understand, had I been decrypted from the start ( which means, before flashing the DU ROM) I wouldn't have had any problems at all with booting ROM first time after installing it and gapps, because it wouldn't ask me for a password. So I wouldn't have to fastboot command to format storage, and wouldn't have problems with partition requiring a new format (this time through recovery).
tip: don't forget to check my comments in the previous page. And I advise you to unencrypt before flashing this ROM. There are tutorials on youtube and xda developers forum certainly. Maybe even here. Good luck every one. And I sincerely only recommend rooting your phone and flashing custom roms if you get the basics of a few commands at least on fastboot and know how to backup your stuff before in case something goes very wrong and your recovery goes to ****
edit: you can decrypt and not lose your data if you backup, move backup to pc, and then, after decrypting, move everything back to your phone.
*

[SOLVED] Help! "encryption unsuccessful" message!

I was running oos based nougat custom rom with blu spark recovery. Then flashed official ob1, didnt like it, wiped cache/data/system and reinstalled my old oos nougat rom (audax 4.7.6). Now i get the above mentioned message..
Things i tried:
- addionally wipe internal storage and media (installed rom via adb sideload then)
- reformat system/cache/date with ext4
I googled the error and for most people (threads werent particularly concerning the op5t however) it seems that just wiping data and reinstalling the rom did the trick. Not for me though..
What can i do now?
Solution: reformating the data partition with ext4 is not enough. I had to format to FAT and right after that again to ext4, reboot to system and boom, it worked!
PS: i wonder what data is on the internal storage partition that i deleted? I didnt have any data on the phone, i just wonder.. It isnt somehow crucial to the phone?!
I think the decryption key is somehow embedded into the internal storage as wiping /data does not delete the PIN/pattern. Might be a hidden partition or something similar that is not wiped when wiping /data as long as it is ext4.
Your data is gone. It failed to completely encrypt and now there's nothing that can be done. Format /data as ext4 and let it try encrypting again
I have the same problem exactly. Can you explain in steps you have installed then format or how?
I have the same problem exactly. Can you explain in steps you have installed then format or how?
Click to expand...
Click to collapse
I had the exact same problem. But it is an easy fix but does require wiping your internal storage.
So the save way of doing this would be:
1. Backup all your data by going to TWRP or your ROM if that still works. Plug in an USB cable and use MTP or the adb pull command to backup your data
2. Reflash OB1 with no root (like Magisk of SuperSU) if you have TWRP. This will cause you to have the stock recovery again. I also recommend to do a clean flash (Wiping system and data before flashing the rom).
3. Download the rollback build from Oneplus [HERE] and copy this to the internal storage.
4. Boot into the stock recovery flash the rollback build. THIS STEP WILL WIPE YOUR INTERNAL STORAGE.
5. Now you have OxygenOS 4.7.5. Download OxygenOS 4.7.6 Incremental Update [HERE]
6. Go back to the Stock recovery and flash the incremental 4.7.6 zip.
7. You have the latest version now. So boot to fastboot reflash TWRP and flash SuperSU or Magisk in TWRP to regain root
Guys I did a fail, i had OB3 installed, and I wanted to try RR so I wiped system and when I tried to install I have seen error 7 saying its for dumpling not for oenplus5t.
So I restored.... But instead restoring OB3 I have restored stock Nougat rom -.- I have even stock recovery now, what is the best way to fix it?
Can i change to FAT and stay and dont go back to ex4 again?
Hi i don't know if u r reading this but if you are please help me cause I'm so lost and confused over this since yesterday...
so 2 days ago my phone started lagging and hanging and freezing until i realized i have got this issue with data encryption
i have a rooted sony z2 with TWRP Custom recovery
first i didn't know it was with data encryption failure so i literally factory reset and installed all my apps and data again and again!!! after every time my phone started to lag !!
after one whole day of trying everything i finally realized its actually with the data encryption and i should change my ex4 to something else... so here again i wiped the phone and changed to ex3 and installed and all my data and apps all over again
but after a couple hours...same problem again.....
im literally so tired of not knowing what to do ! my head hurts so much due this ugh....
i havent changed to FAT from ex3 so im wondering if it will finally solve my problem permanently if i change to FAT ??
And if it did can i just keep it on FAT forever ?
Please guide me thanks ...!
Lasersdude said:
I was running oos based nougat custom rom with blu spark recovery. Then flashed official ob1, didnt like it, wiped cache/data/system and reinstalled my old oos nougat rom (audax 4.7.6). Now i get the above mentioned message..
Things i tried:
- addionally wipe internal storage and media (installed rom via adb sideload then)
- reformat system/cache/date with ext4
I googled the error and for most people (threads werent particularly concerning the op5t however) it seems that just wiping data and reinstalling the rom did the trick. Not for me though..
What can i do now?
Solution: reformating the data partition with ext4 is not enough. I had to format to FAT and right after that again to ext4, reboot to system and boom, it worked!
PS: i wonder what data is on the internal storage partition that i deleted? I didnt have any data on the phone, i just wonder.. It isnt somehow crucial to the phone?!
Click to expand...
Click to collapse
Finally. Thank you so much!

[Wipe system/switch rom?] I can't wipe system (or edit build prop in OS) There is no twrp that is capable of that... Fell free to correct me.

Why i cant wipe system (or edit build prop in OS) on this device? There is not twrp that is capable wipe system... (system partition not even showing in wipe menu)
Why is that? I would like to be able to wipe system partition cause otherwise im be able to switch roms without wiping internal memory... (Without formating data) at least i think... feel free to correct me
In new phones, system is part of dynamic partition called super. Without proper twrp, you can't see super's content. And even if you could, wiping system would probably brick the device because of new partitioning systems, which are not yet implemented in twrp (twrp barely got android 10 support, and we're few months away from 12. As far as deleting system partition, that's not how it's done anymore since android 8 (or 9)... Every rom out there overwrites whole system partition, so there's no need to mess with it. About internal storage, there's more to it than your data there, and dirty flashing is indeed possible, but without proper encryption/decryption support from twrp, you'll just lose access to your data when switching roms, because data encryption is done on the first boot. New rom doesn't care about old encrypted data in internal storage, and just re-encrypts it, leaving you with unusable data. So it's all about making proper twrp (or any other recovery for that matter), but until that's done, you're stuck with this. And don't get me wrong, it's the same for almost every phone out there in the past year or two...

Lost internal storage after dirty flash of ROM update

I think I have just screwed up big time.
Here is what happened:
Had CrDroid 8 installed (Android 12) with encrypted storage
Wanted to upgrade to next version; following the guide, simply did a wipe (without any advanced options) in TWRP and then installed the zip
Realized after rebooting that the phone has been completely reset and internal storage shows as empty
I know that this is related to a problem with decryption by TWRP with A12.
My question is, is there any chance that I would be able to recover my lost files? I mean where did they go? What could have happened? Did TWRP just not understand the encrypted data so it threw it away and recreated it, overwriting these files?
Is there any chance that the previous data partition (my internal storage, all my photos, etc) are still somewhere to be found within the storage and I could locate this partition and decrypt it using my passphrase? I am desperate at this point. I am stupid and did not make backups. I thought this would be a regular upgrade, wipe, install ZIP, like I've done dozens of times... Couldn't I perhaps scan the raw disk devices for some magic string or anything that would mark the start of the encrypted partition?
Sorry about the frantic writing, I am devastated and literally begging for any kind of help with this. Thank you.
Sorry for the noise, I was desperate I gave up since then, I just don't think this is possible. As far as I understand the encrpytion keys have been flushed (which are kept in the TEE anyway?). I still don't fully understand why TWRP just decides to wipe /data/media as well as /data in this case, but what is done is done. Back up your data guys. Same old story.

Categories

Resources