FORUMS
Remove All Ads from XDA

[GUIDE] EFS/NV_DATA full backup and restore manually -- Extract / Post your pit file

3,571 posts
Thanks Meter: 7,472
 
Post Reply Email Thread

Here i will show you how to backup & restore EFS and NV_data manually for some variants of Galaxy S5 without a third party app or tool.
Sure a third party app or tool will do the job, but it is good to learn something.....

Backuping efs partition is an essential step to keep it safe after rooting since a bad flashing/modding of your S5 may result in a corruption of that partition. so it is better to be safe than sorry, so any disturbance in the EFS data might result in null IMEI and baseband version.

This will backup data like device specific essential information such as the IMEI (International Mobile Station Equipment Identity), wireless device MAC address, baseband version, product code, system ID and NV data.

You must have a proper root access in addition to busybox installed (preferred)
you can dump these partitions also using adb shell command. but here i will show you how to backup using a terminal emulator.




How to do it
Backup EFS/NV_data for SM-G900F/T/P/A/I/M/W8 variants:

Download "terminal emulator" app from play store and install it.
Open the app and type:
Code:
su
Grant permission
Code:
dd if=/dev/block/mmcblk0p12 of=/mnt/sdcard/efs.img.ext4
dd if=/dev/block/mmcblk0p13 of=/mnt/sdcard/modemst1.bin
dd if=/dev/block/mmcblk0p14 of=/mnt/sdcard/modemst2.bin
copy images from internal sdcard to a safe place such as pc.

Note that the size of .img and .bin must be as follow: efs (14MB) modemst1/2 (3MB each)

Restore EFS/NV_data for SM-900F/T/P/A/I/M/W8 variants:

Make sure Backuped images are in your internal sdcard (not in any folder).
open terminal emulator and type (HERE DONT MAKE MISTAKES!) :
Code:
su
dd if=/mnt/sdcard/efs.img.ext4 of=/dev/block/mmcblk0p12
dd if=/mnt/sdcard/modemst1.bin of=/dev/block/mmcblk0p13
dd if=/mnt/sdcard/modemst2.bin of=/dev/block/mmcblk0p14
Backup EFS/NV_data for SG-900H variant:

Download "terminal emulator" app from play store and install it.
Open the app and type:
Code:
su
Grant permission
Code:
dd if=/dev/block/mmcblk0p3 of=/mnt/sdcard/efs.img.ext4
dd if=/dev/block/mmcblk0p4 of=/mnt/sdcard/m9kefs1.bin
dd if=/dev/block/mmcblk0p5 of=/mnt/sdcard/m9kefs2.bin
dd if=/dev/block/mmcblk0p6 of=/mnt/sdcard/m9kefs3.bin
copy images from internal sdcard to a safe place such as pc.

Note that sizes of .img and .bin must be as follow: efs (20MB) m9kefs1/2/3 (4MB each)

Restore EFS/NV_data for SG-G900H variant:

Make sure Backuped images are in your internal sdcard (not in any folder).
open terminal emulator and type (HERE DONT MAKE MISTAKES!):
Code:
su
dd if=/mnt/sdcard/efs.img.ext4 of=/dev/block/mmcblk0p3
dd if=/mnt/sdcard/m9kefs1.bin of=/dev/block/mmcblk0p4
dd if=/mnt/sdcard/m9kefs2.bin of=/dev/block/mmcblk0p5
dd if=/mnt/sdcard/m9kefs3.bin of=/dev/block/mmcblk0p6
The Following 42 Users Say Thank You to samersh72 For This Useful Post: [ View ] Gift samersh72 Ad-Free
 
 
1st May 2014, 08:26 AM |#2  
pit files

Extract / Post your pit file


Pit file is needed to be flashed when the partition table of your device is corrupted due to some reason such as a wrong flash of your variant.

When partition table is corrupted or missed from your device, odin will tell you when flashing firmware that there is "no pit partition" or "Re-Partition operation failed", in this case pit file must be flashed along with the stock firmware (or alone) with "re-partition" ticked in odin.

--DO NOT flash pit file if there is no need for it--

There is some ways to extract pit file from your device such as using "heimdall" or some tools.
Here i will show you how to extract the pit file manually with a simple way using terminal emulator or adb shell command.
your phone must have a proper root access, with busybox installed (preferred).


how to do it

With terminal emulator:

Download and install terminal emulator from play store.
Open it and type:
Code:
su
Grant permission
Code:
dd if=/dev/block/mmcblk0 of=/sdcard/out.pit bs=8 count=580 skip=2176
See the pit file in your internal sdcard, move it to pc

With adb shell:

You must have android sdk installed in your pc.
Enable "usb debugging" in "developer options", connect your phone to pc, open a cmd window (shift+right mouse click) and type:
Code:
adb devices
adb shell
su
Grant permission
Code:
dd if=/dev/block/mmcblk0 of=/sdcard/out.pit bs=8 count=580 skip=2176
See your pit file in your internal sdcard and move it to pc.
Please attach the extracted pit file in a zip in this thread and mention your S5 variant name and storage (16/32GB) that other users can benefit from it


THX to
@linty
@xtechx
@fffft
@jeffreylin_
@tdunham
@ratatouille
@LoSt180
@babygau
@felstar
@born4trance
@demdix
@qwerty22
@/ofAllEvil
@Max One
@hawst
@androidrouen
The Following 45 Users Say Thank You to samersh72 For This Useful Post: [ View ] Gift samersh72 Ad-Free
xtechx
1st May 2014, 12:20 PM |#4  
Guest
Thanks Meter: 0
 
More
attachment and content removed, can delete post if desired.
The Following User Says Thank You to For This Useful Post: [ View ] Gift Ad-Free
1st May 2014, 12:29 PM |#5  
Quote:
Originally Posted by xtechx

thanks! I've attached a PIT from my phone, if anyone needs it

hmm... can not open it with pit magic tool
there is something wrong.
can you post outcome of
Code:
cat /proc/partitions
The Following User Says Thank You to samersh72 For This Useful Post: [ View ] Gift samersh72 Ad-Free
xtechx
1st May 2014, 12:38 PM |#6  
Guest
Thanks Meter: 0
 
More
attachment and content removed, can delete post if desired.
The Following User Says Thank You to For This Useful Post: [ View ] Gift Ad-Free
1st May 2014, 12:44 PM |#7  
Quote:
Originally Posted by xtechx

weird. I'm running it from Ubuntu 14.04, x64, but I don't think that should matter. I have a couple Windows systems here too... I'm suspect of this cable, it seemed to damage a zip file I tried to flash once (was supposed to be 570MB< but it only copied 70MB)...but everything else has copied fine, including that file when I did it a second time...so not sure...

I re-ran the command, just in case. I've also included the output from /proc/partitions

addition: this time I zipped it on my computer, where as last time I zipped it with root explorer

ok, try with this command
Code:
dd if=/dev/block/mmcblk0 of=/sdcard/out.pit bs=8 count=580 skip=2176
The Following User Says Thank You to samersh72 For This Useful Post: [ View ] Gift samersh72 Ad-Free
xtechx
1st May 2014, 12:57 PM |#8  
Guest
Thanks Meter: 0
 
More
Quote:
Originally Posted by samersh72

ok, try with this command

Code:
dd if=/dev/block/mmcblk0 of=/sdcard/out.pit bs=8 count=580 skip=2176

Done
Attached Files
File Type: gz SM-G900M-16GB-PIT.tar.gz - [Click for QR Code] (1.1 KB, 905 views)
The Following User Says Thank You to For This Useful Post: [ View ] Gift Ad-Free
xtechx
1st May 2014, 01:10 PM |#10  
Guest
Thanks Meter: 0
 
More
Quote:
Originally Posted by samersh72

yes it worked!
thank you
i will add it to second post

You're welcome! I'll edit my posts to remove the bad zip files, so that no one downloads them by mistake.
The Following User Says Thank You to For This Useful Post: [ View ] Gift Ad-Free
Post Reply Subscribe to Thread

Tags
backup, efs, nv_data, pit file, restore

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes