Lenovo ThinkSmart View ROM/OS Development

did you install chromium or chromium browser? From sudo apk add chromium?

As mrhand recommended, chromium.

Yeah I did that but I’m getting errors starting from CLI and the desktop icon doesn’t launch chromium

Hey thanks for going through that, do your partitions still look similar? Mine with stock had 50 (!) so I suspect you’re in a bit of a hybrid state where you have system & vendor again but not all the small android specific ones at the end.

On the note of patch0.xml - did you include mine with the qfil flash for the updated partition scheme? That’s a key piece that resizes the userdata partition and updates the CRC values. Without it that could explain the errors you saw from gdisk.

Btw, I’ve been generating these from a modified version of the qualcomm partitioning tool

No prob! I think we’re getting closer :crossed_fingers:

1 Like

Here’s the canonical upstream for that tool, btw: ptool.py · master · Linaro / qcomlt / db-boot-tools · GitLab
They re-licensed it as BSD 3-Clause and ported it to Python 3, which is very nice of them.

2 Likes

Played around with the Lenovo Rescue and Smart Assistant tonight.
Mainly to find out whether it would be able to recover a device that lost all of its flash memory.

Functionally, for my devices, it’s the same as downloading the [email protected] from @deadman96385’s XDA Thread and running that through edl qfil. It will not restore a corrupted devinfo or any other device-unique partitions, such as DDR, oem, persist, resource, ssd. Only devinfo seems to contain device specific information that is used by the bootloader to set a few things up (such as serial number and product number).
But a corrupted devinfo doesn’t prevent the device from booting (coincidentally the device @mattmon sent me had a corrupted devinfo, probably from some in-depth experimenting :slight_smile:). The bootloader will gladly put any garbled bytes for the serial number and product number into the kernel commandline. Fun fact: You can even inject actual kernel command line arguments by replacing one of the values with a space + your injected argument. Unfortunately it can’t be longer than the serial number or product number minus 1 character (the space).

A corrupt devinfo partition does seem to prevent the Rescue and Smart Assistant from doing its job. I was never able to successfully flash a device that had a broken devinfo partition with it, it would give an error message right after finishing the flashing and drop me into 900e mode. EDL still got those devices booting fine.

It’s possible to replace the devinfo partition with one from another ThinkSmart and just edit the serial number in a hex editor to restore world order.
Thankfully, postmarketOS doesn’t really care about any of this.

Overall, a full dump using edl rl is still a highly recommended first course of action before you even boot up the device for the first time (I did this for 2 devices I freshly unboxed).

But I am starting to feel it’s very likely impossible to irreversibly brick the device by messing with the eMMC storage. But I have yet to test messing with some of the other unique partitions. Who knows? Maybe you can write some whacky DDR memory timings to the DDR partition and smoke the memory? I’m not too eager to find out :stuck_out_tongue:

5 Likes

That’s sounds promising, it should help with attempts to resize the partitions on the smart display 8 if it has a similar level of resilience to bricking!
Interested to see if the tools in the past few posts can also be used on that device too.

Are we confident that a full dump taken using “edl rl --genxml dump” covers everything that will be altered by changing partitions or are there any further steps to take before tinkering with them?

1 Like

So far from my testing, I’m confident that edl rl --genxml covers everything.

But I will only know for certain once I attempt my eMMC swap and have to write back the full dump onto an empty eMMC. But that’ll have to wait until I got all the tools I need and also some more time on my hands.

2 Likes

Hehe, busted :stuck_out_tongue_winking_eye:

Was in a hurry to get it out, and was the only unit I knew for sure had the touch screen in question.

I suspect something about flashing the GSI may have done that. @pgale is having issues over in the other thread, with symptoms (after reading @FelixKa’s last post) seeming very similar to the unit I sent.

1st person to release the magic smoke from thier thinksmart wins… another thinksmart!

(Post pics of the carnage, then send me a dm to claim your prize.)

1 Like

So I have just fired up the device and SSH again (maybe tomorrow or on the weekend I’ll be able to start installing wyoming/the satellite) but it still looks the same. Currently I have just used the backup from my dumps, only using patch0.xml from the stock teams android.

So should I try reflasing with my dumps and your patch0.xml? I would expect if I’m using all files provided by you it will not boot again. Willing to test again but I need some guidance what a next step would be that has a chance to go in the right direction. :slight_smile:

I’m sorry to hear that and yeah, you are right - using SSH i was not able to start a browser on the device - maybe a different addition to the command is needed that states to open the browser on the display of the device instead as part of the ssh session. Or to see the process ID and restart it? Sorry that this is more guessing than knowing. But opening it using the icon was always working for me for all the browsers where I did the changes.

Btw. I’ve additionally tried epiphany (web) (installed via sudo apk add epiphany). Also runs great but does not play my videos from the homeassistant-jellyfin-server (chrome and firefox do!).

Depends on what the prize is - could be worth applying a paperclip strategically :rofl:

I just need to try a few more things. I’m alternating between PMOS and other versions as far as I can get (A11)

1 Like

It’s odd, or at least odd to me as I can install and run PMOS and 8.1 but A11 just refuses to boot.

Anyone have a working link for ‘pmos-lenovo-cd-18781y-testing-latest-rootfs.img.xz’ ? seems down to me.
EDIT: i see now the latest are in this location: thinksmart

I’ve installed and rebooted the device. I see the time and a ‘Slide to Unlock’ note. No matter how i slide the screen, I’m not able to unlock it.

Are you sure you installed the latest image (20240422)? Because only that image includes the Himax touchscreen driver.

2 Likes

Ok. Using the current version fixed the issue. Thank you.

1 Like

Sorry to bother you again. I’m now getting stuck at two postitions and I do not know, how to move on…

Short background: I’ve been using linux for smaller projects now for years (on raspberry pis, etc. so trouble shooting on debian/ubuntu is something I’m a little more used to). Alpine is new for me.

So I’m trying to setup a voice satellite and localwakeword on the Thinksmart.

I’m following a tutorial from “FutureProofHomes” on youtube (based on wyoming-satellite/docs/tutorial_2mic.md at 962b2f5dc6ed0d8b05671f1ade092407ed6251cd · rhasspy/wyoming-satellite · GitHub) and got the satellite set up and I’m able to record and play my recording using “arecord” and “aplay”. My call for the satellite service looks like this. I would say, that looks good. :slight_smile:

First problem:
Home Assistant is not able to find my satellite - even if I try to add it manually (by adding it as a Wyoming integration providing the IP and port…). Do you have an idea what could be wrong?

Second problem:
I’ve tried - following both manuals - to add local wake word detection to the Thinksmart. But I’m immedaitely getting stuck at installing “libopenblas-dev”. If I try to ignore this, the installation (step: “script/setup”) gets stuck with

ERROR: Could not find a version that satisfies the requirement tflite-runtime-nightly (from versions: none)
ERROR: No matching distribution found for tflite-runtime-nightly

Do you have another link to a tutorial for that?

Have a nice Sunday!

Hey coming back to this, taking a cue from Felix and batching up replies…

The one piece I haven’t tracked down yet on the android side is how the mac address gets set, and something I’ve only been able to restore using the RSA tool. By default NetworkManager creates a random but stable mac for each network, so you may notice it gets a new one after a fresh install. I found the macchanger tool which shows the current one and the “permanent” hardware one.

With Android, many people have ended up with the default 000AF58989FF mac from /vendor/firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini. Then multiple devices with the same mac can have some trouble :smile: So the RSA is doing “something” additional, possibly writing to nvram outside the usual partitions? There’s 64M of unpartitioned space at the beginning of the drive so maybe they access that early in the boot process.

Haha nice, I found there’s also a fastboot oem set-serial-num option for this.

I messed the partitions up so bad early on that I couldn’t even get it in EDL mode. Luckily an EDL cable (which has a button that shorts D+ to ground) got me back in business. Still no bricks!

1 Like