Bootloader unlock / Root / Custom Recoveries / ROMs

Lamdarer

Beta Tester
23 November 2019
29
Frage/Question: I followed all steps, can I lock the bootloader again or will that reset the rooting process as well as all data?
(I made a backup with adb backup -all but I think I can only restore it if the bootloader is locked again(? or its doesnt work at all, its a very old method 2011), also I dont want my phone to show a "warning" after every restart)
So is it save to lock the bootloader again and how exactly would I do that?
(Hope this wasn't already answered but the thread is kinda big and I couldn't find anything valuable using the search function)
 

danielp

SHIFT Friend
Alpha Tester
22 September 2019
2.219
Both unlocking fastboot flashing unlock and locking fastboot flashing lock requires a factory reset!

I am not completely sure but I think creating and restoring a backup has nothing to do with the bootloader state.
 

Lamdarer

Beta Tester
23 November 2019
29
Both unlocking fastboot flashing unlock and locking fastboot flashing lock requires a factory reset!

I am not completely sure but I think creating and restoring a backup has nothing to do with the bootloader state.
So if I lock the bootloader again the devices is not longer rooted, correct?
 

danielp

SHIFT Friend
Alpha Tester
22 September 2019
2.219
Booting into the bootloader and executing above command normally should do the trick.

OEM unlocking is still enabled in the developer settings?

In general if you successfully rooted the phone and kept the settings locking the bootloader again should work. Or in other words following the same steps as for unlocking should work.
 

Lamdarer

Beta Tester
23 November 2019
29
Booting into the bootloader and executing above command normally should do the trick.

OEM unlocking is still enabled in the developer settings?

In general if you successfully rooted the phone and kept the settings locking the bootloader again should work. Or in other words following the same steps as for unlocking should work.
I did the same steps as for unlocking the bootloader, but if I select "START" in the bootloader I am in a loop that brings me strait back to the bootloader.
OEM unlocking is still enabled in the developer settings?
Yes it was I couldnt disable it anyways, I think it was greyed out but enabled.
Edit: I can still execute commands via the PC.
 
Zuletzt bearbeitet:

danielp

SHIFT Friend
Alpha Tester
22 September 2019
2.219
I did the same steps as for unlocking the bootloader, but if I select "START" in the bootloader I am in a loop that brings me strait back to the bootloader.
:confused: What do you mean by "START" in the bootloader? The point from the instructions when you reboot into the bootloader?

Does it work if you reboot from the command line using adb reboot bootloader?
 

Lamdarer

Beta Tester
23 November 2019
29
:confused: What do you mean by "START" in the bootloader? The point from the instructions when you reboot into the bootloader?
Bootloader.jpg
No matter which option I choose(Start/Stop/...) I alsways get back to this screen :/
Does it work if you reboot from the command line using adb reboot bootloader?
Nope doesn't work "error: no devices/emulators found" but if I lock/unlock the bootmanager it updates the above view.
 

danielp

SHIFT Friend
Alpha Tester
22 September 2019
2.219
I am more and more confused!

I don't know why you want start or stop. The guide says nothing about it. If you are there you should be able to lock or unlock the bootloader. Are you saying the device is not able to boot normal?

Also it says "Device state - locked". So the bootloader already seems to be locked.

Also are you really sure you can access the device using adb? I don't think so given that it does not find devices or emulators? What does adb devices give you?
 

Lamdarer

Beta Tester
23 November 2019
29
I am more and more confused!

I don't know why you want start or stop. The guide says nothing about it.
I just want to boot into Android after changing the bootloader option.
If you are there you should be able to lock or unlock the bootloader.
Yes I can switch it to locked or unlockd as often as I want.
Are you saying the device is not able to boot normal?
Yes, I cant boot.
Also it says "Device state - locked". So the bootloader already seems to be locked.

Also are you really sure you can access the device using adb?
Yes as meantioned before I can change switch it.
I don't think so given that it does not find devices or emulators? What does adb devices give you?
Currently adb devices does indeed not list any device but earlier it was able to list my phone.
And even though it currently does not list any device I can still shuffle between locked and unlocked. :/
It is probably really a corrupted image or so...
 

danielp

SHIFT Friend
Alpha Tester
22 September 2019
2.219
Strange!
And it also does not boot if you are in unlocked state?
If the boot image really is corrupt maybe flashing it again could help!?

Else I am lost. I locked and unlocked the bootloader without problems or doing anything special.
 

Ene

Original poster
Alpha Tester
Beta Tester
21 Oktober 2020
60
Germany / Bavaria
I just want to boot into Android after changing the bootloader option.

Yes I can switch it to locked or unlockd as often as I want.

Yes, I cant boot.

Yes as meantioned before I can change switch it.

Currently adb devices does indeed not list any device but earlier it was able to list my phone.
And even though it currently does not list any device I can still shuffle between locked and unlocked. :/
It is probably really a corrupted image or so...
Did you flash a bootimage matching for your OS Version? Maybe, also wipe Data in Recovery Mode and try again.
 
  • Like
Reaktionen: danielp

Lamdarer

Beta Tester
23 November 2019
29
Strange!
And it also does not boot if you are in unlocked state?
Nope doesn't boot no matter what I do.
If the boot image really is corrupt maybe flashing it again could help!?
How would I do that?
Did you flash a bootimage matching for your OS Version?
Yes I think so I had 3.3-L and flashed the magisk_boot_shift6mq-sos-3-3-l-20210709.img
Maybe, also wipe Data in Recovery Mode and try again.
How would I do that? If I select recovery mode my phone restarts but the screen afterwards seems to be the same as the one before.
 

Lamdarer

Beta Tester
23 November 2019
29
I think at this point I just need a way to recover the device to the initial starting point, so that I can start the rooting process from the beginning.
(I dont really care if I have to do everything againg and it is probably easier that way instead of trying to find a way to recover it to the rooted state.)
 

danielp

SHIFT Friend
Alpha Tester
22 September 2019
2.219
How would I do that?
Well, I think you rooted your phone? During that you had to flash the magisk patched boot image, didn't you?
Yes I think so I had 3.3-L and flashed the magisk_boot_shift6mq-sos-3-3-l-20210709.img
When dealing with such things it is very dangerous to just think or believe. You ought to know!
Up to now there are three versions of ShiftOS-L 3.3:
SHIFT6MQ.SOS.3.3.L.20210519
SHIFT6MQ.SOS.3.3.L.20210624
SHIFT6MQ.SOS.3.3.L.20210709
So if the versions did not match this might be the reason for your problems! Using the correct image might fix your problem.
 

Lamdarer

Beta Tester
23 November 2019
29
Well, I think you rooted your phone? During that you had to flash the magisk patched boot image, didn't you?

When dealing with such things it is very dangerous to just think or believe. You ought to know!
Up to now there are three versions of ShiftOS-L 3.3:
SHIFT6MQ.SOS.3.3.L.20210519
SHIFT6MQ.SOS.3.3.L.20210624
SHIFT6MQ.SOS.3.3.L.20210709
So if the versions did not match this might be the reason for your problems! Using the correct image might fix your problem.
Ah, I didnt noticed that there where 3 different 3.3 versions. My fault.
So how can I flash my phone again?
 

danielp

SHIFT Friend
Alpha Tester
22 September 2019
2.219
Ah, I didnt noticed that there where 3 different 3.3 versions. My fault.
So how can I flash my phone again?
Then probably you do have not the latest version (20210709). So you can try if flashing one of the two older versions of the boot image fixes the issue. The one matching the version you have installed should fix it. In this thread you will also find the older versions provided by @@Lhotze.

You said you can lock and unlock the bootloader. Then you first need to unlock it again and flash the magisk image as described in the guide using fastboot flash boot YOURIMAGE
 

Lamdarer

Beta Tester
23 November 2019
29
Then probably you do have not the latest version (20210709). So you can try if flashing one of the two older versions of the boot image fixes the issue. The one matching the version you have installed should fix it. In this thread you will also find the older versions provided by @@Lhotze.

You said you can lock and unlock the bootloader. Then you first need to unlock it again and flash the magisk image as described in the guide using fastboot flash boot YOURIMAGE
I tried all three "Boot-Magisk-SHIFT6MQ.SOS.3.3.L...." versions after sucessfully unlocking the bootloader again: "fastboot: error: cannot get boot partition size"

Can/should I try some of the other images? Or which one should I try to boot to recover my phone?
Like mentioned here:
Es gibt schon eine viel neuere Stable Version, vielleicht mal updaten? :)

Hier sind boot.img und recovery.img - https://downloads.shiftphones.com/public/SHIFT6mq/release-light/SHIFT6MQ.SOS.3.1.L.20210226/IMAGES/


Sollte gehen

EDIT: Regarding you earlier post I just noticed that even tough I cant see the phone using adb devices I can see it using fastboot devices
 

danielp

SHIFT Friend
Alpha Tester
22 September 2019
2.219
I tried all three "Boot-Magisk-SHIFT6MQ.SOS.3.3.L...." versions after sucessfully unlocking the bootloader again: "fastboot: error: cannot get boot partition size"
It is hard to say what is going wrong here!
The magsik patched boot images have the correct size? 20210519 (13107200 Bytes), 20210624 (13185024 Bytes), 20210709 (13189120 Bytes)
You are using the latest platform SDK?
Your OS version is not 3.3-something but again some other (maybe older) version?
Maybe it looks like locking and unlocking works but does not!?
You somehow botched the system, e. g. the partition table.
Can/should I try some of the other images? Or which one should I try to boot to recover my phone?
I don't think this will work, these are even older versions and it has to fit the version you have installed.


If nobody else has other ideas it is probably best to contact Shift. Sending in the device for repair might be the only option then!
 

Lamdarer

Beta Tester
23 November 2019
29
It is hard to say what is going wrong here!
The magsik patched boot images have the correct size? 20210519 (13107200 Bytes), 20210624 (13185024 Bytes), 20210709 (13189120 Bytes)
Yes the have.
You are using the latest platform SDK?
Maybe I still use the version from March instead of the April one:
"Android Debug Bridge version 1.0.41
Version 31.0.0p1-android-tools"
It also states on the SDK Platform Tools page that the newest version fixes an error that seems really similar to the on I have:
"fastboot
  • Don't fail when unable to get boot partition size."
I will check if I can update it and use the newer version. This really looks like its related to the error I ran into.
Your OS version is not 3.3-something but again some other (maybe older) version?
I thought I checked for the newest version before updating or at least the last time I tried to update isnt too long ago(last few months)
Maybe it looks like locking and unlocking works but does not!?
You somehow botched the system, e. g. the partition table.

I don't think this will work, these are even older versions and it has to fit the version you have installed.


If nobody else has other ideas it is probably best to contact Shift. Sending in the device for repair might be the only option then!
 

@Lhotze

Alpha Tester
Beta Tester
21 Oktober 2020
321
I would recommend to unlock Bootloader, boot into recovery, Install latest Beta-Version out of the Recovery with adb sideload.
Then a) lock Bootloader and use a unrooted system or of you wanna root flash latest magisk-boot from that thread with fastboot flash boot "imagefile".
I would not recommend to lock again with a patched bootimage.
If you do an System-Update you will not bei able to root again without loosing data. Furthermore i think the Boot-Problem could depend on Androids security mechanisem against manipulating from system files. This mechanism (called andoid verified boot) is active during locker bootloader state.
_______
Ich empfehle den Bootloader zu entsperren , in das Recovery zu booten und die letzte Beta-Version mit ADB zu sideloaden.
Dann:
a) den Bootloader mit ungerootetem Boot Image wieder schließen und ein Stock System nutzen oder
b) den Bootloader offen zu lassen, wenn gerootet wird. Der Android Sicherheitsmechanismus AVB erkennt ein manipuliertes Boot Image. Das macht nichts, wenn der Bootloader offen ist. Ist er aber mit gerootetem Boot gesperrt, verhindert AVB, dass das System startet und genutzt werden kann.
Greetz
 
Zuletzt bearbeitet:

danielp

SHIFT Friend
Alpha Tester
22 September 2019
2.219
Are you sure regaining root after a system update before rebooting does not work if the bootloader is locked? If this is true then surely a locked bootloader does not really make sense.
 

@Lhotze

Alpha Tester
Beta Tester
21 Oktober 2020
321
Not really sure, but if a patched boot image failed avb, then it shouldn't possible to install it if bootloader is locked.
I don't know sure if it pass avb 🤷🏼‍♂️.
Greetz
 
  • Like
Reaktionen: danielp

danielp

SHIFT Friend
Alpha Tester
22 September 2019
2.219
Okay so it is a safe recommendation to keep it unlocked! At least until someone knows better. :)
 
  • Like
Reaktionen: @Lhotze

Lamdarer

Beta Tester
23 November 2019
29
I would recommend to unlock Bootloader, boot into recovery, Install latest Beta-Version out of the Recovery with adb sideload.
I am already failing at this step, I think I cant enter the recovery mode if I select "Recovery mode" the phone restarts but the screen afterwards is the same as before. From what I searched online I think it should be some kind of additional menu and the first line should state something like "Recovery mode", but this is not the case, I just see the usal Bootloader screen(the one I already posted).

Also good to know to keep the bootloader unlocked. If I hadn't tried to lock it my phone would probably still boot.
 

Lamdarer

Beta Tester
23 November 2019
29
Oh I just tried some stuff and apparently booting the image I originally created at the start worked fastboot flash boot magisk_boot.img so now I can at least boot again
Thanks guys.
EDIT: Will check if everything works right and for now I better keep the bootloader unlocked ;)
ReEDIT: So everything seems to work now I flashed the most recent version of SOS-L againg rootet the phone again installed MicroG,... exept for the backup I tried but that was to be expected.
 
Zuletzt bearbeitet:
  • Like
Reaktionen: Ene und danielp

Klajo

Beta Tester
19 Juni 2019
20
Where can I find the boot image for the 20210726 udpate? I don't see it yet in the folder