LineageOS frames: OS updates from Home Assistant, and keeping our boot animation
Status (2026-11-21): untested. Nothing here has run on a device. It is a design read for a possible future frame: a tablet that runs official LineageOS, where LineageOS keeps building, signing and serving the OS updates and Glassworks only finds them, shows them in Home Assistant and starts the install. Every claim is read from LineageOS 22.2 or AOSP source (links below), unless marked otherwise.
Device: none. Sources: LineageOS lineage-22.2 branches of android_packages_apps_Updater,
android_frameworks_base and android_vendor_lineage, read 2026-11-21.
Question
If a frame's base image is LineageOS (an old Samsung tablet, say), can it:
- keep getting LineageOS's own OS updates, without us building or hosting them;
- show those updates in Home Assistant, and install them from there;
- not get in the way of our App and Frame updates, or they of it;
- keep the Glassworks boot animation across every OS update?
What we read
-
How LineageOS's Updater finds a build (read).
app/src/main/res/values/strings.xml:35:<string name="updater_server_url" translatable="false">https://download.lineageos.org/api/v1/{device}/{type}/{incr}</string>misc/Constants.java:41–50names what fills it and what it compares:ro.lineage.device,ro.lineage.releasetype,ro.build.version.incremental,ro.build.date.utc,ro.lineage.build.version,ro.build.ab_update, andlineage.updater.allow_major_upgrades(major upgrades are off unless that is set). Glassworks can send the same request and compare the same build date.Build.TIMEisro.build.date.utcin milliseconds, readable by any app. Untested: whether an untrusted app can read thero.lineage.*properties under SELinux;Build.DEVICEis the fallback for the codename. -
Who may install an OS update without a tap (read).
DevicePolicyManagerService.installUpdateFromFile(lineage-22.2, about line 20209) checks the caller withPreconditions.checkCallAuthorization(... isDefaultDeviceOwner ... || isProfileOwnerOfOrganizationOwnedDevice(caller)). The public API isDevicePolicyManager.installSystemUpdate(ComponentName admin, Uri, Executor, InstallSystemUpdateCallback), Android 10+, whereadminis the device owner'sDeviceAdminReceiver. It takes an OTA zip that the device's own keys must accept, so a LineageOS-signed zip from LineageOS's server qualifies. A/B devices install throughupdate_enginein the background. Non-A/B devices copy the zip and reboot into recovery. Glassworks for generic Android already supports device-owner mode for hands-free app updates on Android 8–11, so this is the same setup. -
Where the boot animation comes from (read).
cmds/bootanimation/BootAnimation.cpp,findBootAnimationFile()(line 718) tries, in order:APEX_BOOTANIMATION_FILE, productBootanimationFile, OEM_BOOTANIMATION_FILE, SYSTEM_BOOTANIMATION_FILEthat is
/apex/com.android.bootanimation/etc/,/product/media/,/oem/media/,/system/media/. LineageOS's own animation is aprebuilt_mediawithproduct_specific: true(android_vendor_lineage/bootanimation/Android.bp:50–53), so it sits in/product/mediaand wins over/oemand/system. Ours has to replace the/product/mediafile. Putting it in/oemor/systemwon't do anything. -
How a file survives a LineageOS update:
addon.d(read).config/common.mk:45–59shipsbackuptool.sh(recovery, non-A/B) andbackuptool_ab.shwithbackuptool_postinstall.sh(A/B). Both run each/system/addon.d/*.shscript with backup and restore steps around the new system being written. Google apps use this to survive LineageOS updates. One guard matters (backuptool.sh:45–56): the restore runs only if the newbuild.prophas the samero.lineage.versionmajor and minor. Monthly builds keep it, while a major upgrade (21 to 22) skips everyaddon.dscript.
Result
| Need | How | Sure? |
|---|---|---|
| Find an OS update | Glassworks sends the Updater's request to download.lineageos.org and compares ro.build.date.utc |
Read; the property access is untested |
| Show it in HA | An OS update entity next to App update and Frame update, with the installed and latest build, size, and LineageOS's changelog link | Design |
| Install, Glassworks as device owner | Download the signed zip, installSystemUpdate, then restart. Non-A/B means 5–10 minutes in recovery |
Read |
| Install, Glassworks as a normal app | Open LineageOS's Updater on the panel, and someone taps Install | Read |
| Our app and settings | Live in /data, which an OS update doesn't touch |
Read |
| Our boot animation | An addon.d script that Kiln installs once. It backs up and restores /product/media/bootanimation.zip, so the first boot after an update already shows ours |
Read; untested on any device |
| Major upgrades (21 to 22) | Not offered by default, and addon.d skips them. HA shows "a new major version is available", and the upgrade is a manual step |
Read |
| The bootloader's own logo | A separate bootloader area that LineageOS updates don't write. If Kiln replaces it once, it stays | Untested; depends on the device |
What conflicts with this: anything a frame changes in the OS itself, such as a Magisk-patched boot
image like the S1's. On non-A/B devices an OS update replaces the boot image, which removes the patch.
Such a frame would need its agent to re-apply the patch after an update, or it would have to block OS updates.
A frame that only runs the app, plus the addon.d animation, has no conflict.
Licences: this route ships no OS bytes, so hard rules 3 and 4 aren't touched. Kiln installs the
image the user downloads from LineageOS, and the addon.d script and animation are ours.
Fallback for the animation: if addon.d can't write on a device (read-only system images such as
EROFS), copying the file back doesn't work either: root can't write a read-only filesystem. What works
there is a bind mount of our zip from /data over /product/media/bootanimation.zip early in every boot,
which is how the S1 tried its animation (frames/aqara-s1-plus/research/boot-animation.md). That needs
root and a hook that makes the mount before bootanimation starts, on every boot: a bind mount doesn't
survive a reboot, and one made after the animation starts doesn't change what plays. The S1 test also
logged a SELinux mounton denial and only worked because SELinux was permissive there, so under
LineageOS's enforcing policy the hook needs a policy rule or a context that allows it. Untested on
LineageOS. A Magisk module that overlays the file would also work, but on non-A/B
devices it goes away with Magisk at the first update, so it's the weakest choice.
How to reproduce
Nothing to run yet. The first device test, in order, on a spare LineageOS tablet:
- Read-only:
adb shell getprop ro.lineage.device, then the same from an app process (Build.DEVICE,SystemProperties), to confirm what an app may read. - Read-only: fetch
https://download.lineageos.org/api/v1/<device>/<type>/<incr>and compare itsdatetimewithro.build.date.utc. - Writes storage: make a test app the device owner (
dpm set-device-owner, no accounts on the device), callinstallSystemUpdatewith the latest LineageOS zip, and time the restart. Undo:dpm remove-active-adminon a test-only admin, or a factory reset. - Writes
/system: only on a device whereadb remountwrites the partitions in place. On devices with dynamic partitions,adb remountsets up OverlayFS instead,update_enginemay refuse an OTA while it is active, andadb enable-verityto clear it also drops the test files, so the test can't run there. On a device where it writes in place: with "Rooted debugging",adb root, thenadb disable-verityand a reboot if verity is on (the remount fails until then),adb rootagain after the reboot, thenadb remount, add a testaddon.dscript that backs up and restores/product/media/bootanimation.zipplus a replaced zip, and install the next monthly update. Undo: the test changes blocks in the verity-protected partitions, so putting files back isn't enough. Delete the testaddon.dscript first (otherwise the same-version sideload runs it and restores the test animation), then sideload the same LineageOS build in LineageOS Recovery (it rewritessystemandproduct; on an A/B device each sideload writes the inactive slot, so sideload it twice to cover the slot you tested too), thenadb enable-verityif you disabled it.
Open questions
- Does
backuptool_ab.shrestore files in/producton devices with a separateproductpartition, or only/system? The script lists paths relative to$S. Checkbackuptool_ab.functions. - Which LineageOS builds ship read-only system images (EROFS) or remount through OverlayFS, and how does
Kiln put an
addon.dscript in place there (recovery, or not at all)? - Does LineageOS's Updater honour a device owner's
setSystemUpdatePolicy(a maintenance window), or do we schedule installs only from Glassworks?
Sources
- LineageOS Updater:
strings.xml,Constants.java - Boot animation:
BootAnimation.cpp,bootanimation/Android.bp addon.d:backuptool.sh,config/common.mk- Device owner install:
DevicePolicyManager.installSystemUpdate