[Utility] Odin for Linux !!! (JOdin3 CASUAL)

Search This thread

Toby4213

Senior Member
Jan 9, 2015
50
64
I have finally found a working version of Odin for Linux!
JOdin 3 Casual powered by Heimdall

You need at least Java 8, if you don't have it already:
To see the java version type:
Code:
java -version
Aptitude Package Manager:
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt update
sudo apt install oracle-java9-installer
If necessary change the java environment to the new one(this should be changed automatically by the installer of the new package):
Code:
sudo update-alternatives --config java

JOdin3 Mirrors:
mega.nz
androidfilehost.com


FYI:
b4Rpfqj.png


__________________
 
Last edited:

Zakku

Member
Sep 5, 2018
31
0
Okay, so, I have to ask. Why does this program need super user authentication? I don't understand why it needs that level of access if it's just for flashing the ROM on a cellphone. I'm just saying that's unrelated to needing root access on my computer, I think.
 

Toby4213

Senior Member
Jan 9, 2015
50
64
Okay, so, I have to ask. Why does this program need super user authentication? I don't understand why it needs that level of access if it's just for flashing the ROM on a cellphone. I'm just saying that's unrelated to needing root access on my computer, I think.

I am not 100% shure but I think it has something to do with access to the usb port... Odin needs permission to use the port for other things than mounting a flash drive... Again im not shure, haven't looked into it much. Since the adb cli also need root permissions I think that odin also really needs higher permissions.
 

henk_j

Senior Member
Dec 19, 2010
460
77
musselkanaal
I am not 100% shure but I think it has something to do with access to the usb port... Odin needs permission to use the port for other things than mounting a flash drive... Again im not shure, haven't looked into it much. Since the adb cli also need root permissions I think that odin also really needs higher permissions.

IT is quite common, Xiaomi also needs sudo to work
.
 

HonestOtter

Senior Member
Aug 20, 2016
56
5
maryville
Looks like Oracle not supporting Java 9 through PPA

I downloaded files and it looks like "old" version

Can someone explain to me how to get "new" version because I am trying to install firmware on Note9

I just spent 4 hours looking through youtube and the web trying to get the "new" version of jodin.

ty for any help given.
 
  • Like
Reactions: zenetare45

StoneRcold

New member
Dec 19, 2015
4
1
Why odin needs su access

Odin needs su access because the underlying adb shell needs root to execute programs on the device itself, which Odin will need to do in order to perform the update/root procedure. I'm not an advanced android engineer, but I know linux well enough to know running arbitrary code on an attached peripheral is a security hole and should not be run unless one knows what they are doing (hence needing su, since admins are the ones that should know if a program is malicious)
 

phoenixbyrd

Member
Jun 2, 2019
10
11
Hi! Can this be installed on Arm64, specifically through a containerized instance of linux? Asking for a friend!

[UPDATE]

OK, so to explain the reasoning behind the question... I've been trying to explain to this dude why this won't work but he refuses to listen because odin is in the linux repositories despite the software description saying something about MRI machines. He now finally after a couple hours understands the difference between that odin and this odin. FINALLY.

He wants to run this odin on his TabS4 through linux on dex in order to flash his note 9... I know... I tried... Maybe someone here can explain it better to him, I have him keeping an eye on these comments.
 
Last edited:

Toby4213

Senior Member
Jan 9, 2015
50
64
Hi! Can this be installed on Arm64, specifically through a containerized instance of linux? Asking for a friend!

[UPDATE]

OK, so to explain the reasoning behind the question... I've been trying to explain to this dude why this won't work but he refuses to listen because odin is in the linux repositories despite the software description saying something about MRI machines. He now finally after a couple hours understands the difference between that odin and this odin. FINALLY.

He wants to run this odin on his TabS4 through linux on dex in order to flash his note 9... I know... I tried... Maybe someone here can explain it better to him, I have him keeping an eye on these comments.

I highly doubt that this would work for the sole reason that odin and for that matter fastboot and adb, need OS level access to the usb controller. DeX in desktop mode would take up the only available usb-c port, this would be a problem since on pc you need to connect the phone directly to the mainboard on the pc instead of using a usb hub. Without the docking station this *might* work but then again I doubt that the linux container has enought OS level permissions to use the usb port in that way. On the bright side, arm64 shouldn't be a problem since java is also available on arm. This means that the odin .jar should be able to run and show the gui but flashing wouldn't be possible but you could give it a try. If odin doesn't work try fastboot on android(not in DEX), links below.

That said there are other ways of getting phone to phone flashing to work. Here are some links:
https://xdaforums.com/showthread.php?t=2586472
https://github.com/kosborn/p2p-adb/

With fastboot you could flash twrp and with that could flash root and custom roms and so on. This nowadays is the preferred method anyway, since you wouldn't depend on a usb cable to f*** up the rom flash.
 
Last edited:

xdausernl

Member
Feb 22, 2019
44
4
Amersfoort
mkservices.nl
Using JOdin3 with 'sudo' shows 'java.lang.OutOfMemoryError: Java heap space'

These are recommendations I'd found:

Heap size specifies the amount of dynamic memory to be made available to the JVM code.
For systems with less than 1 GB of physical memory, use a maximum heap size of 256 MB, and an initial heap size of 0 MB.
For systems with 2 GB memory, use a maximum heap size of 768 MB, and an initial heap size of 256 MB.
For larger systems (more than 2GB), use a maximum heap size of 1024 MB, and an initial heap size of 512 MB.

Is that also suitable for JOdin3?
This is the current error I've got:

Exception in thread "Thread-78" java.lang.OutOfMemoryError: Java heap space
at CASUAL.communicationstools.heimdall.odin.OdinFile.extractOdinContents(OdinFile.java:145)
at CASUAL.communicationstools.heimdall.odin.Odin.getHeimdallFileParametersFromOdinFile(Odin.java:50)
at com.casual_dev.jodin.JOdinController.getHeimdallCommandFromOdinPackageList(JOdinController.java:621)
at com.casual_dev.jodin.JOdinController.access$3300(JOdinController.java:54)
at com.casual_dev.jodin.JOdinController$13.run(JOdinController.java:572)
at java.lang.Thread.run(Thread.java:745)

How do I edit the 'heap space' settings for JOdin3 in Linux Mint 19.1?
 
Last edited:
  • Like
Reactions: onearmedscissor

xdausernl

Member
Feb 22, 2019
44
4
Amersfoort
mkservices.nl
I have finally found a working version of Odin for Linux!
JOdin 3 Casual powered by Heimdall

You need at least Java 8, if you don't have it already:
To see the java version type:
Code:
java -version
Aptitude Package Manager:
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt update
sudo apt install oracle-java9-installer
If necessary change the java environment to the new one(this should be changed automatically by the installer of the new package):
Code:
sudo update-alternatives --config java

JOdin3 Mirrors:
mega.nz
androidfilehost.com


FYI:
b4Rpfqj.png


__________________

That's all good and JOdin3 launched, yet while uncompressing the system.img file (about 1.5GB) the following error shows:

[VERBOSE]Heimdall Device detected!
verified file /home/location/Downloads/OudereStockRom-4.4.2kk/T210XXBNH4_T210OXABNH4_HOME/T210XXBNH4_T210OXABNH4_HOME.tar.md5
decompressing file:/tmp/CASUALroot-2019-07-28-20.56.18/boot.img
decompressing file:/tmp/CASUALroot-2019-07-28-20.56.18/recovery.img
decompressing file:/tmp/CASUALroot-2019-07-28-20.56.18/PBL.bin
decompressing file:/tmp/CASUALroot-2019-07-28-20.56.18/param.lfs
decompressing file:/tmp/CASUALroot-2019-07-28-20.56.18/loke_2nd.bin
decompressing file:/tmp/CASUALroot-2019-07-28-20.56.18/loke_pxa988.bin
decompressing file:/tmp/CASUALroot-2019-07-28-20.56.18/system.img
Exception in thread "Thread-31" java.lang.OutOfMemoryError: Java heap space
at CASUAL.communicationstools.heimdall.odin.OdinFile.extractOdinContents(OdinFile.java:145)
at CASUAL.communicationstools.heimdall.odin.Odin.getHeimdallFileParametersFromOdinFile(Odin.java:50)
at com.casual_dev.jodin.JOdinController.getHeimdallCommandFromOdinPackageList(JOdinController.java:621)
at com.casual_dev.jodin.JOdinController.access$3300(JOdinController.java:54)
at com.casual_dev.jodin.JOdinController$13.run(JOdinController.java:572)
at java.lang.Thread.run(Thread.java:745)
 
Last edited:

Toby4213

Senior Member
Jan 9, 2015
50
64
These are recommendations I'd found:

Heap size specifies the amount of dynamic memory to be made available to the JVM code.
For systems with less than 1 GB of physical memory, use a maximum heap size of 256 MB, and an initial heap size of 0 MB.
For systems with 2 GB memory, use a maximum heap size of 768 MB, and an initial heap size of 256 MB.
For larger systems (more than 2GB), use a maximum heap size of 1024 MB, and an initial heap size of 512 MB.

Is that also suitable for JOdin3?
This is the current error I've got:

Exception in thread "Thread-78" java.lang.OutOfMemoryError: Java heap space
at CASUAL.communicationstools.heimdall.odin.OdinFile.extractOdinContents(OdinFile.java:145)
at CASUAL.communicationstools.heimdall.odin.Odin.getHeimdallFileParametersFromOdinFile(Odin.java:50)
at com.casual_dev.jodin.JOdinController.getHeimdallCommandFromOdinPackageList(JOdinController.java:621)
at com.casual_dev.jodin.JOdinController.access$3300(JOdinController.java:54)
at com.casual_dev.jodin.JOdinController$13.run(JOdinController.java:572)
at java.lang.Thread.run(Thread.java:745)

How do I edit the 'heap space' settings for JOdin3 in Linux Mint 19.1?

That's all good and JOdin3 launched, yet while uncompressing the system.img file (about 1.5GB) the following error shows:

[VERBOSE]Heimdall Device detected!
verified file /home/location/Downloads/OudereStockRom-4.4.2kk/T210XXBNH4_T210OXABNH4_HOME/T210XXBNH4_T210OXABNH4_HOME.tar.md5
decompressing file:/tmp/CASUALroot-2019-07-28-20.56.18/boot.img
decompressing file:/tmp/CASUALroot-2019-07-28-20.56.18/recovery.img
decompressing file:/tmp/CASUALroot-2019-07-28-20.56.18/PBL.bin
decompressing file:/tmp/CASUALroot-2019-07-28-20.56.18/param.lfs
decompressing file:/tmp/CASUALroot-2019-07-28-20.56.18/loke_2nd.bin
decompressing file:/tmp/CASUALroot-2019-07-28-20.56.18/loke_pxa988.bin
decompressing file:/tmp/CASUALroot-2019-07-28-20.56.18/system.img
Exception in thread "Thread-31" java.lang.OutOfMemoryError: Java heap space
at CASUAL.communicationstools.heimdall.odin.OdinFile.extractOdinContents(OdinFile.java:145)
at CASUAL.communicationstools.heimdall.odin.Odin.getHeimdallFileParametersFromOdinFile(Odin.java:50)
at com.casual_dev.jodin.JOdinController.getHeimdallCommandFromOdinPackageList(JOdinController.java:621)
at com.casual_dev.jodin.JOdinController.access$3300(JOdinController.java:54)
at com.casual_dev.jodin.JOdinController$13.run(JOdinController.java:572)
at java.lang.Thread.run(Thread.java:745)

Just f*ing google it...
I dont know whats so hard about reading the error message but ok here you go:
Code:
java -Xms512m -Xmx2g -jar JOdin3CASUAL.jar
Here the link: https://alvinalexander.com/blog/post/java/java-xmx-xms-memory-heap-size-control
If you are wondering what magic that is, its literally the first answer for typing "java increase heap size"
 
Last edited:

xdausernl

Member
Feb 22, 2019
44
4
Amersfoort
mkservices.nl
Just f*ing google it...
I dont know whats so hard about reading the error message but ok here you go:
Code:
java -Xms512m -Xmx2g -jar JOdin3CASUAL.jar
Here the link: https://alvinalexander.com/blog/post/java/java-xmx-xms-memory-heap-size-control
If you are wondering what magic that is, its literally the first answer for typing "java increase heap size"


Thanks Toby4213, you're right ... and I have been there but didn't know how to use it as this is all new for me so I'm sorry for being a noob.
But I still remain unable to get the job done.
Using your line of code with or without 'sudo' results in this error:
Error: Unable to access jarfile JOdin3CASUAL.jar

Do I need to take some additional steps?
 

Toby4213

Senior Member
Jan 9, 2015
50
64
Thanks Toby4213, you're right ... and I have been there but didn't know how to use it as this is all new for me so I'm sorry for being a noob.
But I still remain unable to get the job done.
Using your line of code with or without 'sudo' results in this error:
Error: Unable to access jarfile JOdin3CASUAL.jar

Do I need to take some additional steps?
Sorry for being rude earlier, had a bad day.

Thanks I am new to this and not a developer. I have downloaded Jodin3 files but how do I install please?
Alright so this is what you both have to do:
1. As stated in my original post make sure you have java installed.
2. Download the JOdin archive file linked in my original post
3. Unpack the archive into a folder. Linux Mint should automatically generate a folder called "JOdin3CASUAL-linux-R991"
4. navigate into this folder using the terminal(you can right click and select open "terminal in this folder" or similar) type: cd ./JOdin3CASUAL-linux-R991
5. once you are in the JOdin3CASUAL-linux-R991 folder type ls into the terminal. You should see 2 folders "app" and "runtime" and a file called "JOdin3CASUAL"
6. Type cd ./app
7. again type ls and now you should see the file "JOdin3CASUAL.jar" among another file and a folder
8. Now you can run the .jar file with the before mentioned command: java -Xms512m -Xmx2g -jar JOdin3CASUAL.jar

I hope everything is clear now. If you have any questions feel free to ask. I absolutely encourage the use of Linux and compared to ****ty Windows 10 it is an absolute dream to work and tinker with.
I would recommend that you start to learn how to use the terminal/console. It is really easy once you know what you are doing. Here is a great link to get started: http://linuxcommand.org/
 
Last edited:
  • Like
Reactions: onearmedscissor

xdausernl

Member
Feb 22, 2019
44
4
Amersfoort
mkservices.nl
Sorry for being rude earlier, had a bad day.


Alright so this is what you both have to do:
1. As stated in my original post make sure you have java installed.
2. Download the JOdin archive file linked in my original post
3. Unpack the archive into a folder. Linux Mint should automatically generate a folder called "JOdin3CASUAL-linux-R991"
4. navigate into this folder using the terminal(you can right click and select open "terminal in this folder" or similar) type: cd ./JOdin3CASUAL-linux-R991
5. once you are in the JOdin3CASUAL-linux-R991 folder type ls into the terminal. You should see 2 folders "app" and "runtime" and a file called "JOdin3CASUAL"
6. Type cd ./app
7. again type ls and now you should see the file "JOdin3CASUAL.jar" among another file and a folder
8. Now you can run the .jar file with the before mentioned command: java -Xms512m -Xmx2g -jar JOdin3CASUAL.jar

I hope everything is clear now. If you have any questions feel free to ask. I absolutely encourage the use of Linux and compared to ****ty Windows 10 it is an absolute dream to work and tinker with.
I would recommend that you start to learn how to use the terminal/console. It is really easy once you know what you are doing. Here is a great link to get started: http://linuxcommand.org/

Apology accepted .... and I'm busy with trial and error.
Now on Linux Mint 19.1 Heimdall is installed and I have this 'JOdin3CASUAL-r1142-dist' version.
So when I unzipped the compressed file in the default 'downloads' folder, I found a folder with 2 folders and a file inside like you described.
Next I entered the 'app' folder and launched inside the terminal session, pasted the command you provided 'java -Xms512m -Xmx2g -jar JOdin3CASUAL.jar'.
The following error popped up:
Error: Could not find or load main class com.casual_dev.jodin.JOdinMain
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application
So I firstly installed openjdk-11, but the problem still persists.
Did I do something wrong or are steps missing?
 
  • Like
Reactions: onearmedscissor

Toby4213

Senior Member
Jan 9, 2015
50
64
Apology accepted .... and I'm busy with trial and error.
Now on Linux Mint 19.1 Heimdall is installed and I have this 'JOdin3CASUAL-r1142-dist' version.
So when I unzipped the compressed file in the default 'downloads' folder, I found a folder with 2 folders and a file inside like you described.
Next I entered the 'app' folder and launched inside the terminal session, pasted the command you provided 'java -Xms512m -Xmx2g -jar JOdin3CASUAL.jar'.
The following error popped up:
Error: Could not find or load main class com.casual_dev.jodin.JOdinMain
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application
So I firstly installed openjdk-11, but the problem still persists.
Did I do something wrong or are steps missing?

Alright so I finally got it working myself. I haven't used jodin for a long time.
Ok so first make sure that you have JavaFX installed. For that just type sudo apt install openjfx in the terminal.(This might be optional for you, if you get an error containing JavaFX thats the command to fix it)
Since JOdin doesn't quite work when launched via the .jar file the only way to get it to run is to use the binary. Thats the file in the very first folder just called "JOdin3CASUAL".
But since we are not running the jar directly we cant add -Xmx2g as a launch option. In order to get the bigger heap size type export _JAVA_OPTIONS=-Xmx2g in the terminal. You have to run this everytime you close the terminal window. In order to keep this setting permanently add this line to the .profile file in your home directory.
After that go into the folder with app, runtime and JOdin3CASUAL and type: sudo ./JOdin3CASUAL

Hope this works for you.
Cheers
 

xdausernl

Member
Feb 22, 2019
44
4
Amersfoort
mkservices.nl
Alright so I finally got it working myself. I haven't used jodin for a long time.
Ok so first make sure that you have JavaFX installed. For that just type sudo apt install openjfx in the terminal.(This might be optional for you, if you get an error containing JavaFX thats the command to fix it)
Since JOdin doesn't quite work when launched via the .jar file the only way to get it to run is to use the binary. Thats the file in the very first folder just called "JOdin3CASUAL".
But since we are not running the jar directly we cant add -Xmx2g as a launch option. In order to get the bigger heap size type export _JAVA_OPTIONS=-Xmx2g in the terminal. You have to run this everytime you close the terminal window. In order to keep this setting permanently add this line to the .profile file in your home directory.
After that go into the folder with app, runtime and JOdin3CASUAL and type: sudo ./JOdin3CASUAL

Hope this works for you.
Cheers

I took all the steps you wrote down for me and I got JOdin working, finally..
But there goes something wrong still.
Because ... uploading the stock ROM (1,5GB) should take a while, is not done in just a few minutes.
Uploading all the files should take at least 10 minutes to complete.
Yet, in the end, it does say reset in green though.
And I'm quite sure that something is wrong, because I didn't see the blue status bar on the Samsung tablet during the upload process.
Uploading the extracted files seperately in Heimdall, 10 pieces out of the stock ROM, will take 10 - 15 minutes to complete and the largest of them all is the 'system.img' file which is 1,2 or 1,5GB in size.
With Heimdall I do see the status bar in both the program while uploading and in blue the same status bar on the Samsung tablet.

On the end of the day, I still have a rooted and faulty Android system running on that Samsung tablet.
Somehow the clean factory default is not loaded when the Samsung device reboot after all uploads with Heimdall.
Although the software uploaded is Android 4.4.2 for Tab3 7.0 8GB WiFi, with all the correct changes, date of build and country code.
Is there a final method to clean out the current faulty content of the Samsung Tab3 device?
 
Last edited:
  • Like
Reactions: onearmedscissor

Toby4213

Senior Member
Jan 9, 2015
50
64
I took all the steps you wrote down for me and I got JOdin working, finally..
But there goes something wrong still.
Because ... uploading the stock ROM (1,5GB) should take a while, is not done in just a few minutes.
Uploading all the files should take at least 10 minutes to complete.
Yet, in the end, it does say reset in green though.
And I'm quite sure that something is wrong, because I didn't see the blue status bar on the Samsung tablet during the upload process.
Uploading the extracted files seperately in Heimdall, 10 pieces out of the stock ROM, will take 10 - 15 minutes to complete and the largest of them all is the 'system.img' file which is 1,2 or 1,5GB in size.
With Heimdall I do see the status bar in both the program while uploading and in blue the same status bar on the Samsung tablet.

On the end of the day, I still have a rooted and faulty Android system running on that Samsung tablet.
Somehow the clean factory default is not loaded when the Samsung device reboot after all uploads with Heimdall.
Although the software uploaded is Android 4.4.2 for Tab3 7.0 8GB WiFi, with all the correct changes, date of build and country code.
Is there a final method to clean out the current faulty content of the Samsung Tab3 device?

I'm sorry but I don't know why its not working for you. I don't use odin anymore so I haven't tested the uploading anything to the phone.
I would recommend you to use adb and fastboot. Both are available in the standard repository, just type sudo apt install adb and sudo apt install fastboot. Furthermore it is much saver to do any flashing that way, because it is basically the intended way of debugging a android smartphone/tablet.
Edit: ok I just found out that fastboot does not work with samsung devices
Try to use odin on windows https://samsungodin.com/ or through wine on linux but I highly doubt that this would work.
I am sorry, but at this point I can't help you more. I haven't used a Samsung device in about 4 years and have no idea any more about all the problems and kinks with odin or generall samsung devices.
I wish you the best of luck.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 24
    I have finally found a working version of Odin for Linux!
    JOdin 3 Casual powered by Heimdall

    You need at least Java 8, if you don't have it already:
    To see the java version type:
    Code:
    java -version
    Aptitude Package Manager:
    Code:
    sudo add-apt-repository ppa:webupd8team/java
    sudo apt update
    sudo apt install oracle-java9-installer
    If necessary change the java environment to the new one(this should be changed automatically by the installer of the new package):
    Code:
    sudo update-alternatives --config java

    JOdin3 Mirrors:
    mega.nz
    androidfilehost.com


    FYI:
    b4Rpfqj.png


    __________________
    2
    ooops- may I ask you why you're answering here in this thread? Your post surprised me indeed.
    Just general tech speak: if it doesn't work, verify that every element is functioning correctly.

    By the way, I was not completely accurate: I tried to use it once, but fell back to running Odin in a VM. Nowadays I solely use lineage (and derivatives), so no use for (j)Odin (except the occasional updating of baseband etc, which I do via heimdal).
    2
    It's running fine, but F.Reset, Nand Erase, and some other buttons are grayed out. Is that normal in this Linux/Java version?
    Yes, that's normal. Remember, it's not the original Odin but a clone based on Heimdall.
    1
    Thanks I am new to this and not a developer. I have downloaded Jodin3 files but how do I install please? Thanks Hugo
    1
    Thanks I am new to this and not a developer. I have downloaded Jodin3 files but how do I install please? Thanks Hugo

    Download jdoin .gz file, decompress it to your directory you want e.g /home/username/programs/jodin/

    than right click on the file "JOdin3CASUAL" and open it, if you have installed java 8.