Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.
Python adbadblockandroid-tvandroid-tv-launcherapple-tvbloatware-removalclaude-codedebloatfire-tvgoogle-tvlauncherprivacysmart-tvsony-braviatclvibe-codingxiaomi
docs: install-existing brings a package back disabled when a disable.sh run already reached it
Mazin Kanuga4842144976c1
diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.mdindex 6002d7cdf..c96c3d5c6 100644--- a/docs/TROUBLESHOOTING.md+++ b/docs/TROUBLESHOOTING.md@@ -176,18 +176,23 @@ Things that bit us or contributors, so they don't bite you. Commands use `tools/"not installed any more". Bring it back with`tools/tv.py 'cmd package install-existing --user 0 <package>'` (AOSP's `cmd package` has it fromAndroid 8.0; the Android 6 set in [#1185](https://github.com/Gathin23/cleanyourtv/issues/1185) had no- such command; no TV here has run it yet). It comes back enabled, and without its data unless the- uninstall used `-k`. To keep it, comment its line out of your list first: otherwise `check.py` reports- it as back on, and `--fix` or the next `disable.sh` run disables it again. If you don't want it, let- the list disable it afterwards, which the TV's own settings can undo. `--fix` or that `disable.sh` run- first changes it from absent to enabled in the record, so `restore.sh` turns it back on too. A record- an older version updated, or a package that was already disabled when that run saw it, still says- absent, and `restore.sh` leaves it alone: `pm enable --user 0 <package>` is its undo. Two cases- this does not cover. An app with no copy on the system partition that only user 0 had is deleted with- its APK: the command answers `Package <package> doesn't exist`, and only reinstalling the APK brings- it back (the Toshiba's `com.hisense.business.ad`). And a `User 0:` line with- `installed=true hidden=true` was hidden, not uninstalled. install-existing changes nothing there even- though it prints `Package <package> installed for user: 0`, and the shell cannot unhide it:+ such command; no TV here has run it yet). It comes back without its data unless the uninstall used+ `-k`, and disabled if a list that names it has gone through `disable.sh` since it was removed: that+ run sent it `pm disable-user --user 0`, which AOSP applies to a package removed for user 0 too (the+ [Shield list](../examples/nvidia-shield-tv-pro-2019/debloat.txt) notes `disable.sh` reporting+ "disabled-user" for such packages), and install-existing marks it installed without changing that+ state. `pm list packages -d --user 0 <package>` names it if it came back disabled. To keep it, comment+ its line out of your list, then run `tools/tv.py 'pm enable --user 0 <package>'`: with the line still+ in, `check.py` reports it as back on, and `--fix` or the next `disable.sh` run disables it again. If+ you don't want it, keep the line: the list disables it, or keeps it disabled, which the TV's own+ settings can undo. `--fix` or a `disable.sh` run that finds it enabled first changes it from absent to+ enabled in the record, so `restore.sh` turns it back on too. Until then, or in a record an older+ version updated, it stays absent, and `restore.sh` leaves it alone: `pm enable --user 0 <package>` is+ its undo. Two cases this does not cover. An app with no copy on the system partition that only user 0+ had is deleted with its APK: the command answers `Package <package> doesn't exist`, and only+ reinstalling the APK brings it back (the Toshiba's `com.hisense.business.ad`). And a `User 0:` line+ with `installed=true hidden=true` was hidden, not uninstalled. install-existing changes nothing there+ even though it prints `Package <package> installed for user: 0`, and the shell cannot unhide it:`pm unhide` needs `MANAGE_USERS`, which the shell does not hold from Android 7.0. Unhide it from thedevice-owner app that hid it, or leave it, as the[Chromecast with Google TV 4K list](../examples/google-chromecast-gtv-4k/debloat.txt) does withdiff --git a/tests/test_check_fix_record.py b/tests/test_check_fix_record.pyindex 2014858dd..2201c74e5 100644--- a/tests/test_check_fix_record.py+++ b/tests/test_check_fix_record.py@@ -105,7 +105,7 @@ class CheckFixRecordTest(unittest.TestCase):self.tv(installed=drift.BASE, disabled=[STOCK])self.apply_list()self.assertEqual(self.record()["com.example.later"], "absent")- # A TV refuses pm disable-user for a package it does not have, which this fake does not; then+ # A TV refuses pm disable-user for a package it has no copy of, which this fake does not; then# an update installs it, enabled.state = self.state()self.set_state(installed=state["installed"] + ["com.example.later"],