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

aprunic

Senior Member
Aug 7, 2010
56
4
0
: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
Here's my PIT file from freshly rooted phone using downgrade to KK with ANE2/towelroot and upgrade to LP with BOJ1/flashfire...
 

Attachments

  • Like
Reactions: samersh72

jma.ayala

New member
Dec 8, 2015
1
0
0
Help with SM-G900F XSG version

Hi guys, anyone who has the PIT file for SM-G900F (XSG) Lollipop 5.0? Accidentally Tried to root my phone using CF-Auto 4.4.x wrong version, now It seems cannot flash stock firmware with same version from SamMobile. Since It's not possible to flash stock firmware, I'll try to repartition with the PIT file. Thanks in advance.
 

Waheed Hassan

Senior Member
Aug 29, 2013
158
148
0
Sharjah
EFS backup!

hi guys, when i execute this statement: dd if=/dev/block/mmcblk0p3 of=/mnt/sdcard/efs.img.ext4
after granting su permission, the terminal says: no such file or directory, how to solve this problem? :p
 

mubu

New member
Feb 19, 2016
1
0
0
g900h 32GB pit file

does anyone have the g900h 32GB pit file?....Got my phone bricked before i could extract the pit file and now im only able to boot into download mode... Odin also giving PIT errors....
 

yakeee0023

New member
Feb 23, 2016
2
0
0
Caloocan City
sir,

Good afternoon sir,
can you help me?,
Every time i tried to reflash my s5 using odin with full firm with pit file i always get the error message ( No Pit file ) cant pass through there and ive almost tried every pit file you share here, still cant flash my cp. can you give me some advise?

(Samsung Galaxy s5 SM-G900F 32gb International no carrier)-exact cp model
 

daimonwilcox

New member
Apr 1, 2015
2
0
0
I have a galaxy s5 i rooted it but i also turned on reactivation lock on and locked myself out after doing a hard reset because i didnt think my efs was corrupt is there any way to restore the efs through adb or flash it vis a stock rom i didnt install custom recovery.Also i didnt do a efs backup on this device
 

blackoakx22

Senior Member
Sep 10, 2010
225
15
0
Hello guys!

I am looking for a pit file for the Sprint S5 Acitve (G860P) I see there is a pit file for the s5 active however from what I have been reading the partition layout for the sprint version is a bit different from the GSM variant of S5 Active. Does anyone happen to have a pit file or a phone they are willing to retrieve their pit file from?

Thank you!
 
Oct 16, 2016
19
0
0
baseband unknown imei null

: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


i have g900i
i didnt have any backup of efs folder
n i flashed note 7 based rom
nw my imei null n baseband unknown
anyway to fix it please!!
 

hrundel200

Member
Mar 30, 2016
5
0
0
I have g900w8
TWRP -2.8.7.0
stock - G900W8VLU1AND1_G900W8OYA1AND1_G900W8VLU1AND1_HOME.tar.md5 (rooted)
and I haven't any IMEI partition on my phone, what can I do ?
 

embrosyn

Member
Feb 24, 2016
9
2
0
Awesome guide! Thank you for posting!

I've attached a PIT file extracted from a white, 16 GB SM-G900F. Maybe you can make use of it. EFS Professional device information provided in the code block below, sans the Connected Device SN. part, as I suppose this part uniquely identifies the device.

Code:
---------- Hardware Information ----------
Connected Device SN.:  ########
Device Manufacturer:   SAMSUNG
Device Model:          SM-G900F
Product Code:          SM-G900FZWADBT
Hardware Version:      MP 0.800

---------- Firmware Information ----------
PDA Version:           G900FXXS1CQD4
Baseband Version:      G900FXXU1CQA3
CSC Version:           G900FDBT1CQA1

---------- Software Information ----------
Kernel Release:        3.4.0-9493471
Kernel Version:        #1 SMP PREEMPT Wed Apr 5 00:11:08 KST 2017
ROM Build:             kltexx-user 6.0.1 MMB29M G900FXXS1CQD4 release-keys
Android Version:       6.0.1
BusyBox Version:       1.23.2-Stericson
SU Binary Version:     2.82:SUPERSU
~ embrosyn
 

Attachments

Last edited:

Confuserix

Member
Jun 9, 2017
6
0
0
I am a newbie. And I urgently need a PIT-file which fits to my device and firmware. :crying:
First step for flashing my Galaxy S5 G900F was my idea to flash latest Samsung Firmware on it, in order to get the latest broadband and modem firmware. Second step should be, to get root access, install TRWP, doing backups and then flashing Lineage OS.
My first step was to use Odin3_v3.12.3 and follow the flash tips, I found in several forum identical. Most of them warned, to use / flash a PIT-file. I downloaded the correct Samsung stock firmware from Sammobile, put it in the right place and the flashing stopped at "hidden.img.ext4" with ERROR.
Can I repair the flashed firmware by using the PIT-file, which fits to it?
Here the data from my device before flashing:
Model SM-G900F
Android 6.0.1
Baseband: G900FXXS1CQAV
Kernel: 3.4.0-9493471
[email protected] #1
Thu Mar 30 19:53:52 KST 2017
BuildNr: MMB29M.G900FXXS1CQD1

I have flashed with the firmware:
G900FXXU1CRA2_G900FDBT1CRB1_G900FXXU1CQK3_HOME.tar.md5

My search for a solution let me find out, that the original firmware seemd to be for UK (BTU):
Build date: Mon, 02 Jan 2017 09:46:05 +0000
Security Patch Level: 2017-01-01
Product code: BTU
PDA: G900FXXS1CQAV
CSC: G900FOXA1CPJ6
This is strange because I bought my S5 as a "DBT-version" from an ebay dealer! But it seems, that it has been sold on the British market.

When I change location to Germany and do select DBT, Sammobile offers the firmware, I have just used to flash:
Build date: N/A
Security Patch Level: N/A
Product code: DBT
PDA: G900FXXU1CRA2
CSC: G900FDBT1CRB1

What can I do, to get my S5 working again?

  • Should I try to use your PIT-file, embrosyn?
  • Should I try, to flash back the firmware, which was originally installed, the "G900FXXS1CQAV"?
  • If I would reinstall the firmware, which was originally installed, it is from UK (BTU). Is it possible to flash it to the klte-version of Lineage-OS?
:confused: Any help very welcome!!!
@embrosyn - can your PIT file be the solution for me?
 

Confuserix

Member
Jun 9, 2017
6
0
0
I am a newbie. And I urgently need a PIT-file which fits to my device and firmware. :crying:
:confused: Any help very welcome!!!
@embrosyn - can your PIT file be the solution for me?
Hi!
I have solved the problem, by flashing the ROM back, which was originally on the S5, when I got it. This flashing was successfull. Further I had the luck, that the EFS-partition did not crash and IMEI lost.
Further I found, that the original ROM was one for Germany (DTM) and sammobile had wrong data, showing the ROM as one for UK (BTU). On Samsung-firmware, they had data correct. From there, I got my old ROM back.

From there I could have an OTA update on the latest stock ROM.
Then I flashes TWRP via ODIN and did a full backup.
Then I used TWRP, to install LOS from my SD-card.
Finally I installed AddOn-SU via TWRP.

Now everything is up and running, like I wished. No PIT-file has been necessary.
 
Last edited:

FruBa

Member
Nov 17, 2014
16
2
0
: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


Here is my SM-G900S pit
exported from S5 with RR rom android 7.1.2
 

Attachments

  • Like
Reactions: samersh72