How to restore Lenovo devices on stock firmware on Linux

Ever since various custom ROMs began being released for the Lenovo Tab 4 8 Plus, I have rarely gone back to stock. However, after a ROM installation went wrong, I had to. I tried using the Lenovo Rescue and Smart Assistant (LMSA) but for some reason it failed to restore and did not detect a device. I could not get out of Emergency Download Mode. I feared the worst for my Lenovo Tablet, first released in 2017.

However, a month later, I found a solution in the name of QDL (Qualcomm Download). This works on all Qualcomm Lenovo devices. It runs on Linux, and you must build from source. With it, I successfully restored my Lenovo Tab 4 8 Plus back to stock firmware, allowing me to reinstall an Android 10 custom ROM on it which worked fine.

You must be running Linux and have a copy of your tablet’s firmware. I got my firmware by downloading using the LMSA and then copying it over to my Linux partition. I’m running Ubuntu, but any modern Linux OS should work fine.

Change directory (cd) to the folder your firmware is at. In my case, that is:

Now we have to build QDL. Do so by running the following:

git clone https://git.linaro.org/landing-teams/working/qualcomm/qdl.git
cd qdl
make
cd ..

Now you must find the mbn file. Go into the folder of the firmware and find a file along the lines of prog_emmc_ddr.mbn. In my case it was prog_emmc_firehose_8953_ddr.mbn. Make a note of that file, it is very important.

Make sure your device is in QDL mode. Run lsusb, if you see something along the lines of “Qualcomm, Inc. Gobi Wireless Modem (QDL mode)” then you’re good. If you don’t, make sure your device is unplugged, powered off, and then press the volume up button and connect to PC at the same time. Then run lsusb again and a QDL device should show.

Now run:

qdl/qdl --debug --include 'PATHTOFIRMWARE' 'PATHTOFIRMWARE/device.mbn' 'PATHTOFIRMWARE/rawprogram_upgrade.xml' 'PATHTOFIRMWARE/patch0.xml'

Your device should now restore. It may take a few minutes. Once your device has finished it will boot up. Your device should now be recovered. Enjoy!

Advertisement

Go on, you know you want to! Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: