cobaltowl

We'll cross that bridge when we find it

Writing custom ROMs with Odin

20-08-2023


Although Odin is rather old, and also “leaked” software, which means it has no support, the Heimdall project has been able to provide an open source alternative which works rather well.

Due to its age, the libusb situation makes things only a bit more complicated than they should be.

For Debian/Ubuntu, install libusb-1.0-0-dev, which is required for compiling Heimdall, since all the .deb packages are no longer compatible with modern versions of Ubuntu/Debian (>13.04 or >7)

apt install libusb-1.0-0-dev

As for compiling Heimdall itself, first clone the project, setup CMake and compile:

git clone https://github.com/Benjamin-Dobell/Heimdall/
cd Heimdall
cmake -DCMAKE\_BUILD\_TYPE=Release
make

After that, use the CLI utility to flash the recovery partition. Although a GUI exists, it is a tad unstable, as is JOdin, the multi-platform Odin alternative.

First, boot your device into “Download” mode. For most devices, it should be accessible through either pressing Home + Volume Down + Power on startup. If not, check for your device’s recommended method of accessing download mode.

After downloading and extracting the recovery image file of choice for your specific device (for example, this one for a Galaxy Tab E SM-T560), you should be able to flash it. To flash recovery, just run:

./bin/heimdall flash –RECOVERY ./recovery.img

After that, your custom recovery (most likely TWRP) should be working. You can then flash a custom image by copying the compressed image to a Micro SD card (recommended) or internal storage.

You must reformat (if not already formatted properly) the Micro SD card utilizing FAT, exFAT or any TWRP-supported filesystem as your filesystem of choice. After that, wipe the necessary partitions while on recovery (factory reset through TWRP/recovery generally does it).

Now, you should be able to install the desired custom ROM. Have fun!