yashsingh1/xdaforums huggingface dataset:
[Android Software Development] romstockprivate:
I flashed my phone 3 7 times with 3 different USB C cable but every-time it restarts, it boots normally, no TWRP. Me=?

Now my phone is stuck in download mode.. While trying over and over to get TWRP installed, I tried to relock the bootloader (and factory reset the phone). Phone wont boot, cyan download screen. I am able to restart the phone by holding down all buttons. I can get the the main download screen but it shows that OEM unlock is on.

For now, how can I get my phone to boot (so that I can unlock the bootloader, again)?

ETA: I see that I should be able to install a stock ROM...
[Android Software Development] romstockprivate:
What command is needed to install a stock rom? -a leads to Fail parse.
[Android Software Development] ethical_haquer:
-a is for the AP file. Could you post the output you're getting?
[Android Software Development] romstockprivate:
I used the build in help to install but, I got
up_param.bin.lz4
Fail request receive -101
Fail uploadBinaries

Is something wrong with my setup or the download file I extracted?

ETA: My setup was wrong, phone is now working with stock rom. Time to try to flash TWRP again.

ETA2: I have no luck. The ROM I installed does not give me an option to unlock the bootloader. Time to find an international ROM to install.
[Android Software Development] ethical_haquer:
Who knows. How did you download the firmware? I would use Bifrost.
[Android Software Development] romstockprivate:
Thank you for the suggestion. I just searched for SM-536E firmware. Lots of sketchy sites.
[Android Software Development] romstockprivate:
My phone said Clara for the rom. I looked it up, ZTA Brazil I think. Downloading via Bifrost. Thanks again @ethical_haquer
[Android Software Development] romstockprivate:
I tried to redownload firmware on bifrost but using ZTA and the serial number of my phone, no firmware can be found. Me=?
[Android Software Development] ethical_haquer:
It took me a while... but I figured it out.

It's "SM-A536E", not "SM-536E". 🤣

Let me know how the download goes!

(the IMEI will be filled in automatically)
[Android Software Development] romstockprivate:
You were right, noob mistake by my lol. I was able to get TWRP installed, wipe my phone, then get LineageOS installed.
[Android Software Development] ethical_haquer:
Nice!
[Android Software Development] lolmujahid:
This may be dumb, yet I can not access the download link. Says I dont have permissions. Hope this post helps with that
[Android Software Development] shervinemami:
Hi, I downloaded the 1.0.4 release of your Thor C# project at https://github.com/Samsung-Loki/Thor and installed C# dotnet 7.0 on Kubuntu 24.04 for my Samsung A336E.

I then installed the udev rule and ran "sudo udevadm control --reload-rules && sudo udevadm trigger" to enable the udev rule (I recommend mentioning this command in your script).

I got a warning about "Unknown2", and then after trying to flash it doesn't show any partition to flash from:

$ ./TheAirBlow.Thor.Shell
Welcome to Thor Shell v1.0.4!
Successfully loaded "usb.ids" from cache.
Type "help" for list of commands.
To start off, type "connect" to initiate a connection.
~~~~~~~~ Platform specific notes ~~~~~~~~
You have to run Thor as root or edit udev rules as follows:
1) create and open /etc/udev/rules.d/51-android.rules in an editor
2) enter SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="YourUserGroupHere"
Additionally, you may have to disable the cdc_acm kernel module:
1) To temporarily unload, run "sudo modprobe -r cdc_acm"
2) To disable it, run "echo 'blacklist cdc_acm' | sudo tee -a /etc/modprobe.d/cdc_acm-blacklist.conf"
shell> connect
Successfully connected to the device!
Now run "begin" with the protocol you need.
shell> begin odin
[22:20:57 INF] Unknown2 is not zero: 80
[22:20:57 INF] Please contact me (TheAirBlow) about this in XDA DMs!
[22:20:57 INF] If you would cooperate, we could uncover hidden features!
Successfully began an Odin session!
shell> flashTar Phone_Firmware_of_SM-A336E_XSA_A336EDXS8DXC1_fac/
Choose what partitions to flash from BL_A336EDXS8DXC1_A336EDXS8DXC1_MQB78085687_REV00_user_low_ship_MULTI_CERT.tar.md5:
…

(Press <space> to select, <enter> to accept) ~~~~~~~^
Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
shell>

I didn't try doing anything after this since I wasn't sure if it's safe.

Cheers,

Shervin.
[Android Software Development] ethical_haquer:
@shervinemami

Don't worry about the "Unknown 2" thing, it's just a debug statement.

This is an issue though:

It is the same issue as this. The work-around is described in that issue. Let me know if you have any questions!
[Android Software Development] shervinemami:
Hi @ethical_haquer , thanks. Oh OK so the problem is perhaps that my firmware files are each a tar.md5 container of img.lz4 containers, and the tool isn't designed for that structure?
[Android Software Development] ethical_haquer:
Yeah, something like that, although Thor is supposed to be able to handle them.

Please rename the "BL_A336EDXS8DXC1_A336EDXS8DXC1_MQB78085687_REV00_user_low_ship_MULTI_CERT.tar.md5" file to "BL_A336EDXS8DXC1_A336EDXS8DXC1_MQB78085687_REV00_user_low_ship_MULTI_CERT.tar". (just remove the ".md5") Then extract it, and post a screenshot or copy/paste (if you're using the terminal) of the files that are in it.
[Android Software Development] ethical_haquer:
Well, that was only the first step. :p
[Android Software Development] akamaus:
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.
[Android Software Development] uluruman:
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).
[Android Software Development] NielDK:
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.
[Android Software Development] Richard Gówno:
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?)

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

Thanks for any advice.

Terminal screenshot attached
[Android Software Development] ildar_prophet:
I guess you didn't flash the vbmeta.
[Android Software Development] PalmerBE:
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
[Android Software Development] Richard Gówno:
Hi!

Funny, google doesn't find find anything for "Fail request receive" + odin :)

From where did you get the vbmeta file?

I often read to try different cable, but since I can use my existing hardware for flashing the stock stuff, I don't think thats the problem.
[Android Software Development] PalmerBE:
Good question. :)

I guess from Github.

I found this link below in my browser download history . If you have a better source, please let me know/

https://objects.githubusercontent.com/github-production-release-asset-2e65be/516121735/e63855ed-a192-46cc-a9ce-c53f5ecef5e6?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230129%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230129T140410Z&X-Amz-Expires=300&X-Amz-Signature=07bdfb37cb63de3f975153cd9e7f7f3df1e199d70efd88890dbdc83b9f31f905&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=516121735&response-content-disposition=attachment%3B%20filename%3DA528BXXU1CVG7_patched_vbmeta.tar&response-content-type=application%2Foctet-stream

Cheers

Palmer
[Android Software Development] ildar_prophet:
Guys, regarding the vbmeta questions, you'd better consult the device-specific forums.

Those often contain explicit lists what to do after what.
[Android Software Development] PalmerBE:
Got mine from github and it is working like a charm .

https://github.com/BlackMesa123/proprietary_vendor_samsung_a52sxq/releases/download/A528BXXU1DWA4_BTU/A528BXXU1DWA4_patched_vbmeta.tar
[Android Software Development] ethical_haquer:
What phone are you using?
[Android Software Development] Richard Gówno:
Well,

For my device, A8, I found no information a about vbmeta, the solution was to flash an older version of twrp.
[Android Software Development] magnetosphere:
so has nobody fed it into ghidra yet?
[Android Software Development] TheAirBlow:
There's a new flash tool called Thor in the leak, but it uses legacy software for compilation. If anyone would like to help me compile it, DM me.
[Android Software Development] Virnik0:
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!
[Android Software Development] Archae Opteryx:
Looks clean enough on Virustotal, but why is it trying to do things with Snap?

VirusTotal

VirusTotal

www.virustotal.com
[Android Software Development] TheAirBlow:
No ****ing idea.
[Android Software Development] pranatic:
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?
[Android Software Development] TheAirBlow:
Try to blacklist or unload cdc_acm
[Android Software Development] ethical_haquer:
In other words, do this:

EDIT: The OP's first post talks about how to do this.
[Android Software Development] TheAirBlow:
Name of the config file doesn't matter, it's just an easy way to separate stuff. If blacklist.conf doesn't exist, just create one and it will work without problem
[Android Software Development] ethical_haquer:
Nice to know, thanks. :)
[Android Software Development] grm34:
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.

🙏
[Android Software Development] jojo5656:
I can't find the "F. Reset Time" and "Re-Partition" options, are them ON automatically?
[Android Software Development] LMI Hype:
Works very well even with 2012 phones but it cant detect samsung s1 (gt-i9000) i don't know why
[Android Software Development] newt23:
Works great!
[Android Software Development] Virnik0:
Love this binary. Works as expected. Only downside is that it doesn't support flashing userdata images. Other than that, I tested it on Galaxy S10+, Galaxy S20+ and Galaxy S22.

Super nice!

Still, sometimes it is more convenient to be more granular in what to flash like Heimdall, but this binary mimic original Odin3 very well.
[Android Software Development] parkerlreed:
I used this to upgrade my rooted tab S8 Plus. It flashes the magisk patched AP and the rest of the files including home CSC great. For some reason even though I used home CSC still ended up wiping the device.

I'm trying to figure out if it's for one of two reasons

1. I flashed BL and home CSC first while I was waiting for my phone to patch the AP image so it had a reboot cycle that lasted a while before I flashed AP. Does Samsung do an automatic user data reset after too many failed boots?

2. Just possibly missing a flag to use with odin4

Thanks a lot for this post!
[Android Software Development] :
I downloaded Odin. zip from the first page this theme. I extracted it. I tried copy/paste Odin4 in local/bin, but I don't have the authority to paste it. How and where should I paste Odin4 to run it with the command: 'odin -h'?
[Android Software Development] :
I got this. Is this okay? If so, what should I do next?
[Android Software Development] :
I installed this on Debian 11. I don't know how to run this.
[Android Software Development] Virnik0:
go to the directory you extracted it to. then run:

chmod +x odin4

then:

./odin4
[Android Software Development] :
What extracted? I pasted odin4 in /usr/local/bin. In bin I can't open Terminal.
[Android Software Development] ethical_haquer:
The terminal should be its own application. Try following these steps:

First run the terminal,

Then run this command:

cd /usr/local/bin

Next, run this command (it may need to be run with sudo):

chmod +x odin4

Finally, run this:

./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.
[Android Software Development] ethical_haquer:
The first command should actually be:

cd /usr/local/bin/odin4

Sorry!
[Android Software Development] :
I get this:
[Android Software Development] :
After this command I get notification: Not a directory
[Android Software Development] ethical_haquer:
That's good! You already have odin4 installed successfully. Otherwise it would say something like:

Command 'odin4' not found

It sounds like you just need help using it. Disregard all of my above comments, as odin4 is already installed. :)
[Android Software Development] :
Yes. I need only run it.
[Android Software Development] ethical_haquer:
Running

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.
[Android Software Development] Virnik0:
It could be started from any directory, even your home dir.
[Android Software Development] ethical_haquer:
According to his screenshots, it appears that @ZmisiS has already installed odin4, and is simply unsure of how to use it.
[Android Software Development] Virnik0:
to me, it looks like he cant execute the binary, for which my advice was to make it executable first
[Android Software Development] ethical_haquer:
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.
[Android Software Development] Virnik0:
ah, my bad. I overlooked this post
[Android Software Development] ethical_haquer:
Well, so did I! :)
[Android Software Development] :
I don't know how to use this. For example when I want to install ROM, TWRP, etc.
[Android Software Development] Virnik0:
run odin4 -h

will give you help. only thing it takes is to read
[Android Software Development] :
My English is not good. I use translator. I can't really understand everything.
[Android Software Development] Virnik0:
are you telling me that the help the binary provides isn't clear?
[Android Software Development] :
I see the marks -d; -l; -v; and the like. I see the marks for AP, BL, CSC... I get: command not found. Phone is in Download mode.
[Android Software Development] Virnik0:
use what is in example
[Android Software Development] :
How to use?
[Android Software Development] Virnik0:
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
[Android Software Development] :
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.
[Android Software Development] Virnik0:
understood, but you also fail to explain what are you trying to do and what doesn't work
[Android Software Development] :
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.
[Android Software Development] Virnik0:
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:

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:

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:

. ~/.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:

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):

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
[Android Software Development] :
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.
[Android Software Development] :
I open phone in Download Mode, but it not work for me.
[Android Software Development] Virnik0:
It says that it can't find the device. unplug the phone, reboot to download again and then plug the cable. Or check that you do have data cable. some cables are charging only
[Android Software Development] braveheartleo:
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.
[Android Software Development] Virnik0:
You have to unload one kernel module. Also applies to sharing usb over KVM to a VM. Sometimes required before flashing on Linux as well:

$ sudo modprobe -r cdc_acm

Then try again. If you'll reconnect the cable, you need to unload the module again, or black list it throug /etc/modules.d/
[Android Software Development] braveheartleo:
Thanks but if you have read the quoted reply and it's quoted reply before it, then you would know cdc_acm has been unloaded/blacklisted. 😉

I believe blacklisting and/or passing custom options to modules are done in /etc/modprobe.d. Loading modules on the otherhand go in /etc/modules.d (or /etc/modules-load.d, depending on the distro). 😊
[Android Software Development] Virnik0:
correct
[Android Software Development] :
I used the same cable on Windows and it worked. I don't know if I entered everything correctly in Terminal.

You must set up your system to detect your device on LINUX host.Create this file: /etc/udev/rules.d/51-android.rules. How create this?

I didn't type md5.
[Android Software Development] :
I created file 51-android.rules wit this command:

sudo touch /etc/udev/rules.d/51-android.rules

Did this in Terminal and the problem remained the same.

I think this is how it should be for me.
[Android Software Development] nobbysheep:
Worked like a dream and saved me many hours of trying to get (windows) odin working. Many thanks
[Android Software Development] Virnik0:
Just creating the file is not enough. I do use Ubuntu and I didn't have to create any udev file. what 'sudo dmesg | tail' prints, after connecting the usb with phone in download mode? Debian is know for refusing to install proprietary drivers and software until directly told to.
[Android Software Development] :
The problem is that I don't know how to tell him. I searched on the Internet, but without success.
[Android Software Development] :
I tried this, but problem not solved.
[Android Software Development] :
I installed JOdin3Casual and it open, but it is Disconnected. Odin4 not work for me.
[Android Software Development] ethical_haquer:
If you really can't get this or JOdin3 working I would follow my tutorial on using Odin on Linux here. It still uses Windows, but as a VM (Virtual Machine) inside of Linux, so you don't have to shutdown your Linux computer just to use Odin. I tried to make the instructions easy enough so that even those new to Linux (like you) can still follow them. Of course, if you have any problems or questions just let me know. (Nice work switching to Linux, BTW.)
[Android Software Development] :
I have installation package for Windows 11 x64 Pro. Can I it use instead of Windows 10?

I installed VM. When I right clicked on the extension and clicked open with, i selected VM and it crashes.
[Android Software Development] :
I want to install Ubuntu. I don't know which one to install. Ubuntu 22.04.2 LTS or Ubuntu 23.04.
[Android Software Development] ethical_haquer:
I would just use Windows 10. I doubt Windows 11 would work, at the very least I would have to try it myself and change the tutorial accordingly.