LG G3 Receives Oversharpening Fix via Modified Kernel

Nothing is perfect, as they say. No matter how alluring or seemingly perfect, … more

APKTool Updated with Android Lollipop Support

One of the beauties of Android is the level of flexibility we have over our devices. Whether … more

Lollipop Leak for Sprint Galaxy S5, TWRP for Micromax Canvas Magnus – XDA TV

Android 5.0 Lollipop has been leaked for the Sprint … more

Velocity is Like OpenTable on Steroids

We all enjoy a night out with friends or our significant other from time to time. However, there is … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[GUIDE] to fix persist partition

OP bitdomo

19th July 2014, 11:26 PM   |  #1  
OP Senior Member
Flag Göd
Thanks Meter: 709
 
1,142 posts
Join Date:Joined: Nov 2011
More
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.
Last edited by bitdomo; 20th July 2014 at 12:12 AM.
The Following 13 Users Say Thank You to bitdomo For This Useful Post: [ View ]
19th July 2014, 11:33 PM   |  #2  
rootSU's Avatar
Senior Member
Flag Oxenhope, West Yorkshire, UK
Thanks Meter: 13,497
 
24,599 posts
Join Date:Joined: Aug 2010
More
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
The Following User Says Thank You to rootSU For This Useful Post: [ View ]
20th July 2014, 02:45 AM   |  #3  
Darth's Avatar
XDA: ASSIST
Recognized Contributor
Flag The boonies - southwest Ontario
Thanks Meter: 4,678
 
12,460 posts
Join Date:Joined: May 2011
More
Nice job! 👍
20th July 2014, 03:30 AM   |  #4  
xnormskix's Avatar
Senior Member
Flag Semarang
Thanks Meter: 247
 
378 posts
Join Date:Joined: Feb 2014
Donate to Me
More
This should be very helpful, well done!
5th October 2014, 12:25 AM   |  #5  
Junior Member
Thanks Meter: 2
 
13 posts
Join Date:Joined: Sep 2014
I keep getting not found when i enter that comand in cmd.
5th October 2014, 05:10 AM   |  #6  
Senior Member
Thanks Meter: 14
 
101 posts
Join Date:Joined: Jan 2014
Great thread. Didn't even know about such a partition to be honest.


Sent from my Nexus 5 using Tapatalk

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

Quote:
Originally Posted by Juniluis

I keep getting not found when i enter that comand in cmd.

Have you added adb to your PATH?

Sent from my Nexus 5 using Tapatalk
5th October 2014, 06:29 AM   |  #7  
Junior Member
Thanks Meter: 2
 
13 posts
Join Date:Joined: Sep 2014
Man your a life saver thank you so much I just copy your and I stop typing because I was typing something bad.
6th October 2014, 12:42 AM   |  #8  
Junior Member
Thanks Meter: 2
 
13 posts
Join Date:Joined: Sep 2014
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?

Post Reply Subscribe to Thread

Tags
baseband unknow, error mounting /persist, no imei, no signal, persist
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes