[Thinkpad Tablet Android Development] black.kahder:
I got to play with the LMSA tool recently. Here's what I have learned.

This is the Lenovo Moto Smart Assistant. It is a Windows PC based tool which can upgrade the OEM software, or do a factory restore. You can download it from the Lenovo support site here. https://support.lenovo.com/us/en/downloads/ds101291

I was mostly interested in doing a factory restore. I did not try the upgrade features.

I worry that this app will stop working some day, because it is obvious that it is a browser-like front-end for web content. It will not work without internet access or the Lenovo web content being accessible, even if you have already downloaded the files you intend to install. Basic navigation menus won't even work.

The app installs various drivers, a version of ADB/fastboot, and some other tools. It may be possible to use these tools directly, but I have not tried.

By default it seems that the app will download files to "C:\ProgramData\LMSA\Download\RomFiles" This is where it downloaded the restore file for my TB-X704V. It downloaded a file named TB_X704V_S000004_171218_LRA_DCC.zip and then automatically unzipped it.

It looks like to put the tablet into EDL mode, we hold vol-up + vol-down and plug in the USB port. The Lenovo logo will flash briefly on the screen. After any flashing is done, we must hold the power button for 10 seconds to force a power off. Then our OEM system is restored, though I have noticed that the bootloader was still unlocked, so not all data was reverted to a factory.

Here is what the restore archive for my device looked like

usern@host>ls TB_X704V_S000004_171218_LRA_DCC/
total 4.5G
drwxr-xr-x 2 usern usern 12K Jun 3 22:06 .
drwxr----- 3 usern usern 4.0K Jun 6 20:24 ..
-rw-r--r-- 1 usern usern 16M Dec 18 2017 adspso.bin
-rw-r--r-- 1 usern usern 23M Dec 18 2017 boot.img
-rw-r--r-- 1 usern usern 6.1M Dec 18 2017 cache_1.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 cache_2.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 cache_3.img
-rw-r--r-- 1 usern usern 250K Dec 18 2017 cmnlib64.mbn
-rw-r--r-- 1 usern usern 197K Dec 18 2017 cmnlib.mbn
-rw-r--r-- 1 usern usern 71K Dec 18 2017 devcfg.elf
-rw-r--r-- 1 usern usern 37K Dec 18 2017 devcfg.mbn
-rw-r--r-- 1 usern usern 13K Dec 18 2017 dp_AP_signed.mbn
-rw-r--r-- 1 usern usern 13K Dec 18 2017 dp_MSA_signed.mbn
-rw-r--r-- 1 usern usern 576K Dec 18 2017 emmc_appsboot.mbn
-rw-r--r-- 1 usern usern 177K Dec 18 2017 fs_image.tar.gz.mbn.img
-rw-r--r-- 1 usern usern 17K Dec 18 2017 gpt_backup0.bin
-rw-r--r-- 1 usern usern 34K Dec 18 2017 gpt_both0.bin
-rw-r--r-- 1 usern usern 17K Dec 18 2017 gpt_main0.bin
-rw-r--r-- 1 usern usern 334M Dec 18 2017 hq_modem.elf.zip
-rw-r--r-- 1 usern usern 221K Dec 18 2017 keymaster.mbn
-rw-r--r-- 1 usern usern 196M Dec 18 2017 lenovocust.img
-rw-r--r-- 1 usern usern 57K Dec 18 2017 lksecapp.mbn
-rw-r--r-- 1 usern usern 14M Dec 18 2017 mdtp.img
-rw-r--r-- 1 usern usern 314K Dec 18 2017 mon.elf
-rw-r--r-- 1 usern usern 84M Dec 18 2017 NON-HLOS.bin
-rw-r--r-- 1 usern usern 7.3M Dec 18 2017 oem2.img
-rw-r--r-- 1 usern usern 8.2M Dec 18 2017 oem3.img
-rw-r--r-- 1 usern usern 11M Dec 18 2017 oem4.img
-rw-r--r-- 1 usern usern 8.1K Dec 18 2017 partition.xml
-rw-r--r-- 1 usern usern 6.2K Dec 18 2017 patch0.xml
-rw-r--r-- 1 usern usern 4.7M Dec 18 2017 persist_1.img
-rw-r--r-- 1 usern usern 4.7M Dec 18 2017 persist.img
-rw-r--r-- 1 usern usern 354K Dec 18 2017 prog_emmc_firehose_8953_ddr.mbn
-rw-r--r-- 1 usern usern 5.0M Dec 18 2017 qsee.elf
-rw-r--r-- 1 usern usern 2.4M Dec 18 2017 ramdisk.img
-rw-r--r-- 1 usern usern 4.4M Dec 18 2017 ramdisk-recovery.img
-rw-r--r-- 1 usern usern 13K Dec 18 2017 rawprogram0.xml.bak
-rw-r--r-- 1 usern usern 37K Dec 18 2017 rawprogram_unsparse_upgrade.xml
-rw-r--r-- 1 usern usern 25M Dec 18 2017 recovery.img
-rw-r--r-- 1 usern usern 2.9M Dec 18 2017 RPM_AAAAANAAR.elf
-rw-r--r-- 1 usern usern 171K Dec 18 2017 rpm.mbn
-rw-r--r-- 1 usern usern 365K Dec 18 2017 sbl1.mbn
-rw-r--r-- 1 usern usern 80 Dec 18 2017 sec.dat
-rw-r--r-- 1 usern usern 215K Dec 18 2017 splash.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_10.img
-rw-r--r-- 1 usern usern 126M Dec 18 2017 system_11.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_12.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_13.img
-rw-r--r-- 1 usern usern 126M Dec 18 2017 system_14.img
-rw-r--r-- 1 usern usern 84K Dec 18 2017 system_15.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_16.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_17.img
-rw-r--r-- 1 usern usern 126M Dec 18 2017 system_18.img
-rw-r--r-- 1 usern usern 44K Dec 18 2017 system_19.img
-rw-r--r-- 1 usern usern 129M Dec 18 2017 system_1.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_20.img
-rw-r--r-- 1 usern usern 122M Dec 18 2017 system_21.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_22.img
-rw-r--r-- 1 usern usern 119M Dec 18 2017 system_23.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_24.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_25.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_26.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_27.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_28.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_29.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_2.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_30.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_31.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_32.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_33.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_34.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_35.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_36.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_37.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_38.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_39.img
-rw-r--r-- 1 usern usern 126M Dec 18 2017 system_3.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_40.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_41.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_42.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_43.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_44.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_45.img
-rw-r--r-- 1 usern usern 126M Dec 18 2017 system_46.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_47.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_48.img
-rw-r--r-- 1 usern usern 126M Dec 18 2017 system_49.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_4.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_50.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_51.img
-rw-r--r-- 1 usern usern 125M Dec 18 2017 system_52.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_53.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_54.img
-rw-r--r-- 1 usern usern 127M Dec 18 2017 system_5.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_6.img
-rw-r--r-- 1 usern usern 126M Dec 18 2017 system_7.img
-rw-r--r-- 1 usern usern 216K Dec 18 2017 system_8.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 system_9.img
-rw-r--r-- 1 usern usern 1.5M Dec 18 2017 tz.mbn
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_10.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_11.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_12.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_13.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_14.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_15.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_16.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_17.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_18.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_19.img
-rw-r--r-- 1 usern usern 7.9M Dec 18 2017 userdata_1.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_20.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_21.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_22.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_23.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_24.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_25.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_26.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_27.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_28.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_29.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_2.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_30.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_31.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_32.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_33.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_34.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_35.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_36.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_37.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_38.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_39.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_3.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_40.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_41.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_42.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_43.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_44.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_45.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_46.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_47.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_48.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_49.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_4.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_50.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_51.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_52.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_53.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_54.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_55.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_56.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_57.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_58.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_59.img
-rw-r--r-- 1 usern usern 126M Dec 18 2017 userdata_5.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_60.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_61.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_62.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_63.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_64.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_65.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_66.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_67.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_68.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_69.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_6.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_70.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_71.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_72.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_73.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_74.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_75.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_76.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_77.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_78.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_79.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_7.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_8.img
-rw-r--r-- 1 usern usern 8.0K Dec 18 2017 userdata_9.img
-rw-r--r-- 1 usern usern 512 Dec 18 2017 zeros_1sector.bin
-rw-r--r-- 1 usern usern 17K Dec 18 2017 zeros_33sectors.bin

There is no authentication required to download the restore files, so ROM makers can use this tool to download them for any Lenovo model. This may be useful to inspect some of the OEM image files.

I was able to successfully restore my tablet using LMSA. The only final thing I have to say about LMSA is that doing the recovery from within a VM may be a bad idea because of USB port forwarding. It appears that the USB device of the tablet in EDL mode will appear and disappear quickly on the bus, and my VM software was not able to follow this fast enough. I had to run the LMSA on real hardware to get it to work.

Also while on the subject...

https://xdaforums.com/showpost.php?p=75202960&postcount=319

This guy did some packet sniffing of the LMSA tool and analysis of the URLs and web resources. Might be helpful for grabbing download URLs hidden behind the tool.

https://xdaforums.com/showpost.php?p=75063947&postcount=277

In this thread I have read posts such as this with people using a tool called QFIL and MiFlash to install software on their tablets. I guess this is something like Odin/Heimdal? I won't be trying any of this out since our LineageOS ROM is already in such good shape.