• XDA Forums have been migrated to XenForo. We are aware of several issues including missing threads, logins not working, and more. To discuss, use this thread.

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

samersh72

Senior Member
Nov 26, 2012
3,572
7,468
0
48
Android City
:cowboy:
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.....:p

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
 
Last edited:

samersh72

Senior Member
Nov 26, 2012
3,572
7,468
0
48
Android City
pit files

:cowboy:
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
 

Attachments

Last edited:

samersh72

Senior Member
Nov 26, 2012
3,572
7,468
0
48
Android City
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
 

philow

New member
Aug 30, 2007
268
106
0
Looking for someone rooted that is willing to create an SM-G900T (Tmobile) PIT that can be used with Heimdall or JOdin. No Windows machines in my house.

Thanks!
 
  • Like
Reactions: Kannyy

joeknoob

New member
Jul 10, 2012
7
1
0
i have this error msg with SM-G900F pit

<ID:0/004> Added!!
<OSM> Enter CS for MD5..
<OSM> Check MD5.. Do not unplug the cable..
<OSM> Please wait..
<OSM> G900FXXU1ANCE_G900FAUT1ANC7_G900FXXU1ANCE_HOME.tar .md5 is valid.
<OSM> Checking MD5 finished Sucessfully..
<OSM> Leave CS..
<ID:0/004> Odin v.3 engine (ID:4)..
<ID:0/004> File analysis..
<ID:0/004> SetupConnection..
<OSM> All threads completed. (succeed 0 / failed 1)
<ID:0/004> Removed!!
<ID:0/004> Added!!
<ID:0/004> Odin v.3 engine (ID:4)..
<ID:0/004> File analysis..
<ID:0/004> SetupConnection..
<ID:0/004> Initialzation..
<ID:0/004> Set PIT file..
<ID:0/004> DO NOT TURN OFF TARGET!!
<ID:0/004> Get PIT for mapping..
<ID:0/004> Firmware update start..
<ID:0/004> SingleDownload.
<ID:0/004> sbl1.mbn
<ID:0/004> NAND Write Start!!
<ID:0/004> aboot.mbn
<ID:0/004> rpm.mbn
<ID:0/004> tz.mbn
<ID:0/004> sdi.mbn
<ID:0/004> NON-HLOS.bin
<ID:0/004> boot.img
<ID:0/004> recovery.img
<ID:0/004> system.img.ext4
<ID:0/004> modem.bin
<ID:0/004> cache.img.ext4
<ID:0/004> hidden.img.ext4
<ID:0/004> FAIL! (Size)
<ID:0/004>
<ID:0/004> Complete(Write) operation failed.
<OSM> All threads completed. (succeed 0 / failed 1)
 
  • Like
Reactions: lovelybia2

samersh72

Senior Member
Nov 26, 2012
3,572
7,468
0
48
Android City
i have this error msg with SM-G900F pit
I see problem in connection at first flash

But in second step Pit is set properly.

Odin troubleshooting: If Odin accidentally gives you "fail" try the following:
- Repeat procedure.
- Make sure that all actions of Kies are disabled from task manager.
- Change usb port.
- Try another usb cable (make sure it is the original).
- Try another Odin version.
- Uninstall and re-install driver.
- Try another computer

Why you are flashing with pit?

Sent from my N91
 
Last edited:

samersh72

Senior Member
Nov 26, 2012
3,572
7,468
0
48
Android City
It seems that certain G900F S5 had a different partition layout that could cause flashing to fail on the "size" of Hidden.img. (as Note 3 phone)
I need some users from different countries with a SM-G900F (16GB) to extract pit file from their rooted phones (follow second post of this thread).

thanks in advance
 

joeknoob

New member
Jul 10, 2012
7
1
0
It seems that certain G900F S5 had a different partition layout that could cause flashing to fail on the "size" of Hidden.img. (as Note 3 phone)
I need some users from different countries with a SM-G900F (16GB) to extract pit file from their rooted phones (follow second post of this thread).

thanks in advance
i need pit for my G900F - 16GB AUT (Switzerland)

this is reason for my flashfail :(


(sorry for my bad english)