• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Restore Stock Image and Lock the Bootloader (for Warranty)

Search This thread

Keibow

Member
Nov 27, 2018
12
2
hello guys, I bought the z5 pro gt already unlocked on aliexpress, I installed the twrp and magiski and everything was fine, then to do the last update zui I restored the device and locked the bootloader, when I tried to unlock it again following the correct procedure I did not succeed, the release file sent to me by zui is not loaded with the command fastboot, (but is it normal that it is only 6 kb?) I read that maybe I should install via qfil the rom _ZUI_10.5.061_ST_190119_qpst.zip to be able to unlock the bootloader but it didn't work, I believe that the problem is the img (sn.img) file sent to me by the zui not to go, can someone help me? (I apologize for how I write, I use google translator)

On fastboot mode it says that the bootloader is locked?
Are you using the right commands?
Did you put the correct info of your phone when requesting the bootloader file?

And the sn.img file size it is normal.
 
Last edited:
Z5 pro gt

thanks for the answer, yes, I execute the right commands following the steps described in the various guides, I moved the unlock file received from zui to the same folder where I have adb and fastboot, the phone is recognized by the pc but when I type the command "fastboot flash unlock sn.img "says that sn.img is not loaded, I tried different commands but it's all useless. (yes, it tells me that the bootloader is blocked) the rom installed is not the one with which I arrived, after I have locked the bootloader not starting anymore and I installed a Chinese ROM downloaded from xda, maybe that's why the release is not going?
 

Keibow

Member
Nov 27, 2018
12
2
What site did you download the file from? zui.com/iunlock?

Are you using USB 2.0 or 3.0? I've experienced an issue with my phone, that I couldn't use adb with USB 3.0 controller so I need to use another PC with USB 2.0 instead. Try it out, maybe that works.
 
  • Like
Reactions: mauriziol
What site did you download the file from? zui.com/iunlock?

Are you using USB 2.0 or 3.0? I've experienced an issue with my phone, that I couldn't use adb with USB 3.0 controller so I need to use another PC with USB 2.0 instead. Try it out, maybe that works.

yes I asked and received the file from zui, I am using a 2.0 port, however I will try from another pc, I will keep you updated, hello and thanks
 
Sblocco bootloader z5 pro GT

I solved the problem of not being able to unlock the bootloader, the problem was the naming of the file, I had tried both leaving the file as it came to me from ZUI and renaming it in various ways with the end "img" (sn.img unlock.img) it was enough for me to rename the "sn" file without putting img at the end because everything was fine, in summary, I renamed the "sn" file (without quotes) fastboot command "fastboot flash unlock sn.img" and then "fastboot oem unlock-go "after which I confirmed the unlock of the bootloader on the phone and restarted, to lock the bootloader instead the" fastboot flashing lock "command confirms on the phone and restart, in recent days I repeated this procedure several times, first to update to zui 11.0.21 and then to go back to zui 10 because 11 has too many bugs, a big thank you to those who helped me or at least tried. Ciao
 

Keibow

Member
Nov 27, 2018
12
2
I solved the problem of not being able to unlock the bootloader, the problem was the naming of the file, I had tried both leaving the file as it came to me from ZUI and renaming it in various ways with the end "img" (sn.img unlock.img) it was enough for me to rename the "sn" file without putting img at the end because everything was fine, in summary, I renamed the "sn" file (without quotes) fastboot command "fastboot flash unlock sn.img" and then "fastboot oem unlock-go "after which I confirmed the unlock of the bootloader on the phone and restarted, to lock the bootloader instead the" fastboot flashing lock "command confirms on the phone and restart, in recent days I repeated this procedure several times, first to update to zui 11.0.21 and then to go back to zui 10 because 11 has too many bugs, a big thank you to those who helped me or at least tried. Ciao

Glad you made it, but, the name of the file? Straaange, I don't think that should be a problem when flashing an img file, well strange things happens all the time, right!?
 

Luisds2110

Member
Dec 16, 2017
7
0
hello guys, I bought the z5 pro gt already unlocked on aliexpress, I installed the twrp and magiski and everything was fine, then to do the last update zui I restored the device and locked the bootloader, when I tried to unlock it again following the correct procedure I did not succeed, the release file sent to me by zui is not loaded with the command fastboot, (but is it normal that it is only 6 kb?) I read that maybe I should install via qfil the rom _ZUI_10.5.061_ST_190119_qpst.zip to be able to unlock the bootloader but it didn't work, I believe that the problem is the img (sn.img) file sent to me by the zui not to go, can someone help me? (I apologize for how I write, I use google translator)




could you tell me how you locked the bootloader:confused:
 

leerh

Member
Jan 18, 2020
37
2
could you tell me how you locked the bootloader:confused:

yh
-------------------
Use fastboot command:


fastboot flash unlock unlock_bootloader.img

fastboot oem unlock-go
------------------------

get unlock unlock_bootloader.img from http://developer.zuk.com/bootloader_2

put unlock_bootloader.img in ADB root file directory

open Minimal ADB Fastboot

then use commands whilest in fastboot mode on phone

_______________________________


my bad that was for unlocking use this command

fastboot flashing lock

then use volume button to select option and confirm with power button

your phone will be wiped
 
Last edited:
  • Like
Reactions: ivanrx

AliCoreBaz

New member
Feb 28, 2020
1
0
re-lock the bootloader of Lenovo Z5s

Does this method work for Lenovo Z5s?
I get error : FAILD (remote unknown command)
finished, total time 0.001s
 

morpheys72

Member
Jan 27, 2016
24
5
Frankfurt
issues with bootloader unlock

Hi,
i just flashed the latest stock ROM via QFIL. Now i like to unlock the bootloader and flash TWRP.
Currently i stuck with the bootloader unlock. I have enabled OEM unlock in the developer options, started in bootloader mode and try
fastboot oem unlock-go
but it failed with "oem unlock not allowed"
Do you have some proposal to solve the issue? Any instructions how i can unlock the bootloader?

Thanks in advance
Mathias
 

sbebbe

Member
Sep 22, 2013
8
2
Now, Press all two buttons at the same time vol+ and vol- and connect the cable USB to the phone and quickly press Download button!




I get to this point and pressing the volume controls simultaneously nothing happens I can't click download
Suggestion's?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    --------------------------------> DISCLAIMER: <------------------------------------

    Guide for pure educational purpose. If you are going to use it, you do it to your risk and danger, I will not be held responsible if your phone will not work anymore.

    ----------------------------------------------------------------------------------------

    This tutorial is for relock the boot loader and restore original stock image on Lenovo Z5 Pro (L78031 - NO-GT version)

    For security reason, it's better if you do an Nandroid Backup with the TWRP.

    https://forum.xda-developers.com/z5...ow-to-unlock-bootloader-install-twrp-t3890402

    I'm not responsable if this operation brick you mobile phone!

    How to put the phone in EDL:
    1) The phone must be Turn-OFF.
    2) Press all two buttons at the same time vol+ and vol- and connect the cable USB.
    3) Put the phone in EDL mode only a second before to press the button DOWNLOAD (you must be very very fast otherwise you'll have Sahara error)

    Do it

    1) Download a Rom: Here you find the 293 and 320 Version (if one give you an error, try the other one), Here you find 342 Version
    2) Download and Install ADB Driver: Here or look the Attachments
    3) Download and Install Qualcomm Flasher: Qualcomm Flasher Qfil QPST V.2.0.1.9 or look the Attachments
    4) download and install Qualcomm Driver: For Windows 32 Bit - For Windows 64 Bit or look the Attachment 32 Bit - Attachments 64bit
    5) Download and Install Minimal ADB fastboot from the Attachments
    6) Follow this Steps:

    115201rdc5mpcllmomomm7.jpg.thumb.jpg


    115202eaa7a77a99sby47a.jpg.thumb.jpg


    115202kotfnd8nf7ow86x7.jpg.thumb.jpg


    115203h90q0tatr98tc98t.jpg.thumb.jpg


    115203pa1m3usl9xvlkxld.jpg.thumb.jpg


    115204bphi86kc8l6ghntn.jpg.thumb.jpg


    115204nrqo63jkepxh3zqr.jpg.thumb.jpg


    115205reqke55b1212r9vq.jpg.thumb.jpg


    115205ov0accuapvoccjv7.jpg.thumb.jpg


    115206cg83285552qh8c3c.jpg.thumb.jpg


    01.png


    02.png


    03a.png


    03.png


    04.png


    05.png


    06.png


    07.png


    08.png


    Now, Press all two buttons at the same time vol+ and vol- and connect the cable USB to the phone and quickly press Download button!

    09.png


    115211yimdb7vr1ckhmhhw.jpg.thumb.jpg


    115211sd92syf1mmh3mzey.jpg.thumb.jpg


    Done!

    Sahara Error: https://forum.xda-developers.com/showpost.php?p=77229641&postcount=2

    Sahara Error 2:
    url]
    1
    not working :crying: i can't post the image for u to see
    my cmd after entering "fastboot -i 0x2b4c oem lock" is "< waiting for any device >"
    what should i do?

    i have the same problem. i followed all steps from twrp and installing the stock rom, but after all the hastle im not able to lock the bootloader so i still cannot get any updates.
    i have the same problem where it says waiting for device. would be nice if there will be a solution for this to get future updates soon!

    ---------- Post added at 05:16 PM ---------- Previous post was at 04:49 PM ----------

    succesful flashed version 355
    THIS IS A VERY RISKY OPERATION AND I ALMOST LOST MY PHONE!!

    it didnt go as planned.
    i installed twrp and created a backup (not of system, is that nesecarry?) to get to when everything got messed up.

    and boi, did it get messed up...

    problem 1: when trying to install the rom with QFIL for the first time i got a sahara error and the phone lost its OS. i wanted to reinstall the twrp backup as i got really freaked out about losing my phone. somehow it did not get into edl or something and i failed the installation process and ended up with a broken phone with inly TWRP installed.

    problem 2: when wanting to reinstall the backup in twrp i got some error saying the \system partition was not mounted. searching online gave me a solution to this problem, but reinstalling the backup still gave errors. on startup i got a "unsuccesful encryption" error, which yielded a useless backup. also after reformatting i got again the /system not mounted error, but now with a "partition is occupied or used" error. even the solutions online wouldnt work, so my online solution was to flash the original rom with QFIL.

    solution:
    trying to flash the rom resulted in a 1: sahara error, 2: a file not found error and 3: a phone not in EDL error.
    when using the QFIL flasher provided by BadCluster i got the first two errors, and there was no quick way of resolving this problem. the post from @Nikorasu of another QFIL programm being used led to to the last error. this was good news as the file not found had been gone and now the only thing i had to do was putting the phone in EDL mode. MANY thanks to Nikorasu!!

    trying to flash now resulted in an error where QFIL tried to put the phone in EDL mode, but failed to do so. a article online provided me with the following ADB commands to use. try to open to the bootloader/twrp recovery menu, and using the ADB cmd try to see if your device is connected (command "adb devices"). if so, type the command "adb reboot edl" and the phone will reboot in EDL mode. this was the only thing left to flash the stock rom back.

    moral of the story!
    1. only do this if you can miss the phone, this will save you a LOT of stress!
    2. only do this if you can afford losing your phone!
    3. in my case, the TWRP backup was pretty useles. only do this if you can afford to lose data!
    4. THE MOST IMPORTANT ONE: NEVER GIVE UP! using the internet you can google every error and eventually get to a solution.

    if you have any questions please ask
    1
    Well there is no way i can flash the original rom in this device. Is there anybody wanting to do it remotely? I just keep getting the error firehose fhloader: fail the system can not find the specified file

    I had the same error, but another version of QFIL solved this for me.
    someone posted this in another topic:
    https://mega.nz/#!al0WlKTK!Zi23HafWA1uWVjc8kmEMQntW81LuW4_AXMo7BOSVkck

    I used this version to successfully flash my device.
    1
    My Z5 Pro, after trying GSI ROMs, restored to pie stock firmware via QFIL and bootloader locked still get red warning screen "device corrupted" after bootloader. However it can boot up and catch OTA.
    If I flashed oreo stock ROM using QFIL, there is no warning just booting. But updated to pie through OTA, red warning appears.

    I don't get warning screen when booting into recovery, no matter stock recovery or TWRP. It only appears when booting into system.

    Even I tried QFIL "erase all" and erase QCN to flash the initial ROM, then manually restored persist, modem, and EFS to get networks back. There is still the red warning with pie firmware.

    I can`t figure out what is the broken partitiom leads to the warning. Hope someone know the solution, or any way restoring deeper.


    I've had that problem with my Lenovo Z5 Pro and I solved it connecting the phone to PC, opening CMD inside ADB folder and typing:

    adb reboot "dm-verity enforcing"

    And that red warning vanished, but the yellow one persists.
    1
    What site did you download the file from? zui.com/iunlock?

    Are you using USB 2.0 or 3.0? I've experienced an issue with my phone, that I couldn't use adb with USB 3.0 controller so I need to use another PC with USB 2.0 instead. Try it out, maybe that works.