OFFICIAL Samsung Odin v4 1.2.1-dc05e3ea - For Linux

Search This thread

akamaus

New member
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.
 
  • Like
Reactions: NielDK and Mates11

uluruman

Senior Member
Oct 23, 2021
266
48
Hello! Can you to public source code? And port Odin for Linux for ARM. It's only for x86
If you want something open-source there is a working version of Heimdall from amo13. For simplified flashing of separate image files (or any other files) or the whole stock firmware using Heimdall there are my scripts, theoretically they should work with any Samsung phone (except for the main repacksuper.sh which is for Treble-enabled phones only).
 
  • Like
Reactions: BookCase

NielDK

Inactive Recognized Developer
Jul 13, 2008
540
141
Farum
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.
Interrestingly this is the error I get , when trying to flash my SM-G991B (Galaxy S21 5G/ EU). So far I have not been able to finish the flashing on this device, with this tool.
 
Jan 27, 2023
5
0
Fist, many thanks for all the information on this forum and the Odin tool for linux!
I just registered to post here. i am new to android modding but I have already educated myself somewhat. I want to flash TWRP to my A8 to get started but I run into a problem I cannot resolve after researching for many hours. I use ubuntu 20.04.
FRP unlocked
OEM unlocked
KG state checking (not prenormal)

When trying to flash twrp, I get the lines:
Fail request receive -1
FAIL close
Fail Close Connection
Upon rebooting I get this screen (kinda soft brick?)
1674814804011.png

I can fix and restart the phone by flashing the stock AP file with this odin here.
Thanks for any advice.

Terminal screenshot attached
 

Attachments

  • Screenshot from 2023-01-27 11-30-52.png
    Screenshot from 2023-01-27 11-30-52.png
    242.2 KB · Views: 298
Last edited:

PalmerBE

Member
Nov 11, 2021
30
4
Samsung Galaxy A52s 5G
Hi,
I am in the same situation.

How do I flash the vbmeta ?

I tried with :
"odin4 -a A528BXXU1CVG7_patched_vbmeta.tar -d /dev/bus/usb/003/17 "

But I got :

/dev/bus/usb/003/017
Setup Connection
initializeConnection
Receive PIT Info
success getpit
Upload Binaries
vbmeta.img
Close Connection
Fail request receive -5
FAIL close
Fail Close Connection

Cheers
 

Virnik0

Senior Member
Sep 14, 2010
1,953
438
Prague
blog.nutcracker.cz
Heimdall didn't work with S22 and Android 13. Windows inside KVM with USB forwarded and Samsung USB drivers installed didn't work too (although ADB works over forwarded USB port just fine). I do not intend to prep live Windows USB to do this from, so I was slowly loosing hope. But this binary works. I tested it with S7, S10+, S20+ and S22, no problem at all. I would welcome GUI, but CLI works as well for me. That said - thanks a lot!
 

pranatic

New member
Apr 6, 2023
1
0
I'm using a Samsung Tab A4 8.4" (SM-T307U), trying to flash firmware using Fedora 37. It's connected via USB-C.

When I do ./odin4 -l nothing comes up.

The SM-T307U is in Download mode. I created the 51-android.rules file in /etc/udev/rules.d/.

I've rebooted the machine, installed adb as well.

The tablet shows up in lsusb and I can access the tablet in MTP mode and transfer files to it just fine.

Any ideas of how to get odin4 to recognize the tablet?
 

TheAirBlow

Member
May 7, 2021
40
32
I'm using a Samsung Tab A4 8.4" (SM-T307U), trying to flash firmware using Fedora 37. It's connected via USB-C.

When I do ./odin4 -l nothing comes up.

The SM-T307U is in Download mode. I created the 51-android.rules file in /etc/udev/rules.d/.

I've rebooted the machine, installed adb as well.

The tablet shows up in lsusb and I can access the tablet in MTP mode and transfer files to it just fine.

Any ideas of how to get odin4 to recognize the tablet?
Try to blacklist or unload cdc_acm
 
  • Like
Reactions: ethical_haquer

ethical_haquer

Senior Member
Jan 30, 2023
493
203
Samsung Galaxy A52 4G
I'm using a Samsung Tab A4 8.4" (SM-T307U), trying to flash firmware using Fedora 37. It's connected via USB-C.

When I do ./odin4 -l nothing comes up.

The SM-T307U is in Download mode. I created the 51-android.rules file in /etc/udev/rules.d/.

I've rebooted the machine, installed adb as well.

The tablet shows up in lsusb and I can access the tablet in MTP mode and transfer files to it just fine.

Any ideas of how to get odin4 to recognize the tablet?
Try to blacklist or unload cdc_acm
In other words, do this:
In the terminal, run the following:
Bash:
modprobe -r cdc_acm

cd /etc/modprobe.d/

ls
In the output from "ls" there should be one file, named something like "dkms.conf" or "blacklist.conf".
In the terminal, run the following, replacing "yourfilename.conf" with the output of the "ls" command:
Bash:
sudo nano yourfilename.conf
Add the following line to the file:
Code:
blacklist cdc_acm
To safe your changes to the file, hit Ctrl+x, y, and Enter,
EDIT: The OP's first post talks about how to do this.
 

Top Liked Posts

  • 1
    I installed JOdin3Casual and it open, but it is Disconnected. Odin4 not work for me.
  • 2
    I downloaded Odin. zip from the first page this theme. I extracted it. How I can install Odin on Linux? Command: odin -h not work for me.
    go to the directory you extracted it to. then run:
    chmod +x odin4

    then:
    ./odin4
    1
    go to the directory you extracted it to. then run:
    chmod +x odin4

    then:
    ./odin4
    What extracted? I pasted odin4 in /usr/local/bin. In bin I can't open Terminal.
    1
    What extracted? I pasted odin4 in /usr/local/bin. In bin I can't open Terminal.
    The terminal should be its own application. Try following these steps:
    First run the terminal,
    Then run this command:
    Bash:
    cd /usr/local/bin
    Next, run this command (it may need to be run with sudo):
    Bash:
    chmod +x odin4
    Finally, run this:
    Bash:
    ./odin4
    The first command changes the directory you are in, the second one changes the permissions to make the odin4 file executable, and the third runs odin4. Please let me know if you have any questions.
    1
    The first command should actually be:
    Bash:
    cd /usr/local/bin/odin4
    Sorry!
    1
    The terminal should be its own application. Try following these steps:
    First run the terminal,
    Then run this command:
    Bash:
    cd /usr/local/bin
    Next, run this command (it may need to be run with sudo):
    Bash:
    chmod +x odin4
    Finally, run this:
    Bash:
    ./odin4
    The first command changes the directory you are in, the second one changes the permissions to make the odin4 file executable, and the third runs odin4. Please let me know if you have any questions.
    I get this:
  • 19
    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!
    8
    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.

    🙏