[HOWTO] Android bootloader, fastboot, recovery and normal booting

Besides normal booting of an android device, there are two more systems maintenance mode. The bootloader or fastboot mode and the recovery mode. We can get into both the modes via startup key combinations or by using adb commands.

What is a bootloader and how to get into the bootloader mode on your android device?

A bootloader is a computer program that loads an operating system (OS) or runtime environment for the computer after completion of the self-tests.

Bootloader is like BIOS to your computer. It is the first thing that runs when you boot up your Android device. It packages the instructions to boot operating system kernel. Basically, Android device has a storage space(disk) that has several partitions, which holds the Android system file in one and all the app data in another. Bootloader serves as a security checkpoint that is responsible for checking and initializing the hardware and starting software. You can get into this mode using adb command as well as by pressing device-specific buttons



In my sm-g900f i have android 4.4.2

Have I to flash a file PIT before update from TWRP with /e/ .zip?

For this device there is no need to change PIT yet, maybe one day, in some years…system image is growing up.

But you need to update the Samsung OS to the latest available

On a Windows PC, « samfirmtool » could help you

Ok, I will flash last firmware, then I will root and then flash TWRP. At this point from TWRP I wil instal /e/ zip (after hard reset, clean dalvik and chacè)


No need to root the phone at this step,

update the firmware (with heimdall OR odin)
allow bootloader to be unlocked (in dev options),
allow USB android adb debugging, (in dev options)
boot to download mode (with volume down + home + power buttons)
unlock the bootloader (with heimdall, no need with odin) using the command “heimdall print pit” automatically use the pit file included in the phone’s rom (stock firmware, CSC part) ,

re-allow USB android adb debugging (in dev options),
flash TWRP (with heimdall OR odin),
turn off the phone (hold volume down + power buttons)

reboot to recovery (hold volume up + home + power buttons)
wipe the needed partitions (with TWRP)
now you can install /e/ (with TWRP)
after that, if you need root permission for some apps, you could install magisk (with TWRP).

Flashing the latest version of Stock Android 6.0.1 is extremely useful and a good basis for sharing with a custom ROM.

The tried and tested saving option is to update only the bootloader and baseband firmware. The leading LineaegOS maintainer @haggertk provides the best possible combination of bootloader_modem_firmware for five S5 G900 models is available here.

I can not find how to unlock bootloader also with the last update of last firmware (6.0.1).
I can’t find it in the development options

Yes, I believe you. A function 'OEM Unloc’k aka ‘Unlock bootloader’ does not know Stock Android 6.0.1. Ignore any hints.

Yes, I believe that too. The developer options are not activated by default. Navigate to ‘About phone’ and tap at least 7x on ‘Buildnumber’. This will unlock the ‘Ddeveloper options’ and you can enable ‘USB debugging’.

These are the basic requirements to continue.

I have activated the developer options with the seven tap but unlock bootloader or oem unlock ther was not

I’am wronging somthing…

I have Linux with heimdall, fastboot and adb installed and functioning.

To install TWRP the only thing I have to do is:

heimdall flash --RECOVERY twrp-x.x.x-x-klte.img --no-reboot


Please have a look to this HowTo :

(HowTo easily install /e/OS on a Samsung device from a GNU/Linux PC)

My only problem is that I do not activate “oem unlock” in the development options.

I can follow two paths: Starting from a firmware other than 6.0.1 hoping that maybe this will activate the infamous “oem unlock” or starting from the 4.4.2 I have now, but in this case I need a PIT file to partition the memory, since android 5 onwards the partitions are different. I already have TWRP installed

The OEM unlock may be device specific…these are screenshots from a Samsung S7 SM-G930U…a device which unfortunately does not work with /e/

yes but my s5 is on the officially supported list and the fact that “oem unlock” does not appear surprises me. I managed to install /e/ but doing the root and I get the warranty bit.

Which version of the OS do you have on your device

Now I have 4.4.2 stocks with root and TWRP. But from android 5 onwards partitions are different I can’t flash the . zip of /e/

I tried to put 6.0.1 (last one) but “oem unlock” does not appear

I should try this

Is /e/ Os always installed in same partition?

Can someone of you adb shell in your phone to see the /cat/proc/partition output?

This is mine of the stock 4.4.2 g900f:

shell@klte:/ $ cat /proc/partitions
major minor #blocks name

253 0 1048576 vnswap0
179 0 15388672 mmcblk0
179 1 15360 mmcblk0p1
179 2 58816 mmcblk0p2
179 3 512 mmcblk0p3
179 4 64 mmcblk0p4
179 5 32 mmcblk0p5
179 6 2048 mmcblk0p6
179 7 512 mmcblk0p7
179 8 512 mmcblk0p8
179 9 3072 mmcblk0p9
179 10 7136 mmcblk0p10
179 11 10240 mmcblk0p11
179 12 14336 mmcblk0p12
179 13 3072 mmcblk0p13
179 14 3072 mmcblk0p14
179 15 13312 mmcblk0p15
179 16 15360 mmcblk0p16
179 17 13312 mmcblk0p17
179 18 7159 mmcblk0p18
179 19 1 mmcblk0p19
179 20 8 mmcblk0p20
179 21 8192 mmcblk0p21
179 22 9216 mmcblk0p22
179 23 2560000 mmcblk0p23
179 24 204800 mmcblk0p24
179 25 51200 mmcblk0p25
179 26 12383215 mmcblk0p26
179 32 512 mmcblk0rpmb
179 64 30183936 mmcblk1
179 65 30182912 mmcblk1p1

For old devices abandoned by the vendor, It is recommended to use the latest firmware available, on witch /e/OS is builded.

On some recent Samsung models, the feature off allowing OEM-Unlock or not the bootloader is hidden, and do not appear in the developer menu. So you have to make it appear…

On old Samsung models, the feature off allowing OEM-Unlock or not the bootloader was not implemented yet, and do not appear in the developer options menu.
Here don’t care about it, and go to next step :
Unlocking the bootloader with a Terminal :

heimdall print-pit

Samsung’s Galaxy S5, e.g. Model SM-900F with Stock Android 6.0.1 has not integrated this device-specific function. Why do you want to admit this?

You’ve installed TWRP. So now you can install the /e/ for klte dev (Pie) via TWRP! What else is stopping you?

Because I know that from 4.4.2 I can not install .zip update for exemple of android 6.0.1 for the reason I say before. I will try