[GUIDE][FIX] Boot loop on Lollipop 5.0 and above (fix persist partition)

Search This thread

bitdomo

Senior Member
Nov 3, 2011
1,542
1,240
28
Göd
What is the persist partition?

Persist is partition mounted at /persist. It has ext4 file system. DRM releated files, sensor reg file (sns.reg), wifi and bluetooth mac addresses are stored there.

If you experience the following issues:
  • Can't access to internal storage.
  • No signal even after formating cache and fastboot flash cache.img
  • IMEI number is lost even after formating cache and fastboot flash cache.img
  • Boot loop on Lollipop 5.0 and above
  • You get "e: cannot mount /persist" in recovery
then your persist partition have to be fixed.


Requirements to proceed:

  • Ability to use adb command.
  • TWRP or Philz touch recovery.
  • Universal Naked Driver for recovery. (Windows users)
  • Root.

Setting up adb, rooting and installing drivers are not part of this guide. If you have to do that then please use @rootSU's great thread to find the guides you need.

Let's start!

  • Reboot your phone to recovery.
  • Connect USB cable.
  • Open CMD or Terminal application.
  • Enter following commands in CMD or Terminal application:

  • adb shell
  • e2fsck /dev/block/platform/msm_sdcc.1/by-name/persist

You should be prompted to repair or fix errors. Keep pressing enter until the process finishes.
If you are not prompted for repair or you still have problems then follow my instructions.


  • Get to that point again when you entered the adb shell command then type the following command:

  • make_ext4fs /dev/block/platform/msm_sdcc.1/by-name/persist

  • Reboot your phone.

Now all your problems should be gone now, but your wifi and bluetooth addresses should be fixed to prevent further problems or bugs.

  • Download this rar file.
  • Extract it.
  • (Linux users should enable show hidden files)
  • Open .bdaddr with a hexeditor.
  • You should see following:
BC F5 AC 00 00 00
  • Change the last three 00 to something else.
  • You can use 0-9 numerals and A-F letters.
  • Save the modified .bdaddr.
  • Open .macaddr with a hexeditor.
  • You should see the following:
8C 3A E3 00 00 00

  • Change the last three 00 to something else.
  • You can use 0-9 numerals and A-F letters.
  • Save the modified .macaddr.
  • Copy both files to your sdcard.
  • Enable USB debugging on the phone.
  • Open CMD or Terminal application. (If you closed it)
  • Enter following commands in CMD or Terminal application:

  • adb shell
  • su
  • Grant access on the phone.
  • cd /persist
  • mkdir bluetooth wifi
  • chown bluetooth:system ./bluetooth
  • chmod 770 ./bluetooth
  • cp /sdcard/.bdaddr /persist/bluetooth
  • chown bluetooth:system ./bluetooth/.bdaddr
  • chmod 660 ./bluetooth/.bdaddr
  • chown wifi:system ./wifi
  • chmod 770 ./wifi
  • cp /sdcard/.macaddr /persist/wifi
  • chown wifi:system ./wifi/.macaddr
  • chmod 660 ./wifi/.macaddr

Reboot your phone. All your problems should have gone now. You can delete .bdaddr and .macaddr from your sdcard.

About the other files:

SNS.reg will be regenrated, but the DRM releated files will not. Nobody ever complained about the missing DRM files, but I still want to make it possible to restore them. If anyone could make an md5 checksum about the files on the persist partition that would be great.
 
Last edited:

rahulpat13

Senior Member
Jan 8, 2014
101
12
Great thread. Didn't even know about such a partition to be honest.


Sent from my Nexus 5 using Tapatalk

---------- Post added at 03:10 AM ---------- Previous post was at 03:09 AM ----------

I keep getting not found when i enter that comand in cmd.

Have you added adb to your PATH?

Sent from my Nexus 5 using Tapatalk
 

Juniluis

Member
Sep 29, 2014
15
2
One question the Mac address WiFi and Bluetooth steps in hex editor only the ones that had problem with the first qoute ta was ef2sck .....etc and needed to go to the second quote that was make ef4 ..,.etc need to do it right?
 

#$wag

Member
Dec 4, 2014
10
0
What is the persist partition?

Persist is partition mounted at /persist. It has ext4 file system. DRM releated files, sensor reg file (sns.reg), wifi and bluetooth mac addresses are stored there.

If you experience the following issues:
  • Can't access to internal storage.
  • No signal even after formating cache and fastboot flash cache.img
  • IMEI number is lost even after formating cache and fastboot flash cache.img
  • You get "e: cannot mount /persist" in recovery
then your persist partition have to be fixed.


Requirements to proceed:

  • Ability to use adb command.
  • TWRP or Philz touch recovery.
  • Universal Naked Driver for recovery. (Windows users)
  • Root.

Setting up adb, rooting and installing drivers are not part of this guide. If you have to do that then please use @rootSU's great thread to find the guides you need.

Let's start!

  • Reboot your phone to recovery.
  • Connect USB cable.
  • Open CMD or Terminal application.
  • Enter following commands in CMD or Terminal application:



You should be prompted to repair or fix errors. Keep pressing enter until the process finishes.
If you are not prompted for repair or you still have problems then follow my instructions.


  • Get to that point again when you entered the adb shell command then type the following command:



  • Reboot your phone.

Now all your problems should be gone now, but your wifi and bluetooth addresses should be fixed to prevent further problems or bugs.

  • Download this rar file.
  • Extract it.
  • (Linux users should enable show hidden files)
  • Open .bdaddr with a hexeditor.
  • You should see following:
  • Change the last three 00 to something else.
  • You can use 0-9 numerals and A-F letters.
  • Save the modified .bdaddr.
  • Open .macaddr with a hexeditor.
  • You should see the following:


  • Change the last three 00 to something else.
  • You can use 0-9 numerals and A-F letters.
  • Save the modified .macaddr.
  • Copy both files to your sdcard.
  • Enable USB debugging on the phone.
  • Open CMD or Terminal application. (If you closed it)
  • Enter following commands in CMD or Terminal application:


  • Grant access on the phone.


Reboot your phone. All your problems should have gone now. You can delete .bdaddr and .macaddr from your sdcard.

About the other files:

SNS.reg will be regenrated, but the DRM releated files will not. Nobody ever complained about the missing DRM files, but I still want to make it possible to restore them. If anyone could make an md5 checksum about the files on the persist partition that would be great.
I have a big problem: when I enter "e2fsck /dev/block/platform/msm_sdcc.1/by-name/persist", it says that the journal has data and can't set superblocks, and when I enter "make_ext4fs /dev/block/platform/msm_sdcc.1/by-name/persist" the problem persist..:crying:
 
Jan 3, 2015
6
0
I need a professional guy help

Great thread @bitdomo. Thanks for adding this to the forum. I added it to the root guides section of sticky roll-up

Sent from my Nexus 5 using Tapatalk

im really stuck on the starting adb and fastboot is their any guy to whom should i show this nexus 5 imei gone. storage corrupt and baseband null even camera is also not working.
i live in pak please prefer a guy who can resolve my problem

Thanks
 

ezakto

New member
Mar 10, 2015
1
1
I registered in the forum to thank you @bitdomo ! My Nexus 5 lost signal a few weeks ago and I did EVERYTHING. Started with trying to add apn stuff manually, then in-android factory reset, wipes, then stock flash, a few more flashes, and I started to go crazy. My IMEI was lost. But this got it back! Thank you very much!
 
  • Like
Reactions: bitdomo

Paschfire

Senior Member
May 16, 2014
932
812
43
Ottawa
im really stuck on the starting adb and fastboot is their any guy to whom should i show this nexus 5 imei gone. storage corrupt and baseband null even camera is also not working.
i live in pak please prefer a guy who can resolve my problem

Thanks
Did you try any of the suggested guides/links by rootSU in the OP? The required information on getting ADB/fastboot working correctly is all there, see link http://forum.xda-developers.com/google-nexus-5/general/noob-read-adb-fastboot-how-hep-t2807273
 

Jeff1010

New member
Apr 15, 2015
1
0
Thanks!!!!!!!!

I love my Nexus 5. This did the trick. I did have to flash-all at the end because I screwed it up too much while trying to fix it.

By the way the symptom I was experience was the phone was in a endless forever loop on the boot and I was seeing the color dots animation for a couple days.
 
Last edited:

mayurh

Senior Member
Jul 8, 2010
1,559
85
Johannesburg
Guys can this only be done in adb? My nexus 5 is in a bootloop, tried reflashing stock. Still the same. I can get into bootloader, tried going in recovery but it just bootloops after that. Help please. Thought it was the power button. Replaced but still the same
 

Top Liked Posts

  • There are no posts matching your filters.
  • 55
    What is the persist partition?

    Persist is partition mounted at /persist. It has ext4 file system. DRM releated files, sensor reg file (sns.reg), wifi and bluetooth mac addresses are stored there.

    If you experience the following issues:
    • Can't access to internal storage.
    • No signal even after formating cache and fastboot flash cache.img
    • IMEI number is lost even after formating cache and fastboot flash cache.img
    • Boot loop on Lollipop 5.0 and above
    • You get "e: cannot mount /persist" in recovery
    then your persist partition have to be fixed.


    Requirements to proceed:

    • Ability to use adb command.
    • TWRP or Philz touch recovery.
    • Universal Naked Driver for recovery. (Windows users)
    • Root.

    Setting up adb, rooting and installing drivers are not part of this guide. If you have to do that then please use @rootSU's great thread to find the guides you need.

    Let's start!

    • Reboot your phone to recovery.
    • Connect USB cable.
    • Open CMD or Terminal application.
    • Enter following commands in CMD or Terminal application:

    • adb shell
    • e2fsck /dev/block/platform/msm_sdcc.1/by-name/persist

    You should be prompted to repair or fix errors. Keep pressing enter until the process finishes.
    If you are not prompted for repair or you still have problems then follow my instructions.


    • Get to that point again when you entered the adb shell command then type the following command:

    • make_ext4fs /dev/block/platform/msm_sdcc.1/by-name/persist

    • Reboot your phone.

    Now all your problems should be gone now, but your wifi and bluetooth addresses should be fixed to prevent further problems or bugs.

    • Download this rar file.
    • Extract it.
    • (Linux users should enable show hidden files)
    • Open .bdaddr with a hexeditor.
    • You should see following:
    BC F5 AC 00 00 00
    • Change the last three 00 to something else.
    • You can use 0-9 numerals and A-F letters.
    • Save the modified .bdaddr.
    • Open .macaddr with a hexeditor.
    • You should see the following:
    8C 3A E3 00 00 00

    • Change the last three 00 to something else.
    • You can use 0-9 numerals and A-F letters.
    • Save the modified .macaddr.
    • Copy both files to your sdcard.
    • Enable USB debugging on the phone.
    • Open CMD or Terminal application. (If you closed it)
    • Enter following commands in CMD or Terminal application:

    • adb shell
    • su
    • Grant access on the phone.
    • cd /persist
    • mkdir bluetooth wifi
    • chown bluetooth:system ./bluetooth
    • chmod 770 ./bluetooth
    • cp /sdcard/.bdaddr /persist/bluetooth
    • chown bluetooth:system ./bluetooth/.bdaddr
    • chmod 660 ./bluetooth/.bdaddr
    • chown wifi:system ./wifi
    • chmod 770 ./wifi
    • cp /sdcard/.macaddr /persist/wifi
    • chown wifi:system ./wifi/.macaddr
    • chmod 660 ./wifi/.macaddr

    Reboot your phone. All your problems should have gone now. You can delete .bdaddr and .macaddr from your sdcard.

    About the other files:

    SNS.reg will be regenrated, but the DRM releated files will not. Nobody ever complained about the missing DRM files, but I still want to make it possible to restore them. If anyone could make an md5 checksum about the files on the persist partition that would be great.
    3
    Great thread @bitdomo. Thanks for adding this to the forum. I added it to the root guides section of sticky roll-up

    Sent from my Nexus 5 using Tapatalk
    2
    nexus 5 *no baseband*no imei*no signal* solved

    yes, just press enter
    HOW I FIXED IT ::good:
    1- DOWNLOAD ANDROID -SDK
    2-ADB COMMAND ( I USED WINDOWS 7 )
    3-FLASHED PHILZ TOUCH RECOVERY ,,, TWRP RECOVERY IT WASN'T HELP ME
    4- ROOTED DEVICE
    5-I OPENED CMD
    6-HIT : adb shell / PRESS ENTER/
    7-e2fsck /dev/block/platform/msm_sdcc.1/by-name/userdata /PRESS ENTER/
    8- KEEP PRESS ENTER UNTIL ITS FINISHED DONE
    I FIXED MY NEXUS 5 LIKE THAT
    ******* VERY BIG THANKS TO THE GENIUS *** bitdomo *** WHO'S MADE THIS THREAD
    ******* VERY BIG THANKS TO THE AWESOME **** *** rootSU *******
    ******* VERY BIG THANKS TO THE ******** ROLF2 *********
    THANK YOU GUYS BECAUSE OF YOU MY NEXUS 5 BACK TO LIFE I REALLY APPRECIATED
    1
    This should be very helpful, well done!
    1
    When I download the .rar file and extracted it, the file was empty. Im using a mac, does anybody still have that file or am I doing something wrong?
    You're doing it right. You need to show hidden files, though. The two files have a . as the first character. Mac (and UNIX and Linux) see . as a hidden file.

    Sent from my TARDIS
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone