[SAMSUNG][J100H] how do I unlock my bootloader using Linux

jolly-jump

Member
Jul 22, 2020
12
0
0
Hi there,

I have a Samsung SM-J100H and I have searched and read hopefully thoroughly this forum and found no conclusive answer
  • how to get TWRP onto my phone without a Windows computer

I found:
https://www.teamandroid.com/2015/12/28/how-to-install-twrp-2-8-7-0-recovery-on-samsung-galaxy-j1/2/ which supposedly works with ODIN which only works on Windows.

I have not found, how to do the same using heimdall, which works on Linux.
I have found that `adb reboot bootloader` does not work with my device - it justs reboots.
I have found that using the three-button-combo does get me into download mode but then I am stuck, since it seems that I have no fastboot functions, so I cannot use the guide https://www.xda-developers.com/how-to-install-twrp/

My goal is:
  • make a complete backup of my stock rom
  • get twrp on the phone as recovery
  • try different custom roms that I found for the J100H
  • try to build a custom rom on my own

Thank you for any help!
 

jolly-jump

Member
Jul 22, 2020
12
0
0
I reply myself, since after more reading and searching, I indeed found no way to unlock my bootloader using heimdall and Linux, see here:

https://gitlab.com/BenjaminDobell/Heimdall/-/issues/388

It seems the current heimdall or the current usb-drivers or my cable or my USB-Ports are responsible for not being able to do the TWRP -> RECOVERY step in the first place.

## Using windows
Sadly I had to resolve to use a Windows 10 Computer, an Odin installation downloaded from ship (v3.14) and a TWRP image from kingkobra97: https://androidfilehost.com/?fid=818070582850493528
That actually worked seemingly without a problem, but it did not boot into the recovery partition when using VOLUME UP+ HOME + Power combination, it booted into the stock recovery.
The only obvious change was the "STatus: custom" in the last line of the stock recovery. Maybe some more boot-reboot combination should have done the trick.

## Using linux again
now I miraculously could use the same heimdall command in download mode that did nothing beforehand with the same strange warnings.
But this time I rebooted right into TWRP recovery mode.
Code:
$ sudo heimdall flash --verbose --no-reboot --RECOVERY recovery.img
Heimdall v1.4.2

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
      Manufacturer: "SAMSUNG"
           Product: "SAMSUNG USB DRIVER"

            length: 18
      device class: 2
               S/N: 0
           VID:PID: 04E8:685D
         bcdDevice: 021B
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

...snip...
Claiming interface...
Setting up interface...

Initialising protocol...
Protocol initialisation successful.
Beginning session...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...

Some devices may take up to 2 minutes to respond.
Please be patient!

WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
... snip ...
Uploading RECOVERY
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
0%WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...

10%
...snip...
Ending session...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
Releasing device interface...
Thats as far as I got. Maybe someone else might find this useful.
 
Last edited:

TheExploitedOne

Senior Member
Jul 8, 2019
268
42
0
Unfortunately Samsung replaced fastboot mode with Odin mode (hosted in the bootloader). I'd prefer you use a Windows OS with Odin as you'd have a way better success rate with that tool.
 

jolly-jump

Member
Jul 22, 2020
12
0
0
Unfortunately Samsung replaced fastboot mode with Odin mode (hosted in the bootloader). I'd prefer you use a Windows OS with Odin as you'd have a way better success rate with that tool.
Thank you, is there a way to replace the Odin mode by the fastboot mode?

I was wondering why the fastboot mode did not "appear" when I seemingly flashed TWRP successfully.

This is actually not quite true.
If I reboot into recovery mode, I was back to the stock recovery. I could reproduce going to download mode, downloading TWRP then going into recovery mod ewith TWRP. Now I downloaded Lineage OS and it seems TWRP is permanent, but I will have to check.
 

TheExploitedOne

Senior Member
Jul 8, 2019
268
42
0
Thank you, is there a way to replace the Odin mode by the fastboot mode?

I was wondering why the fastboot mode did not "appear" when I seemingly flashed TWRP successfully.

This is actually not quite true.
If I reboot into recovery mode, I was back to the stock recovery. I could reproduce going to download mode, downloading TWRP then going into recovery mod ewith TWRP. Now I downloaded Lineage OS and it seems TWRP is permanent, but I will have to check.
Yes the stock system has a file 'recovery-on-boot.p' and force flashes the stock recovery upon boot. When you go to download mode and download TWRP you have to uncheck auto-reset. After that hard reset the immediately hold the key combo to recovery and your good for custom flashing

Fastboot is not integrated by the bootloader on Samsung devices. You won't be able to replace Odin download mode as that can brick the device

You're welcome as well good sir I'm glad to be able to help
 
  • Like
Reactions: jolly-jump

jolly-jump

Member
Jul 22, 2020
12
0
0
Yes the stock system has a file 'recovery-on-boot.p' and force flashes the stock recovery upon boot. When you go to download mode and download TWRP you have to uncheck auto-reset. After that hard reset the immediately hold the key combo to recovery and your good for custom flashing

Fastboot is not integrated by the bootloader on Samsung devices. You won't be able to replace Odin download mode as that can brick the device

You're welcome as well good sir I'm glad to be able to help
Ok. thanks you again.

That means for my level of experience there is just no way of unlocking the bootloader.
But the good thing is, that some how in the normal process of install TWRP and LineageOS it seems to have somehow broken the "force stock recovery upon boot" cycle. I always get into TWRP recovery, even if I boot the download mode = odin mode. In odin mode it says twice "custom" which means probably that the odin mode recognizes that both the system and probably the recovery is custom.
 

TheExploitedOne

Senior Member
Jul 8, 2019
268
42
0
Ok. thanks you again.

That means for my level of experience there is just no way of unlocking the bootloader.
But the good thing is, that some how in the normal process of install TWRP and LineageOS it seems to have somehow broken the "force stock recovery upon boot" cycle. I always get into TWRP recovery, even if I boot the download mode = odin mode. In odin mode it says twice "custom" which means probably that the odin mode recognizes that both the system and probably the recovery is custom.
Yes that shows the system has be modified (tampered). After you flashed a new OS it doesn't contain that file so TWRP will stay without issues