The OnePlus One has had its share of bugs, but there has been one issue that effectively breaks the phone without the owner being even accidentally at fault. One minute you're swiping through the app drawer looking at the best way to kill time for a couple of minutes, the next you're hit with a spontaneous reboot and staring at a phone that boot loops indefinitely, leaving you with a bricked device.

nexusae0_wm_IMG_3398

The problem is suspected to stem from the "persist" partition getting corrupted during the reboot, even though CyanogenMod doesn't use this particular location. The damaged area doesn't get fixed like other partitions because a filesystem integrity check isn't ran. It's left corrupted, and even though the area isn't needed for the OS to run, the OnePlus One boot loops anyway.

After a helpful session with +Ricardo Cerqueira of +Cyanogen Inc., here's a fix. While your phone is booted to TWRP, run these commands on your computer:

adb shell
make_ext4fs /dev/block/mmcblk0p15

A similar fix appeared earlier on the XDA Developers forum, but this single command is easier, runs faster, and doesn't require any downloads.

Here's the output of the command:

make_ext4fs /dev/block/mmcblk0p15
Creating filesystem with parameters:
    Size: 33554432
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 2048
    Inode size: 256
    Journal blocks: 1024
    Label:
    Blocks: 8192
    Block groups: 1
    Reserved block group size: 7
Created filesystem with 11/2048 inodes and 1166/8192 blocks

Once everything is over, the OnePlus One should be restored without any data loss. We still don't know what causes the partition to get corrupted in the first place, but at least we all now know what to do if it does.