jueves, 9 de noviembre de 2023

Freeing your phone from Linux (with heimdall for Samsung)

When I wrote about updating baseband I realised that I hadn't written about how to install an aftermarket ROM, so... here we go.

The typical journey of installing an aftermarket ROM Like LineageOS, crDroid, ... which means replacing the propietary ROM of your phone with a hopefully free OS that is updated more frequently and for a longer time, starts with unlocking your mobile phone's bootloader, that depends on your maker, or even your model, so you must find an specific guide on that, typically it means enabling developer mode oand then looking for a

OEM unlock option.

Then you must install a recovery, you have to choose the specific one for your phone from all the available ones. Both LineageOS and crDroid have their own simple recoveries, and you have of course the good old TeamWin, OrangeFox, ... you just need to find the one you like and is available for your phone and then we install it.

After installing the recovery we have half the work done, as we can boot into it and from there we can flash our chosen OS and then the Google Apps or maybe you prefer to choose microG instead.

But... how do we install the recovery... on some devices you have a fastboot bootloader, there you must use the fastboot tool doing something like:

fastboot flash recovery recovery.img either if you are on Windows or Linux, but for Samsung devices... you either use Samsung tools for Windows like the old Odin, or if you are on Linux... yes, you need the latest version of heimdall (2.0.2 as I write this).

Once you have the latest heimdall installed we get the phone to start the bootloader or download mode and plug it to our computer, there we can run

heimdall flash --VBMETA vbmeta.img --RECOVERY recovery.img where the vbmeta image is specific for your model and is needed so that we are allowed to install our recovery and our chosen OS. One thing about heimdall... you can use the --no-reboot option, and so the phone won't reboot after heimdall exits, however, on modern phones and at least on heimdall versions up to and including 2.2, you won't be able to run heimdall again to do some other task without rebooting, it will fail, so... you must reboot anyway.

After installing the recovery we must boot it, not the OS, if you boot to the OS just once, it will restore the old recovery and you'll have to start all over, so... after you execute heimdall, make sure you press the right keys to boot into recovery.

That's it, I know it sounds a bit complicated, but, if you do things right, you can forget about Samsung's crap forever and enjoy your chosen system for a hopefully long time. I hope this new experience with your phone pleases you, enjoy it!

No hay comentarios: