Restoring /persist partition

Search This thread

DerEmryz

Senior Member
Jun 13, 2015
52
15
Hey all.

I covered all threads here which mention the /persist partition, but nothing seems to help me. I come from Stock-Rom 5.1.1. LMY48M, was rooted. Origin of my Problem was that suddenly my wifi was stuck in "activating", as mentioned in this thread. Sadly, nothing in there helped resolve my issue, so i found a thread in another forum suggesting to fix and then edit some files in the /persistent partition.

Long story short, obviously i don't have most of the files which apparently should be in there. To be accurate, it is empty. Now i don't know if this command did that:

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

This is the Thread i got it from.

Either way, after I found out that the folder is empty, I tried this guide to restore at least my wifi/mac-address files in /persistent - but after a reboot my newly created files are gone and the /persistent partition is empty again.

I tried numerous factory resets, reflashing stock rom, flashing custom roms and custom kernels, flashing every image manually, everything there is to my knowlede.

I thought the /persistent partition gets overwritten if i flash everything new on my phone, but apparently it does not.

So, how do I restore it? I know, this is a long shot, it could well be that my mainboard is kill, but i want to try everything.

Every tip would be appreciated.
 
  • Like
Reactions: jwalker9715

Terfysgol

Member
Dec 14, 2014
41
9
Turin
I think that u have tryed to flash only the radio module... When i had lost my mac addres i solved by flashing a new radio

Inviato dal mio Nexus 5 utilizzando Tapatalk
 

DerEmryz

Senior Member
Jun 13, 2015
52
15
I think that u have tryed to flash only the radio module... When i had lost my mac addres i solved by flashing a new radio

Inviato dal mio Nexus 5 utilizzando Tapatalk



Tried that, but will try again. I update on the outcome.

Edit: Did not work.


Edit 2: Could somebody with a nexus 5 on stock rom maybe post an image of the files inside the /persistent partition? I would really like to know what should be inside.
Or maybe make a zip of them (if this can be done) for me to insert them in my phone.
 
Last edited:
  • Like
Reactions: jwalker9715

eross

Senior Member
May 2, 2015
98
36
Were you prompted to fix the persist partition after e2fsck /dev/block/platform/msm_sdcc.1/by-name/persist ?
What problems do you have with the phone?
 

DerEmryz

Senior Member
Jun 13, 2015
52
15
Were you prompted to fix the persist partition after e2fsck /dev/block/platform/msm_sdcc.1/by-name/persist ?
What problems do you have with the phone?

No, i was not prompted to fix it.
Problems are that my wifi is stuck on "activating", my SIM-Card occasinally is not recognized, and the whole phone freezes when i try to activate/press the wifi button in the quicksettings.


Problems started 3 days ago, when wifi occasionally went on and off for minutes to hours, but since yesterday nothing works anymore. I even cooled the phone in the refrigerator (i somewhere read that it may help, and i was grasping at straws here as I'm on vacation, plus my phone was a little bit warm) - which strangely helped my issue for 3 full minutes - but now even my cooled phone does not work with wifi.

Does the radio.img actually write a new /persist partition? Or which image does it (if any)? Because afaik there should be files residing there which tell the phone my Wifi and Bluetooth Mac-Adresses. If I check them in Phone-Status in the Settings it says "not available".
 
Last edited:

eross

Senior Member
May 2, 2015
98
36
The persist partition does not get written when flashing any image (hence the name persist).
In the persist partition fix guide it states that you should be prompted to fix it, and from my experince that's what happens. You can also try the make command that is suggested in the guide. There is also a reference to fixing the wifi and BT files in that guide. Have you tried that?
 

DerEmryz

Senior Member
Jun 13, 2015
52
15
The persist partition does not get written when flashing any image (hence the name persist).
In the persist partition fix guide it states that you should be prompted to fix it, and from my experince that's what happens. You can also try the make command that is suggested in the guide. There is also a reference to fixing the wifi and BT files in that guide. Have you tried that?

yeah, I was afraid the name was no coincedence.

I followed the guide through, so i tried the make command. And I tried fixing the BT files and wifi files. The strange thing is, bluetooth is working ALTHOUGH the BT-Adress i created through the guide is NOT the same it states in the System-Information. So I don`t know if it worked (i was using ES File explorere with root.)

In the guide there is no mention of the other files and folders in /persist. There should be other folders (playready, sensors, widevine), but i don`t create those in the guide.
 
Last edited:

DerEmryz

Senior Member
Jun 13, 2015
52
15
And what abuot spoofing your mac? Did u try?

Inviato dal mio Nexus 5 utilizzando Tapatalk

Thanks, this Tip actually got me a bit farther. I installed busybox and a terminal app to follow this guide.

As i su'd and typed the first command
Code:
busybox iplink show eth0
I got
Code:
iplink: can't find device eth0

Same with wlan0 (which i tried just for the fun of it, although I just found out tht eth0 is indeed the wifi device).
Which brought me to
Code:
ifconfig
, and this lists only lo and rmnet0 as devices. :rolleyes:

I would like to post a screenshot so the more tech-savvy people here could look over it, but my basic linux knowledge tells me that the device is not there, so it could be a hardware defect. Although I don't know if there could be a driver error, but i assume not.
 
Last edited:

Terfysgol

Member
Dec 14, 2014
41
9
Turin
Thanks, this Tip actually got me a bit farther. I installed busybox and a terminal app to follow this guide.

As i su'd and typed the first command
Code:
busybox iplink show eth0
I got
Code:
iplink: can't find device eth0

Same with wlan0 (which i tried just for the fun of it, although I just found out tht eth0 is indeed the wifi device).
Which brought me to
Code:
ifconfig
, and this lists only lo and rmnet0 as devices. :rolleyes:

I would like to post a screenshot so the more tech-savvy people here could look over it, but my basic linux knowledge tells me that the device is not there, so it could be a hardware defect. Although I don't know if there could be a driver error, but i assume not.
Try with some apps

Inviato dal mio Nexus 5 utilizzando Tapatalk
 

DerEmryz

Senior Member
Jun 13, 2015
52
15
Try use some apps to change ur mac address...
I understand that u failed manually

Inviato dal mio Nexus 5 utilizzando Tapatalk


Tried terminal again and Mac Adress Ghost, both did not work.

Code:
*#*#INFO#*#*
still tells me "enabling" and "UNINITIALIZED" supplicant state. IP is 0.0.0.0. And the mac-adress field is just blank

Gesendet von meinem Nexus 5 mit Hilfe von XDA Forums


Edit: I installed LiveBootLog to check my issue further. Hopefully someone can give me some insight in these parts of the Log:

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

(...)

I/wpa_supplicant( 4806): Successfully initialized wpa_supplicant
I/wpa_supplicant( 4806): rfkill: Cannot open RFKILL control device
E/wpa_supplicant( 4806): Could not read interface wlan0 flags: No such device

Edit 2:
And another snippet, and I think this one tells me that it's over:
http://pastebin.com/Zhs8vpQ2
 
Last edited:
  • Like
Reactions: jwalker9715

joey_

New member
Apr 23, 2009
2
0
DerEmryz, were you able to solve this issue? I am facing the exact issue as yours. Can you pls share if you were able to resolve?
 

eross

Senior Member
May 2, 2015
98
36
Man, I have the same problem with my own device. I need a /persist folder from a working Nexus 5 user. I there someone to offer us the solution? Do you have any friends who own this device and are willing to help?
If you need to restore the persist partition I wrote a detailed guide. If you follow it carefully, you will restore your phone.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hey all.

    I covered all threads here which mention the /persist partition, but nothing seems to help me. I come from Stock-Rom 5.1.1. LMY48M, was rooted. Origin of my Problem was that suddenly my wifi was stuck in "activating", as mentioned in this thread. Sadly, nothing in there helped resolve my issue, so i found a thread in another forum suggesting to fix and then edit some files in the /persistent partition.

    Long story short, obviously i don't have most of the files which apparently should be in there. To be accurate, it is empty. Now i don't know if this command did that:

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

    This is the Thread i got it from.

    Either way, after I found out that the folder is empty, I tried this guide to restore at least my wifi/mac-address files in /persistent - but after a reboot my newly created files are gone and the /persistent partition is empty again.

    I tried numerous factory resets, reflashing stock rom, flashing custom roms and custom kernels, flashing every image manually, everything there is to my knowlede.

    I thought the /persistent partition gets overwritten if i flash everything new on my phone, but apparently it does not.

    So, how do I restore it? I know, this is a long shot, it could well be that my mainboard is kill, but i want to try everything.

    Every tip would be appreciated.
    1
    I think that u have tryed to flash only the radio module... When i had lost my mac addres i solved by flashing a new radio

    Inviato dal mio Nexus 5 utilizzando Tapatalk



    Tried that, but will try again. I update on the outcome.

    Edit: Did not work.


    Edit 2: Could somebody with a nexus 5 on stock rom maybe post an image of the files inside the /persistent partition? I would really like to know what should be inside.
    Or maybe make a zip of them (if this can be done) for me to insert them in my phone.
    1
    Try use some apps to change ur mac address...
    I understand that u failed manually

    Inviato dal mio Nexus 5 utilizzando Tapatalk


    Tried terminal again and Mac Adress Ghost, both did not work.

    Code:
    *#*#INFO#*#*
    still tells me "enabling" and "UNINITIALIZED" supplicant state. IP is 0.0.0.0. And the mac-adress field is just blank

    Gesendet von meinem Nexus 5 mit Hilfe von XDA Forums


    Edit: I installed LiveBootLog to check my issue further. Hopefully someone can give me some insight in these parts of the Log:

    Code:
    E/WifiStateMachine(  791): Unable to change interface settings: java.lang.IllegalStateException: command '8 interface setcfg wlan0 0.0.0.0 0 down' failed with '400 8 Failed to set address (No such device)'
    
    (...)
    
    I/wpa_supplicant( 4806): Successfully initialized wpa_supplicant
    I/wpa_supplicant( 4806): rfkill: Cannot open RFKILL control device
    E/wpa_supplicant( 4806): Could not read interface wlan0 flags: No such device

    Edit 2:
    And another snippet, and I think this one tells me that it's over:
    http://pastebin.com/Zhs8vpQ2
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