I upgraded CM13 to LineageOS14.1 on a Xiaomi Note 3 (kenzo), setup everything, and decided to encrypt the phone (from settings/encrypt phone). It asked for a pattern, and then rebooted.

I never got to see a timer as seems to be expected from reading around. The phone got into a boot loop (vibrate, show MI logo, show lineage mascot for about a second, then reboot, over and over again). I left it doing this for about 40 minutes when I decided something was wrong.

I can now boot into TWRP 3.1.0-0, but any attempt to boot normally results in the above.

How can I get my phone to boot again? (if possible without losing data, I have backups, but if I can spare the hassle of reinstalling everything...).

The device was rooted, and I installed nightly lineage lineage-14.1-20170405-nightly-kenzo, along with gapps and lineage su package.

"Longer term", how do I encrypt the phone without breaking everything? Is there a bug in lineageOS (I've not seen anything on the bugtracker, except for another device (athene))?

  • 1
    For the records: I just had it with a Samsung A5 2017 (SM-A520F) after encryption of the disk. Very annoying! And the data wipe, well, wipped my data… now I'm reinstalling everything. Good luck to the others!
    – Joël
    Commented Jan 9, 2023 at 23:20

4 Answers 4


If you are able to boot into TWRP format and wipe the device (dont loose your backups) and restore your backups.

After that everything should be back to normal (without encryption).


For future reference, choosing repair for /data in TWRP seems to solve bootloops right after encryption. The device stays encrypted. This worked on two of my devices and I didn't notice any data loss.


Here's a really convoluted workaround if anyone's still having trouble. I was unable to solve it with the comment above about using the repair option.

There are multiple bug reports for this on different devices in the lineage os Jira. One commenter suggests a workaround (once you get out of boot loop):

  1. Fresh install CM13

(Note that for my device, HTC One M9 I had to modify a line in the flashable zip due to a firmware upgrade. See This commenters post on how to do that: https://jira.lineageos.org/browse/BUGBASH-457?focusedCommentId=14507&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14507)

  1. Boot into CM13, Run though setup
  2. Set a pin or pattern (IMPORTANT)
  3. Run encrypt phone
  4. Once phone is encrypted and booting, reboot to TWRP (twrp will need your pin or pattern)
  5. Go to TWRP settings be sure the rm -rf setting is checked
  6. Go to wipe and wipe the data partition (this shouldn't reformat it)
  7. Go to install and Flash LOS
  8. Boot to LOS, you'll be asked for your pattern/pin from earlier
  9. You'll need to set a pin/pattern for lineage itself, but it works.

More detailed instructions from that comment: https://jira.lineageos.org/browse/BUGBASH-457?focusedCommentId=14354&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14354

CM13 archive: https://archive.org/download/cmarchive_nighlies


If you can boot in TWRP and the device does not look encrypted, and you tried already to flash lineage again without success and you always get bootloops, try in TWRP to go to wipe, select "format data". Attention, this seems different than just "wipe data". When I selected format data, a dialog asked me to type "yes" to continue, it even showed that it would unencrypt the partition.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .