FORUMS
Remove All Ads from XDA

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

43 posts
Thanks Meter: 48
 
By Toby4213, Member on 13th April 2018, 07:37 AM
Post Reply Email Thread
20th July 2019, 07:49 AM |#11  
OP Member
Thanks Meter: 48
 
More
Quote:
Originally Posted by phoenixbyrd

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://forum.xda-developers.com/sho....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.
 
 
27th July 2019, 02:04 PM |#12  
xdausernl's Avatar
Member
Flag Amersfoort
Thanks Meter: 0
 
More
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.getH eimdallFileParametersFromOdinFile(Odin.java:50)
at com.casual_dev.jodin.JOdinController.getHeimdallCo mmandFromOdinPackageList(JOdinController.java:621)
at com.casual_dev.jodin.JOdinController.access$3300(J OdinController.java:54)
at com.casual_dev.jodin.JOdinController$13.run(JOdinC ontroller.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?
28th July 2019, 09:43 PM |#13  
xdausernl's Avatar
Member
Flag Amersfoort
Thanks Meter: 0
 
More
Quote:
Originally Posted by Toby4213

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:
Odin New/Old Button Labeling


__________________

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.getH eimdallFileParametersFromOdinFile(Odin.java:50)
at com.casual_dev.jodin.JOdinController.getHeimdallCo mmandFromOdinPackageList(JOdinController.java:621)
at com.casual_dev.jodin.JOdinController.access$3300(J OdinController.java:54)
at com.casual_dev.jodin.JOdinController$13.run(JOdinC ontroller.java:572)
at java.lang.Thread.run(Thread.java:745)
28th July 2019, 10:31 PM |#14  
OP Member
Thanks Meter: 48
 
More
Quote:
Originally Posted by xdausernl

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.getH eimdallFileParametersFromOdinFile(Odin.java:50)
at com.casual_dev.jodin.JOdinController.getHeimdallCo mmandFromOdinPackageList(JOdinController.java:621)
at com.casual_dev.jodin.JOdinController.access$3300(J OdinController.java:54)
at com.casual_dev.jodin.JOdinController$13.run(JOdinC ontroller.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?

Quote:
Originally Posted by xdausernl

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.getH eimdallFileParametersFromOdinFile(Odin.java:50)
at com.casual_dev.jodin.JOdinController.getHeimdallCo mmandFromOdinPackageList(JOdinController.java:621)
at com.casual_dev.jodin.JOdinController.access$3300(J OdinController.java:54)
at com.casual_dev.jodin.JOdinController$13.run(JOdinC ontroller.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...p-size-control
If you are wondering what magic that is, its literally the first answer for typing "java increase heap size"
30th July 2019, 01:20 AM |#15  
Junior Member
Thanks Meter: 0
 
More
Thanks I am new to this and not a developer. I have downloaded Jodin3 files but how do I install please?


__________________________________________________ ______
Sarkari Result Pnr Status 192.168.l.l
31st July 2019, 02:59 PM |#16  
xdausernl's Avatar
Member
Flag Amersfoort
Thanks Meter: 0
 
More
Quote:
Originally Posted by Toby4213

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...p-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?
1st August 2019, 10:08 PM |#17  
OP Member
Thanks Meter: 48
 
More
Quote:
Originally Posted by xdausernl

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.

Quote:
Originally Posted by matador84

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 shitty 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/
3rd August 2019, 08:46 PM |#18  
xdausernl's Avatar
Member
Flag Amersfoort
Thanks Meter: 0
 
More
Quote:
Originally Posted by Toby4213

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 shitty 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?
4th August 2019, 12:44 AM |#19  
OP Member
Thanks Meter: 48
 
More
Quote:
Originally Posted by xdausernl

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
5th August 2019, 08:09 PM |#20  
xdausernl's Avatar
Member
Flag Amersfoort
Thanks Meter: 0
 
More
Quote:
Originally Posted by Toby4213

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?
5th August 2019, 10:52 PM |#21  
OP Member
Thanks Meter: 48
 
More
Quote:
Originally Posted by xdausernl

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.
Post Reply Subscribe to Thread

Tags
java, jodin, jodin3, linux, odin

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes