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

Search This thread

Da_G

Inactive Senior RD / Moderator Emeritus
Aug 20, 2007
3,332
1,563
Riverside, CA
Samsung Galaxy S22 Ultra
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
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
 

whiteguypl

Senior Member
Nov 9, 2010
929
202
Gonna go out on a limb and assume they are using search, hence the 5 month old post bump.
 

lilizblack

Senior Member
Feb 1, 2010
62
33
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!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    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
    1
    This thread may be almost a year old, but it just saved my Infuse.

    Once again it just proves that if you serach, read, try and search, read and try somemore, you can find the answers.