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

damiggiano

New member
Aug 28, 2010
3
0
0
someone can help about the post below?

thanks

Hi, I followed all the steps but stuck at the unable to set the superblock flags:


C:\>adb shell
~ # ←[6ne2fsck /dev/block/platform/msm_sdcc.1/by-name/persist
e2fsck /dev/block/platform/msm_sdcc.1/by-name/persist
e2fsck 1.41.14 (22-Dec-2010)
/dev/block/platform/msm_sdcc.1/by-name/persist: recovering journal
Superblock needs_recovery flag is clear, but journal has data.
Run journal anyway<y>? y
y
yes

e2fsck: unable to set superblock flags on /dev/block/platform/msm_sdcc.1/by-name/persist


also the "make" command is not working
anyone found the solution for this so far?

thanks!
 

benlvt

New member
May 6, 2015
2
0
0
Hi evbdy,

My N5 can't register on any network. I tried to follow that guide to solve this supposing my persist partitions is broken (I may be wrong, I'm a newbie in this, I try many stuff to fix my phone, is there a way to be sure?)
But I have this result :
Code:
$ adb shell
id: unknown ID 2000
[email protected]:/ $ su
su
[email protected]:/ # e2fsck /dev/block/platform/msm_sdcc.1/by-name/persist
e2fsck /dev/block/platform/msm_sdcc.1/by-name/persist
e2fsck 1.42.9 (28-Dec-2013)
e2fsck: Permission denied while trying to open /dev/block/platform/msm_sdcc.1/by-name/persist
You must have r/w access to the filesystem or be root
My phone is rooted, Android 6.0.1. Any idea?
 

benlvt

New member
May 6, 2015
2
0
0
Ok I'm an idiot, I wasn't in recovery...
Code:
$ adb shell
~ # e2fsck /dev/block/platform/msm_sdcc.1/by-name/persist
e2fsck /dev/block/platform/msm_sdcc.1/by-name/persist
e2fsck 1.42.9 (28-Dec-2013)
/dev/block/platform/msm_sdcc.1/by-name/persist: clean, 15/1024 files, 1109/4096 blocks
~ # make_ext4fs /dev/block/platform/msm_sdcc.1/by-name/persist
make_ext4fs /dev/block/platform/msm_sdcc.1/by-name/persist
Creating filesystem with parameters:
    Size: 16777216
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 1024
    Inode size: 256
    Journal blocks: 1024
    Label:
    Blocks: 4096
    Block groups: 1
    Reserved block group size: 7
Created filesystem with 11/1024 inodes and 1102/4096 blocks
But it still not working, I can't access to any network... :crying:
Do you think it can be other than a software problem?
I can see networks when I look for them, but no way to register. I try with a SIM of a friend (other provider) and no more success.
 

swolff1234

Member
Aug 9, 2015
13
0
0
When I enter "adb shell", it starts the daemon, and says "error: no devices found". Then I tried "e2fsck /dev/block/platform/msm_sdcc.1/by-name/persist", and it returned the good old "... is not recognized as an internal or external command, operable program or batch file.". I have android studio installed, and the command line I am using is opened at platform tools. Help?
 

theRatchetOrange

New member
Oct 21, 2013
2
0
0
Bootloop problem persists...

Nexus 5 is bootlooping.

Tried to go through your guide, and at the e2fsck command, this is what is returned:

Code:
[email protected]:/ # e2fsck /dev/block/platform/msm_sdcc.1/by-name/persist
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Attempt to read block from filesystem resulted in short read while tryin
g to open /dev/block/platform/msm_sdcc.1/by-name/persist
Could this be a zero-length partition?
8|[email protected]:/ #
My dad, who knows a lot more about Linux, thinks the flash on my phone needs to be reformatted, but I don't really know how to do that.

Anyway, I was hoping you would know how to fix my phone, as currently it is unusable (although I am able to get it booted on Kit Kat, as evidenced by the ADB shell, etc).


Thanks.
 

DeadSquirrel01

Senior Member
Jun 2, 2016
532
436
0
Rimini
Thank you man you saved me and my phone, because with that problem I had to use only samsung firmaware, because by flashing cm rom I stucked on boot animation, but after applied your fix....poof, my phone boots fine. Thank you, I really appreciated your guide :)
 

chaco81

Senior Member
Sep 28, 2010
458
117
0
OH
I just did this procedure hoping to fix a Nexus 5 i got, and doesn't appear to have fix my issue.

Heres whats going on and why i did it.
I have reset the N5, and flashed the July MM image. Everything flashed fine.
I insert SIM before booting, Android doesnt see SIM... so i pulled out the SIM and reinsert while on, and it sees it.
The Signal goes into an empty triangle... It says you have voicemail. And nothing else happens.
No data, no service. *#*#4636#*#* shows the right selection, it gives me the option to turn on the radio, but if i click it, nothing ever happens.
Under phone info, it sees my phone number, the IMEI is fine, and its not blacklisted when i check multiple carrier's websites.

I just cant seem to figure out why it wont just acquire service signal.
 

coiae

Member
Jan 27, 2009
8
0
21
madrid
bitdomo thank you very much for this thread. My Nexus 5 return from the death, but now I have a small problem.
I follow the end of your guide for fix WIFI and BLUETOOTH, but still to change the MAC ADDRESS every time I reboot the phone. I mean the Wifi MAC ADDRESS it seem like 00 90 4C XX XX XX, and the last XX change every time I reboot the phone.
I execute all the commands without any error . (I use CF-Auto-Root-hammerhead for root access on 6.0.1 ROM STOCK VERSION)
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

But still change everytime reboot the NEXUS 5 the MAC ADDRESS of the WIFI
Any idea?
UPDATE:
I found the solution and Works perfectly.
1St. Downgrade at 5.0 Lollipop, apply the "instructions" and that's it.
 
Last edited:

monikia

New member
Aug 21, 2016
1
0
0
Worked like a charm

Thanks a lot, the solution was perfect. After several tries to install Android, all of them (except the 4.4.4) were stuck in the bootloop , and manual updates didn´t work. After finally seeing the log with partition, this post help me fix all errors and the next installation worked perfectly.

Thanks again, i was becoming desperate ... :D
 

iissaamm

New member
Jan 24, 2013
3
0
1
hy guys
im not really a noob to this , but this method those not work for me ..
everytime i typed the commend line it said that the journal still still has errors and does nothing after ..
please help .. thank you

its shows this
/dev/block/platform/msm_sdcc.1/by-name/userdata: ********** WARNING: Filesystem
still has errors **********
 
Last edited:

mattgyver

Senior Moderator - Cookie Monster
Staff member
:( thought this would fix me up, but it didn't. I ran through everything to the letter. I rebooted, and my wifi still is stuck at "turning on". Mac address still shows as 02:00:00:00:00:00.
My nexus 5 is rooted and running 6.0.1..


This thread speed up when searching for "nexus 5 wifi stuck turning on". But I just saw one comment by the OP that said he has no fix for that. Stinks...
 
Last edited:

royd123

New member
Sep 18, 2016
1
0
0
My phone has this issue as well and I really don't know what to do, I tried wiping the chache and doing a factory reset, they both failed.
My computer doesn't recognize the phone is connected, so I can't really do anything from there.
Does anyone know what should I do?
 

MingX2790

New member
Oct 9, 2016
2
0
0
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?
 

mattgyver

Senior Moderator - Cookie Monster
Staff member
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
 
  • Like
Reactions: MingX2790

31101992

New member
Oct 15, 2016
4
0
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
  • 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:



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.
My Nexus 5 has same issue. But, i don't known how to Root it.
When i install SuperSU via TWRP, it raise the errors: E: Unable to mount "/cache".
Can you help me?