yashsingh1/xdaforums huggingface dataset:
[Nexus 5 General] bitdomo:
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 [MENTION=2872010]rootSU[/MENTION]'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.
[Nexus 5 General] danarama:
Great thread [MENTION=4325732]bitdomo[/MENTION]. Thanks for adding this to the forum. I added it to the root guides section of sticky roll-up
[Nexus 5 General] Darth:
Nice job! ?
[Nexus 5 General] walpurgisnacht30:
This should be very helpful, well done!
[Nexus 5 General] Juniluis:
I keep getting not found when i enter that comand in cmd.
[Nexus 5 General] rahulpat13:
Great thread. Didn't even know about such a partition to be honest.

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

Have you added adb to your PATH?
[Nexus 5 General] Juniluis:
Man your a life saver thank you so much I just copy your and I stop typing because I was typing something bad.
[Nexus 5 General] Juniluis:
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?
[Nexus 5 General] #$wag:
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:
[Nexus 5 General] tall--man:
thaaaaaaaaaanks the phone is work O_O
[Nexus 5 General] faizanfarooq86:
I need a professional guy help

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
[Nexus 5 General] ezakto:
I registered in the forum to thank you [MENTION=4325732]bitdomo[/MENTION] ! 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!
[Nexus 5 General] Tomsen1977:
The same thing here! Thanx a lot,bitdomo!
[Nexus 5 General] Paschfire:
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://xdaforums.com/google-nexus-5/general/noob-read-adb-fastboot-how-hep-t2807273
[Nexus 5 General] KamalN:
Thank you very much! This helped me a lot.
[Nexus 5 General] DaGr81:
The best way is to flash factory images.

I had this issue in the morning and solved it in no time.

Goodluck
[Nexus 5 General] siddlv:
This issue won't be solved by flashing factory images. Hence the thread.
[Nexus 5 General] Jeff1010:
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.
[Nexus 5 General] zerosum0:
Don't copy the whole OP page to ask a simple question please #swag

Sent from my Nexus 5
[Nexus 5 General] mayurh:
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
[Nexus 5 General] bitdomo:
What recovery are you using? CWM? TWRP? Which variant of twrp, caf or normal?
[Nexus 5 General] mayurh:
No idea... Twrp that nexus root kit installs.. But shouldn't the stock recovery be installed now since I reflashed stock? From the toolkit? From bootloader if I choose recovery it just starts bootloops again...

---------- Post added at 06:21 PM ---------- Previous post was at 06:20 PM ----------

Think bootloader or recovery is damaged? Or this persist partition?
[Nexus 5 General] bitdomo:
No idea yet. How familiar you are with cmd and fastboot/adb commands?
[Nexus 5 General] mayurh:
I'd say I'm quite familiar with it.. What can I try? I'm gonna try fastboot wipe cache..... If not. Fastboot flash recovery... If it's still not booting. Gona try flash 4.4.4 image instead of lollipop
[Nexus 5 General] bitdomo:
Then download the latest non-caf twrp recovery from here https://dl.twrp.me/hammerhead/ and just use this command

fastboot boot twrp<<rest of the file name>>.img

When your phone is in bootloader mode (fastboot mode) and lets see how it turns out.
[Nexus 5 General] mayurh:
How do I know which one is non caf? I'll try tomorrow and let you now. Left the phone at work
[Nexus 5 General] bitdomo:
Luckily the link I sent has only the non-caf twrps
[Nexus 5 General] pashkustva:
Thanks! The guide is solid! Saved my N5!
[Nexus 5 General] MushyMan:
Good Day

Can this be done without editing the bluetooth .bdaddr file?

I need to fix my wifi macaddr and permissions but I am a bit paranoid in messing with my bluetooth that is working perfectly.

If so, Can you please guide me in which commands do I only need to type to only effect my wifi and not bluetooth
[Nexus 5 General] mayurh:
guess what the fone booted up without me doing anything this morning at work? very very weird

so now that i can get into the fone i'll follow the thread to check if the persist partition is damaged?
[Nexus 5 General] mayurh:
started on 4.4 then installed ota till 5.1 was downloading

then it started bootlooping and

installed twrp as per your instructions...stuck @ google logo now/

help

Mayur
[Nexus 5 General] bitdomo:
Now that starts to look like a damaged persist partition. Any luck getting to twrp recovery with fastboot boot twrp<<rest of the file name>>.img?
[Nexus 5 General] mayurh:
tried flashing the twrp ..no luck. bootloops

funny thing is

if i flash the kitkat factory image.it starts up straight away

what changed in the 5.0.1 factory image? bootloader? recovery? did they change some partitions?

update.

the 4.4.0 factory image boots up

update

when i flash 4.4.0 the storage says 16gb only..after factory reset it goes back to 32
[Nexus 5 General] bitdomo:
This is just matter of kernel.

Try to flash an older twrp then.

We must have a custom recovery to proceed.
[Nexus 5 General] mayurh:
tried flashing 4.4.4 image..bootloops

trying to flasht 4.4.0 image again now..lets see

the phone was working fine on 4.4.4 but when my bro tried to flashthe 5.0 ota or factory image.thens when the problem started

it didnt want to flash properly and kept giving errors.he eventually got it working but i think partition tables or something must have gotten damaged? any way to repartition them?

ill try older trwp now

when i chose recovery from bootloader it justs bootloops before
[Nexus 5 General] bitdomo:
if you do fastboot boot twrp..........img it will boot that recovery image right away without flashing.

Try with both flashing: fastboot flash recovery twrp........img and fastboot boot twrp..........img
[Nexus 5 General] mayurh:
flashed 4.4.4 factory image. boot loops.wont go into recovery also

flashed 4.4.0 factory image , the phone boots up straight away

i dont understand why 4.4.0 image boots 100% but 4.4.4 and the lolipop ones dont.(or when they do by chance work.after a day it just goes back into a bootloop)

tried fastboot boot recovery - just ends up at google logo

tried fastboot flash recovery - it goes to google logo

tried fastboot flash- oldest twrp - seems to have worked only
[Nexus 5 General] bitdomo:
then fix persist witht he oldest twrp.
[Nexus 5 General] mayurh:
im concerned this is not a persist partition issue? i can access that folder from the oldest twrp

and i never lost signal or imei?
[Nexus 5 General] bitdomo:
Then it could be anyithing and not just some partitions got corrupted. If you see the files and folder on the persist partition then it is not a persist problem.
[Nexus 5 General] babalonius508:
You saved my phone! Thank you!
[Nexus 5 General] fridayghost:
thanks a lot

it worked flawlessly.... thanks a ton brother:)
[Nexus 5 General] kunalsaddar:
Guide was accurate. Worked. Saved the nexus 5. Thanks
[Nexus 5 General] wasim74:
help please: nexus 5 unknown baseband, no imei, no network

I have nexus 5 when I flashed lollipop 5.0 the phone stock on boot loop and never pass I used fast boot manually flashed /cmd/ So I downgrade to kitkat 4.4 and right now I have unknown baseband no imei no signal,, camera stopped working, play store stopped working, hangouts stopped working,, I flashed too many times the stock Google images without any luck and I did factory reset, wipe cache partition but same issue still I believe the problem it's on the internal storage,, So I don't know What I have to do,, should I format the internal storage ???? please anybody here who can help me and guide me step by step What should I have to do I will appreciate and thank you
[Nexus 5 General] bitdomo:
Read the OP :D

There is your guide
[Nexus 5 General] wasim74:
Thank you for the fast respond,, but What is the OP???
[Nexus 5 General] bitdomo:
The very first post of this thread.
[Nexus 5 General] wasim74:
Thank again,,, but you mean the first page of this thread?
[Nexus 5 General] wasim74:
i just tried your thread iam using Philz recovery please check the pic which i posted and thank you
[Nexus 5 General] wasim74:
i tried again my friend check the other pic which i posted too and tell me please what i have to do and thanks:confused:
[Nexus 5 General] RolF2:
that's all in OP :
[Nexus 5 General] wasim74:
sorry did you check the pics which i posted already : which it says :

C:\android-sdk\platform-tools>adb shell

~ # e2fsck /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)

Superblock has an invalid journal (inode 8).

Clear<y>?

so should i hit enter on cmd ???? any help i will be appreciated and thanks
[Nexus 5 General] RolF2:
yes, just press enter
[Nexus 5 General] wasim74:
nexus 5 *no baseband*no imei*no signal* solved

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
[Nexus 5 General] RolF2:
/userdata or /persist ? :D
[Nexus 5 General] MushyMan:
When i type in this command:

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

I get a reply that file is in use cannot continue, aborting.

I've tried switching off wifi and turning on airplane mode., and same thing happens.

Also. can this be done with CWM? I know TWRP and Phils is mentioned on the first page was just wondering cause I was thinking of changing to CWM for other related issues.
[Nexus 5 General] deepak21:
I don't know why .. but this is not working for me!! Any suggestions?
[Nexus 5 General] bitdomo:
Which part of "this" not working for you?
[Nexus 5 General] deepak21:
I complete the basic preparations... and use the command adb shell... till then everything works.. but nothing happens when I use this command:

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

I don't get any error prompts!!
[Nexus 5 General] nat510:
still not working
[Nexus 5 General] rockuppl:
Guyz as soon as i reboot folders created in /persist namely bluetooth n wifi gets deleted again n again .

what's the matter?
[Nexus 5 General] sirob71:
Is there a possibility to backup and restore this nexus 5 persist partition?
[Nexus 5 General] tcuwolf:
Use this. http://xdaforums.com/google-nexus-5/development/modem-nexus-5-flashable-modems-efs-t2514095
[Nexus 5 General] BrainF**k:
Thank You guys, for this awesome post, issue got resolved in less than a minute. Thanks a ton again :o:o:good:
[Nexus 5 General] Prodeje79:
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?
[Nexus 5 General] magrello:
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).
[Nexus 5 General] bitdomo:
Changed the name of the thread to draw more attention to those who facing this problem on lollipop
[Nexus 5 General] Prodeje79:
[MENTION=4325732]bitdomo[/MENTION]

During the procedure, you advise to "reboot your phone". Do we reboot phone into recovery mode like noted in the first instruction or just reboot letting it go to the standard homescreen?
[Nexus 5 General] :
Reboot to Sytem.
[Nexus 5 General] Prodeje79:
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, [MENTION=4325732]bitdomo[/MENTION] , please look at his thread:

http://xdaforums.com/google-nexus-5...less-stuck-t3140085/post61667064#post61667064
[Nexus 5 General] SamarthX:
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!!
[Nexus 5 General] pinstripebob:
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!
[Nexus 5 General] bitdomo:
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.
[Nexus 5 General] pinstripebob:
Oh okay. How do I fix the wifi turning on issue?
[Nexus 5 General] bitdomo:
I wish I knew, but I dont any soultion for that.

Tapatalk-kal küldve az én Nexus 5-el
[Nexus 5 General] zarquon45:
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.
[Nexus 5 General] zarquon45:
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.
[Nexus 5 General] JordanFrmCanada:
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 ----------

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
[Nexus 5 General] ShaunYCash:
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.
[Nexus 5 General] JordanFrmCanada:
hey [MENTION=4325732]bitdomo[/MENTION] 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?
[Nexus 5 General] red911turbo:
I'm having some issues running the command. After I run e2fsck command it getS stuck and (Y). I can not type anything after this.

Any ideas?

Cheers,

Chris
[Nexus 5 General] bitdomo:
Just continue the guide. It will direct you to format the partition.
[Nexus 5 General] Thom123456789:
Hi,

I followed this fix tuto (before reading all the posts) to try fixing my nexus5 wifi, locked on "turning on..".
[MENTION=4325732]bitdomo[/MENTION], even if you said that this wifi lock is not related to the persist partition, i get some doubts.

I'm able to mount the persist partition, but not to format it. It's probably why even a phone restart/restore is not solving this issue ?

the hardware crash may probably have keep locked the disk data.

May you get in your pockets something that can help me to force this format?

Thanks in advance !
[Nexus 5 General] lesp4ul:
Hi, i wanna ask, my phone keep rebooting itself after i unlock the screen, after Google logo it will reboot again and then stuck. So i must long press power button to hard reboot. Is this guide will my problem also? I'm on android M now, the prob occurred also on 5.1.1, so i guess it wasn't rom's bug.
[Nexus 5 General] akosiberber:
Thank you!

Thank you for this tutorial! I am able to revived my nexus 5 from a bootloop. I wonder what cause this problem with persist partition. Thanks again and hope this will help others solve their problems on this matter.
[Nexus 5 General] 936mw:
error !!!!!!! need help!!!

phone start up only with 4.x.x (no imei ,camera...) and with 5.x.x only animation log

1 write android4.4.2

2 unlock bootloader

3 rooted

E:\adb>adb shell

shell@hammerhead:/ $ e2fsck /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)

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

8|shell@hammerhea
[Nexus 5 General] marioemp2k7:
You have a hint there in the last row. You need root to do this. Do this from recovery.
[Nexus 5 General] akosiberber:
download CF-Root,

this will help http://xdaforums.com/google-nexus-5/help/nexus-5-stuck-boot-loop-lollipop-t3098632
[Nexus 5 General] Aroch925:
so i did everything in the guide but now my wifi wont turn back on

EDIT: Nvm I fixed it
[Nexus 5 General] akosiberber:
great!
[Nexus 5 General] AudioFreeeze:
I've flashed the phone back to 4.4 fine, and I've been able to root and make a recovery easily, as well as the adb setup, however I cannot get anywhere farther because it says that e2fsck/dev/block/platform/msm_sdcc.1/by-name/persist was not found. The same goes for the other command we type into the adb shell (the adb shell works btw)

Maybe the answer was posted earlier and i just didn't catch on, but can someone plz explain what I have to do?:confused: