OFFICIAL Samsung Odin v4 1.2.1-dc05e3ea - For Linux

Search This thread

braveheartleo

Senior Member
I'm also in the same boat as you while trying to flash stock ROM for my SM-A528B Galaxy A52s 5G. I get the same error ioctl bulk read Fail : Connection timed out 110. I have setup the correct udev rules and verified no interference from cdc_acm. I'm still trying to figure where the problem might be, or that it could be that the flasher binary is at fault and would need an update or bugfix should a workaround may not be found.
I'm posting an update regarding this issue. I can only describe what happened as surprising, but I successfully flashed the Galaxy A52s 5G when I was ready to do some more troubleshooting with it using strace. Here is the console log:
Code:
strace -o trace.log odin4 -b BL_A528BXXU3EWE1_A528BXXU3EWE1_MQB64984945_REV00_user_low_ship_MULTI_CERT.tar.md5 -a AP_A528BXXU3EWE1_A528BXXU3EWE1_MQB64984945_REV00_user_low_ship_MULTI_CERT_meta_OS13.tar.md5 -c CP_A528BXXU3EWE1_CP24186417_MQB64984945_REV00_user_low_ship_MULTI_CERT.tar.md5 -s HOME_CSC_OLM_A528BOLM3EWE1_MQB64984945_REV00_user_low_ship_MULTI_CERT.tar.md5
Check file : BL_A528BXXU3EWE1_A528BXXU3EWE1_MQB64984945_REV00_user_low_ship_MULTI_CERT.tar.md5
Check file : AP_A528BXXU3EWE1_A528BXXU3EWE1_MQB64984945_REV00_user_low_ship_MULTI_CERT_meta_OS13.tar.md5
Check file : CP_A528BXXU3EWE1_CP24186417_MQB64984945_REV00_user_low_ship_MULTI_CERT.tar.md5
Check file : HOME_CSC_OLM_A528BOLM3EWE1_MQB64984945_REV00_user_low_ship_MULTI_CERT.tar.md5
meta-data/download-list.txt
/dev/bus/usb/001/010
/dev/bus/usb/001/010
Setup Connection
initializeConnection
Receive PIT Info
success getpit
Upload Binaries
abl.elf.lz4
xbl.elf.lz4
xbl_config.elf.lz4
tz.mbn.lz4
hypvm.mbn.lz4
devcfg.mbn.lz4
tz_iccc.mbn.lz4
aop.mbn.lz4
km41.mbn.lz4
qupv3fw.elf.lz4
storsec.mbn.lz4
NON-HLOS.bin.lz4
dspso.bin.lz4
shrm.elf.lz4
cpucp.elf.lz4
uefi_sec.mbn.lz4
imagefv.elf.lz4
sec.elf.lz4
bksecapp.mbn.lz4
apdp.mbn.lz4
vbmeta.img.lz4
vaultkeeper.mbn.lz4
tz_kg.mbn.lz4
tz_hdm.mbn.lz4
boot.img.lz4
recovery.img.lz4
vendor_boot.img.lz4
dtbo.img.lz4
super.img.lz4
vbmeta.img.lz4
vbmeta_system.img.lz4
modem.bin.lz4
cache.img.lz4
prism.img.lz4
optics.img.lz4
Close Connection
As you can see, I was quite surprised when it started flashing. I was expecting to see the ioctl bulk read Fail : Connection timed out 110 error and get the trace log to know more. The setup remained the same phone unit, same USB cable used, same USB port connected to, same machine used for flashing.

I don't know what changed for the flashing to push through, save for the strace prepended before the odin4 command. Perhaps this changed some execution condition that doesn't result to the ioctl bulk read fail. I guess it would be good to repeat flashing the unit again normally, without strace, and see if it results in the error coming back but that would be for some other time.
 
Last edited:

ZmisiS

Senior Member
Dec 23, 2011
3,451
810
60
Livno
I'm posting an update regarding this issue. I can only describe what happened as surprising, but I successfully flashed the Galaxy A52s 5G when I was ready to do some more troubleshooting with it using strace. Here is the console log:
Code:
strace -o trace.log odin4 -b BL_A528BXXU3EWE1_A528BXXU3EWE1_MQB64984945_REV00_user_low_ship_MULTI_CERT.tar.md5 -a AP_A528BXXU3EWE1_A528BXXU3EWE1_MQB64984945_REV00_user_low_ship_MULTI_CERT_meta_OS13.tar.md5 -c CP_A528BXXU3EWE1_CP24186417_MQB64984945_REV00_user_low_ship_MULTI_CERT.tar.md5 -s HOME_CSC_OLM_A528BOLM3EWE1_MQB64984945_REV00_user_low_ship_MULTI_CERT.tar.md5
Check file : BL_A528BXXU3EWE1_A528BXXU3EWE1_MQB64984945_REV00_user_low_ship_MULTI_CERT.tar.md5
Check file : AP_A528BXXU3EWE1_A528BXXU3EWE1_MQB64984945_REV00_user_low_ship_MULTI_CERT_meta_OS13.tar.md5
Check file : CP_A528BXXU3EWE1_CP24186417_MQB64984945_REV00_user_low_ship_MULTI_CERT.tar.md5
Check file : HOME_CSC_OLM_A528BOLM3EWE1_MQB64984945_REV00_user_low_ship_MULTI_CERT.tar.md5
meta-data/download-list.txt
/dev/bus/usb/001/010
/dev/bus/usb/001/010
Setup Connection
initializeConnection
Receive PIT Info
success getpit
Upload Binaries
abl.elf.lz4
xbl.elf.lz4
xbl_config.elf.lz4
tz.mbn.lz4
hypvm.mbn.lz4
devcfg.mbn.lz4
tz_iccc.mbn.lz4
aop.mbn.lz4
km41.mbn.lz4
qupv3fw.elf.lz4
storsec.mbn.lz4
NON-HLOS.bin.lz4
dspso.bin.lz4
shrm.elf.lz4
cpucp.elf.lz4
uefi_sec.mbn.lz4
imagefv.elf.lz4
sec.elf.lz4
bksecapp.mbn.lz4
apdp.mbn.lz4
vbmeta.img.lz4
vaultkeeper.mbn.lz4
tz_kg.mbn.lz4
tz_hdm.mbn.lz4
boot.img.lz4
recovery.img.lz4
vendor_boot.img.lz4
dtbo.img.lz4
super.img.lz4
vbmeta.img.lz4
vbmeta_system.img.lz4
modem.bin.lz4
cache.img.lz4
prism.img.lz4
optics.img.lz4
Close Connection
As you can see, I was quite surprised when it started flashing. I was expecting to see the ioctl bulk read Fail : Connection timed out 110 error and get the trace log to know more. The setup remained the same phone unit, same USB cable used, same USB port connected to, same machine used for flashing.

I don't know what changed for the flashing to push through, save for the strace prepended before the odin4 command. Perhaps this changed some execution condition that doesn't result to the ioctl bulk read fail. I guess it would be good to repeat flashing the unit again normally, without strace, and see if it results in the error coming back but that would be for some other time.
I tried strace and it not work for me. I installed strace with Terminal.

Can you be a little more precise and write what you typed in Terminal when you used strace? What should be done to start the strace?
 

ZmisiS

Senior Member
Dec 23, 2011
3,451
810
60
Livno
Odin4 work for me on Ubuntu 22.04.2 LTS. I need know how disable 'Autoreboot in odin4. Here's how I did and installed the Stock ROM on Samsung Galaxy S10 (SM-G973F).

I need install twrp-3.7.0_9-1-beyond1lte.img.tar and vbmeta.tar.
 

Attachments

  • Screenshot from 2023-06-03 18-48-49.png
    Screenshot from 2023-06-03 18-48-49.png
    54.4 KB · Views: 31
  • Screenshot from 2023-06-03 18-47-25.png
    Screenshot from 2023-06-03 18-47-25.png
    121.8 KB · Views: 34
Last edited:

ZmisiS

Senior Member
Dec 23, 2011
3,451
810
60
Livno
I tried install TWRP and vbmeta and not work for me. I don't know command for install this.
 

Attachments

  • Screenshot from 2023-06-03 19-32-10.png
    Screenshot from 2023-06-03 19-32-10.png
    82.1 KB · Views: 27

ZmisiS

Senior Member
Dec 23, 2011
3,451
810
60
Livno
I was able to install TWRP and vbmeta. After the installation, which took a few seconds, a black screen appeared. I immediately pressed the Up + Bixby + Power buttons together. I held until TWRP appeared. Here's how it looks in the Terminal.
 

Attachments

  • Screenshot from 2023-06-03 20-02-23.png
    Screenshot from 2023-06-03 20-02-23.png
    60.7 KB · Views: 34

ZmisiS

Senior Member
Dec 23, 2011
3,451
810
60
Livno
I installed and up_param.tar.
 

Attachments

  • Screenshot from 2023-06-03 20-51-53.png
    Screenshot from 2023-06-03 20-51-53.png
    96.4 KB · Views: 19

AnonVendetta

Senior Member
Apr 29, 2016
1,644
599
Up until today, I thought that Heimdall was the only option for flashing Samsung firmware on Linux. I've tried Heimdall, several times, but failed to flash anything with it. I'd always thought that Odin was a Windows only thing.

I'm definitely glad I found this, I just have to try it. Later today, I'm going to test flash the latest Android 13 firmware onto my Note 20 Ultra. It's nice to know that we in the open source corner have flashing options that don't involve booting into Windows.

I also couldn't get JOdin to flash anything.
 
  • Like
Reactions: ethical_haquer

AnonVendetta

Senior Member
Apr 29, 2016
1,644
599
I was just able to flash a Marshmallow firmware onto my Galaxy Note 4, easy as pie once I created the udev rule and blacklisted cdc_acm. This tool is awesome! Screw you, Microsoft!

Now, time to test with something newer.

Any way to disable auto reboot? I've noticed it does it automatically. I never use that option in Windows Odin.
 
  • Like
Reactions: ethical_haquer

ZmisiS

Senior Member
Dec 23, 2011
3,451
810
60
Livno
Don't do that. Install kvm and virt-manager. native virtualization. Works the best. I do have Win11 virtualized as well, for similar purposes.
I installed Stock ROM, TWRP and vbmeta. All working OK. I did the same on Windows. I needed it for installation OneUI 5.1 for Exynos Galaxy S10 series (Android 13). The only thing I miss is turning off automatic reboot like on Odin on Windows.

How to Install kvm and virt-manager native virtualization on Ubuntu 22.04.2 LTS?
 

AnonVendetta

Senior Member
Apr 29, 2016
1,644
599
Don't do that. Install kvm and virt-manager. native virtualization. Works the best. I do have Win11 virtualized as well, for similar purposes.
I use both VirtualBox and VMware Workstation on Linux. Some OSes work better in one, other OSes work better in the other. So I use both. I haven't tried kvm/virt-manager.

I've also been able to successfully install Windows in a VM, and Odin flash Samsung firmwares from within the VM. You just need to install the Samsung USB drivers on the guest, then pass through a USB port from host to guest. Works perfectly.

But now that I've found this native Odin for Linux, I won't have much of a need for using VMed Windows to flash.
 
  • Like
Reactions: ZmisiS

Virnik0

Senior Member
Sep 14, 2010
1,984
446
Prague
blog.nutcracker.cz
I use both VirtualBox and VMware Workstation on Linux. Some OSes work better in one, other OSes work better in the other. So I use both. I haven't tried kvm/virt-manager.

I've also been able to successfully install Windows in a VM, and Odin flash Samsung firmwares from within the VM. You just need to install the Samsung USB drivers on the guest, then pass through a USB port from host to guest. Works perfectly.

But now that I've found this native Odin for Linux, I won't have much of a need for using VMed Windows to flash.
KVM is native virtualization on Linux. So no intermediate layer, no virtualbox or vmware in between. Performance tends to be much better.
 

ZmisiS

Senior Member
Dec 23, 2011
3,451
810
60
Livno
I use both VirtualBox and VMware Workstation on Linux. Some OSes work better in one, other OSes work better in the other. So I use both. I haven't tried kvm/virt-manager.

I've also been able to successfully install Windows in a VM, and Odin flash Samsung firmwares from within the VM. You just need to install the Samsung USB drivers on the guest, then pass through a USB port from host to guest. Works perfectly.

But now that I've found this native Odin for Linux, I won't have much of a need for using VMed Windows to flash.
How to install the Samsung USB drivers on the guest, then pass through a USB port from host to guest?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 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/
    1
    Alright, what unofficial build though? Your device isn't officially supported.
    Oh... I didn't know that..
  • 24

    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!
    11
    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.

    🙏