yashsingh1/xdaforums huggingface dataset:
[Lenovo P11] djgje:
Hello!!

I finally have been able to get the sn.img from Lenovo this morning!

Now I would like to unlock my boot loader, but I'm facing a problem, or I'm doing something wrong maybe...

After execution the "add reboot bootloader" command, my tablet restart on the boot loader, with "device status - locked" in red (normal at this point, I didn't flash yet...

From there, I'm supposed to launch the "fastboot flash unlock sn.img" command, but the command prompt remains in < waiting for any device > and nothing seems to happened on the tablet...So I'm stucking at this point...

Could anyone help me to go further please?

Thanks in advance

EDIT : Finally I get it working by reinstalling the Lenovo USB Drivers
[Lenovo P11] disconmair:
Hi guys,

I downloaded the "sn.img" from this link

http://cdn.zui.lenovomm.com/developer/tabletboot/my-sn-number/sn.img

but it didn't work. The fastboot command returned this error:

I can be sure that I have entered the correct sn (in lowercase because I got 404 error with that link if entered the sn in uppercase).

So I tried to submit the https://www.zui.com/iunlock form and it said I had submitted successfully but no email was sent to me. I've checked all my email folders but found nothing.

Can anybody give me some clues or help me with this?

Thank you.

PS: I'm on ZUI 14
[Lenovo P11] Ungeskriptet:
How long do you have your tablet? Normally you have to wait at least a day or two after initially connecting it to the internet. If you're using your tablet for some time already you can try requesting the file in a week or so. The Lenovo unlock site can be broken sometimes.
[Lenovo P11] atweek:
Hi. the site works for everyone after some magic. The tablet is half a year old. the third day I can not get the file. I make a request from a tablet. can anyone advise?
[Lenovo P11] disconmair:
I got the tablet last year and tried to get sn file from https://www.zui.com/iunlock several times but they never send any email.
[Lenovo P11] Ungeskriptet:
Try replacing the serial number in this link with yours, the E-Mail is just a link to this anyway: http://cdn.zui.lenovomm.com/developer/tabletboot/(your_sn_number)/sn.img

The link should look like http://cdn.zui.lenovomm.com/developer/tabletboot/HA1MK6GA/sn.img but with your SN
[Lenovo P11] atweek:
help me please. I can download from your CN, but from mine 404. Why is this happening? thx
[Lenovo P11] Ungeskriptet:
Try reflashing stock ROM through EDL and try again the next day
[Lenovo P11] atweek:
hi,thx. I did yesterday as you said. There is still no file, I will check for a week. Apparently not fate. My HA1A81NZ number. If someone can get it, I will be grateful.
[Lenovo P11] martindy:
a bit of magic to make the unlock site work.

1. make sure to login into https://passport.lenovo.com like this

2. go to the zui.com/iunlock site and navigate to the unlock tablet and click the blue text in Chinese.

3. it will verify your identity as it says in the screen

4. it will now say that you are logged in to the unlock site and are free to submit your details. see the difference from the first and fourth image? you're welcome. hope this helps
[Lenovo P11] martindy:
once you have submitted your details but there is no email from Lenovo.

try this method after a couple of tries/an hour, http://cdn.zui.lenovomm.com/developer/tabletboot/(your_sn_number)/sn.img

it worked for me. hope this helps
[Lenovo P11] fonzserge18:
I can't find my imei?
[Lenovo P11] fonzserge18:
http://cdn.zui.lenovomm.com/developer/tabletboot/(your_sn_number)/sn.img this link does not work
[Lenovo P11] martindy:
you need to swap the (your_sn_number) with your serial number for it to work

http://cdn.zui.lenovomm.com/developer/tabletboot/

(your_sn_number)/sn.img
[Lenovo P11] fonzserge18:
http://cdn.zui.lenovomm.com/developer/tabletboot/HA1G9FJL/sn.img 404 not found
[Lenovo P11] martindy:
follow my post to submit your details to lenovo
[Lenovo P11] fonzserge18:
I can't find my imei.
[Lenovo P11] martindy:
no need for IMEI, just click the lenovo text as circled below
[Lenovo P11] fonzserge18:
"You've reached the limit of unlocking today, so come back tomorrow!"

OK i think i got it. so ill just wait for the email then?
[Lenovo P11] martindy:
no, submit your details again tomorrow and wait for the email.

if you submitted and still no email. try the link with your serial after an hour.

it happened to me, no email but the link worked
[Lenovo P11] hawk1500:
Does anyone know how to unlock the bootloader with ZUI 15? I installed it but I think I like the GSIs better, but this procedure doesn't seem to work anymore. TIA.
[Lenovo P11] martindy:
which part does not work?
[Lenovo P11] Dovelings:
I have a different question. A friend asked me to fix his Huawei mediapad t1-701u which is stuck at the mediapad logo screen. I have tried to hard reset it but nothing happened and when I connect the device to my laptop the laptop doesn't pick up the device I downloaded the ROM firmware from Huawei website to my laptop and I have followed the instructions but still nothing, PLEASE HELP
[Lenovo P11] martindy:
there is a post for this https://xdaforums.com/t/huawei-mediapad-t1-701u-custom-rom-official-rom.3351252/

from way back 2016.
[Lenovo P11] Dovelings:
Thanks Martindy
[Lenovo P11] DF5JT:
I haven't received an eMail from the site, but the download link for sn.img finally worked. Make sure you use the same eMail address on the site as the one from your Lenovo log in.
[Lenovo P11] hawk1500:
It attempts to flash the sn.img file (says sending OKAY) but when it comes to writing 'unlock' it returns

FAILED (remote: 'unknown command')

fastboot: error: Command failed
[Lenovo P11] martindy:
where did you get your sn.img?
[Lenovo P11] hawk1500:
It's the official one that they sent me after I requested it on the website.
[Lenovo P11] stevendoesstuffs:
I just tried with a known previously working sn.img on ZUI 15 and got the same error as @hawk1500.

I also got an warning about how the unlock partition size is 0, so I'm guessing it no longer exists?

$ fastboot flash unlock sn.img

Warning: skip copying unlock image avb footer (unlock partition size: 0, unlock image size: 5386).
Sending 'unlock' (5 KB) OKAY [ 0.006s]
Writing 'unlock' FAILED (remote: 'unknown command')
fastboot: error: Command failed

For context, 5386 bytes is the size of sn.img.

EDIT: both 15.0.216 and 15.0.423 give the same error.
[Lenovo P11] martindy:
maybe you need to request another sn.img? just maybe, just throwing ideas
[Lenovo P11] Hebbocake:
Hi, can you help me? I'm trying this with a J607f so I can install de ZUI rom with newer android. I followed your instructions. I'm not able to get the SN unlock file. I've tried it three days in a row. I've tried it on the tablet itself and on a laptop. The ZUI website always says: "The number of unlocks today has reached the limit, please come again tomorrow!"

I've tried it with different Lenovo accounts, I've tried logging in with one and sending it to another, I always get the reached the limit error. The developer/tabletboot/sn/sn.img link doesn't work either, gives a 404 error. The link from someone else here worked, but not for my SN obviously.

Edit: Ok, no idea why everyone says you need the file. I have the xiaoxin pad pro 2020 tb-j607f and I did NOT need the file. I needed the lenovo usb drivers, go to fastboot mode and then run fastboot flashing unlock and confirm on the tablet. No file needed and it's unlocked now.
[Lenovo P11] martindy:
glad you figured it out
[Lenovo P11] stevendoesstuffs:
@hawk1500 I got an unlocked bootloader with ZUI 15, but it's a bit involved.

Before starting, make sure you have OEM unlocking enabled in your developer settings and have your sn.img ready.

Then downgrade to the latest version of ZUI14 (all the firmware file are here). Do this with the following steps:

Flash to ZUI 13.0.430 using qpst (link)

Unlock the bootloader (ZUI13 will not boot without this step due to downgrade protection!)

Apply the ZUI 14.0.127 OTA (link)

Apply the 14.0.127->14.0.266 OTA (link).

Even though the ZUI15 update is a full OTA, you'll want the latest version of ZUI14 anyways for reasons you'll see later.

After all that, flash TWRP.

Now here comes the nasty part. Download the ZUI 15.0.423 OTA (don't flash it yet!) (link) and grab the payload.bin file inside.

Use android-ota-extractor (link) to extract all the images from the payload.bin. If I remember correctly there should be 26 images. Boot to the bootloader and run `fastboot reboot fastboot`, which should take you into TWRP fastbootd.

Now EXCEPT for the abl, system, system_ext, vendor, product, and odm partitions, flash all the extracted images to their respective partitions using fastboot. Reboot into fastbootd (this should now be stock fastbootd), and EXCEPT for abl, flash the partitions excluded earlier.

Reboot into recovery (this should now be stock recovery), wipe all the data, and reboot.

Basically the procedure applies all of ZUI 15 except keeps the abl partition from the latest ZUI 14 firmware.

The `abl` partition is the android bootloader, and implements things like fastboot and locking/unlocking, so not updating it means that we can still use the ZUI 14 unlocking procedure.

If you can't use the tool I linked (it only works on Linux), try using another payload extraction tool, using WSL, or if you want me to send you an extracted copy of ZUI 15 I can do that.

EDIT 1: add details to warn about downgrade protection.

EDIT 2: clarify use of fastbootd.
[Lenovo P11] hawk1500:
Oh wow, that's great detective work, not to mention perseverance! Glad you figured it out. I suspected that they changed something for zui 15...thanks so much for your work.
[Lenovo P11] A3148475824:
zui15 is not allowed to unlock BL lock，It’s so sad, and it will be locked when upgrading from zui14 to zui15.
[Lenovo P11] A3148475824:
What I want to tell you is that please stay on Lenovo’s official website at 11:58 pm and submit it at 12 o’clock. You will 100% be able to get what you want on the same day.
[Lenovo P11] Hebbocake:
Nope, this wasn't any of the issue. Didn't even need the website.
[Lenovo P11] Kochev:
When I try to lock my bootloader with "fastboot flashing lock" I get:

FAILED (remote: 'Prc device unlocked, don't allow lock')

fastboot: error: Command failed

Any idea? I want to make my L1 working so I can use the tablet with Netflix for my kids
[Lenovo P11] mcdull:
I am having issue in following this. With ZUI 15 and flashing 13.0.430, it does not boot at all. It shows "

your device is corrupted and cannot be trusted

And return to bootloader. It seems the ZUI does not allow downgrade without unlocking bootloader. I tried 12.6 and 13 qpst but no luck and there is no qpst image for zui 15. So my device is bricked now. And sadly I have also accidentally delete all data (serial number) and its SN doesn't match the device for now as well... sad.​
[Lenovo P11] stevendoesstuffs:
Hmmm for me it let me downgrade (using qdl) even though I'd already installed ZUI15 before. Maybe different versions of ZUI15 behave differently in this regard? But also the "your device is corrupted" might be caused by having deleted all the data, including the serial number. I think you're really not supposed to touch that, and who knows what other stuff might've been wiped (probably some keys used for boot verification or something).

Also, have you tried unlocking the bootloader after flashing ZUI13?
[Lenovo P11] mcdull:
This is what I would try next. The cuorrupt message come before I wipe all data, so it is not the cause.

Now my frp and fpinfo partiton is empty. So I have no idea on where I should edit the temporary SN for unlocking.
[Lenovo P11] mcdull:
BTW, did you use FLAT build or META build in QFIL?
[Lenovo P11] mcdull:
Some updates. Managed to edit HAHAHA to the begining of the partition and finally unlocked the bootloader and the ZUI 13 is now bootable.
[Lenovo P11] stevendoesstuffs:
@mcdull Eyyyyy congrats. I've also just updated the guide I wrote to give some warnings about how it wont boot older versions without unlocking.
[Lenovo P11] mcdull:
following your instruction and was fine until trying to flash the "except" partitions. i.e. odm product, etc. in bootloader, fastboot gives error as following.

Warning: skip copying odm image avb footer (odm partition size: 0, odm image size: 1060864).

Sending 'odm' (1036 KB) OKAY [ 0.040s]

Writing 'odm' FAILED (remote: '(odm_a) No such partition')

fastboot: error: Command failed

Also tried it in fastbootd

C:\tmp\ota\step2>fastboot.exe flash odm odm.img

Resizing 'odm_a' FAILED (remote: 'Not enough space to resize partition')

fastboot: error: Command failed
[Lenovo P11] stevendoesstuffs:
I forget which method is correct (fastbootd or bootloader). If I had to guess, it'd be fastbootd since the remaining partitions are all part of the super partition.

I noticed that you're on windows. How did you get the image files from the payload.bin? (Which tool did you use?) I think there are a few tools out there which don't work but I can't remember which ones.

If you can, can you gimme a list of files and hashes you extracted from the payload? I'll check whether they match what I've got.
[Lenovo P11] mcdull:
Its the android-ota-extractor.exe

android-ota-payload-extractor/README.zh.md at master · tobyxdd/android-ota-payload-extractor

A fast & natively cross-platform Android OTA payload extractor written in Go - tobyxdd/android-ota-payload-extractor

github.com

Still no go in using fastbootd using either stock recovery or twrp.

My goal is to use GSI rom so it is not essential to flash system / product / vendor partition, but the GSI system is not able to flash as well. I will try to run the hash of those file for comparison.

odm.img

478BD003E11BECF342A2E37ACCC0C8DE6F1307BDA16F81502B754CC304266A9F

product.img

0CF56B97630C0C2E8D2F855A9A19104439C954C4562C54272F19AFE6FD6AA4A9

system.img

F8729FC537CE598CCE935251F2FA63099DBEE05756104E51E52B069F2CE64D54

system_ext.img

63D811D6B107CA07EFB656B6833E8D0F36C0B426C1336151A97C89EB3B151C7F

vendor.img

E2F3491E02BAAA13E4B9575B4FE5C0DAE742DC60E0B0DB985DD5605961D81A6E

(SHA256)
[Lenovo P11] stevendoesstuffs:
Hmmm those hashes all look correct... I'm not sure exactly what's wrong. Can you also grab the hash for the rest of the images?

EDIT: I've included my hashes here as well (also sha256).

93afacb6def17ccc5417e5477fa61f3cddc8cb9ecc1e685057fc8488a86aebf7 abl.img
39c64bfe37a4798a37f59e6563a1d464f774a0bc17deff516d464bd649947845 aop.img
159ce0eb6a57f8cdda120ad9654d13f1c2c29162fb26dd376ff2808ef942a653 bluetooth.img
a69f6f3962b71ff41c4e5962da7f4a08e8fd1c700074dfe2958266136c3dd2b5 boot.img
42536cf62bf25e2ca5cbd7d8e5e9d8a045fe62fdf21cc38ba4f3a5fc19a1a07b devcfg.img
f91ae2b493b4f220cdedfb0b3a761f4731da7354826e2ab7d40c59632aae577b dsp.img
244488c9d24f1e3bd5b1c7d94b7606fa320ced80d70279157fdd8b7284be5103 dtbo.img
e307e88c4482421ec8013cd1bafd7298ba62aa317416a8e76ea31f529d3357d3 featenabler.img
543c441deeeb75e65f525a9208b277335def83d126306e880559b6055e7dd8c9 hyp.img
8afae8e3773e26924f4fc149a390b4bd000953ad299fcb82dd1cda10e554bc6a imagefv.img
49ae6e3bd8a7f86c3b607a9deaf802168b8df6019f4b79f30ff8c3241d0b6ea7 keymaster.img
5c45a347939a81af544bd35db254b7d115e3fe1b0c0b01629315931e206ee87f modem.img
0e95b42e94dc117ff0701ca0cf48aa3a2eb1880bf33889658d524fc30dc715e8 multiimgoem.img
478bd003e11becf342a2e37accc0c8de6f1307bda16f81502b754cc304266a9f odm.img
0cf56b97630c0c2e8d2f855a9a19104439c954c4562c54272f19afe6fd6aa4a9 product.img
fb5588dd4a13480df1890b24ee05abd6bfedfc7a8c91b4f1417e05ae0c3461ce qupfw.img
e3afcef08e5d3c0cbeef4ef43cd59126afbf0793c189fece4306385872150ad4 recovery.img
f8729fc537ce598cce935251f2fa63099dbee05756104e51e52b069f2ce64d54 system.img
63d811d6b107ca07efb656b6833e8d0f36c0b426c1336151a97c89eb3b151c7f system_ext.img
d34a0e4c81f5e3e8d745b5c1222a3703b5c0318121bb1a7ae41578e609369ff1 tz.img
854c878e68fac024744ca035a072dce6314454558dd66fd34cba956df004d41f uefisecapp.img
3089b91261e251ec090c91e9e6094c83b873e70369913db0498462824cc6e0d1 vbmeta.img
7d6b9b325a48dfbc3d339fdc1aa40856887c2d8ea6c95f42561ba7145bbeaccb vbmeta_system.img
e2f3491e02baaa13e4b9575b4fe5c0dae742dc60e0b0db985dd5605961d81a6e vendor.img
c6c279d84fce72a792a887c0d42666b97c409e258fbad6ef86249e232462ac3f xbl.img
5fcdf8eff9d9c508101cc8874348f4c7f2850233210607916fb3ea8d9c92dbb8 xbl_config.img
[Lenovo P11] stevendoesstuffs:
I'm on linux so I have no clue what either of those mean. I used qdl with this command:

sudo qdl --storage ufs --include ./ ./prog_firehose_ddr.elf ./rawprogram0.xml ./patch0.xml ./rawprogram1.xml ./patch1.xml ./rawprogram2
.xml ./patch2.xml ./rawprogram3.xml ./patch3.xml ./rawprogram4.xml ./patch4.xml ./rawprogram5.xml ./patch5.xml ./rawprogram_unsparse0_ful
lupgrade.xml

Not sure where I found it but it's definitely on the internet somewhere.
[Lenovo P11] stevendoesstuffs:
Can you check if flashing a GSI works before flashing anything ZUI15 (i.e on ZUI14 after following the downgrading step)?

The thing I'm trying to figure out is whether anything is wrong with the stock fastbootd flashing process (which is part of the stock recovery) or whether it's a ZUI15 specific thing.

Unfortunately this will require starting over from the beginning.

Currently TWRP doesn't support dynamic partitions, and that's why you can't flash the excluded partitions with everything else. So don't try to flash any of those partitions with TWRP, I'm not sure what happens if you do other than that it won't work.

Apparently it does now as of a few hours ago. See here (the build just got updated on the TWRP website).
[Lenovo P11] mcdull:
I am not sure if the qpst image would correctly restore partition structure if I have accidentially deleted them.

It allows me to boot correctly to ZUI13 after restore and everything seems normal. My case seems to be incorrect partition allocation. But I will try what you suggest, and will take some time.
[Lenovo P11] stevendoesstuffs:
Yeah it not properly restoring partition structure (or some other data about partitions) was my concern as well. If flashing things doesn't work with ZUI14 stock recovery/fastbootd, then we'd have confirmation that that's the case.

Also, since flashing things with TWRP seems to have worked, maybe try flashing the remaining partitions with TWRP as well now that it supports dynamic partitions?

If you need any data from a working device to restore your partitions, let me know. I'd be happy to help :).
[Lenovo P11] mcdull:
for now I may rather try complete ota zui 15 again first, see if it will give error.

Update: ZUI updated fine without issue. Will see if the new twrp that was the cause (new version fixed dynamic partition issue)
[Lenovo P11] mcdull:
Some update. With bootloader unlocked, and ota update up to 15.0.423, the fastboot seems broke as expected, but the fastbootd seems able to flash recovery direct to any slot. So I have the latest twrp flashed and works fine.

I am now seeing if I could flash gsi direct under twrp without tempering the bootloader.

TWRP to install GSI fine and bootable (more testing in progress)

vbmeta could be flashed by "fastboot reboot fastboot" that will kick start fastbootd mode under twrp.

(next I may try to flash an old abl partition under fastbootd to see if it will fix the broken bootloader)
[Lenovo P11] jet-shet:
The option button on the OEM bootloader cannot be change to on unlocked, and the status shows "Bootloader is already unlocked." However, when I try to install TWRP, it cannot enter fastboot devices.
[Lenovo P11] kennyboda:
Hi!

I got the 15.0.423 via OTA. In the past I almost bricked my tablet trying to lock the bootloader. Now I want to be careful trying to lock it again. I tried in a lot of versions. Were you able to lock it with success in 15.0.423?

Thanks
[Lenovo P11] mcdull:
With the very broke zui 15 bootloader, I suggest you should relock in earlier build.

i.e. ZUI 13 after restoring QPST, if anything goes wrong, you can still unlock it to save your device.

If it works fine and reboot in ZUI locked, you can then upgrade to ZUI 15 by OTA (for L1? I guess)
[Lenovo P11] allan_try_fixing_brick:
Hi, mcdull

I bricked my pad in the downgrade process like you.

Could you share how you fix it ?

I need your experience to unlock bootloader.

Thanks in advance.
[Lenovo P11] mcdull:
The brick isnt a brick, it was just the rom version is not align with the bootloader and thus protected and unable to boot. Just unlock the bootloader will allow the device the boot. Or to update with vbmeta afterward. If you have your proper sn.img, you can unlock as normal. Or you need to use the HAHAHAHA as serial as instructed in another post.
[Lenovo P11] mikeinside:
Who has root on the latest firmware, please copy the file in the system/framework folder the framework-res.apk file and drop it here, I wanted to change the mouse cursor in the end nothing worked, I got a bootloop
[Lenovo P11] Marvemssc:
Hi friend. I get the same error, but what I hadn't noticed was that even though the error appeared, I had downloaded my sn.img. I know it's silly, but could you check? cmg worked like this. I got the error, but I downloaded the sn.img directly
[Lenovo P11] Tropaion:
@fazioso It should arrive very fast, it didn't even take two minutes.

But I only got it after the second request.
[Lenovo P11] fazioso:
try 4 times.... 2 times with an mail

2 times with other....

check also in spam folder.... nothing comes....
[Lenovo P11] zeroflame15:
Tried and able to get the image file email.

U may private message me Yr email or u can try again. On the top, there are 4 tabs. Choose the one on the most right Lenovo 平板
[Lenovo P11] rosco_pc:
You can also try this: https://xdaforums.com/t/p11-pro-2021-tb-j716f-bootloader-unlock.4300553/post-85792687

Instant download in my case :)
[Lenovo P11] sebseb83:
Ive got TB-J716F bought from bangood. I want to put it back to stock google or something that isn't chinese based but I am having so much trouble. I can't even get an IMEI number from this thing. There is no IMEI on the box, in the settings, anywhere. I have tried to flash another rom but I can never get it to go into EDL mode. Any ideas? thanks

Just now I even downloaded an app to tell me the IMEI number and it is blank where it has IME1 and IME2
[Lenovo P11] Tropaion:
@sebseb83 There isn't any "Stock Google" or whatever you want.

With a bit research you should know that this tablet is only sold in China and at Stock there only exists the chinese rom.

Only devices with cellular connectivity have an IMEI number, which this tablet doesn't have.
[Lenovo P11] sebseb83:
Makes sense, thanks. Yeah I meant the international rom, sorry its 3am here.I have been doing my due diligence I can pick up devices when I am connected in Windows using adb devices, but whenever I try to boot to EDL I can no longer see it and nothing works, Ive tried several other ways to get into EDL with no luck... with the images attached, is that normal? To be honest, the ROM isnt so bad and I guess I could live with it, but I just don't trust it so would rather have installed the rom myself is all. I got no clue where to go from here. I might just have to take it for what it is!
[Lenovo P11] Tropaion:
@sebseb83 Did you install Qualcomm Drivers? In EDL Mode the screen stays black, thats normal.