Restoring a dd backup with Odin (A fix for a badly broken EFS)

Da_G

Inactive Senior Recognized Developer / Moderator E
Aug 20, 2007
3,320
1,553
253
Riverside, CA
I was reading rotohammer's post about an easy on-device backup method (using dd) that can restore data at a bit more of a lower level (Odin) than a nandroid backup. (EFS partitions, etc.)

It's possible to get your EFS partition in such a state that the /dev/block/bml3 and /dev/block/stl3 devices are no longer exposed on the device at all. This results in such nice behavior as the Cellular portion of the device not functioning at all. Providing you made a dd backup of all bml and stl devices (i.e. you have a backup of stl3 specifically,) you can recover from this situation.

Odin can recognize any file defined in the .pit file, when they are flashed to the PDA slot in a .tar, and place them in their proper partitions. One benefit to this is that if you get the EFS partition to a place where the device nodes aren't exposed to the OS anymore, you can restore it to working functionality.

These are the possible filenames that Odin recognizes: (from 512.pit, other .pits may have differing partition schemes.)

Code:
ries.pit
efs.rfs (this is the file we are going to restore to fix a broken EFS with a dd backup)
sbl.bin
param.lfs
zImage (kernel and recovery)
factoryfs.rfs
dbdata.rfs
cache.rfs
modem.bin
Any of these files are flashable by Odin3 1.7 if you place them in a .tar and put in the PDA slot.

rotohammer's post details which device matches up with which filename, in this case what we want to do is name the /dev/block/stl3 backup efs.rfs, and add it to a tar file (efs.tar) then flash it.

Assuming you have adb installed, and the stl3.bin file in the current folder:
adb push stl3.bin /sdcard/efs.rfs
adb shell
$ su
#
# cd /sdcard
# tar -cf efs.tar efs.rfs
# exit
$ exit
adb pull /sdcard/efs.tar

Now, get into download mode, open odin, stick efs.tar in PDA slot, and press start. Bam! EFS fixed :)

Note that in normal conditions you won't need a backup this extreme (copies of the files inside will be ok) but i've seen a number of users who have gotten their phones into this state (and did it myself during testing!) - This works with all the partitions you back up with dd that have support in your .pit file.

I've also used this to make an odin backup of my ROM, and flash it back later. This way you can have a pre-lagfixed ROM, for example :)

Dedicated to cerjam
 
Last edited:
  • Like
Reactions: organic2

grafyman

Senior Member
Feb 6, 2008
52
1
0
Moca
how to obtain stl3 and bml3

in adb

adb shell

su (allow the root access)

cat /dev/block/stl3 > /sdcard/stl3.bak

cat /dev/block/bml3 > /sdcard/bml3.bak

rename .bak by .bin

sorry for my english.:D
 

bulletproof1013

Senior Member
Dec 11, 2008
910
81
0
thats not nv_data.bin or imei and product code stuffi want efs partition structure
wich come from stl3.bin
Sorry im late...but adamoutler was going to post a blank efs partition in another thread . Dont know what happenwd to it tho.

Sent from my SAMSUNG-SGH-I897 using xda premium
 

lilizblack

Senior Member
Feb 1, 2010
62
33
0
San Juan
I was reading rotohammer's post about an easy on-device backup method (using dd) that can restore data at a bit more of a lower level (Odin) than a nandroid backup. (EFS partitions, etc.)

It's possible to get your EFS partition in such a state that the /dev/block/bml3 and /dev/block/stl3 devices are no longer exposed on the device at all. This results in such nice behavior as the Cellular portion of the device not functioning at all. Providing you made a dd backup of all bml and stl devices (i.e. you have a backup of stl3 specifically,) you can recover from this situation.

Odin can recognize any file defined in the .pit file, when they are flashed to the PDA slot in a .tar, and place them in their proper partitions. One benefit to this is that if you get the EFS partition to a place where the device nodes aren't exposed to the OS anymore, you can restore it to working functionality.

These are the possible filenames that Odin recognizes: (from 512.pit, other .pits may have differing partition schemes.)

Code:
ries.pit
efs.rfs (this is the file we are going to restore to fix a broken EFS with a dd backup)
sbl.bin
param.lfs
zImage (kernel and recovery)
factoryfs.rfs
dbdata.rfs
cache.rfs
modem.bin
Any of these files are flashable by Odin3 1.7 if you place them in a .tar and put in the PDA slot.

rotohammer's post details which device matches up with which filename, in this case what we want to do is name the /dev/block/stl3 backup efs.rfs, and add it to a tar file (efs.tar) then flash it.

Assuming you have adb installed, and the stl3.bin file in the current folder:
adb push stl3.bin /sdcard/efs.rfs
adb shell
$ su
#
# cd /sdcard
# tar -cf efs.tar efs.rfs
# exit
$ exit
adb pull /sdcard/efs.tar

Now, get into download mode, open odin, stick efs.tar in PDA slot, and press start. Bam! EFS fixed :)

Note that in normal conditions you won't need a backup this extreme (copies of the files inside will be ok) but i've seen a number of users who have gotten their phones into this state (and did it myself during testing!) - This works with all the partitions you back up with dd that have support in your .pit file.

I've also used this to make an odin backup of my ROM, and flash it back later. This way you can have a pre-lagfixed ROM, for example :)

Dedicated to cerjam
If I could Ill kiss you! Thank you it really did the trick!