OFFICIAL Samsung Odin v4 1.2.1-dc05e3ea - For Linux

Search This thread

ethical_haquer

Senior Member
Jan 30, 2023
712
384
Samsung Galaxy A52 4G
Running
Bash:
odin4 -h
like you already have shows you how to use the command. What exactly are you trying to do with it? (Flash, etc.) Let me know and I'll help you achieve the desired result.
 

ethical_haquer

Senior Member
Jan 30, 2023
712
384
Samsung Galaxy A52 4G
to me, it looks like he cant execute the binary, for which my advice was to make it executable first
running_odin4.png

That's what I originally thought too, but after looking more in-depth at his screenshot I saw that he had been able to run "odin4 -h" successfully.
 
  • Like
Reactions: Virnik0

Virnik0

Senior Member
Sep 14, 2010
1,984
446
Prague
blog.nutcracker.cz
Extract the firmware zip, which will produce AP, BL, CP, CSC tarballs. (tar archives).

then call:
odin4 -a APtarball -b BLtarball....

again, it is printed in your terminal as help. Just read it. I am quite surprised that you managed toinstall and configure your desktop, when you have a problem with this
 

ZmisiS

Senior Member
Dec 23, 2011
3,434
809
60
Livno
Extract the firmware zip, which will produce AP, BL, CP, CSC tarballs. (tar archives).

then call:
odin4 -a APtarball -b BLtarball....

again, it is printed in your terminal as help. Just read it. I am quite surprised that you managed toinstall and configure your desktop, when you have a problem with this
I know for extract. I did that on Windows. AP_G973FXXSGHWA3_CL25257816_QB61057831_REV01_user_low_ship_meta_OS12.tar. I'm not going to write all this down, am I?

I switched from Windows to Linux 2 or 3 weeks ago. To install this I found help on several sites on the Internet. I know what I need to do, but I don't know how.
 

ZmisiS

Senior Member
Dec 23, 2011
3,434
809
60
Livno
understood, but you also fail to explain what are you trying to do and what doesn't work
For example, I want to install Stock ROM. I open the phone in Download Mode. I want to select AP, BL, CP and CSC. No matter what I type in the Terminal, it doesn't work. I get the message Command not found. If I were to type, what should I do to start the ROM installation? I need a description of how to do it.
 

Virnik0

Senior Member
Sep 14, 2010
1,984
446
Prague
blog.nutcracker.cz
For example, I want to install Stock ROM. I open the phone in Download Mode. I want to select AP, BL, CP and CSC. No matter what I type in the Terminal, it doesn't work. I get the message Command not found. If I were to type, what should I do to start the ROM installation? I need a description of how to do it.
Yes, because while you've put the binary to a directory (I think it was /usr/local/bin, right?), you have to either provide full path to the binary (so you'll flash by running /usr/local/bin/odin4), or export /usr/local/bin to your PATH variable.

So, let's assume your odin4 binary is in /usr/local/bin, where I also put it on my system:
Bash:
virnik@Mainframe:~/Práce/GalaxyS7$ which odin4
/usr/local/bin/odin4
virnik@Mainframe:~/Práce/GalaxyS7$ echo $PATH
/home/virnik/.bin:/opt/wine-git/bin:/home/virnik/.bin:/opt/wine-git/bin:/home/virnik/.bin:/opt/wine-git/bin:/opt/wine-git/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/virnik/.dotnet/tools
virnik@Mainframe:~/Práce/GalaxyS7$

As you can see, my odin4 is in /usr/local/bin, and I Have exported /usr/local/bin to my PATH. You can do it too. Run this:
Bash:
tee -a ~/.profile > /dev/null <<EOT
# set PATH so it includes /usr/local/bin
if [ -d "/usr/local/bin" ] ; then
PATH="/usr/local/bin:$PATH"
fi
EOT
This will add path of /usr/local/bin to your PATH variable. I am using ~/.profile file, which is loaded first time you logon. Now you can either logoff, or just 'source' the file, so the change become effective. This is one command! Copy everything starting by 'tee' and ending by last EOT, and paste to your terminal. Then run this:
Code:
. ~/.profile
The dot at the beginning is important! It will load this change to your profile.

Now, you should be able to use odin4 regardless of your current directory. Try it:

Bash:
cd ~/
which odin4
(should print: /usr/local/bin/odin4)

OK, so now you should be able to use odin4, so try to use it to flash the phone. Connect your phone over USB in Download mode, and enter the directory where you've extracted firmware tarballs. I am not certain whether odin4 understands *.md5 files being just tarballs, if not, rename your firmware files to remove md5 suffix (leaving just .tar), and flash. Bellow example is from flashing Galaxy S7, but the principle is the same (I used it on Galaxy S10+, Galaxy S20, Galaxy S22):
Bash:
odin4 -b BL_G930FXXU8EVG3_CL19497840_QB54396082_REV00_user_low_ship.tar -a AP_G930FXXU8EVG3_CL19497840_QB54396082_REV00_user_low_ship_meta.tar -c CP_G930FXXU8ETI2_CP16784499_CL19497840_QB34227861_REV00_user_low_ship.tar -s CSC_ETL_G930FETL8ETI3_CL19818482_QB34666376_REV00_user_low_ship.tar
 
Last edited:
  • Like
Reactions: ZmisiS

ZmisiS

Senior Member
Dec 23, 2011
3,434
809
60
Livno
Yes, because while you've put the binary to a directory (I think it was /usr/local/bin, right?), you have to either provide full path to the binary (so you'll flash by running /usr/local/bin/odin4), or export /usr/local/bin to your PATH variable.

So, let's assume your odin4 binary is in /usr/local/bin, where I also put it on my system:
Bash:
virnik@Mainframe:~/Práce/GalaxyS7$ which odin4
/usr/local/bin/odin4
virnik@Mainframe:~/Práce/GalaxyS7$ echo $PATH
/home/virnik/.bin:/opt/wine-git/bin:/home/virnik/.bin:/opt/wine-git/bin:/home/virnik/.bin:/opt/wine-git/bin:/opt/wine-git/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/virnik/.dotnet/tools
virnik@Mainframe:~/Práce/GalaxyS7$

As you can see, my odin4 is in /usr/local/bin, and I Have exported /usr/local/bin to my PATH. You can do it too. Run this:
Bash:
tee -a ~/.profile > /dev/null <<EOT
# set PATH so it includes /usr/local/bin
if [ -d "/usr/local/bin" ] ; then
PATH="/usr/local/bin:$PATH"
fi
EOT
This will add path of /usr/local/bin to your PATH variable. I am using ~/.profile file, which is loaded first time you logon. Now you can either logoff, or just 'source' the file, so the change become effective. This is one command! Copy everything starting by 'tee' and ending by last EOT, and paste to your terminal. Then run this:
Code:
. ~/.profile
The dot at the beginning is important! It will load this change to your profile.

Now, you should be able to use odin4 regardless of your current directory. Try it:

Bash:
cd ~/
which odin4
(should print: /usr/local/bin/odin4)

OK, so now you should be able to use odin4, so try to use it to flash the phone. Connect your phone over USB in Download mode, and enter the directory where you've extracted firmware tarballs. I am not certain whether odin4 understands *.md5 files being just tarballs, if not, rename your firmware files to remove md5 suffix (leaving just .tar), and flash. Bellow example is from flashing Galaxy S7, but the principle is the same (I used it on Galaxy S10+, Galaxy S20, Galaxy S22):
Bash:
odin4 -b BL_G930FXXU8EVG3_CL19497840_QB54396082_REV00_user_low_ship.tar -a AP_G930FXXU8EVG3_CL19497840_QB54396082_REV00_user_low_ship_meta.tar -c CP_G930FXXU8ETI2_CP16784499_CL19497840_QB34227861_REV00_user_low_ship.tar -s CSC_ETL_G930FETL8ETI3_CL19818482_QB34666376_REV00_user_low_ship.tar
It is this:


It is in /home/mandak/Downloads. Should I type this in Terminal and then Enter? Then AP, BL, CP and CSC? When everything is entered, is it just necessary to press Enter for Start or...?

I tried install and I get notification: cannot find device.
 

Attachments

  • Screenshot_20230528_135649.jpg
    Screenshot_20230528_135649.jpg
    33.9 KB · Views: 29
  • cannot find device.jpg
    cannot find device.jpg
    102.4 KB · Views: 26
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Can u make a video pls, I don't rly understand..
    Can you be more specific please, I can't help you if you don't say what you're trying to do.
    1
    Hello guys ... I am trying to flash A34 5G. ANDROID 13 .. BUT I GET ERROR MESSAGE

    Fail request received 0
    FAIL!(Erase)
    Fail receive PIT info


    Then on phone it says

    MDM MODE. CAN'T ERASE USERDATA
    Userdata is probably encrypted. Have you provided PIT? Try booting to stock recovery, and doing Factory Reset/Wipe. Format Data as well.

    Then try again. Make sure that you do provide vbmeta image as well to the Odin, or package it to existing tarball and flash along. Basically it tells you that you're not authorized to overwrite data image/part of the phone.
    1
    Very good stuff, just a remark from France, I've just refund my Samsung M20 (turk version) with android 10 with your soft : quiet good! before, i've made a mistake with a release of his old Android 9 with e/OS (to ungoogle it) wich is make for android 10 ... all broken... But, odin4 is strong, odin4 is full, you know, with odin4, this is freedom for release ;-)))))) If you want some screenshots of my upgrade , I could send them. thank you. Sylvain. (Linux Devuan4)
    Usually when you're not certain in which state the phone is, make sure to download latest genuine FW for given phone model, and either flash with Odin3 (Windows), or odin4 (Linux) with re-partition ticket/defined. You'll need PIT file as well (it is available in the firmware tarball, just extract it).

    That would wipe the phone, and reset it to factory settings, overwriting all content. Then follow the procedure to get it rooted and TWRP flashed, before moving forward with any firmware reflash.
    1
    Can you be more specific please, I can't help you if you don't say what you're trying to do.
    I don't understand nothing, I'm new l8nex user I know nothing about commands and boot and things like that. I just want to install a custom rom to my samsung a21s.
    1
    What custom ROM in particular? (link please).
    I wanted to Flash twrp so I can install lineage os https://lineageos.org/
  • 22

    Try out my new Linux flash tool called Thor - https://forum.xda-developers.com/t/dev-thor-flash-utility-the-new-samsung-flash-tool.4597355, which has all the features of this tool + extras, like the usual Windows Odin ones which are missing in this leaked tool: F. Reset Time, NAND Erase All (aka just erase userdata), EFS Clear and bootloader update.​


    Samsung's Odin on Linux is no longer a dream! This is an official version leaked from Samsung.

    WARNING! Don't DM me stupid questions, I'm not tech support and I'm not going to teach you linux.


    Here's the output you get from
    Code:
    odin -h
    Code:
    Usage : odin4 [args...]
    Odin4 downloader. odin4 version 1.2.1-dc05e3ea
     -v        SHOW VERSION
     -w        Show License
     -b        Add Bootloader file
     -a        Add AP image file
     -c        Add CP image file
     -s        Add CSC file
     -u        Add UMS file
     -e        Set Nand erase option
     -V        Home binary validation check with pit file
     --reboot  Reboot into normal mode
     --redownload   Reboot into download mode if it possible (not working in normal case)
     -d        Set a device path (detect automatically without this option)
     -l        Show downloadable devices path
    
    IMPORTANT : You must set up your system to detect your device on LINUX host.
     create this file: /etc/udev/rules.d/51-android.rules
     to add a line to the file:
     SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
       (http://developer.android.com/tools/device.html)
     And you maybe need to unload a module cdc_acm before downloading. (This is only needed for older kernels.)
       $sudo rmmod cdc_acm
     OR
       echo "blacklist cdc_acm" > /etc/modprobe.d/cdc_acm-blacklist.conf
    
    Example :
    $odin4 -b BL_XXXX.tar.md5 -a AP_XXXX.tar.md5 -c CP_XXXX.tar.md5 -s CSC_XXXX.tar.md5
    Example (Select One Device):
    $odin4 -l
    PATH_OF_DEVICE_A
    PATH_OF_DEVICE_B
    $odin4 -b BL_XXXX.tar.md5 -a AP_XXXX.tar.md5 -c CP_XXXX.tar.md5 -s CSC_XXXX.tar.md5 -d PATH_OF_DEVICE_A
    
    Odin Community : http://mobilerndhub.sec.samsung.net/hub/site/odin/

    You can even verify that's the real one by comparing it's code with the Windows Odin.
    For some reason some method names were left unmodified.
    Have a nice day!
    10
    It is in the archive attached. XDA doesn't allow for no-extension files to be uploaded.
    2
    OMFG! You are a godsend!!! I was skeptical at first when I saw this post, wondering how I never saw this before today... However, I just tried it out and it worked 100% and quickly!

    I have tried every other linux solution and every last one came up bust until now. Thanks again!
    Screenshot_2022-10-26_04-59-27.png
    2
    I successfully flashed lineage os recovery on Samsung a52q using that tool. I want to emphasize that rmmod cdc_acm was a mandatory step for me. Without it I got
    ioctl bulk read Fail : Connection timed out 110 error. That's quite strange, given the fact that module count usage was zero and /dev/ttyACM device was not created. But still the module interfered with the flashing process somehow.

    Also I decided not to mess with udev rules and just issued chown my_user /dev/bus/usb/xxx/yyy.
    Whats was enough.
    2
    Thanks a lot @TheAirBlow !

    I just tested, I was able to downgrade/update official firmware and flash my bootloader without problems. Really great, it was really annoying to have to use a VM for that.

    🙏