Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

Merge PR #640: Update Russian localization to match new strings

Gathin23874bc494d50f
diff --cc README.md
index 79266e490,6ec7217d2..4b226ee07
--- a/README.md
+++ b/README.md
@@@ -392,110 -329,21 +392,125 @@@ The **TV** needs Android 8.0 (API 26) o
`ro.build.version.sdk` before it builds, so an older set is told both numbers instead of failing at
`pm install` (see [Troubleshooting](docs/TROUBLESHOOTING.md) for what is left on such a set).
+| What | How it works |
+|---|---|
+| **Configure** | Dock order, hidden apps, Live TV app, 4 to 7 tiles per row, reduced motion. All in [`config.xml`](launcher/app/src/main/res/values/config.xml) |
+| **Settings on the TV** | Hold OK on the Settings pill for Launcher settings: tiles per row, animations, advanced effects |
+| **Themes** | Background, wallpaper and layout from a `config.json` pushed over Wi-Fi, no rebuild. Five ship in [`themes/`](themes/) |
+| **24 languages** | Follows the TV's language, with a fully mirrored right-to-left layout for Hebrew |
+| **App library** | Optional: browse every installed app and add or remove Home shortcuts. See [the app library guide](docs/app-library.md) |
+| **Module cards** | Any TV app can offer its own tile; you approve each one once. See [`docs/modules.md`](docs/modules.md) |
+| **Clock screensaver** | A drifting clock over the glow, so nothing burns in |
+| **Remote keys** | Keeps the Input, YouTube and gear buttons working after the stock launcher is gone |
+
+<details>
+<summary><b>Build it yourself</b></summary>
+
+It needs JDK 17 and Android SDK platform 34. On macOS: `brew install openjdk@17 android-commandlinetools`
+and `sdkmanager "platforms;android-34" "build-tools;34.0.0"`. On Linux the install script finds
+`~/Android/Sdk` and the `java` on your PATH.
+
+</details>
+
+<details>
+<summary><b>Configure</b></summary>
+
+[`config.xml`](launcher/app/src/main/res/values/config.xml) sets the dock order, hidden apps, the Live TV
+package, columns (tiles shrink from 5 up), rows under the dock, an optional VPN app for the network pill,
+and `reduced_motion` for TVs whose GPU cannot keep up. Themes set the same keys plus a background colour
+and a wallpaper.
+
+</details>
+
+<details>
+<summary><b>Launcher settings and the default home</b></summary>
+
+- Click **Settings** for the TV's own settings. Hold OK on it and choose **Launcher settings** to set 4, 5,
+ 6 or 7 apps per row, turn animations on or off, and opt into advanced effects (tile lift, icon zoom and
+ smooth ambient-colour transitions; they may use more memory).
+- **Follow theme** clears the on-TV choices. Pushing or resetting a theme clears them too.
+- **Change the default home:** Launcher settings and the optional Default-home tile
+ (`show_home_settings_shortcut`) open Android's home picker. Choose the original launcher to stop using
+ CleanYourTV as Home, or CleanYourTV to return. The original launcher must be enabled; if the install
+ script disabled it, run the restore script below first. Some TVs provide no home picker.
+
+</details>
+
+<details>
+<summary><b>Languages</b></summary>
+
+English, German, Spanish, Catalan, French, Russian, Serbian (Latin), Polish, Czech, Italian, Portuguese,
+Turkish, Arabic, Hebrew, Simplified Chinese, Traditional Chinese (Taiwan), Thai, Finnish, Vietnamese,
+Bangla, Indonesian, Norwegian Bokmål, Dutch and Uzbek (Latin). The launcher follows the TV's language. Android 13+ can set it for the launcher
+alone: `tools/tv.py 'cmd locale set-app-locales com.gathin.tvhome --locales ca'`.
+
+Hebrew mirrors the layout: menu buttons on the left, date and clock on the right with the greeting above,
+dock and app rows starting on the right with matching remote navigation, the input selector's icons and
+labels on the right, and dates with the month prefix ב (for example, 19 באוקטובר). The Clock screensaver
+right-aligns its date and time. Russian includes the module-card screens and the VPN-off badge. Other
+languages keep their original layouts.
+
+</details>
+
+<details>
+<summary><b>Module cards</b></summary>
+
+Any TV app can declare its own tile (label, caption, glow). The launcher asks you once per app, keeps it
+hidden by default, and remembers the answer for that app's signing key and card name. Hold OK on Settings
+and choose Module cards to change your mind. How to make one: [`docs/modules.md`](docs/modules.md); the
+contract: [`docs/specs/card.md`](docs/specs/card.md).
+
+</details>
+
+<details>
+<summary><b>Clock screensaver</b></summary>
+
+Pick "Clock" in the TV's screensaver settings, or over ADB:
+
+```bash
+tools/tv.py 'settings put secure screensaver_components com.gathin.tvhome/.ClockDream; settings put secure screensaver_enabled 1'
+```
+
+</details>
+
+<details>
+<summary><b>Remote keys</b></summary>
+
+- An optional accessibility service keeps the remote's **Input** button working on Google TV
+ (`INPUT_KEY_SERVICE=1` at install).
+- It can bring back other buttons only the stock launcher answered, such as the **YouTube** button
+ (`app_keys` and `input_key_keycodes`, in config.xml or a theme; `HOME_KEY_SERVICE=1` reads `app_keys` too).
+- `HOME_KEY_SERVICE=1` also fixes sticks whose Home key sends ALL_APPS, and opens Settings from the remote's
+ **gear** button, even one Android does not map (scancodes or keycodes in config.xml).
+- With `settings_key_panel` the gear opens a [small quick settings panel](docs/quick-settings-panel.jpg)
+ over Home or any app: TV settings, Display, Network, Apps and Launcher settings.
+
+</details>
+
+<details>
+<summary><b>Navigation and artwork</b></summary>
+
+Up and Down move one row. The top buttons never fall through to tiles, and Down from them returns to the
+dock tile you came from. The last focused app is remembered, and installing or removing an app refreshes
+the tiles while Home is open. App banners load at xhdpi or better, so low-density TV UIs do not downsample
+them before the focus zoom.
+
+</details>
+ - **Configure** in [`config.xml`](launcher/app/src/main/res/values/config.xml): dock order, hidden apps, the Live TV package, columns (tiles shrink from 5 up), rows under the dock, an optional VPN app for the network pill, and `reduced_motion` for TVs whose GPU cannot keep up.
+ - **App library (optional):** enable `app_library` in config.xml or a theme to browse installed apps and add or remove Home shortcuts with the remote. See [the app library guide](docs/app-library.md).
+ - **On-TV launcher settings:** click Settings for the TV's system settings, or hold OK on Settings and choose Launcher settings to set 4, 5, 6 or 7 apps per row, turn animations on or off, and opt into advanced effects. The advanced option adds tile lift, icon zoom and smooth ambient-colour transitions; it may use more memory. Use Follow theme to clear on-TV choices. Pushing or resetting a theme also clears them.
+ - **Change the default home:** Launcher settings and the optional Default-home tile (`show_home_settings_shortcut`) open Android's home picker. Choose the original launcher to stop using CleanYourTV as Home, or CleanYourTV to return. The original launcher must be enabled. If the install script disabled it, use the restore script below first. Some TVs provide no home picker.
+ - **Themes** set the same keys plus a background colour and a wallpaper from a `config.json` pushed to the TV, no rebuild. Five ship in [`themes/`](themes/), documented there.
+ - **Language** follows the TV: English, German, Spanish, Catalan, French, Russian, Serbian (Latin), Polish, Czech, Italian, Portuguese, Turkish, Arabic, Hebrew, Simplified Chinese, Traditional Chinese (Taiwan), Thai, Finnish, Vietnamese, Bangla, Indonesian, Norwegian Bokmål, Dutch, Uzbek (Latin). Android 13+ can set it for the launcher alone: `tools/tv.py 'cmd locale set-app-locales com.gathin.tvhome --locales ca'`.
+ Hebrew places the menu buttons on the left and the date and clock on the right, with the greeting above the clock. The Clock screensaver right-aligns its date and time, and Hebrew dates include the month prefix ב (for example, 19 באוקטובר). Hebrew dock and app-grid rows start on the right, with matching left/right remote navigation. The Hebrew input selector places icons and labels on the right, status on the left, and aligns the dropdown with the Inputs button’s right edge. Other languages keep their original layouts.
+ Russian includes the module-card approval and management screens, VPN-off badge, wallpaper and row settings, race sessions and countdowns, built-in festival greetings, storage units, the optional Shamsi date, and the cinematic shelf's last-opened line.
+ App-provided labels and names, places, or custom greetings supplied by a theme remain the owner's text.
+ - **Module cards** let any TV app declare its own tile (label, caption, glow). The launcher asks you once per app, Keep hidden by default, and remembers the answer for that app's signing key and card name. Hold OK on Settings and choose Module cards to change your mind. How to make one: [`docs/modules.md`](docs/modules.md); the contract: [`docs/specs/card.md`](docs/specs/card.md).
+ - **Clock screensaver**: a drifting clock over the glow, so nothing burns in. Pick "Clock" in the TV's screensaver settings, or over ADB:
+ `tools/tv.py 'settings put secure screensaver_components com.gathin.tvhome/.ClockDream; settings put secure screensaver_enabled 1'`
+ - **Remote keys**: an optional accessibility service keeps the remote's Input button working on Google TV (`INPUT_KEY_SERVICE=1` at install) and can bring back other buttons only the stock launcher answered, such as the YouTube button (`app_keys` and `input_key_keycodes`, in `config.xml` or a theme; `HOME_KEY_SERVICE=1` reads `app_keys` too), another fixes sticks whose Home key sends ALL_APPS and opens Settings from the remote's gear button, even one Android does not map (`HOME_KEY_SERVICE=1`, scancodes or keycodes in `config.xml`). With `settings_key_panel` the gear opens a [small quick settings panel](docs/quick-settings-panel.jpg) instead, over Home or any app: TV settings, Display, Network, Apps and Launcher settings.
+ - **Navigation** is deliberate: Up and Down move one row, the top buttons never fall through to tiles and Down from them returns to the dock tile you came from, the last focused app is remembered, and installing or removing an app refreshes the tiles while Home is open.
+ - **Artwork**: app banners load at xhdpi or better, so low-density TV UIs do not downsample them before the focus zoom.
## Restoring your TV
diff --cc launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
index 48916d8ae,dfa9c917d..38595dd21
--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
@@@ -1661,9 -1636,9 +1662,9 @@@ public class MainActivity extends Activ
// showing a dash that never fills in.
StringBuilder line = new StringBuilder();
if (cpu >= 0) line.append(getString(R.string.stats_cpu, cpu));
- long mem = memAvailableMb();
- if (mem >= 0) appendStat(line, getString(R.string.stats_memory, mem));
+ long[] mem = memUsedOfTotalMb();
+ if (mem != null) appendStat(line, getString(R.string.stats_memory, mem[0], mem[1]));
- String free = formatGb(Environment.getDataDirectory().getFreeSpace());
+ String free = formatGb(getResources(), Environment.getDataDirectory().getFreeSpace());
if (!free.isEmpty()) appendStat(line, getString(R.string.stats_storage, free));
return line.toString();
}
@@@ -1949,23 -1916,12 +1950,23 @@@
private void updateGreeting() {
int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
int res;
- if (hour < 5) res = R.string.good_night;
- else if (hour < 12) res = R.string.good_morning;
- else if (hour < 17) res = R.string.good_afternoon;
- else if (hour < 22) res = R.string.good_evening;
- else res = R.string.good_night;
+ // Indonesian day parts run on different hours than English:
+ // Pagi 00-10, Siang 10-15, Sore 15-18, Malam 18-24.
+ // The app's own locale (per-app language on Android 13+), under either code Android uses for Indonesian.
+ String lang = getResources().getConfiguration().getLocales().get(0).getLanguage();
+ if ("in".equals(lang) || "id".equals(lang)) {
+ if (hour < 10) res = R.string.good_morning;
+ else if (hour < 15) res = R.string.good_afternoon;
+ else if (hour < 18) res = R.string.good_evening;
+ else res = R.string.good_night;
+ } else {
+ if (hour < 5) res = R.string.good_night;
+ else if (hour < 12) res = R.string.good_morning;
+ else if (hour < 17) res = R.string.good_afternoon;
+ else if (hour < 22) res = R.string.good_evening;
+ else res = R.string.good_night;
+ }
- String festiveGreeting = festive ? festival.greetingText() : "";
+ String festiveGreeting = festive ? festival.greetingText(getResources()) : "";
if (!festiveGreeting.isEmpty()) {
greeting.setText(festiveGreeting);
greeting.setTextColor(liftTowardsWhite(festival.accentColor(), 0.25f));
diff --cc launcher/app/src/main/res/values-ru/strings.xml
index c20763f1b,3fe06ced0..3d25c1b50
--- a/launcher/app/src/main/res/values-ru/strings.xml
+++ b/launcher/app/src/main/res/values-ru/strings.xml
@@@ -20,9 -22,23 +22,23 @@@
<string name="cant_open">Не удалось открыть %1$s</string>
<string name="date_format">EEEE, d MMMM</string>
<string name="date_format_home">EEEE\nd MMMM</string>
+ <string name="shamsi_month_farvardin">фарвардина</string>
+ <string name="shamsi_month_ordibehesht">ордибехешта</string>
+ <string name="shamsi_month_khordad">хордада</string>
+ <string name="shamsi_month_tir">тира</string>
+ <string name="shamsi_month_mordad">мордада</string>
+ <string name="shamsi_month_shahrivar">шахривара</string>
+ <string name="shamsi_month_mehr">мехра</string>
+ <string name="shamsi_month_aban">абана</string>
+ <string name="shamsi_month_azar">азара</string>
+ <string name="shamsi_month_dey">дея</string>
+ <string name="shamsi_month_bahman">бахмана</string>
+ <string name="shamsi_month_esfand">эсфанда</string>
<string name="stats_cpu">CPU %1$d%%</string>
- <string name="stats_memory">Память %1$d МБ свободно</string>
+ <string name="stats_memory">Память %1$d / %2$d МБ</string>
<string name="stats_storage">Накопитель %1$s свободно</string>
+ <string name="storage_gb_whole">%1$.0f ГБ</string>
+ <string name="storage_gb_decimal">%1$.1f ГБ</string>
<string name="dream_name">Часы</string>
<string name="vpn">VPN</string>
<string name="vpn_off">VPN отключён</string>
diff --cc launcher/app/src/main/res/values/strings.xml
index 8de0bcd40,dc42f51e6..04ee1dccf
--- a/launcher/app/src/main/res/values/strings.xml
+++ b/launcher/app/src/main/res/values/strings.xml
@@@ -21,9 -23,23 +23,23 @@@
<string name="date_format">EEEE d MMMM</string>
<!-- Date next to the clock on Home; a locale can split it over two lines with \n. -->
<string name="date_format_home" translatable="false">@string/date_format</string>
+ <string name="shamsi_month_farvardin">Farvardin</string>
+ <string name="shamsi_month_ordibehesht">Ordibehesht</string>
+ <string name="shamsi_month_khordad">Khordad</string>
+ <string name="shamsi_month_tir">Tir</string>
+ <string name="shamsi_month_mordad">Mordad</string>
+ <string name="shamsi_month_shahrivar">Shahrivar</string>
+ <string name="shamsi_month_mehr">Mehr</string>
+ <string name="shamsi_month_aban">Aban</string>
+ <string name="shamsi_month_azar">Azar</string>
+ <string name="shamsi_month_dey">Dey</string>
+ <string name="shamsi_month_bahman">Bahman</string>
+ <string name="shamsi_month_esfand">Esfand</string>
<string name="stats_cpu">CPU %1$d%%</string>
- <string name="stats_memory">Memory %1$d MB free</string>
+ <string name="stats_memory">Memory %1$d / %2$d MB</string>
<string name="stats_storage">Storage %1$s free</string>
+ <string name="storage_gb_whole">%1$.0f GB</string>
+ <string name="storage_gb_decimal">%1$.1f GB</string>
<string name="dream_name">Clock</string>
<string name="vpn">VPN</string>
<string name="vpn_off">VPN off</string>