openandroidinstaller icon indicating copy to clipboard operation
openandroidinstaller copied to clipboard

OpenAndroidInstaller does not drop to bootloader unlock in download mode on Samsung S10

Open marmotte32 opened this issue 2 years ago • 11 comments

Describe the bug At after clicking on 'Confirm and run' at step ''Unlock the bootloader', the device reboot in download mode without the option to unlock the bootloader.

To Reproduce Steps to reproduce the behavior:

  1. Run OpenAndroidInstaller 0.4.4 beta
  2. Click on 'I understand', click on 'Let's Start'
  3. Click on 'Search for device', the device is detected 'beyond1lte', click 'Continue'
  4. Tick the box 'requiered version of android installed' + 'battery level over 80%' + No lock ...', click 'Continue'
  5. Select an OS image, select a recovery image, click 'Continue' (just a little bug, the file selection popup does not open foreground ...)
  6. then now you are at the menu 'Unlock the bootloader', there is the issue, click 'Confirm and run' image
  7. The phone will reboot in download mode without the option to unlock the bootloader: issue

Expected behavior I should reboot in bootloader unlock mode to be able to unlock the bootloader (long press volume up expected

Log file openandroidinstaller.log

Screenshots The phone will reboot in download mode without the option to unlock the bootloader: issue

Desktop (please complete the following information):

  • OS: Linux Mint Cinnamon
  • Version: 21.2

Smartphone (please complete the following information):

  • Device: Samsung Galaxy S10 / codename: beyond1lte / model: SM-G973F/DS
  • OS: Original Stock Samsung ROM installed is Android 12:
  • Version A12 AP/PDA: G973FXXSGHWC1 (PDA) CSC: G973FOXJGHVJ4 CP: G973FXXSGHWB3 (BaseBand)

Additional context It seems that the command adb reboot download does not show the expected unlock bootloader option I did some test and was not able to get the right screen using adb. It seems that on Samsung devices (at least S10), you really need to that manually to get the option to unlock the bootloader: "With the device powered off - hold Volume Down + Bixby and connect USB cable to PC"

marmotte32 avatar Aug 03 '23 20:08 marmotte32

See https://github.com/openandroidinstaller-dev/openandroidinstaller/issues/229#issuecomment-1664655617

MagicLike avatar Aug 03 '23 21:08 MagicLike

I don't have a device of that samsung period to test but I think you are right .

We have to :

  • [ ] Decide when samsung introduce the "manual" oem unlock ( S9 era I guess )
  • [ ] Create a new image " Samsung Button Bixby Download cold" to explain how to manually boot to download mode
  • [ ] Create the step to explain that the user should choose unlock with your screenshot

Generally the " unlock oem" although very important is not really well supported as each device has its own mechanism and UI in fastboot/download mode so your feedback is really important

freechelmi avatar Aug 04 '23 15:08 freechelmi

Instructions can be found here: https://wiki.lineageos.org/devices/beyond1lte/install#pre-install-instructions This should be fixable by adding bootloader unlocking steps to the respective config.

tsterbak avatar Aug 08 '23 06:08 tsterbak

Hello,

@tsterbak These instructions from LOS doc for recovery flash are wrong. If you flash only the recovery then you'll end up on a vbmeta lock !

Carefully, when flahing the recovery the vbmeta-disabled IMG must be flashed at the same time.

Then regarding the bootloader unlock, yes it seems that this can not be triggered from any adb command.

So as suggested by @freechelmi it would be necessary to tell the enduser how to do it manually using some screenshots to access download mode after having set OEM unlock to enabled in Android dev options.

The bootloader must be unlocked before injecting any recovery.

marmotte32 avatar Aug 08 '23 09:08 marmotte32

Hi, thanks a lot for the clarification! Twrp mentions this here: https://twrp.me/samsung/samsunggalaxys10.html So we need to make it possible to flash the vbmeta.img before even touching the recovery.

As far as I know, the S10 line is the first generation of Samsung devices affected by this. Are there any other devices with this issue?

tsterbak avatar Aug 08 '23 10:08 tsterbak

So we need to make it possible to flash the vbmeta.img before even touching the recovery.

It's easy to do with #220, just invert instructions in device configuration file

ghost avatar Aug 08 '23 10:08 ghost

It's easy to do with https://github.com/openandroidinstaller-dev/openandroidinstaller/pull/220, just invert instructions in device configuration file

True to some extend, but Samsung devices don't have a fastboot mode. So it needs to be done with heimdall (which should be possible)

tsterbak avatar Aug 08 '23 11:08 tsterbak

Ok, I was not aware of that.

ghost avatar Aug 08 '23 12:08 ghost

Here are the instructions for unlock and recovery + vbmeta Disabler : https://forum.xda-developers.com/t/recovery-official-3-6-1-x-twrp-for-galaxy-s10-e-5g-exynos.4180287/

Please read the heimdall instruction but once unlocked, in download mode: sudo heimdall flash --RECOVERY /path/to/recovery.img --VBMETA /path/to/vbmetaavbdisabled.img

marmotte32 avatar Aug 08 '23 16:08 marmotte32

And only if coming from a full stock ROM, the encryption need to be disabled by flashing this zip from twrp: multidisabler-samsung-3.*.zip

Please note that I didn't tried nor the erecovery nor the losrecovery I'm using twrp

marmotte32 avatar Aug 08 '23 16:08 marmotte32

It seems behaviour is again different on Samsung note 9 ( crownlte )

If I try to go manually in download mode ( BIX + VOLDW + PWR ) it will just power on OS

and although the oem lock toggle automatically wiped the OS , booting in download mode with adb said " only official binairies could be flashed" when flashing TWRP

I needed to BIX + VOLDW + plug the usb cable ( much more difficult ) and then launch the TWRP flash ( no "unlock mode " like S10 )

We realy need to write all this down in a dedicated markdown file because each samsung model will need its own scenario

freechelmi avatar Nov 30 '23 12:11 freechelmi