Lenovo ThinkSmart View ROM/OS Development

I’m running into an issue after updating the USB driver, I go back into Powershell to run:

(venv) PS C:\git\edl> python3 edl w userdata C:\Users\User\Downloads\pmos-lenovo-cd-18781y-testing-20240628-rootfs.img
Traceback (most recent call last):
File “C:\git\edl\edl”, line 137, in
from docopt import docopt
ModuleNotFoundError: No module named ‘docopt’
(venv) PS C:\git\edl>

Any ideas?

had that error when i missed the " ```
pip3 install -r .\requirements.txt

(venv) PS C:\git\edl> pip3 install -r .\requirements.txt
Requirement already satisfied: wheel in c:\git\edl\venv\lib\site-packages (from -r .\requirements.txt (line 1)) (0.43.0)
Requirement already satisfied: pyusb>=1.1.0 in c:\git\edl\venv\lib\site-packages (from -r .\requirements.txt (line 2)) (1.2.1)
Requirement already satisfied: pyserial>=3.4 in c:\git\edl\venv\lib\site-packages (from -r .\requirements.txt (line 3)) (3.5)
Requirement already satisfied: docopt>=0.6.2 in c:\git\edl\venv\lib\site-packages (from -r .\requirements.txt (line 4)) (0.6.2)
Requirement already satisfied: pycryptodome in c:\git\edl\venv\lib\site-packages (from -r .\requirements.txt (line 5)) (3.20.0)
Requirement already satisfied: pycryptodomex in c:\git\edl\venv\lib\site-packages (from -r .\requirements.txt (line 6)) (3.20.0)
Requirement already satisfied: lxml>=4.6.1 in c:\git\edl\venv\lib\site-packages (from -r .\requirements.txt (line 7)) (5.2.2)
Requirement already satisfied: colorama in c:\git\edl\venv\lib\site-packages (from -r .\requirements.txt (line 8)) (0.4.6)
Requirement already satisfied: capstone in c:\git\edl\venv\lib\site-packages (from -r .\requirements.txt (line 9)) (5.0.1)
Requirement already satisfied: keystone-engine in c:\git\edl\venv\lib\site-packages (from -r .\requirements.txt (line 10)) (0.9.2)
Requirement already satisfied: qrcode in c:\git\edl\venv\lib\site-packages (from -r .\requirements.txt (line 11)) (7.4.2)
Requirement already satisfied: requests in c:\git\edl\venv\lib\site-packages (from -r .\requirements.txt (line 12)) (2.32.3)
Requirement already satisfied: passlib in c:\git\edl\venv\lib\site-packages (from -r .\requirements.txt (line 13)) (1.7.4)
Requirement already satisfied: Exscript in c:\git\edl\venv\lib\site-packages (from -r .\requirements.txt (line 14)) (2.6.28)
Requirement already satisfied: typing-extensions in c:\git\edl\venv\lib\site-packages (from qrcode->-r .\requirements.txt (line 11)) (4.12.2)
Requirement already satisfied: pypng in c:\git\edl\venv\lib\site-packages (from qrcode->-r .\requirements.txt (line 11)) (0.20220715.0)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\git\edl\venv\lib\site-packages (from requests->-r .\requirements.txt (line 12)) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in c:\git\edl\venv\lib\site-packages (from requests->-r .\requirements.txt (line 12)) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\git\edl\venv\lib\site-packages (from requests->-r .\requirements.txt (line 12)) (2.2.2)
Requirement already satisfied: certifi>=2017.4.17 in c:\git\edl\venv\lib\site-packages (from requests->-r .\requirements.txt (line 12)) (2024.6.2)
Requirement already satisfied: configparser in c:\git\edl\venv\lib\site-packages (from Exscript->-r .\requirements.txt (line 14)) (7.0.0)
Requirement already satisfied: future in c:\git\edl\venv\lib\site-packages (from Exscript->-r .\requirements.txt (line 14)) (1.0.0)
Requirement already satisfied: paramiko in c:\git\edl\venv\lib\site-packages (from Exscript->-r .\requirements.txt (line 14)) (3.4.0)
Requirement already satisfied: bcrypt>=3.2 in c:\git\edl\venv\lib\site-packages (from paramiko->Exscript->-r .\requirements.txt (line 14)) (4.1.3)
Requirement already satisfied: cryptography>=3.3 in c:\git\edl\venv\lib\site-packages (from paramiko->Exscript->-r .\requirements.txt (line 14)) (42.0.8)
Requirement already satisfied: pynacl>=1.5 in c:\git\edl\venv\lib\site-packages (from paramiko->Exscript->-r .\requirements.txt (line 14)) (1.5.0)
Requirement already satisfied: cffi>=1.12 in c:\git\edl\venv\lib\site-packages (from cryptography>=3.3->paramiko->Exscript->-r .\requirements.txt (line 14)) (1.16.0)
Requirement already satisfied: pycparser in c:\git\edl\venv\lib\site-packages (from cffi>=1.12->cryptography>=3.3->paramiko->Exscript->-r .\requirements.txt (line 14)) (2.22)
[notice] A new release of pip is available: 24.0 → 24.1.1
[notice] To update, run: python.exe -m pip install --upgrade pip
(venv) PS C:\git\edl> python3 edl w boot ~\Downloads\lk2nd-lenovo-cd-18781y-latest.img
Traceback (most recent call last):
File “C:\git\edl\edl”, line 137, in
from docopt import docopt
ModuleNotFoundError: No module named ‘docopt’
(venv) PS C:\git\edl>

is there a way to install chromium ? “sudo apk add chromium” fails with “no package”

I just got my ThinkSmart device today and installed PMOS using the instructions. I ran into the same issue. Don’t know why but for me it helped when I ran “python edl w” etc. instead of “python3 edl w”, even though running just “python” or “python3” showed the exact same 3.10.11 version installed.

You are my HERO for this one. Thanks so much for the tip on the firewall and the wheel!

Here’s what I did to get wyoming-satellite and wyoming-openwakeword running on my pmos install.

  1. Run sudo rc-update del nftables to disable the pmos firewall, as outlined in the docs
  2. Reboot
  3. sudo apk add git and git clone the wyoming-satellite and wyoming-openwakeword repos.
  4. cd wyoming-openwakeword && vi requirements.txt and comment out the first line, which mentions tflite-runtime
  5. Run script/setup, as instructed in the docs.
  6. sudo apk add wget && wget https://pmos-thinksmart.s3.amazonaws.com/tflite_runtime-2.16.1-cp312-cp312-linux_aarch64.whl to dowload @mrhand’s provided wheel for tflite-runtime
  7. source .venv/bin/activate && pip install tflite_runtime-2.16.1-cp312-cp312-linux_aarch64.whl
  8. Follow the readme and run script/run --uri 'tcp://0.0.0.0:10400'
  9. In a new terminal tab, cd into wyoming-satellite, and follow the readme to run something like:
script/run \
  --name 'my satellite' \
  --uri 'tcp://0.0.0.0:10700' \
  --mic-command 'arecord -r 16000 -c 1 -f S16_LE -t raw' \
  --snd-command 'aplay -r 22050 -c 1 -f S16_LE -t raw' \
  --wake-uri 'tcp://127.0.0.1:10400' \
  --wake-word-name 'ok_nabu'

And it works!

3 Likes

It should be pretty easy to roll this into a proper Alpine Linux package. I’ll take a look at it.

5 Likes

wget “https://dl-cdn.alpinelinux.org/alpine/latest-stable/community/aarch64/chromium-126.0.6478.126-r0.apk
sudo apk add --allow-untrusted chromium-126.0.6478.126-r0.apk

1 Like

As a relative novice who bought one of these without realizing how much technical expertise it would take to get it running, I’ll be monitoring this thread (and especially this effort of yours)!

wouldn’t it be useful to have a dedicated wiki for this project ?

3 Likes

The first post on this thread is a wiki post, so I believe anyone registered on the forum should be able to edit it. I have no strong feelings about what it should look like, but I recognize it definitely needs a cleanup. It contains a fair bit of information that is outdated or not really relevant.

I’d be happy for someone to take a stab at it to make it more friendly to people looking at this for the first time.

I’ve also started editing this a while ago: Lenovo ThinkSmart View (lenovo-cd-18781y) - postmarketOS Wiki

In other news:

  • The Himax touchscreen driver patch was accepted upstream and I assume it will land in the 6.11 kernel. Now on to the Amp codec driver and WiFi driver :slight_smile:
  • Naturally, due to the way I obsess about things, I took another look at the camera situation. I’m starting to believe there may be a way via this driver: mipi-ccs.yaml « i2c « media « bindings « devicetree « Documentation - kernel/git/stable/linux.git - Linux kernel stable tree
    There may be a few quirks needed for the particular sensor, but I haven’t played with it yet.
  • I also tried another eMMC swap and now have another board that doesn’t boot anymore. But it looks like it may be fixable in this instance, just ran out of time once more. No lifted pads. It seems the secret there seems to be to get the board pre-heated to just about 140°C, flux, and then hit it with the hot air gun at 280°C (flow of 5) for about 15 seconds and the eMMC should start swimming.

If only I’d be doing this full-time or the day had 48h :sweat_smile:

6 Likes

I recently bought an unusual “Lenovo Smart Display (SD-X701B)” which runs a full version of Android 8.1 (not Android Things, not Android Go, just Android) with a 64-bit kernel and OS.

It has some custom personal assistant software from a Chinese company, maybe some forgotten sample from Lenovo (who knows lol).

If it’s useful for discussion, I can upload the full firmware I got from EDL, which is compatible with the hardware of either the Lenovo Smart Display or the ThinkSmart View.

If it comes with a 64-bit Kernel and userspace it may be interesting to get a dump so we have 64-bit versions of the binary blobs.

It’s now on there: https://shorturl.at/LZsNy

Let me know if there are any findings and progress from here :smiley:

Some previews that might be useful:

Btw, I tried to extract the defconfig from my device and build the kernel using the source code from CD-18781Y (which is version 3.18, whereas Lenovo only provides version 3.10 for the Smart Display). However, I have never been able to get it to boot (it just goes into Fastboot).

Can anyone help with this issue?