Bootloop after encrypting phone - OnePlus 3 Questions & Answers

I encrypted my phone under security settings menu. It finished encryption process just fine, rebooted, asked for my pattern and then just got stuck on boot animation. I let it sit on boot animation for at least 45 minutes yet no success.
Here is the TWRP recovery log. https://pastebin.com/3BLnGdVw
I noticed some I/O errors show up regarding some apps but it's hard to see why they would be causing errors.
I'm using the latest RR ROM by Eliminater with TWRP 3.1.0-x by blu_spark v26. Also OB16 rom+fw.
Cache and data partitions use F2FS, system is EXT4.
Edit: Kind of fixed it by reflashing everything and flashing SuperSU instead of Magisk that was included with RR by Eliminater. Had no luck installing Magisk in any way. Still feels like something is wrong so further testing is needed, I'll edit when I find something out.

karliyo said:
I encrypted my phone under security settings menu. It finished encryption process just fine, rebooted, asked for my pattern and then just got stuck on boot animation. I let it sit on boot animation for at least 45 minutes yet no success.
Here is the TWRP recovery log. https://pastebin.com/3BLnGdVw
I noticed some I/O errors show up regarding some apps but it's hard to see why they would be causing errors.
I'm using the latest RR ROM by Eliminater with TWRP 3.1.0-x by blu_spark v26. Also OB16 rom+fw.
Cache and data partitions use F2FS, system is EXT4.
Edit: Kind of fixed it by reflashing everything and flashing SuperSU instead of Magisk that was included with RR by Eliminater. Had no luck installing Magisk in any way. Still feels like something is wrong so further testing is needed, I'll edit when I find something out.
Click to expand...
Click to collapse
Yep dont do that stuff, done it once and my phone magically didn't boot..

karliyo said:
I encrypted my phone under security settings menu. It finished encryption process just fine, rebooted, asked for my pattern and then just got stuck on boot animation. I let it sit on boot animation for at least 45 minutes yet no success.
Here is the TWRP recovery log. https://pastebin.com/3BLnGdVw
I noticed some I/O errors show up regarding some apps but it's hard to see why they would be causing errors.
I'm using the latest RR ROM by Eliminater with TWRP 3.1.0-x by blu_spark v26. Also OB16 rom+fw.
Cache and data partitions use F2FS, system is EXT4.
Edit: Kind of fixed it by reflashing everything and flashing SuperSU instead of Magisk that was included with RR by Eliminater. Had no luck installing Magisk in any way. Still feels like something is wrong so further testing is needed, I'll edit when I find something out.
Click to expand...
Click to collapse
The real trouble is the mine: I've done encryption with a custom rom (Dirty Unicorns v11.3) and I achieved your same result: bootloop.
You've to keep OxygenOS encryption, is much simple:
1) Reflash the firmware with a factory reset without Magisk (because it prevents forced encryption);
2) After first startup, reboot in bootloader and flash again TWRP;
3) Go in TWRP for a full wipe, then flash your desider rom.
4) Et voilĂ , encryption still remains (because it's upper to /data, /system and /cache);
5) Now you can install Magisk, because encryption is already enabled.
I would add that 3rd-party encryption get you in troubles when you switch back to OOS (99% sure that recovery can't decrypt).
Stay with stock encryption, or remove it via fastboot format userdata.

Related

May have figured out solution to encryption fails.

Edit: Check this whole first post, because I have made some additional entries concerning failures and potential cures to things. I will update when my current encryption test is complete.
For the short version see the tldr at the bottom.
I have been trying different combinations of things all day in my last ditch attempt to get encryption working without needing to flash my original firmware back on from odin, since I hate the thought of how long it takes and what could go wrong.
The secret that I have worked out today is I install TWRP, wipe everything out, factory reset, wipe etc. Then install the rom, in my case it was my TWRP backup of my original firmware installed and then later CM11 M12, then immediately after flashing, reboot to download mode and flash the stock recovery image (I had to get a guide and use my linux VPS to turn the extracted recovery.img into a .tar.md5 and use that for flashing my original recovery. Then boot to recovery (now the genuine original recovery) and perform a factory reset. Then boot the phone up and the encryption works. Right now CM11 is at 38% encryption! Just before I started this off, I also had 100% success with encryption using my TWRP backup of a stock firmware install, using this same method. Once it is encrypted I will flash TWRP back on here as I did before and it should be good.
My theory (I am too burned out to test it at this point, I just want my phone working...) is that the issue is not whether you have TWRP installed, but whether the final factory reset (before booting up phone for usage) is performed by an official recovery or a third party recovery. So I bet it would work if you perform the factory reset and then immediately flash TWRP back on there and then boot up and perform the encryption.
Plus, in theory since I am using CM11 encryption, TWRP should be able to access /data which means I can keep this encryption and flash what ever rom I want using TWRP and upon booting it "should" just work. I tested this once before when I lucked out and got encryption working on some rom (I forget now which it was) but I was able to do a wipe with TWRP and install a different rom and the encryption still worked, still booted up fine.
Do you have any thoughts on this topic? Maybe I am reinventing the wheel...? I have not seen any of this referenced in any of the text or video guides I have been checking out. So I thought I would share this just in case. It might work for other samsung phones too.
STAND BY. The encryption did not work and I am trying a slight modification that is also proceeding. I am 19% on encrypting CM10.2. This time I did the usual TWRP wipes and then once wiped, Immediate flash of the original stock recovery (no OS install yet), then perform a factory reset and then flash TWRP again. Then I installed CM10.2 and skipped through the setup wizard and went straight to setting up encryption. Where usually it fails, it is actually performing the encryption. I have hopes that since the factory reset from the stock firmware's recovery was performed BEFORE the OS install, that it should... should work this time. I have a feeling the prior one failed because of doing a factory reset from one rom's recovery on a different rom's OS. So doing the factory reset before the OS install might be what will make it work. I will update soon.
Edit: It worked flawlessly... Booted up, authenticated, everything is fine. I am now running the same test with CM11 (M12) Also, I am not sure if this will work, but once I performed the final factory reset via the stock recovery (before re-flashing TWRP to begin OS install) I made a backup. My hope is that instead of reflashing and re-flashing back and forth, that the backup I made will have everything ready as if I had done a stock recovery based factory reset. If I decide to ditch CM11 I will test this theory out. I should also mention that the last test I mentioned with CM10.2 worked even though TWRP was presently still installed. So the presence of the stock recovery is not required, rather it is the factory reset from a stock rom being the final step required before the OS ROM install process.
Edit: There seems to be an issue with CM11. Twice now it has failed to work on CM11. I will try CM12 next, using my backup of a freshly official factory reset. If it fails I will do the whole process on 12 and see if it works and report back.
Edit: CM12 encryption by using the TWRP backup of a freshly factory reset (via stock recovery) failed. I am in the process of waiting for the first initial boot and setup wizard to complete of my second attempt at CM12 encryption via the full final step of actual stock recovery factory reset before CM12 installation via TWRP that is flashed after the stock recovery factory reset. I will update if this works. If it works and boots up correctly while encrypted, then it means a TWRP of a stock recovery factory reset is not adequate to replicate a true factory reset and the developers of TWRP should be made aware of this so they can enhance their own factory reset feature to allow encryption to work. If it doesn't work then there is something definitely wrong with CM11 and CM12 since both the stock firmware and CM10.2 encrypt using this full factory reset method. Stay tuned, wizard just came on screen...
Edit: Ok, weird... this time the encryption process has begun, whereas using my TWRP backup that was made after doing the stock factory reset did not get to this point, although the percentage counter started from 100% and counting... Right now the encryption is at 146% completed. That is very odd... I will report back if the encryption process actually ends up with a successfully booting phone or not, since CM11 failed at the booting phase. Before I save this edit, ne thing I am noticing is the progress percentage is going up rather fast compared to any other ROM. Right now it is at 177% and right now it is 179%, now it is 183% and I type fast... Stay tuned.
Edit: The encryption process worked and rebooted, asked for authentication and came up, however upon unlocking verious apps like CM bug reporter and whisper and others crash sometimes resulting in a OS loading screen and a fresh unlock needing to be performed.
tldr: When installing ANY rom, you need to wipe the file systems with TWRP or other similar recovery, then flash your stock firmware's recovery image (not the whole firmware, just the recovery, which means you need to extract the recovery.img from your flash file using 7zip and then follow these instructions: http://www.w0lfdroid.com/2013/04/android-how-to-convert-img-recovery-to.html to create a .tar.md5 file that odin can use to flash your recovery rom. (load odin, click AP or PDA and set your recovery tar.md5 and untick the two boxes that are always on by default. I use Odin v3.09). Then after you have wiped the file systems with TWRP (format data, then wipe the other mount points) then with your stock recovery perform a factory reset. Then flash TWRP or what ever custom recovery you use and just install your ROM, no other formatting or anything else, just install (not restore). Then the encryption will work, assuming there are no bugs in the rom that prevent it working on your handset, as seen on my handset with CM11 and the weird bugs with apps crashing on CM12.
So my recommendation is that the developer(s) of TWRP change the way they perform the factory reset, to emulate the actual process that a stock recovery uses, so that you do not need to keep reflashing your recovery images over and over when you need a fresh install.
Notes: CM11 M12 fails to boot, post successful encryption process, while CM12 nightly (18th March 2015) has bugs with apps crashing after successful bootup post encryption.
I have verified all this twice since. It is the stock recovery factory format that is needed before you install your ROM. I hope this helps the other people that I have seen having encryption problems.

Bootloop - Urgent help!

Hi,
I just got my OP3 today.
I unlocked and flashed TWRP. so far so good.
Then sideloaded OOS, and also sideloaded blue_spark kernel - switched to f2fs on cache and data partitions. The phone booted successfully.
Then I transferred the FreedomOS rom to the internal memory and flashed it, and used elemental's kernel.
The phone loaded up for a couple of minutes, didn't complete the boot, then bootloop.
I wanted to flash it again, but I noticed that my internal data was erased, and I don't remember doing that...
I thought maybe it had something to do with the changed filesystems, so I tried to restore the cache and data partitions back to default.
The cache successfully restored. the data partition procedure did nothing for about 15 minutes, and then I rebooted.
Tried flashing again FreedomOS using sideload - bootloop again.
Tried flashing OOS again, using sideload - The phone just freezes at the boot animation (the boot animation is still the FreedomOS's animation, for some reason), then the screen turns black, the LED remains lit, and nothing happens....
What the hell is going on?? For years I've been flashing ROMs, and it never happened to me.
Can someone please advise??
Thanks
Have you tried to change the file system with TWRP ?
Dushaine said:
Have you tried to change the file system with TWRP ?
Click to expand...
Click to collapse
Yes, did it for the cache and data partitions - the ones I changed for the blue spark kernel.
These are now ext4
I think I'll try flashing stock OOS 3.1.2....
I'm lost here...

Unbrick the device please? Problems with encryption and OOS 4.0 N update.

Guys, a bit of help.
I clean flashed the new OOS 4.0, coming from the 30dez RR-N Unoff by Eliminator.
That worked, but encrypted my system. I couldn't access the recovery, was asking for a pass.
So I formatted everything, and now trying to go back to RR 5.7.4 M. I tried Eliminators and Takers builds. Both are stuck at the RR logo.
I flashed 3.2.8 firmware, followed by
ROM
Nano 6.0 Open Gapps
Ex Kernel 0.39(CM)
SuperSU 2.79
Xposed v87
TB
Followed this for both the Official and Unofficial build.
Both stuck at the RR logo.
Do I need the modified .28 TWRP?
I wanted xposed, so I wanted to downgrade back to M
Tried something
Flashed the modified TWRP, and tried flashing OOS 3.2.8 and SuperSU 2.79
Getting this error now
Code:
Encryption Unsuccessful
Encryption was interrupted and can't complete. As a result, the data on your phone is no longer accessible
To resume using your phone, you need to perform a factory reset. When you set up your phone after the reset, you'll have an opportunity to restore any data that was backed up to your Google Account.
Here, there is a button to reset the phone, but pressing that does nothing. Pressing the power button gives me the options of powering off the device, rebooting, and taking a screenshot.
I went into fastboot then and did a fastboot erase userdata.
Then I booted into TWRP and did a format all, typed yes(that keeps changing the data partition to F2FS, so I changed it to exFat)
I flashed OOS 3.2.8 again, followed by SU again.
Got the same Encryption Unsuccessful message again, with the same option to reset the phone, which is not working.
Tried the 3.2.4 firmware, and then I flashed OOS 3.2.8 along with SU 2.79 again, in the hopes that if it boots properly, I will clean flash BJRR 5.7.4.
First I got error 7.
Formatted everything again and flashed again
Still getting the Encryption Unsuccessful message.
What to do?
I'll try flashing BJRR M directly this time.
I think the issue was after installing the new OOS 4.0 update, it encrypted my phone, and I flashed stuff before unencrypting it, I thought format option in TWRP would remove encryption.
Help please.
Its been 15 mins, BJRR 5.7.4 still stuck at the RR logo.
gro0vr said:
Guys, a bit of help.
Help please.
Its been 15 mins, BJRR 5.7.4 still stuck at the RR logo.
Click to expand...
Click to collapse
Flash 4.0 full rom, reboot
flash modified twrp, change /data to ext4
wipe /data, cache, dalvik
reboot
you are now 100% stock with working twrp and /data partition
BTW with encrypted issue.
Wipe Userdata with Fastboot
Go back to Twrp flash rom and directly flash SuperSU
You should be decrypted currently we can't encrypt because of TWRP.
atulclassic said:
Flash 4.0 full rom, reboot
flash modified twrp, change /data to ext4
wipe /data, cache, dalvik
reboot
you are now 100% stock with working twrp and /data partition
Click to expand...
Click to collapse
Thanks for getting back.
I already flashed the modified TWRP through fastboot. Will I need to flash that again after installing 4.0 ROM?
I will try this and get back to you.
Puddi_Puddin said:
BTW with encrypted issue.
Wipe Userdata with Fastboot
Go back to Twrp flash rom and directly flash SuperSU
You should be decrypted currently we can't encrypt because of TWRP.
Click to expand...
Click to collapse
I tried fastboot erase userdata.
the command completed successfully, but on OOS 3.2.8, it still showed the Encryption Interrupted error.
I will try flashing OOS 4.0 and get back.
If I want to downgrade from OOS 4.0, how will that work? Do I just wipe everything after flashing the OOS 4.0, then flash RR 5.7.4 or OOS 3.2.8?
atulclassic said:
Flash 4.0 full rom, reboot
flash modified twrp, change /data to ext4
wipe /data, cache, dalvik
reboot
you are now 100% stock with working twrp and /data partition
Click to expand...
Click to collapse
Flashed 4.0 after formatting everything.
Rebooted.
Changed /data to extfat by mistake.
Wiped /data, cache, dalvik
Rebooted in OOS 4.0
Got the Encryption Interrupted message again, but this time pressing the reset phone button worked, and took me to TWRP.
Booting to sysyem again took me to TWRP again.
Noticed everything had been deleted.
Formatted everything again
Installed 4.0
Reboot
Installed the modified twrp again via fastboot(already flashed it, so I skipped it during the first time I flashed 4.0)
Changed /data to ext4 correctly this time.
Wiped /data, cache, dalvik
Rebooted.
Again came back to twrp
Now, when I install 4.0, and change /data to ext4, it deletes everything, and I am reboot back to twrp even if I select reboot to system in TWRP.
Since I can't have 4.0 with /data on ext4, I tried to install RR 5.7.4.
Same result, keeps sending me back to recovery.
gro0vr said:
Flashed 4.0 after formatting everything.
Rebooted.
Changed /data to extfat by mistake.
Wiped /data, cache, dalvik
Rebooted in OOS 4.0
Got the Encryption Interrupted message again, but this time pressing the reset phone button worked, and took me to TWRP.
Booting to sysyem again took me to TWRP again.
Noticed everything had been deleted.
Formatted everything again
Installed 4.0
Reboot
Installed the modified twrp again via fastboot(already flashed it, so I skipped it during the first time I flashed 4.0)
Changed /data to ext4 correctly this time.
Wiped /data, cache, dalvik
Rebooted.
Again came back to twrp
Now, when I install 4.0, and change /data to ext4, it deletes everything, and I am reboot back to twrp even if I select reboot to system in TWRP.
Since I can't have 4.0 with /data on ext4, I tried to install RR 5.7.4.
Same result, keeps sending me back to recovery.
Click to expand...
Click to collapse
Yes.. Flash stock recovery if it boots flash TWRP back. Its a mess it really is..
Puddi_Puddin said:
Yes.. Flash stock recovery if it boots flash TWRP back. Its a mess it really is..
Click to expand...
Click to collapse
I'll try flashing the stock recovery.
Could you tell me what are the stock formats of /system partition? ExFat or Ext4?.
/Data keeps changing to F2FS, what should I change that to? exfat or Ext4?
Also, what should I change cache to? Its currently at exfat.
gro0vr said:
I'll try flashing the stock recovery.
Could you tell me what are the stock formats of /system partition? ExFat or Ext4?.
/Data keeps changing to F2FS, what should I change that to? exfat or Ext4?
Also, what should I change cache to? Its currently at exfat.
Click to expand...
Click to collapse
Ext4 is default. Don't change cache.. Only Data.
IT BOOTED!!!
Puddi_Puddin said:
Ext4 is default. Don't change cache.. Only Data.
Click to expand...
Click to collapse
Thanks. Just booted.
Atulclassic told me /data was ext4, was wondering about /system.
It just booted.
I followed both your advice, flashed stock recovery, then relocked the bootloader.
Then tried pushing ota via adb. That didn't work
Said loading failed.
So I unlocked the bootloader again, flashed modified TWRP
Flashed OOS 3.2.8
Just that, didn't flash SuperSU or anything else.
Just booted into the setup page.
Thanks a ton for helping me out.

TWRP acts weird, crashes and breaks ROMs when reloaded.

Hey guys, could one of you please tell me how to do a complete wipe?
I'm having so many problems with TWRP at the moment, and so I want to nuke the partitions in hope that it'll fix it. I've tried using the fastboot format commands for system, data & cache. I've also tried to wipe the recovery, but it gives me the error "Formatting is not supported for filesystem with type ' ' ". So for that I just use format erase and flash the recovery again.
The only other partitions I know of are the boot and bootloader, but I don't want to touch them if at all possible.
The problem I'm having and why I want to wipe sotrage is that if I install sultan's LinageOS (haven't tested with other ROMs yet), TWRP ****s the bed and will make the device undetectable from ADB, (while TWRP is still running though), and if I then try to go into TWRP again, it'll hang, crash, and somehow make the ROM think its just been freshly installed again (data partition corruption?), and it'll do that every time I reboot from then on. The only way to fix this is to wipe the phone as I mentioned earlier, but it will always get stuck again when I re-flash the ROM.
Also, another unusual thing is that when I boot the phone, it has the old boot splash from my previous ROM when loading recovery or for the first few seconds when loading a ROM. So that might be having an effect on the problems I'm having, and what makes me believe that wiping will help.
Any help would be greatly appreciated. (Sorry if it's a bit incoherent)
TL;DR: Flash TWRP, load TWRP, flash ROM, flash Gapps, load ROM, restart, load TWRP, TWRP hangs, crashes, and breaks ROM. ROM will keep being broken until full wipe. Also weird thing where I have old boot splash from old ROM.
Edit: Ended up bricking my phone, and using the unbrick tool to fix that. It seems that it was what I was looking for, where it wiped the phone completely. I'll have to see if that actually fixes my problem.
TWRP 3.1.xx is having this problem, believe the fix is to use the blue_spark 3.1.xx version or the nethunter 3.0.4-1 version, both found here on the forums somewhere

Bootloop on every Magisk installation

Hi everyone,
I recently made a fresh install of the latest OOS ROM on my Onplus 5T (OOS 9.0.8). After reinstalling all the apps and data I tried to root the phone. My bootloader was already unlocked, so I just went on to flash TWRP (first tried the official TWRP 3.3.1 dumpling, and then the 3.3.1 blu_spark version). Then I tried to flash Magisk via TWRP (tried versions 19.2, 19.3, 19.4), and every time I try to reboot I get stuck on a black screen with the cyan led on, and I have to uninstall Magisk in order to reboot on the phone. Also the phone is encrypted, and I have a the Microsoft Intune Portal app installed to use some work apps, but I don't know if that can be the source of the problem.
If you have any idea on how to successfully flash Magisk, that would be amazing.
Thanks in advance :good:
I use the same version of ROM and magisk I use is canary build . Working fine. (even its not canary build I also can boot successfully)
you might need to check if some apps you install might cause this.
my recommendation is clear /data and starts fresh then root it before installing any apps. to see if it working fine or not.
also after you flash magisk do you try to wipe cache, dalvik-cache?
and how long are you waiting for its to boot? normally it would take more time than normal boot (without magisk)
Just connect to to ADB and delete vendor.. recovery.. rom.. radio.. antennaa.. ect everything. Get yourself a stock full rom and flash that through ADB. Then flash custom recovery, custom rom, gapps, custom kernel, magisk. thats it. find stock rom on manufacturers data server. I did this to a different phone I had but this is the way to 100% fix everything... by purging the phone to nothing. You can however do a twrp backup before doing so.
Thanks for the input, I will try first to reflash the ROM and root before installing any apps, and see if it works in order to avoid the long process of restoring all my data. I do wipe cache/dalvik cache before and after every flash. If that doesn't work I will try another time a clean flash and tell you if it worked.
I just reflashed the ROM and right after I flashed Magisk 19.3, then rebooted and it worked. Not sure what the issue was but the problem is now resolved. Thanks guys for the advice.

Categories

Resources