Lenovo ThinkSmart View ROM/OS Development

Hey guys.

I have been following along and tried to do this myself. I got it working up until I did something wrong I would strongly assume.

So I got pmos running no problem. Then I tried to install docker to run Home Assistant within. (I realised in hindsight I should just have ran HA on my raspberry pi, and used the thinksmart view as the dashboard) Restarted the device and now it wont mount the root partition. I have tried countless things. Aswell as trying to flash the firmware again.

This is where it gets weird. I cant flash no matter what I try and Lenovo Rescue tool wont flash the firmware either.

Its always the same error: fails to write on sector xxxxx.

I have tried everything I could think of with no luck and couldnā€™t find any reference any other places. I think the device might be bricked due to my own idiocy

thatā€™s something i would expect from a defect emmc. unless someone figures out a way to boot from usb, the only way would be to solder on a new one

I was thinking that aswell. It baffled me that I couldnā€™t write a single thing to the device. I think I might get a new one and try again

Thank you so much for this awesome project! Just picked up my first one and flashing it soon :slight_smile:

ANyone else having issues with bluetooth crashing errors popping up periodically? Everything works just great including gapps, but I"m getting error messages saying something like ā€œBluetooth not respondingā€ which I can clack past until the next error.

Iā€™ve disabled the bluetooth with no change in behavior.

Hi! Could you please reupload this? The link says file is removed. It would be nice if I could try to flash my X701B from Android Things to this :eyes:

Unfortunately I have some issues with restricted Thingsā€™ API.

@FelixKa has there been any progress on the PMOS dev?

Yes, mostly on the kernel and bootloader side though.

  • Himax Touchscreen driver is now merged into the kernel and is part of kernel 6.11 (currently in rc)
  • Focaltech Touchscreen driver is now set to accept up to 10 touchpoints
  • Iā€™ve submitted the wireless patches but havenā€™t received any reviews from the maintainers yet. As I understand they only sporadically look at ath10k patches at this point.
  • lk2nd bootloader changes are now merged into the upstream lk2nd project, furthermore I extended the lk2nd build process to be able to output correctly signed binaries without needing to use magiskboot sign on them. This is one step needed to get a seamless experience when building an image for the device using pmbootstrap.

I have started documenting all the patches that went into supporting the device on the pmOS wiki page. My hope is that this will help people that are also looking to port devices to pmOS understand what areas to look at and what it entails.

So the only pieces left are:

  • Sound driver cleanup and sending that upstream
  • DTS cleanup and sending that to the msm8953-linux repo
  • Submitting pmOS device support packages

After that the device should have all the things required to be supported by pmOS and allow for easy building straight from the pmOS repo.

A bit further into the future, on my to do list I still have:

  • Extending pmbootstrap to support edl as a flashing method
  • Packaging wyoming-satellite and wyoming-openwakeword for Alpine Linux
  • Get the camera working (this requires a bit more involved reverse engineering though)
14 Likes

For packaging wyoming-satellite and openwakeword, are you thinking of wrapping a venv and installing as a start up service? Or what path would you propose for packaging? I could try my hand at those.

I tried mapping it onto how packages in Alpine are packaged in general. This is my work in progress branch: Files Ā· wyoming Ā· Felix Kaechele / aports Ā· GitLab

Youā€™ll notice that, while everything builds for now, I havenā€™t gotten to the part where I install the binaries/scripts to the proper locations. So I havenā€™t gotten to the part you were asking about yet.

In general I would avoid trying to package venvs, as most distributions wouldnā€™t allow it. So the packages are designed to move all required dependencies into he system Python path.

2 Likes

Since we are wanting to get these as Alpine packages, I am assuming we want to stick with openrc over systemd? I am not certain the correct path considering the recent-ish announcement of systemd support on pmos.
I am assuming you also noticed the ā€œinstallerā€ running for wyoming-satellite which we canā€™t use in its current form. Iā€™ll work on writing a new installer that we can use that will generate the openrc service file(s) we need interactively (to match as best it can to the existing one, minus the auto venv install).
The only slight changes Iā€™ve added are using gpep to install and adding a post-install script (that doesnā€™t work yet). Here is the branch I am on: Files Ā· origin/wyoming Ā· Cameron Mehl / aports Ā· GitLab

Good question. Iā€™ll have to see how pmOS is going to be handling this. If that means we submit the packages to pmOS instead of Alpine thatā€™s fine with me as well.

Yeah, I saw that the wyoming and openwakeword components arenā€™t really built to be run as system-wide packages/services. So a bit of manual intervention will be necessary. Iā€™m sure the upstream devā€™s wouldnā€™t mind a PR for any scripts we might add.

Nice! Iā€™ll keep an eye on that.

I have two of these units on their way to me. If I can help in any way, I am happy to do so. I am familiar with embedded Linux, but I have not done any work with PmOS so far. I have limited ability to do electronics debugging at home.

1 Like

I have found on ebay ThinkSmart View devices with the model names CD-17871Y, ZA690000US, ZA690008SE. Visually all they are the same and parameters are identical in lenovo website.
Does anyone know if these devices are compatible and I can buy ZA690008SE?

yes ZA690008SE is the model I have (EU version)

Has anyone noticed any audio distortion / crackling issues. Iā€™ve had my unit connected up to my snapcast server for audio notifications etc, however have noticed that after around 5-6s of playback the audio starts crackling before cutting out entirely. At this point no audio can be heard for an unknown amount of time. Had this on Android, and thought Iā€™d see if pmOS had the same issue, and it does. This is what is in dmesg for pmOS:

[ 1032.673371] tas5805m 1-0049: set mute=0 (is_powered=0)
[ 1032.741050] tas5805m 1-0049: set mute=1 (is_powered=0)
[ 1032.762588] tas5805m 1-0049: DSP shutdown
[ 1032.775411] q6asm-dai c200000.remoteproc:smd-edge:apr:service@7:dais: command[0x10dac] not expecting rsp
[ 1032.775436] q6asm-dai c200000.remoteproc:smd-edge:apr:service@7:dais: command[0x10dac] not expecting rsp
[ 1032.775569] q6asm-dai c200000.remoteproc:smd-edge:apr:service@7:dais: command[0x10dac] not expecting rsp
[ 1032.775579] q6asm-dai c200000.remoteproc:smd-edge:apr:service@7:dais: command[0x10dac] not expecting rsp
[ 1032.796125] tas5805m 1-0049: set mute=0 (is_powered=0)
[ 1032.871763] tas5805m 1-0049: clock start
[ 1032.871857] tas5805m 1-0049: DSP startup
[ 1033.392729] tas5805m 1-0049: refresh: is_muted=0, vol=0/0
[ 1033.396202] tas5805m 1-0049: set mute=1 (is_powered=1)
[ 1033.396215] tas5805m 1-0049: refresh: is_muted=1, vol=0/0
[ 1033.424025] tas5805m 1-0049: DSP shutdown
[ 1033.440112] tas5805m 1-0049: set mute=0 (is_powered=0)
[ 1033.460706] tas5805m 1-0049: clock start
[ 1033.460798] tas5805m 1-0049: DSP startup
[ 1034.036860] tas5805m 1-0049: refresh: is_muted=0, vol=0/0
[ 1038.039191] q6asm-dai c200000.remoteproc:smd-edge:apr:service@7:dais: command[0x10bdb] not expecting rsp
[ 1043.494520] tas5805m 1-0049: set mute=1 (is_powered=1)
[ 1043.494551] tas5805m 1-0049: refresh: is_muted=1, vol=0/0
[ 1043.521981] tas5805m 1-0049: DSP shutdown
[ 1049.143086] tas5805m 1-0049: set mute=0 (is_powered=0)
[ 1049.162509] tas5805m 1-0049: clock start
[ 1049.162612] tas5805m 1-0049: DSP startup
[ 1049.835445] tas5805m 1-0049: refresh: is_muted=0, vol=0/0
[ 1119.221629] tas5805m 1-0049: set mute=1 (is_powered=1)
[ 1119.221664] tas5805m 1-0049: refresh: is_muted=1, vol=0/0
[ 1119.253724] tas5805m 1-0049: DSP shutdown
[ 1119.270571] tas5805m 1-0049: set mute=0 (is_powered=0)
[ 1119.291779] tas5805m 1-0049: clock start
[ 1119.291892] tas5805m 1-0049: DSP startup
[ 1119.956134] tas5805m 1-0049: refresh: is_muted=0, vol=0/0

Faulty hardware perhaps? Thoughts?

I think I have the services built correctly and placing an init.d file. There were a couple options, I chose the ā€˜simplerā€™ one which will require the user modifing a file placed in /etc/conf.d and then enabling the service with openrc instead of adding dependencies and some scripting about those dependencies. After install, the user is provided a couple instructions to follow to enable their configuration.
Take a look when youā€™ve a chance: Files Ā· origin/wyoming Ā· Cameron Mehl / aports Ā· GitLab
Thoughts?

1 Like

@FelixKa Is there a repo we can clone to build your version of PMOS ourselves? Or do we just need to apply each of your patches to the upstream PMOS repo?

EDIT: Nevermind not sure how I missed the post from January with the repo. For anyone else looking: https://community.home-assistant.io/t/lenovo-thinksmart-view-rom-os-development/676324/27

I just got my device (ZA690000US) and iā€™m looking to update my device mainly for a tabletop kiosk and voice assistant with wakeword. Can anybody suggest weather I go with Android 11, pmos or LineageOS?

Also is there any central location I can follow to see updates for the android images ?

Cool! Iā€™ll try this and report back. Thanks!