# Decisions

Why the store works the way it does. One entry per decision: date, what was decided, why, and what it implies for future changes. Entries are not rewritten: when a decision changes, mark the old one **Replaced** and add a new one.

Statuses: **Active**, **Replaced**, **Deferred** (deliberately not done; don't propose it again unless the stated trigger happens), **Pending** (waiting for an answer or someone else).

Start with "Open items" to resume work. Procedures are in [guides.md](guides.md). The build side (apps, Codemagic, signing) is documented in the `Android-Apps-Root` repository.

---

## Open items (updated 2026-11-05)

- **Store 1.3.6 (136) still to publish in `Numero2Mini.json`** — not urgent, few phones concerned (maintainer, 2026-11-04): non-Ordissimo phones with an older Store read that file and only move to `ExclusiveMobile.json` once they have 1.3.6, so until then they do not get Launcher 3.1.0. Publish it after the checks of the Numero2 phones.
- **Numero2 release** of Launcher 300, Contacts 124 and the key-rotated Dialer 90 (`baacd01`): online since 2026-10-21 (customer service note dated 2026-10-22). Check that Numero2 phones update without the Dialer crashing.
- **Numero2 phones with Launcher 3.0.0 and Dialer 1.4.5** (Crashlytics, 2026-10-22): at least 4 phones got the launcher but not the rotated Dialer, so the Dialer crashes at launch until the Store installs it. Store 1.2.4 (58) also crashed on 2 Numero2 starting `UpdatesService2` in the background: a possible cause, not checked. Launcher 3.0.1 and Dialer 91 rotated then replace 300 and 90 in `Numero2.json` (fix of the launcher's call history tab).
- **Automatic pull on the server is broken** — Pending, maintainer and server developer: the server container was recreated on 2026-10-21 and only `/var/www/html` is kept in a volume, so the `webssh` account lost its SSH key and `known_hosts` for GitHub. The `git pull` run by `ci-deploy-store.sh` then fails with "Host key verification failed" and the build does not notice. Fix: keep `/home/webssh/.ssh` in a volume, put there a read-only deploy key of this repository and the github.com host key, and check that `webssh` can pull in `/var/www/html/json`. Until fixed, pull by hand after each Codemagic build.
- **Unreferenced APK** `Dialer-App-release-v85_old_signature.apk` on the server: no JSON uses it.
- **AnyDesk 9.0.2 is refused on the Numero2 Mini** (2026-11-04, two phones, through `DebugOrdissimo.json`; a Numero2 runs 9.0.2 without this error): `INSTALL_FAILED_UPDATE_INCOMPATIBLE`, because its signature differs from the factory AnyDesk 7.0.0. The Store still offers the update there, and it fails with "Error during installation" each time, so testers must not read it as a Store defect. To decide before 9.0.2 reaches a production file: it cannot update the factory app on this model. Customers do not see it: `Numero2Mini.json` has 6.6.0, lower than 7.0.0, so nothing is offered. The Wishtel add-on 1.0.2, also only in `DebugOrdissimo.json`, is blocked by Play Protect on that model (`INSTALL_FAILED_VERIFICATION_FAILURE`).
- **AnyDesk 9.0.2 crashes at launch on the Pix-Star Touch** (2026-10-28, Android 11, after an update from 6.6.0 through `DebugOrdissimo.json`): native abort (SIGABRT) in `libadext.so`, thread `svc`, every launch. Keep 6.6.0 in production files. Still in `DebugOrdissimo.json` with QuickSupport 15.83.285, universal add-on 15.61.611 and AD1 1.7.4, to be tested on a Celia and the phones. Seen again on 2026-11-03 with 9.0.2 from the Play Store; reinstalling 6.6.0 from the Store fixed it. On a Celia, tested on 2026-11-03: AnyDesk 9.0.2 starts and the computer takes control with AD1 1.7.4 alone, once full access is granted when accepting the session, although AnyDesk's settings recommend the Wishtel add-on. The Wishtel11 add-on is not needed, and Play Protect blocks it unless forced. Production files don't change. The Play Store cannot block one app: automatic updates of AnyDesk are off on that tablet, and the maintainer accepts that "Update all" can still bring 9.0.2 back rather than disabling the Play Store.

---

## 1. Organisation

### 1.1 The JSON files are versioned in git, the server is a clone — Active (2023-12-07)

- **Decision**: the manifests live in this GitHub repository; `/var/www/html/json` on `android.ordissimo.com` is a clone of `main`, updated by `git pull`. APKs are not versioned: they are copied to `/var/www/html/store/apk/<flavor>/`.
- **Why**: history and review of what customers receive; APKs are too large for git.
- **Consequences**: a change is live only after the pull on the server. A JSON may reference an APK that is missing on the server: check URLs (`validate_store.py --check-urls`).

### 1.2 Codemagic writes only the `Debug*` files — Active (documented 2026-10-20)

- **Decision**: the release workflows of `Android-Apps-Root` publish each build to `DebugOrdissimo.json` (commits "Debug store: add <apk>"). Production files and `DebugOrange.json` are edited by hand.
- **Why**: devices of customers get a version only after it was tested through the debug store.
- **Consequences**: updating customers is a separate manual step (see [guides.md](guides.md#update-a-production-file-from-the-tested-versions)). Codemagic pushes to `main`: pull before editing.

### 1.3 `DebugOld.json` mirrors `DebugOrdissimo.json` — Active (2026-10-20)

- **Decision**: `DebugOld.json` is kept identical to `DebugOrdissimo.json`.
- **Why**: older Store-App versions installed on test devices read `DebugOld.json` in developer mode; with a stale file they did not see the new builds.
- **Consequences**: copy `DebugOrdissimo.json` over it when testing with such a device. Can be dropped once every test device runs a recent Store-App.

### 1.4 Schema validator — Active (2026-06-02)

- **Decision**: `validate_store.py` checks every manifest; run it before committing.
- **Why**: a malformed file (missing field, `//` in a URL, bad MD5) silently breaks updates on devices.

### 1.5 Exclusive Mobile is driven by the DPC — Replaced by 1.7 (2026-05-29, updated 2026-10-21)

- **Decision**: `ExclusiveMobile.json` is not known to Store-App; it is the profile given to the Ordissimo DPC through the `profile_url` of its provisioning QR code. Since 2026-10-21 it lists only the Ordissimo apps (Launcher, Contacts, Mail, Dialer, Gallery, Browser); the DPC itself, Google calculator and Google clock, added in June 2026 from `/dpc/`, were removed.
- **Consequences**: update it like the other production files. An APK rebuilt with the same `versionCode` changes its MD5: the Browser 475 entry still had the MD5 of the March 2026 build after the rebuild of 2026-09-02, so a fresh install failed the check until 2026-10-21; devices that already have 475 are not updated.

### 1.6 The Vrbank and Waz files are removed — Active (2026-11-02)

- **Decision**: `Vrbank.json`, `Waz.json`, `DebugVrbank.json` and `DebugWaz.json` are removed, with the `vrbank` and `waz` flavors of `Android-Apps-Root`.
- **Why**: no tablet with these flavors is in production (maintainer, 2026-11-02). `Vrbank.json` and `Waz.json` served Ordissimo APKs anyway.
- **Consequences**: to work with such a partner again, restore the files from the commit before this one and point the production file at the partner's APKs; the code side is in `Android-Apps-Root`, `docs/decisions.md`. Their APKs stay on the server in `store/apk/vrbank/` and `store/apk/waz/`, unreferenced.

### 1.7 Store-App reads `ExclusiveMobile.json` on non-Ordissimo phones — Active (2026-11-05)

- **Decision**: from Store 1.3.6 (136), a phone that is not an Ordissimo model uses `ExclusiveMobile.json`, and that file lists the Store itself, with Launcher 3.1.0 (310), Contacts 128, Gallery 122 and Browser 477. Replaces 1.5, which said the Store does not know this file. Other Ordissimo models without a file of their own, such as the Numero1, stay on `Numero2Mini.json`.
- **Why**: these phones fell back on `Numero2Mini.json`, the list of another product (maintainer, 2026-11-04). Without the Store in the list, the Store could not update itself there.
- **Tested** on 2026-11-05 after clearing the Store data: a Galaxy Note 8 picks `ExclusiveMobile.json`, a Numero2 `Numero2.json`, a Numero2 Mini `Numero2Mini.json`. Launcher 3.1.0 checked on the Note 8.
- **Consequences**: a phone with an older Store stays on `Numero2Mini.json` until it gets 1.3.6. Developer mode with a saved choice hides the automatic choice: clear the Store data to test it. The DPC and the club app read the same file, so they see the Store entry too: the club app's "install all" would install the Store and count it among the apps it removes at the end of a subscription. The club app is not in production yet: decide this before it is.

## 2. Signing

### 2.1 Numero2 Dialer signed with the legacy key only — Replaced by 2.2 (2025-11-27)

- **Decision**: `Numero2.json` served `Dialer-App-release-v86_old_signature.apk`, signed with the legacy key of the Numero2 system Dialer.
- **Why it was replaced**: since launcher 295, the phone launcher protects its preferences with a `signature` permission; a Dialer signed with the legacy key alone crashes at launch with launcher 295 or later.

### 2.2 Numero2 Dialer signed with a key rotation — Active (2026-10-21)

- **Decision**: on Numero2, the Dialer is `Dialer-App-release-v<N>_rotated.apk`: the release APK re-signed with an APK Signature Scheme v3 rotation from the legacy key to the current key, effective from API 28 (`--rotation-min-sdk-version 28`). Tested on a Numero2 on 2026-10-21 (v90: launch and call history work).
- **Why**: Numero2 ships a system Dialer signed with the legacy key, so Android refuses an update signed with the current key; the rotation lets it accept the update, and the installed app then holds the current key, which the launcher's permission requires. Without `--rotation-min-sdk-version 28`, the rotation only applies from API 33 and Numero2 (Android 10) keeps the legacy key.
- **Consequences**: every Dialer release for Numero2 is re-signed by hand ([guides.md](guides.md#numero2-dialer)). Once a device has it, an update signed with the legacy key alone is refused (the lineage was created without `--set-rollback true`): a rollback goes through a higher `versionCode`, rotated again. A factory reset returns to the system Dialer, which the rotated APK updates again. Other devices keep the normal APK.

### 2.3 A dedicated `DebugNumero2.json` — Deferred (2026-10-21)

- **Decision**: no debug file specific to Numero2 for now; the rotated Dialer is tested through `DebugOrange.json`, exceptionally.
- **Status of that entry**: added in `833248e`, removed on 2026-10-22 once the Numero2 release was checked; add it again the same way for the next rotated Dialer to test.
- **Why**: Store-App only knows a fixed list of files, so a new one needs a Store-App release.
- **Trigger to reconsider**: the next Store-App release, or a second Numero2-specific APK to test.

---

## 3. Remote support apps

### 3.1 Pix-Star Touch offers AnyDesk only — Active (2026-10-28)

- **Decision**: `PixstarTouch.json` offers only AnyDesk 6.6.0 and its AD1 add-on 1.0.18; TeamViewer QuickSupport, the TeamViewer Wishtel add-on and the AnyDesk Wishtel11 add-on are removed.
- **Why**: remote support of this tablet is done with AnyDesk, tested on 2026-10-28 (AnyDesk 6.6.0 + AD1 1.0.18 take control). TeamViewer was never supported on it: QuickSupport 15.83.285 shows "Ready to connect" but the computer cannot connect. The two Wishtel add-ons (target Android 9, no newer version) and QuickSupport 15.21.113 (target Android 10) are blocked by Play Protect ("Unsafe app blocked", built for an older version of Android) on a first install, and the Store kept offering them in a loop.
- **Consequences**: removing an app from a JSON does not uninstall it from devices. Any remote support app added to a production file must target a recent Android, or Play Protect blocks new installs. Celia and phones keep TeamViewer.
- **Update (2026-10-28)**: AnyDesk and AD1 have `autoInstall: true` in `PixstarTouch.json`. Both are installed at the factory on this tablet, so "Tout télécharger" only updates them; without the field the Store offered the update but never installed it. On Celia and phones they stay manual: `autoInstall` also installs apps that are missing, and their remote support is TeamViewer. Never set it on an app that Play Protect blocks on a first install (Wishtel add-ons): the Store would retry it at every update.
- **Update (2026-10-29)**: the AnyDesk Wishtel11 add-on is also removed from `Celia.json`, `Numero2.json` and `Numero2Mini.json`. It targets Android 9, so Play Protect blocks it on a first install (seen on Celia), and it works only with the Celia platform key; AD1 does the same job on these models.

### 3.2 Celia uses TeamViewer QuickSupport 15.83.285 with the universal add-on — Active (2026-10-28)

- **Decision**: `Celia.json` offers TeamViewer QuickSupport 15.83.285 with `autoInstall: true` and the universal add-on 15.61.611 for phones and tablets; the TeamViewer Wishtel add-on is removed.
- **Why**: tested on a factory-reset Celia on 2026-10-28. TeamViewer for Windows refuses QuickSupport 15.21.113 ("client version too old"). QuickSupport 15.83.285 installs as an update of the factory 15.8.115, and asks for the universal add-on, not the Wishtel one: from its pop-up it downloads 15.57.511 from TeamViewer, and our Store then updates it to 15.61.611. Neither is blocked by Play Protect, and once the accessibility service is enabled, Windows takes control. The Wishtel add-on (target Android 9) is blocked by Play Protect on a first install. QuickSupport is installed at the factory on Celia, so `autoInstall` only updates it.
- **Consequences**: the add-on stays manual: a customer who did not install it gets TeamViewer's pop-up during the call. `Numero2.json` and `Numero2Mini.json` still offer QuickSupport 15.21.113 with the universal add-on 15.8.5: to be tested on the phones through `DebugOrdissimo.json`, then updated the same way.

### 3.3 Numero2 and Numero2 Mini use TeamViewer QuickSupport 15.83.285 with the universal add-on — Active (2026-10-29)

- **Decision**: `Numero2.json` and `Numero2Mini.json` offer TeamViewer QuickSupport 15.83.285 and the universal add-on 15.61.611 (phones only), as on Celia (3.2). QuickSupport has `autoInstall: true` on Numero2 only.
- **Why**: tested on 2026-10-28 after a factory reset of both phones, through `DebugOrdissimo.json`. QuickSupport 15.21.113 is refused by TeamViewer for Windows, and blocked by Play Protect on a first install (Numero2 Mini). With 15.83.285 and the add-on, Play Protect answers `ALLOW` on both and Windows takes full control. QuickSupport is installed at the factory on the Numero2 (15.4.61), so `autoInstall` only updates it; it is not on the Numero2 Mini, where `autoInstall` would install it on every phone, and AnyDesk is there at the factory and works (see [guides.md](guides.md#factory-state-of-the-devices)).
- **Consequences**: on the Numero2 Mini (Android 13), the add-on's accessibility service is greyed out ("paramètre restreint"), because Android 13 restricts apps installed from an APK file, which is how Store-App installs (`ACTION_VIEW` in `InstallWorker.kt`). Workaround, tested: Settings → Apps → TeamViewer Universal Add-on → ⋮ → "Autoriser les paramètres restreints", then enable the service. This applies to every app installed by the Store on Android 13 and later that needs accessibility. Lasting fix: install through a `PackageInstaller` session, which Android does not restrict; it waits until Play Protect accepts a new Store version (see the open item in `Android-Apps-Root/docs/decisions.md`).
- **Update (2026-10-29)**: Store 1.2.9 installs through a `PackageInstaller` session. Tested on a factory-reset Numero2 Mini: the add-on's accessibility service enables at once, without the workaround, and TeamViewer for Windows takes full control. The workaround stays needed with Store 1.2.6 until a session-based Store is accepted by Play Protect and published.
