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

Prodeje79

Senior Member
Dec 29, 2008
299
34
0
Ohio
I appear to be having same issue as mayurh. Where can I get a copy of persist.img ?

What version of TWRP should I be using as in the older version referenced?
 

magrello

New member
Jun 21, 2010
1
0
0
Thx man. You save my life.

Thx man. I was with the problem of "flying dots" on the boot. I tried everything, from restore all factory images. All hangs on loop in boot of flying dots. I could install TWRP and 4.4.4 (but no network).

Whem I tried to format all partitions to install the Cyanogen via TWRP this error show up. Strange because in other versions of no errors was reported.

Using your post, I could boot my phone again with network. Very thanks, I will try to donate something for you.

PS.: I'm posting more to help someone with loop in boot (flying dots).
 

Prodeje79

Senior Member
Dec 29, 2008
299
34
0
Ohio
Reboot to Sytem.
I appreciate it! In hindsight, one can only execute that su command and "grant access on phone" from the system.....

Welp, I did the full procedure without errors. I was not prompted to repair or fix errors after doing that first part either............
:(

I am so frustrated nothing will fix my wifi or bluetooth issues!
Please note that I got wifi/bluetooth to work intermittently using cm-12.1-20150629-NIGHTLY-hammerheadcaf (flashed with TWRP for hammerheadcaf) It would just periodically reconnect itself. I was able to see access points etc versus on all stock ROMs all I get is stuck on turning on............ The downfall of CM for me was my cell carrier data would no longer work........ so i had to go back to 5.1.1 stock. It seems I have the same issues as yoncy. he has provided advanced logs but we cannot get anyone to read them. If you have the time, @bitdomo , please look at his thread:
http://forum.xda-developers.com/goo...less-stuck-t3140085/post61667064#post61667064

avc: denied { read } for name="wpa_supplicant.conf" dev="mmcblk0p28" ino=318356 scontext=u:r:wpa:s0 tcontext=ubject_r:app_data_file:s0 tclass=file permissive=1
----------- it's related with selinux . For a moment Wifi started working, HW addr for wlan0 was detected ( i had wlan0 and p2p in "ip link show" terminal command ). Will investigate more related with that.
I/wpa_supplicant( 3427): type=1400 audit(0.0:13): avc: denied { read } for name="wpa_supplicant.conf" dev="mmcblk0p28" ino=318356 scontext=u:r:wpa:s0 tcontext=ubject_r:app_data_file:s0 tclass=file permissive=1

I/wpa_supplicant( 3427): type=1400 audit(0.0:14): avc: denied { open } for name="wpa_supplicant.conf" dev="mmcblk0p28" ino=318356 scontext=u:r:wpa:s0 tcontext=ubject_r:app_data_file:s0 tclass=file permissive=1

I/wpa_supplicant( 3427): type=1400 audit(0.0:15): avc: denied { getattr } for path="/data/misc/wifi/wpa_supplicant.conf" dev="mmcblk0p28" ino=318356 scontext=u:r:wpa:s0 tcontext=ubject_r:app_data_file:s0 tclass=file permissive=1

D/SoftapController( 190): Softap fwReload - Ok

W/CommandListener( 190): Failed to retrieve HW addr for wlan0 (No such device)

D/CommandListener( 190): Setting iface cfg

E/WifiStateMachine( 770): Unable to change interface settings: java.lang.IllegalStateException: command '29 interface setcfg wlan0 0.0.0.0 0 down' failed with '400 29 Failed to set address (No such device)'

E/WifiMonitor( 770): killSupplicant p2ptrue init.svc.wpa_supplicant=unknown init.svc.p2p_supplicant=unknown

E/WifiMonitor( 770): startMonitor called with unknown iface=wlan0
 

SamarthX

New member
Jul 16, 2015
1
0
0
Stuck in a boot loop (boot animation is going on and on)

My Nexus 5 is stuck in a boot loop (boot animation is going on and on)
I tried to solve the issue with Wugfresh Root tool kit .
Had installed TWRP Recovery .
While Factory data rest I am getting Error " e:unable to mount '/persist' " :(

What should I do next??? :confused:

I am trying ADB Commands from the CMD but its giving me some errors (not found) , I must have written wrong command:confused::( because I am new to this.
Help!!
 
Last edited:

pinstripebob

Member
Jun 23, 2015
5
0
0
I have Clockwork Recovery Touch on my Nexus 5. Will this work with that, or do I need to switch to TWRP or Philz recovery?

Also, what does the universal naked driver do? I can run commands from Windows through command prompt no problem.

The only issue I have is that after flying once and using airplane mode, WiFi is stuck turning on. I've tried just deleting the wifi folder, remaking it and adding the .macaddr file, but no success. I might go ahead and do the whole /persist fix this thread details, but I'd like to know if I need TWRP and universal naked driver. Any help would be awesome!
 

bitdomo

Senior Member
Nov 3, 2011
1,542
1,240
0
28
Göd
I have Clockwork Recovery Touch on my Nexus 5. Will this work with that, or do I need to switch to TWRP or Philz recovery?

Also, what does the universal naked driver do? I can run commands from Windows through command prompt no problem.

The only issue I have is that after flying once and using airplane mode, WiFi is stuck turning on. I've tried just deleting the wifi folder, remaking it and adding the .macaddr file, but no success. I might go ahead and do the whole /persist fix this thread details, but I'd like to know if I need TWRP and universal naked driver. Any help would be awesome!
The "wifi turning on" issue is not related to the persist partition. People who have corrupted persist can turn on the wifi and bluetooth just fine, but their mac address become random.
 

zarquon45

Member
Jul 12, 2015
18
0
0
OK, I think this is exactly the issue I'm facing. I wish to beg for a guide. I have not so much as rooted my phone. Yes it is a nexus 5 using Lolipop and it is looping at the boot animation. I don't have a clue what anyone is talking about concerning TWP or any of the tools mentioned. I called Google and they put me in touch with LG to send them my phone, but all I have seen is people saying that they were told that they had to have their 'motherboard' replaced at $200. Nutz to that!

So.... anyone willing to step me through the process? It sounds like a number of you have had great success in getting past this... I'm not hip to much more that booting into recovery mode.

Here is a great opportunity for someone to prove that humans can be altruistic.
 

zarquon45

Member
Jul 12, 2015
18
0
0
As painful as this was for me, all my moaning and groaning, FIXED! Learned a lot and can see that it is difficult to improve on this process. I don't know if anyone could have made this ordeal easier. I just had to keep making mistakes and try to learn as I went. Now what do I do with a brand new, never been opened HTC 1 (m8)?

Oh, and not to forget, thank you Bitdomo (and company), whoever you are.
 
Jul 11, 2015
9
0
0
help please

when i type the adb shell command instead of the next line starting with ~# for me to type the e2sfck... command my second line is coming up as ~#[6N theres a arrow pointing left right after the number symbol, couldnt find one on my keyboard, could anyone help please? when i type the e2sfck/ command it says not found

---------- Post added at 06:54 PM ---------- Previous post was at 06:48 PM ----------

i typed adb shell command and instead of second line beginning ~# mine begins ~#[6N so when i type the e2fsck/ command it says not found, can someone help please? thanks

---------- Post added at 07:01 PM ---------- Previous post was at 06:54 PM ----------

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.
hey bitdomo, i just need some help i got stuck because when i typed the adb shell command instead the next line starting with ~# mine is ~#[6N so when i type e2fsck command it says not found, im using the TWRP recovery installed.. do you know how to fix this? thanks
 

ShaunYCash

New member
Jul 26, 2015
3
0
0
Little question here quite easy or not how do you transfer the 2 files in SDcard if you can't gain access to it??
I'm stuck at this points.
 
Last edited:
Jul 11, 2015
9
0
0
hey @bitdomo thanks for this mine worked after first 2 commands so thats all i needed to do except now i noticed a small problem the phone is not recognizing my rear camera, the camera app icon vanished and so did my flashlight icon in top menu, if i open the camera with an app like snapchat it only shows front cam if you press the button to switch to rear cam nothing happens.. any idea what this is from?