Continuing the discussion from Is this the perfect standalone tablet for HA?:
It should be possible to port a newer OS onto these devices. I currently see two options:
-
AOSP (or something like LineageOS).
I am personally not super familiar with the Android ecosystem on the OS layer. From my quick looking at it today it seems that we would need to build the Kernel with the device specific pieces and then wrap a custom ROM that brings the updated userland.
Similar devices: Lenovo Tab4 8 Plus and Lenovo Tab4 10 Plus. The Lenovo Tab4 10 Plus has TWRP support and some LineageOS support: GitHub - lukaspieper/android_device_lenovo_tb_x704f: LOS 18.1 for Lenovo Tab4 10 Plus (TB-X704F) -
postmarketOS
This is more on the vanilla embedded Linux side, which I am more familiar with. Benefit here is that we would be able to run a pretty recent (e.g. 6.6.x) kernel on this device. But the userland would be a Linux distribution, not Android. So a lot of nice things that Android gives us would need to be built from scratch (I’m thinking voice assistant integration).
A few basics about the device:
- Qualcomm SDA624 SoC: This seems to be a marketing model number for “home hub devices”. It’s actually a APQ8053 which is a close relative of the Snapdragon 625, which also was part of many phones and tablets in 2017/2018. It is well supported by the mainline kernel.
- Focaltech FT8201 driven 8" touchscreen: My guess is, it’s this part: 8 Inch 800*1280 Vertical TFT LCD Display - Kingtech Group Co., Ltd.
No upstream driver yet, but one that looks to function very similarly to the one provided in the GPL sources. - TI TAS5782M Audio Amplifier: Driver is custom, because it loads in some initialization values that are unique to the board/design. But the driver is part of the GPL Sources, so we have it if we need it.
Links
Lenovo
- Lenovo Open Source Portal - Lenovo Support US
- Open Source Code for ThinkSmart View For ZOOM (Lenovo CD-18781Y) / Version 201218.2018 (2021-02-20)
- Lenovo Kernel Changes
Diff of the original Code Aurora kernel version used in the SDK Lenovo used (LA.UM.6.6.3.r1-01300-8x53.0
) vs. the GPL Sources released by Lenovo.
LineageOS
postmarketOS
Miscellaneous
Customization
Some notes on customization(s) applied to kingston-ha-rom:
All the files referenced below can be found here.
Splash
- From uboots perspective the screen is 800x1280, portrait orientation
- The splash screen loaded by uboot is just the first frame of bootanimation.zip
- The image data must be RLE and have an appropriate header prepended
- logo_gen.py generates the RLE section from PNGs
- append to kingston-splash-header.bin
- logo_gen.py depends on python2 PIL, I use it in a container of debian oldstable
Bootanimation
- screencapped @andyfitz’s animation
- used shotcut to export a webm of the animation in the correct resolution
- ffmpeg to rip the frames
- pngquant to reduce their size
- shoved it all into the right dir structure with desc.txt and zipped
boot image
- must be signed, any signature will do
- for testing, the magiskboot utility can place a default signature in a repacked image (i.e.
magiskboot sign
)
chromium / webview
- building chromium with the package name “com.google.webview” makes it much easier for users to update system webview
PMOS Installation
Windows instructions
Prerequisites
- Install Python 3.9 or higher, following the defaults, including making it available to PowerShell
- Install Git, following the defaults. Same as above.
- Download FelixKa’s lk2nd-lenovo-cd-18781y-latest.img and pmos-lenovo-cd-18781y-testing-latest-rootfs.img.xz
- Using a tool like 7zip, extract the .xz file so you end up with a .img file.
Install EDL
- Open Windows PowerShell (not ISE)
- Run the following:
mkdir ~/git
cd ~/git
git clone https://github.com/bkerler/edl
cd edl
git submodule update --init --recursive
python -m venv venv
.\venv\Scripts\Activate.ps1
pip3 install -r .\requirements.txt
- Leave this window open
Put the ThinkSmart into EDL mode
- Unplug the device
- With the device standing up in portrait mode (camera at the top left) remove the plug on the right side of the screen to access the USB-C port and connect it to your computer.
- While holding both the Vol - and + keys (left side of the screen), plug in the barrel connector to power it up. You should see the screen flash and then remain dark.
Update the USB driver
- Install Zadig and run it
- Click the dropdown to select QUSB__BULK and click “Reinstall driver”
Flash PMOS
- Back in your PowerShell window, run the following:
python3 edl w boot ~\Downloads\lk2nd-lenovo-cd-18781y-latest.img
python3 edl w userdata ~\Downloads\pmos-lenovo-cd-18781y-testing-latest-rootfs.img
Sample output
(venv) PS C:\Users\chris\git\edl> python3 edl w boot C:\Users\chris\Downloads\lk2nd-lenovo-cd-18781y-latest.img
Qualcomm Sahara / Firehose Client V3.62 (c) B.Kerler 2018-2023.
main - Trying with no loader given ...
main - Waiting for the device
main - Device detected :)
main - Mode detected: firehose
main - Trying to connect to firehose loader ...
firehose - logbuf@0x080700D8 fh@0x0806CF40
firehose_client
firehose_client - [LIB]: ←[33mNo --memory option set, we assume "eMMC" as default ..., if it fails, try using "--memory" with "UFS","NAND" or "spinor" instead !←[0m
firehose - TargetName=MSM8953
firehose - MemoryName=eMMC
firehose - Version=1
firehose - Trying to read first storage sector...
firehose - Running configure...
firehose - Storage report:
firehose - total_blocks:15269888
firehose - block_size:512
firehose - page_size:512
firehose - num_physical:3
firehose - mfr_id:21
firehose - serial_num:4044472363
firehose - fw_version:6
firehose - mem_type:eMMC
firehose - prod_name:8GTF4R
firehose_client - Supported functions:
-----------------
firehose -
Writing to physical partition 0, sector 790528, sectors 427
Progress: |██████████| 100.0% Write (Sector 0x1AA of 0x1AA, ) 20.84 MB/s
Wrote C:\Users\chris\Downloads\lk2nd-lenovo-cd-18781y-latest.img to sector 790528.
(venv) PS C:\Users\chris\git\edl> python3 edl w userdata C:\Users\chris\Downloads\pmos-lenovo-cd-18781y-testing-latest-rootfs.img
Qualcomm Sahara / Firehose Client V3.62 (c) B.Kerler 2018-2023.
main - Trying with no loader given ...
main - Waiting for the device
main - Device detected :)
main - Mode detected: firehose
main - Trying to connect to firehose loader ...
firehose_client
firehose_client - [LIB]: ←[33mNo --memory option set, we assume "eMMC" as default ..., if it fails, try using "--memory" with "UFS","NAND" or "spinor" instead !←[0m
firehose - TargetName=MSM8953
firehose - MemoryName=eMMC
firehose - Version=1
firehose - Trying to read first storage sector...
firehose - Running configure...
firehose - Storage report:
firehose - total_blocks:15269888
firehose - block_size:512
firehose - page_size:512
firehose - num_physical:3
firehose - mfr_id:21
firehose - serial_num:4044472363
firehose - fw_version:6
firehose - mem_type:eMMC
firehose - prod_name:8GTF4R
firehose_client - Supported functions:
-----------------
firehose -
Writing to physical partition 0, sector 6890512, sectors 4833280
Progress: |██████████| 100.0% Write (Sector 0x49B800 of 0x49C000, ) 27.39 MB/s
Progress: |██████████| 100.0% Write (Sector 0x49C000 of 0x49C000, ) 25.65 MB/s
Wrote C:\Users\chris\Downloads\pmos-lenovo-cd-18781y-testing-latest-rootfs.img to sector 6890512.
Reboot
Unplug the device and plug it back in. You should see a Lenovo logo followed by the postmarketOS logo.
PostmarketOS Status
Kernel 6.7.5 (branch 6.7.5/main
): GitHub - msm8953-mainline/linux: Linux mainline kernel with WIP patches for msm8953 devices
eMMC Storage (working as of 2024-02-14)
Simple Framebuffer (working as of 2024-02-14)
GPU (working as of 2024-02-15)
Display Panel (working as of 2024-02-15)
Touchscreen (working as of 2024-02-15)
Backlight (working as of 2024-02-14)
Proximity Sensor (kinda contingent on Draft: Qualcomm Sensor Manager support (MSM8996 & Co. SSC) (!4118) · Merge requests · postmarketOS / pmaports · GitLab)
Buttons / Switches (working as of 2024-02-14)
USB Networking (working as of 2024-02-14)
WiFi (working as of 2024-02-15, added support for the chip to ath10k, not fast though, ~20 Mbit/s)
Bluetooth (working as of 2024-02-15, tested with Bluetooth Keyboard)
Sound output (working as of 2024-02-22)
Microphones (working as of 2024-03-04)
Camera (very little hope on this one)