Is the bootloader locked? How to unlock/access on pre-installed phones?

So, I’m trying to flash an updated version of TWRP onto my phone, and I cannot get into the bootloader. This command …

adb reboot bootloader

… just reboots the phone normally. I don’t have enough experience hacking on phones to be confident about what’s going on, but it seems like the bootloader is locked?

I’m working on a Samsung Galaxy S7 edge, purchased thru /e/ with eOS pre-installed. The machine I’m running ADB on is a Linux running Pop!_OS (an Ubuntu-downstream distro, very similar to Ubuntu but, y’know … better).

ADB confirms it is connected to the device, USB debugging is active, etc … I can successfully see the device on the laptop, ADB allows me to monitor and reboot it … just can’t reboot to bootloader.

adb --version == 1.0.39
fastbook --version == 1:8.1.0+r23-5

What’s going on here? If the bootloader is (re-)locked, how do I unlock it? Thanks in advance.

ETA: Addendum …

adb reboot fastboot

Gives me the same result (ie, normal reboot).

ETA: Addendum #2 … I am reading thru the /e/ install docs for my device, here, and it sounds like the issue is that Samsung does not have a bootloader at all?!? Am I on the right track here? Need to use the ‘Download Mode’ in combination with the Heimdall Suite … is this my solution?

PS: For the record, I have never (yet) used bootloader/fastboot on this phone, have never flashed anything on it, so it’s not like this is a new issue that just appeared.

Normally, the bootloader must already be unlocked as /e/ is already installed on your phone. With a locked bootloader, the installation of a custom ROM would not be possible and relocking the bootloader is not supported on Samsung phones.

Maybe there is something wrong with adb. Try getting into download mode with the hardware key combinations:
You should be then able to flash your custom recovery using fastboot.
However, I can’t help you with fastboot as I only used heimdall so far and always made good experiences with that tool.

Download mode is just a term for bootloader mode used by Samsung.
You should still be able to flash partitions with fastboot, but well, as I said I only used heimdall so far.
If you want to give that a try, it should even be in the repository of your Linux distro.
Try installing heimdall with sudo apt-get install heimdall-flash
You can then access the heimdall tool directly from your terminal. For flashing partitions, you can referr to the installation instructions as the procedure should be the same

Quickly, hardware key combo to get into download mode works on my phone.

Also, however, “adb reboot bootloader” works fine (as expected) on my OnePlus, so it’s definitely specific to my Samsung, and not my ADB install …

Maybe the standard “bootloader” fastboot options should work with Samsung, but I’m side-stepping the whole issue … I’ve already installed the Heimdall suite on my laptop (yes, it was in my repo collection) … learning how to use it now, and will report back here on my flashing progress, success or fail.


I never have used heimdal. I’m always using twrp for flashing. It’s the easiest way and I love easy ways :slight_smile:

If you have twrp installed, boot into, push the zip ia file explorer from pc to device in ‘install’ it via twrp.

If you don’t have twrp installed, download twrp for your device, from folder which incl. twrp start terminal and command: fastboot boot twrp-xyz.img (your device must be in bootloader or download mode)
Now twrp should be started and you can push the zip ia file explorer from pc to device in ‘install’ it via twrp.

Hi harvey186 … I’m still experimenting with heimdal, hope to learn it’s basic use eventually … but for now, your solution sounds more straightforward, especially since I do already have TWRP and all I want to do is update to the latest version.

However, and I apologize for asking, but your wording in the quoted sentence above is a bit confusing. Can you explain it a bit more clearly? "Boot into … " into TWRP recovery? Also, where on the phone should I save the twrp.img file?

If you want to update TWRP from within TWRP itself, you need at least version 2.8.4 installed.
If thats the case, you are good to go.
Download the latest TWRP image and save it either on your external sd card or your internal storage. If your phone is encrypted, you probably have to save the image on your external sd card as TWRP has problems with decrypting samsung devices.
Then boot into TWRP, select “Install”, choose your micro sd card and flash the image.

Yet again, effin’ Android OS-stuff is pissing me off. Not you guys, thanks for the help, please stick with me … but Damn!, why does this OS never do anything simply???

I cannot figure out where to save the twrp.img on my phone, such that when I boot into recovery, TWRP actually sees it is there.

To be clear, my phone is not rooted. I am assuming it does not have to be rooted just to update TWRP.

With that caveat, there doesn’t seem to be anywhere in the phone, nor thru a laptop-to-phone USB connection, that I can save the twrp.img where TWRP can see it.

WTF am I doing wrong?

PS: No external SD card.

ETA: Addendum #2: The /e/OS installation guide walks thru this exact process (of updating TWRP) here, starting about halfway down the page with “Install a Custom Recovery” … except for step #7 “Manually reboot directly into recovery” … there does not seem to be any way to do this. Everything I do, the phone will not shut off – it always automatically rebooots itself, and (presumably) erases the TWRP update. Any tips to get past this?

I figured this way out. Maybe it’s just me and/or my device … maybe the documentation should be updated.

From the Download Mode screen, after pushing the TWRP update via heimdall, to reboot directly into recovery … I had to press-and-hold Power+Home+VolDown (same as when starting into Download), until I got a black screen … then I immediately switched to press-and-hold Power+Home+UpVol (the normal ‘boot-to-recovery’ combo), hold until the TWRP screen came up.

I could not find any documentation of this combo-of-combos anywhere online. Maybe it’s just my device.

I still do not know how to update TWRP directly using TWRP (IDK where/how to save the new twrp.img file on the phone, such that TWRP can find it) … would love an explanation for that.

Apart from that, however … I have successfully updated to the latest TWRP, and particularly, to the TiPatched version of TWRP that should allow me to make really full backups, incl user data, via TWRP.

Thanx to all who helped.

If you have TWRP installed:

  1. boot in recovery (TWRP). you can do with hardware buttons. On Samsung it’s olume up + power + home when I remember right

  2. When you are in TWRP copy and paste the from PC to device (where ever you want) via USB connection/file explorer

  3. Install via TWRP ‘install’ menu

  4. Reboot

  5. be happy

For me, step 2 does not work. Remember, I’m on a Linux box, shouldn’t be any different, but maybe it is.

That said, for me, phone booted into TWRP, USB connected to laptop, laptop sees the phone. I can open a file explorer window to the phone, but it’s read-only. I cannot copy anything into it.

sure, I’m too. But I can ‘see’ the device in nautilus file manager. If you don’t, push it via adb

Nah, I can ‘see’ the device, too. I can open a file manager window to the device. I just cannot write files to the device.

OK, than I think your data is encrypted.

Boot into eOS and try than the same. That should work

When I am booted into eOS, and connected to the laptop, I can copy the twrp.img file into the phone.

However, when I then reboot to recovery/TWRP, TWRP does not see the img file. No matter where I save the img file inside of eOS, afterwards in TWRP, there is no img file available to install.

Ok, first, it’s a zip not a img file. Only for clarifying.
You can’t ‘see’ it, because your /data is encrypted.

You must go into developer options and enable root for adb. Than you must push the zip to root of your device.
After reboot in recovery, you should find the zip in root folder

Please check if encryption is enabled on your phone. Settings -> Security & Privacy -> Trust

My phone data is definitely not encrypted. I didn’t think it was, but per exyna, just double-checked.

TWRP offers both .zip and .img versions … I have been using the .img files. I don’t see why it would make a diff, but I could switch to .zips if you think it’s relevant.

And when booted into eOS, when you copy the twrp installation file (.img or .zip) into the phone … WHERE do you put it, so that twrp finds it, to update itself?

ETA: I have root for adb enabled, I have this whole time. Nonetheless, when copying from laptop to eOS thru adb, I do not have access to the phone’s root folder.

Don’t copy to your root folder of your phone, that will not work. Just save the .img in your regular Documents or Downloads folder.
If your data partition is not encrypted you should be able to navigate to that folder using TWRP.
In TWRP navigate to /storage/emulated/0/ - your file system tree should be the same as if you would navigate to internal storage with your file manager app directly in the OS.

Thanks, sounds promising exyna, but past my bedtime. Will continue in the morning.