Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,810,846 Members 37,314 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] to fix persist partition

Tip us?
 
bitdomo
Old
(Last edited by bitdomo; 19th July 2014 at 11:12 PM.)
#1  
Senior Member - OP
Thanks Meter 657
Posts: 1,072
Join Date: Nov 2011
Location: 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
  • 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:

Quote:
  • 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:

Quote:
  • 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:
Quote:
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:
Quote:
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:

Quote:
  • adb shell
  • su
  • Grant access on the phone.
Quote:
  • 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.
The Following 8 Users Say Thank You to bitdomo For This Useful Post: [ Click to Expand ]
 
rootSU
Old
#2  
rootSU's Avatar
Senior Member
Thanks Meter 11,416
Posts: 22,448
Join Date: Aug 2010
Location: Oxenhope, West Yorkshire, UK
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
Want to root/unroot? All important guides and info threads are contained within the "Sticky Roll-up" thread in General. Click the link below to get there!

**Sticky Roll-up: All Guides snd Info Threads linked here**



Philz Touch Recovery with passkey secure lock

I do NOT reply to support queries over PM.
The Following User Says Thank You to rootSU For This Useful Post: [ Click to Expand ]
 
KJ
Old
#3  
KJ's Avatar
Recognized Contributor
Thanks Meter 3,582
Posts: 8,577
Join Date: May 2011
Location: The boonies - southwest Ontario
Nice job! 👍
Sent from my new HTC One M8, N7, Moto X, GTab3 or S2.

Need help with poor battery life? Any device welcome, even tho its an N5 thread. Please specify if on a device other than N5. Lots of info in first 4 posts! >>>>
[Battery Life Help] Troubleshoot Battery Issues Here....and Tips

 
xnormskix
Old
#4  
xnormskix's Avatar
Senior Member
Thanks Meter 187
Posts: 326
Join Date: Feb 2014
Location: Semarang

 
DONATE TO ME
This should be very helpful, well done!
-NEXUS 5 D821-
Paranoid Android | ElementalX
Tags
baseband unknow, error mounting /persist, no imei, no signal, persist
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes