• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Fixed] Encryption isn't working anymore

Search This thread

parkbank

Member
Aug 18, 2018
14
8
I finally managed to find a working fix for this issue after having found this post. The origin of the problem is TWRP:
Formatting /data in TWRP uses up all the blocks, but encryption from Lineage needs 16kb of free space at the end of the partition to store the headers.

Fix
You have at least two solutions to fix this issue:
  1. Resize your /data partition to free up the needed space. Here and here are guides how to do it. I haven't give it a try, so I can't confirm it's working, but several other guys reported this fix working.
  2. If you're not comfortable to resize your partition, you can use an old version of TWRP. Beginning with version 3.2.0.0 TWRP seems to use up all blocks for /data. So you need a version prior to this one. I've used TWRP 3.1.0.0, but 3.1.1.0 should also work. Step by step:
    1. Download and flash TWRP 3.1.0.0.
    2. Boot into recovery and do a factory reset: Main menu -> Wipe -> Format Data (confirm with "yes"). I also wiped Cache and System (Main menu -> Wipe -> Advanced Wipe).
    3. If you're going to flash a Nougat based ROM you can stop reading and start flashing and encrypting ;)
    4. If you're going to flash an Oreo based ROM you now need to update your TWRP version as anything prior to 3.2.0.0 doesn't support flashing Android 8.1. The official TWPR version sucks because you won't be able to decrypt your phone when booting in recovery. I've used the TWRP provided in this post.
    5. Install your preferred ROM and encrypt it.

I haven't tested it, but dirty flashing a ROM (without a factory reset) might also work. But this usually leads to some random ****ups.
Also the TWRP alternative "Orange Fox" was mentioned as a solution in this thread. I actually can't remember if I've used Orange Fox to factory reset my phone or if I've flashed it only after having performed a factory reset using TWRP. For me Orange Fox didn't work (= encryption didn't work). But you might give it a try...

Original post
Hi guys,

I'm kind of stuck right now because I cannot encrypt my phone anymore and I don't know why. I got my phone last year and installed LOS 14.1 right away. For security reasons I also encrypted it - without any issues whatsoever. When LOS 15.1 came out, I upgraded my phone, with encryption still working. A couple of days back for some reason I decided to do a factory reset. Obviously, the device wasn't encrypted anymore after the reset. I then installed the new nightly of LOS (20180807) and tried to encrypt my phone once again. When I select "Encrypt phone", I need to enter my PIN, the phone restarts and reboots without encryption being started.

What I've done so far:
  • I've flashed two different TWRP versions: 3.2.3.0 and a customized one (https://forum.xda-developers.com/re...other-development/rom-lineageos-15-0-t3690465).
  • I've clean installed different LOS versions (unofficial LOS 14.1 and LOS 15.1 starting from the 20180710 release)
  • I've clean installed Omnirom (current release and a release from 20180107).
  • I've even flashed MIUI 9 and reinstalled LOS thereafter because some guy in the above mentioned LOS thread wrote, that this did the trick for him.
  • I've disabled WI-FI and mobile data before trying to encrypt my phone, because I found a blog article stating that this might help.
Nothing helped. The phone just reboots and stays unencrypted.
Do you guys have any additional hints or ideas how I can manage to encrypt my phone once again? Could another TWRP version do the trick? Is TWRP even involved in any kind when it comes to encryption of the OS? Do you think another ROM could be helpful?
 
Last edited:

CanBostanci

Senior Member
Aug 21, 2014
94
10
I'm also having trouble with this. Many days ago, someone told they had successfully encrypted their phone. I tried to replicate what he did, got miui.eu and flashed LOS afterwards.

After tons of restarting, reflashing, all kind of stuff, the encryption still doesn't work. Pfff.
 

parkbank

Member
Aug 18, 2018
14
8
I'm also having trouble with this. Many days ago, someone told they had successfully encrypted their phone. I tried to replicate what he did, got miui.eu and flashed LOS afterwards.

After tons of restarting, reflashing, all kind of stuff, the encryption still doesn't work. Pfff.

That's the most ****ed up part. For some people it does work, for some not.
There surely must be some ridiculous small detail we're not getting. Like disabling WI-FI while Bluetooth is enabled.
 

parkbank

Member
Aug 18, 2018
14
8
Things I've also tried:
Of course, my device is still unencrypted...

Has anyone any idea why encryption might fail? I mean, it did work in the past with LOS 14.1. So why does it even fail with an old release of LOS 14.1? I don't do knowingly anything different to all the times I've successfully encrypted my phone in the past.
Does the factory reset still leave some files untouched?
 

CanBostanci

Senior Member
Aug 21, 2014
94
10
Things I've also tried:
Of course, my device is still unencrypted...

Has anyone any idea why encryption might fail? I mean, it did work in the past with LOS 14.1. So why does it even fail with an old release of LOS 14.1? I don't do knowingly anything different to all the times I've successfully encrypted my phone in the past.
Does the factory reset still leave some files untouched?


Mmm, maybe it's about the firmware? I was almost going to try lineageos 14.1...
 

parkbank

Member
Aug 18, 2018
14
8
By flashing I mean factory reset, flashing the firmware and then installing LOS. I noticed, that flashing a new firmware while a ROM is still installed leads to some random ****ups.
 

parkbank

Member
Aug 18, 2018
14
8
After a couple of days of flashing, factory resetting, re-flashing, reading and a lot of cursing I finally found a working solution. I've added the fix to my initial post. Hopefully this helps :)
 
  • Like
Reactions: LoveSick55

aNNjo

Senior Member
Dec 29, 2010
54
7
Almada
I finally managed to find a working fix for this issue after having found this post. The origin of the problem is TWRP:


Fix
You have at least two solutions to fix this issue:
  1. Resize your /data partition to free up the needed space. Here and here are guides how to do it. I haven't give it a try, so I can't confirm it's working, but several other guys reported this fix working.
  2. If you're not comfortable to resize your partition, you can use an old version of TWRP. Beginning with version 3.2.0.0 TWRP seems to use up all blocks for /data. So you need a version prior to this one. I've used TWRP 3.1.0.0, but 3.1.1.0 should also work. Step by step:
    1. Download and flash TWRP 3.1.0.0.
    2. Boot into recovery and do a factory reset: Main menu -> Wipe -> Format Data (confirm with "yes"). I also wiped Cache and System (Main menu -> Wipe -> Advanced Wipe).
    3. If you're going to flash a Nougat based ROM you can stop reading and start flashing and encrypting ;)
    4. If you're going to flash an Oreo based ROM you now need to update your TWRP version as anything prior to 3.2.0.0 doesn't support flashing Android 8.1. The official TWPR version sucks because you won't be able to decrypt your phone when booting in recovery. I've used the TWRP provided in this post.
    5. Install your preferred ROM and encrypt it.

I haven't tested it, but dirty flashing a ROM (without a factory reset) might also work. But this usually leads to some random ****ups.
Also the TWRP alternative "Orange Fox" was mentioned as a solution in this thread. I actually can't remember if I've used Orange Fox to factory reset my phone or if I've flashed it only after having performed a factory reset using TWRP. For me Orange Fox didn't work (= encryption didn't work). But you might give it a try...

Original post

You have save my day "my MIDO" hehehehe ;)

After the 1st PIE Rom the encryption was broken.

Your Step by Step save this and now Syberia 9 was able to encrypt with success :good:

Thank you one more time for sharing.
 
  • Like
Reactions: scoobiedoobiedoo

RoseTheFlower

Member
Dec 7, 2018
9
0
Thank you. It worked for me to get Havoc OS 9.0 with hardware encryption on my Redmi Note 3 SE.
I bypassed unlocking the bootloader by doing this. Then I installed TWRP 3.1.0.0 from the recovery, did the reset and everything as instructed here, updated it to 3.3.1.0, rebooted, then flashed the Pie ROM and latest gapps without any further wiping.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    I finally managed to find a working fix for this issue after having found this post. The origin of the problem is TWRP:
    Formatting /data in TWRP uses up all the blocks, but encryption from Lineage needs 16kb of free space at the end of the partition to store the headers.

    Fix
    You have at least two solutions to fix this issue:
    1. Resize your /data partition to free up the needed space. Here and here are guides how to do it. I haven't give it a try, so I can't confirm it's working, but several other guys reported this fix working.
    2. If you're not comfortable to resize your partition, you can use an old version of TWRP. Beginning with version 3.2.0.0 TWRP seems to use up all blocks for /data. So you need a version prior to this one. I've used TWRP 3.1.0.0, but 3.1.1.0 should also work. Step by step:
      1. Download and flash TWRP 3.1.0.0.
      2. Boot into recovery and do a factory reset: Main menu -> Wipe -> Format Data (confirm with "yes"). I also wiped Cache and System (Main menu -> Wipe -> Advanced Wipe).
      3. If you're going to flash a Nougat based ROM you can stop reading and start flashing and encrypting ;)
      4. If you're going to flash an Oreo based ROM you now need to update your TWRP version as anything prior to 3.2.0.0 doesn't support flashing Android 8.1. The official TWPR version sucks because you won't be able to decrypt your phone when booting in recovery. I've used the TWRP provided in this post.
      5. Install your preferred ROM and encrypt it.

    I haven't tested it, but dirty flashing a ROM (without a factory reset) might also work. But this usually leads to some random ****ups.
    Also the TWRP alternative "Orange Fox" was mentioned as a solution in this thread. I actually can't remember if I've used Orange Fox to factory reset my phone or if I've flashed it only after having performed a factory reset using TWRP. For me Orange Fox didn't work (= encryption didn't work). But you might give it a try...

    Original post
    Hi guys,

    I'm kind of stuck right now because I cannot encrypt my phone anymore and I don't know why. I got my phone last year and installed LOS 14.1 right away. For security reasons I also encrypted it - without any issues whatsoever. When LOS 15.1 came out, I upgraded my phone, with encryption still working. A couple of days back for some reason I decided to do a factory reset. Obviously, the device wasn't encrypted anymore after the reset. I then installed the new nightly of LOS (20180807) and tried to encrypt my phone once again. When I select "Encrypt phone", I need to enter my PIN, the phone restarts and reboots without encryption being started.

    What I've done so far:
    • I've flashed two different TWRP versions: 3.2.3.0 and a customized one (https://forum.xda-developers.com/re...other-development/rom-lineageos-15-0-t3690465).
    • I've clean installed different LOS versions (unofficial LOS 14.1 and LOS 15.1 starting from the 20180710 release)
    • I've clean installed Omnirom (current release and a release from 20180107).
    • I've even flashed MIUI 9 and reinstalled LOS thereafter because some guy in the above mentioned LOS thread wrote, that this did the trick for him.
    • I've disabled WI-FI and mobile data before trying to encrypt my phone, because I found a blog article stating that this might help.
    Nothing helped. The phone just reboots and stays unencrypted.
    Do you guys have any additional hints or ideas how I can manage to encrypt my phone once again? Could another TWRP version do the trick? Is TWRP even involved in any kind when it comes to encryption of the OS? Do you think another ROM could be helpful?
    1
    Try orangewolf recovery ....

    Sent from my Redmi Note 4 using Tapatalk
    1
    After a couple of days of flashing, factory resetting, re-flashing, reading and a lot of cursing I finally found a working solution. I've added the fix to my initial post. Hopefully this helps :)
    1
    I finally managed to find a working fix for this issue after having found this post. The origin of the problem is TWRP:


    Fix
    You have at least two solutions to fix this issue:
    1. Resize your /data partition to free up the needed space. Here and here are guides how to do it. I haven't give it a try, so I can't confirm it's working, but several other guys reported this fix working.
    2. If you're not comfortable to resize your partition, you can use an old version of TWRP. Beginning with version 3.2.0.0 TWRP seems to use up all blocks for /data. So you need a version prior to this one. I've used TWRP 3.1.0.0, but 3.1.1.0 should also work. Step by step:
      1. Download and flash TWRP 3.1.0.0.
      2. Boot into recovery and do a factory reset: Main menu -> Wipe -> Format Data (confirm with "yes"). I also wiped Cache and System (Main menu -> Wipe -> Advanced Wipe).
      3. If you're going to flash a Nougat based ROM you can stop reading and start flashing and encrypting ;)
      4. If you're going to flash an Oreo based ROM you now need to update your TWRP version as anything prior to 3.2.0.0 doesn't support flashing Android 8.1. The official TWPR version sucks because you won't be able to decrypt your phone when booting in recovery. I've used the TWRP provided in this post.
      5. Install your preferred ROM and encrypt it.

    I haven't tested it, but dirty flashing a ROM (without a factory reset) might also work. But this usually leads to some random ****ups.
    Also the TWRP alternative "Orange Fox" was mentioned as a solution in this thread. I actually can't remember if I've used Orange Fox to factory reset my phone or if I've flashed it only after having performed a factory reset using TWRP. For me Orange Fox didn't work (= encryption didn't work). But you might give it a try...

    Original post

    You have save my day "my MIDO" hehehehe ;)

    After the 1st PIE Rom the encryption was broken.

    Your Step by Step save this and now Syberia 9 was able to encrypt with success :good:

    Thank you one more time for sharing.