restore_commands() enabled the stock launcher whenever the record did not hold it as disabled, and
save() recorded only the list and Home's package, so a stock launcher the factory had disabled
(examples/verizon-stream-tv) or that build-and-install.sh had disabled before a second list came back
on at undo, and took Home from com.gathin.tvhome. save() now records every installed stock launcher
build-and-install.sh knows, restore enables only what the record holds as enabled, and Home stays on
this project's launcher when the stock one was not on. A record from before this change leaves an
unlisted stock launcher alone and prints the command to turn it on. The README and the #805 note in
TROUBLESHOOTING say so. restore.ps1 goes through the same recovery.py; its test needs pwsh and runs on
CI only.
`git ls-files -s tools` has every script under tools/ as 100644 except tools/tv.py (100755), so
the seven pages that wrote `tools/check.py --fix`, `tools/bench.py --out-dir ...`,
`tools/readme_card.py Fredoka.ttf ...`, `tools/manage.py list themes` and the two b64push calls
in docs/devices/skyworth-7t861-a23.md hand a reader `bash: tools/<x>.py: Permission denied`
(exit 126). The four device notes that wrote `"$PY" -I tools/tv.py ...` never set PY on the page,
so the shell runs `"" -I tools/tv.py ...`: `bash: : command not found`, and nothing reaches the TV.
All 21 name `tools/venv/bin/python -I tools/<x>.py` now, the form README.md's Tools table and
docs/TROUBLESHOOTING.md:773 already use; a page that sets PY itself is still accepted.
tests/test_documented_tool_commands.py reads the 213 pages a reader follows (README*.md, docs/,
themes/, examples/, addons/) and judges each tool command by git's mode, so a bare 100644 script
or an unset variable fails there. The two tests that pinned the old strings follow the pages.
The #805 bullet said to disable the app that answers the channel query, but since #1092 disable.sh,
disable.ps1 and check.py --fix keep any listed app that query names; it now says to apply that app on
a list of its own with HANDLERS_ALLOW=1, pass the same to check.py --fix, clear the switch afterwards
in PowerShell, and undo it with pm enable, since restore.sh on that list also makes the stock launcher
Home again. Not tried on a TV.
Refs #805
Co-Authored-By: Claude Opus 5.5 <[email protected]>