diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index bd1a0b1..176538c 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -12,7 +12,7 @@ body:
label: Project version
description: The release you installed, or the commit you built. From 0.13.0-rc.10, the title of the Help page
in the Android Auto menu shows it.
- placeholder: 0.13.0-rc.16
+ placeholder: 0.13.0-rc.17
validations:
required: true
- type: input
diff --git a/CHANGELOG.en.md b/CHANGELOG.en.md
index 8fd74e5..0097f49 100644
--- a/CHANGELOG.en.md
+++ b/CHANGELOG.en.md
@@ -2,7 +2,7 @@
> [!IMPORTANT]
> This is a translation of the authoritative [French changelog](CHANGELOG.md), based on
-> [`v0.13.0-rc.16`](https://github.com/Jiraiya43/EntryNav2-Android-Auto/blob/v0.13.0-rc.16/CHANGELOG.md).
+> [`v0.13.0-rc.17`](https://github.com/Jiraiya43/EntryNav2-Android-Auto/blob/v0.13.0-rc.17/CHANGELOG.md).
> It may become outdated; consult the French changelog for the source of truth.
All notable changes to this project. Format inspired by [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
@@ -13,6 +13,15 @@ QEMU with the car's libraries).
## [Unreleased]
+## [0.13.0-rc.17] - 2026-12-03 · PC
+
+Release candidate: a *Use the phone's GPS* box in the Android Auto menu, for a car whose position drifts
+at a stop. Installs from a USB stick since 0.13.0-rc.10. Tested on PC and under QEMU.
+
+### Added
+
+- Android Auto menu: a *Use the phone's GPS* box, next to *Keep logs*. Ticked, the service no longer offers the car's position to the phone, which keeps its own GPS; the `gps-telephone` file already did this, but it had to be created over SSH. On an M2 F87 the car's position drifted at every stop in Android Auto, and the phone's GPS removed the drift ([#265](https://github.com/Jiraiya43/EntryNav2-Android-Auto/issues/265)). The service reads the choice when it starts: changed while Android Auto runs, it stops Android Auto and starts it again, as the USB cable box does. Tested on PC.
+
## [0.13.0-rc.16] - 2026-12-02 · PC
Release candidate: on software 202402191339, the iDrive hidden under Android Auto no longer reacts to
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 95aba7f..0055f1c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,15 @@ QEMU avec les bibliothèques de la voiture).
- USB : une erreur temporaire lors de la première requête au téléphone ne le fait plus abandonner immédiatement ;
le service réessaie jusqu'à trois fois. Testé sur PC.
+## [0.13.0-rc.17] - 2026-12-03 · PC
+
+Version candidate : case *Utiliser le GPS du téléphone* dans le menu Android Auto, pour une voiture dont
+la position dérive à l'arrêt. S'installe par clé USB depuis la 0.13.0-rc.10. Testée sur PC et sous QEMU.
+
+### Ajouté
+
+- Menu Android Auto : case *Utiliser le GPS du téléphone*, à côté de *Garder les journaux*. Cochée, le service ne propose plus la position de la voiture au téléphone, qui garde son propre GPS ; c'est ce que faisait déjà le fichier `gps-telephone`, qu'il fallait créer par SSH. Sur une M2 F87, la position de la voiture dérivait à chaque arrêt dans Android Auto, et le GPS du téléphone l'a supprimée ([#265](https://github.com/Jiraiya43/EntryNav2-Android-Auto/issues/265)). Le service lit ce choix à son démarrage : changé pendant qu'Android Auto tourne, il l'arrête puis le relance, comme la case du câble USB. Testé sur PC.
+
## [0.13.0-rc.16] - 2026-12-02 · PC
Version candidate : sur le logiciel 202402191339, l'iDrive caché sous Android Auto ne réagit plus aux
diff --git a/VERSION b/VERSION
index 29468fa..9dca87a 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.13.0-rc.16
+0.13.0-rc.17
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index 9c85b60..cd51921 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -100,7 +100,7 @@ Le protocole Android Auto côté voiture, sans rien de propre à BMW.
| `entry_aa_app.cpp` | L'appli elle-même : création, menu, bouton d'entrée, relevé d'état chaque seconde |
| `bmw_framework` | Déclarations de l'interface BMW des applis, accroches de la table virtuelle |
| `hold_machine` | Quand demander la page vide de l'iDrive sous Android Auto (classe pure, testée sur PC) |
-| `pending_restart.hpp` | Redémarrage d'Android Auto quand la case du câble USB change en marche (testé sur PC) |
+| `pending_restart.hpp` | Redémarrage d'Android Auto quand la case du câble USB ou du GPS du téléphone change en marche (testé sur PC) |
| `service_link` | Lancement du superviseur, commandes au service, arrêt, copie des journaux et mise à jour par clé USB |
| `update_flow.hpp` | Ligne *Mettre à jour par clé USB* : vérification au premier appui, installation au second, arrêt d'Android Auto avant (et relance, une fois arrêté, si rien n'a été installé), textes affichés (classe pure, testée sur PC) |
| `car_signals` | Marche arrière, appels, jour et nuit, mode de conduite, lus dans l'iDrive |
diff --git a/docs/INSTALLATION.en.md b/docs/INSTALLATION.en.md
index b5ed6ef..b23cb3f 100644
--- a/docs/INSTALLATION.en.md
+++ b/docs/INSTALLATION.en.md
@@ -38,7 +38,7 @@ the one in its archive (in 0.10.0, the supervisor is called `evo-trial`, not `aa
From the PC, in the archive's folder:
```sh
-scp entrynav2-android-auto-0.13.0-rc.16-armhf.tar root@169.254.1.0:/tmp/
+scp entrynav2-android-auto-0.13.0-rc.17-armhf.tar root@169.254.1.0:/tmp/
ssh root@169.254.1.0
```
@@ -50,7 +50,7 @@ flash memory yet.
Nothing is changed during this step.
```sh
-V=0.13.0-rc.16
+V=0.13.0-rc.17
cd /tmp && rm -rf entrynav2-android-auto-$V && tar -xf entrynav2-android-auto-$V-armhf.tar && cd entrynav2-android-auto-$V
md5sum -c MD5SUMS
head -n 1 /etc/version
@@ -139,6 +139,9 @@ itself. The menu's *Start automatically* box starts Android Auto with iDrive.
Android Auto can also use a USB cable: tick *USB cable instead of wireless* in the same menu, see [USB](USB.md) (in
French).
+If the position moves by itself in Android Auto while the car is stopped, tick *Use the phone's GPS*: the phone then
+keeps its own GPS instead of the car's.
+
## Updating
### From a USB stick, without a PC
diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md
index 922063d..0b2e1fd 100644
--- a/docs/INSTALLATION.md
+++ b/docs/INSTALLATION.md
@@ -33,7 +33,7 @@ ancienne, suivre celle de l'archive (dans la 0.10.0, le superviseur s'appelle `e
Depuis le PC, dans le dossier de l'archive :
```sh
-scp entrynav2-android-auto-0.13.0-rc.16-armhf.tar root@169.254.1.0:/tmp/
+scp entrynav2-android-auto-0.13.0-rc.17-armhf.tar root@169.254.1.0:/tmp/
ssh root@169.254.1.0
```
@@ -45,7 +45,7 @@ encore écrit sur la mémoire flash.
Rien n'est modifié pendant cette étape.
```sh
-V=0.13.0-rc.16
+V=0.13.0-rc.17
cd /tmp && rm -rf entrynav2-android-auto-$V && tar -xf entrynav2-android-auto-$V-armhf.tar && cd entrynav2-android-auto-$V
md5sum -c MD5SUMS
head -n 1 /etc/version
@@ -135,6 +135,9 @@ voiture tout seul. La case *Démarrage automatique* du menu lance Android Auto a
Android Auto peut aussi passer par un câble USB : cocher *Câble USB au lieu du sans-fil* dans le même menu, voir
[USB](USB.md).
+Si la position bouge toute seule dans Android Auto quand la voiture est arrêtée, cocher *Utiliser le GPS du téléphone* :
+le téléphone garde alors son propre GPS au lieu de celui de la voiture.
+
## Mettre à jour
### Par clé USB, sans PC
diff --git a/docs/MAINTENANCE.md b/docs/MAINTENANCE.md
index 833e352..45aeb35 100644
--- a/docs/MAINTENANCE.md
+++ b/docs/MAINTENANCE.md
@@ -37,7 +37,7 @@ Le service ne lit aucun réglage dans son environnement : ses valeurs sont fixes
| `kombi-off` | Présent : rien n'est envoyé au compteur ni à la tête haute (Ethernet des Série G ou MOST des Série F) |
| `kombi-most-layout` | Écrit par le service sur une Série F au compteur MOST : l'adresse du compteur et les champs que la navigation BMW y utilise, appris pendant un guidage ([compatibilité](COMPATIBILITE.md#flèches-sur-le-compteur-des-série-f)). Supprimé, il est appris de nouveau au prochain guidage BMW ; abîmé, il est ignoré puis réécrit |
| `kombi-single-maneuver` | Présent au démarrage : graphe limité à la prochaine manœuvre, pour un compteur qui refuse le trajet complet (voir ci-dessous). Sans ce fichier : graphe historique |
-| `gps-telephone` | Présent : le téléphone garde son propre GPS, celui de la voiture n'est pas transmis |
+| `gps-telephone` | Présent : le téléphone garde son propre GPS, celui de la voiture n'est pas transmis (case *Utiliser le GPS du téléphone* du menu) |
| `maintenance` | Présent : l'appli et le service gardent leurs journaux (case *Garder les journaux* du menu, voir [Journaux](#journaux)) |
| `update-report.txt` | Écrit par la mise à jour par clé USB ([installation](INSTALLATION.md#par-clé-usb-sans-pc)) : ce que sa dernière vérification ou installation a trouvé et fait. Copié avec les journaux |
| `update-pending` | Présent pendant les quelques secondes où une mise à jour par clé USB met ses fichiers en place, ou après une coupure à ce moment-là : la mise à jour suivante le lit pour terminer. Ne pas y toucher, sauf après une réinstallation par SSH, qui le rend inutile |
diff --git a/hmiapp/EntryAad.xml b/hmiapp/EntryAad.xml
index 05f9367..3eecdee 100644
--- a/hmiapp/EntryAad.xml
+++ b/hmiapp/EntryAad.xml
@@ -14,6 +14,7 @@
+
@@ -39,6 +40,10 @@
+
+
+
+
@@ -91,6 +96,7 @@
+
diff --git a/hmiapp/app_guards.cpp b/hmiapp/app_guards.cpp
index 3516a4f..0c251d1 100644
--- a/hmiapp/app_guards.cpp
+++ b/hmiapp/app_guards.cpp
@@ -181,10 +181,15 @@ bool autostartOn() {
return fileExists(contract::kAutostart);
}
+// One of the menu's checkboxes changed: what it was, and what its file says now.
+static void logToggle(const char* name, bool before, bool after) {
+ alog("menu: %s %s -> %s", name, before ? "on" : "off", after ? "on" : "off");
+}
+
void toggleAutostart() {
bool on = autostartOn();
setSwitch("autostart", contract::kAutostart, !on, "1\n");
- alog("menu: start automatically %s -> %s", on ? "on" : "off", autostartOn() ? "on" : "off");
+ logToggle("start automatically", on, autostartOn());
}
bool usbCableOn() {
@@ -194,7 +199,17 @@ bool usbCableOn() {
void toggleUsbCable() {
bool on = usbCableOn();
setSwitch("USB cable", contract::kUsb, !on, ""); // empty: every USB port, as `touch` leaves it
- alog("menu: USB cable %s -> %s", on ? "on" : "off", usbCableOn() ? "on" : "off");
+ logToggle("USB cable", on, usbCableOn());
+}
+
+bool phoneGpsOn() {
+ return fileExists(contract::kPhoneGps);
+}
+
+void togglePhoneGps() {
+ const bool on = phoneGpsOn();
+ setSwitch("phone's GPS", contract::kPhoneGps, !on, ""); // empty, as `touch` leaves it
+ logToggle("phone's GPS", on, phoneGpsOn());
}
bool keepLogsOn() {
diff --git a/hmiapp/app_guards.hpp b/hmiapp/app_guards.hpp
index c6799ff..0f069bd 100644
--- a/hmiapp/app_guards.hpp
+++ b/hmiapp/app_guards.hpp
@@ -9,6 +9,7 @@
// 2 minutes with it.
// autostart present: Android Auto starts by itself 30 s after iDrive
// usb present: Android Auto over a USB cable instead of wireless (docs/USB.md)
+// gps-telephone present: the phone keeps its own GPS, the car's position is not offered to it (platform/evo_gps.hpp)
// bootguard the automatic starts of the last 15 minutes not followed by 15 s of running (or of this start of the
// unit); at 3, the automatic start is skipped (Start in the menu still works). Removed by a manual
// start and once the HMI has been up 2 minutes.
@@ -35,6 +36,10 @@ void toggleAutostart(); // the menu's checkbox
// port name someone may have written in it by hand.
bool usbCableOn();
void toggleUsbCable();
+// "Use the phone's GPS": for a car whose position wanders when it stops (#265). The service reads it at its start,
+// like the link.
+bool phoneGpsOn();
+void togglePhoneGps();
// The "keep logs" box: the maintenance profile's file (log_profile.hpp). The app's log follows at once, the
// service's from its next start. Unticking keeps the logs already written, for a copy to a USB stick.
bool keepLogsOn();
diff --git a/hmiapp/entry_aa_app.cpp b/hmiapp/entry_aa_app.cpp
index aafedcf..637fde8 100644
--- a/hmiapp/entry_aa_app.cpp
+++ b/hmiapp/entry_aa_app.cpp
@@ -22,7 +22,7 @@
// service_link the supervisor /opt/aa/aa-supervisor, control messages, the service's state, the stop sequence
// car_signals gear, phone calls, day/night and driving mode from the car's CDS
// hold_machine iDrive kept on the blank state while Android Auto is on screen (pure, tested on the PC)
-// pending_restart the restart the USB checkbox asks for while Android Auto runs (pure, tested on the PC)
+// pending_restart the restart the USB cable or phone's GPS checkbox asks for while Android Auto runs (pure, tested)
// The menu also keeps the logs (maintenance profile), copies them onto a USB stick (platform/log_copy.hpp) and updates
// Android Auto from one (update_flow.hpp, platform/update_install.hpp).
// Uninstall: delete the plugin folder and reboot.
@@ -202,10 +202,11 @@ bool g_settingsShown = false;
void showSettings(bmw::PluginApp* app) {
app->updateModel(kAutostartModel, autostartOn());
app->updateModel(kUsbCableModel, usbCableOn());
+ app->updateModel(kPhoneGpsModel, phoneGpsOn());
app->updateModel(kKeepLogsModel, keepLogsOn());
g_settingsShown = true;
}
-PendingRestart g_restart; // the USB checkbox changed while Android Auto ran
+PendingRestart g_restart; // a checkbox the service reads at its start (USB cable, phone's GPS) changed while it ran
// "Update from USB stick" (hmiapp/update_flow.hpp): a press checks the stick; a second one installs.
UpdateFlow g_update;
@@ -331,9 +332,22 @@ bool onAutostartToggle(void*, const bmw::Parcel&) {
return true;
}
+// A setting the service reads at its start changed: one that runs is stopped, and started again by the status poll
+// once nothing of it is left.
+void restartForSetting(const char* what) {
+ if (stopInProgress()) {
+ if (g_restart.asked()) {
+ g_restart.ask(monoSeconds()); // changed again during its own restart
+ }
+ } else if (readServiceState().pid != 0) {
+ alog("menu: %s changed while Android Auto runs: stopping it, then starting it again", what);
+ beginStop();
+ g_restart.ask(monoSeconds());
+ }
+}
+
// Wireless or USB cable: chosen here and nowhere else, never guessed from what is plugged in (a passenger's
-// phone on charge must not take Android Auto over). The service reads the choice at its start: one that runs is
-// stopped, and started again by the status poll once nothing of it is left.
+// phone on charge must not take Android Auto over).
bool onUsbCableToggle(void*, const bmw::Parcel&) {
try {
if (!g_runApp) {
@@ -341,15 +355,7 @@ bool onUsbCableToggle(void*, const bmw::Parcel&) {
}
if (!guardedByOverlay("USB cable")) {
toggleUsbCable();
- if (stopInProgress()) {
- if (g_restart.asked()) {
- g_restart.ask(monoSeconds()); // changed again during its own restart
- }
- } else if (readServiceState().pid != 0) {
- alog("menu: link changed while Android Auto runs: stopping it, then starting it again");
- beginStop();
- g_restart.ask(monoSeconds());
- }
+ restartForSetting("link");
}
showSettings(g_runApp); // the setting as it is now, changed or not
} catch (abi::__forced_unwind&) {
@@ -360,6 +366,26 @@ bool onUsbCableToggle(void*, const bmw::Parcel&) {
return true;
}
+// The car's position or the phone's own GPS: Android Auto takes the car's when it is offered, and on some cars it
+// wanders at a stop (#265). The service decides what it offers the phone at its start.
+bool onPhoneGpsToggle(void*, const bmw::Parcel&) {
+ try {
+ if (!g_runApp) {
+ return true;
+ }
+ if (!guardedByOverlay("phone's GPS")) {
+ togglePhoneGps();
+ restartForSetting("GPS");
+ }
+ showSettings(g_runApp);
+ } catch (abi::__forced_unwind&) {
+ throw; // a thread being cancelled
+ } catch (...) {
+ alog("exception in onPhoneGpsToggle");
+ }
+ return true;
+}
+
// "Keep logs": the maintenance profile's file, so the logs need no SSH either.
bool onKeepLogsToggle(void*, const bmw::Parcel&) {
try {
@@ -533,12 +559,12 @@ void statusRun(void*) {
stopInProgress() || launchCoolingDown(now) || readServiceState().pid != 0 || supervisorRunning();
const PendingRestart::Turn restart = g_restart.turn(now, busy);
if (restart == PendingRestart::kStart) {
- alog("link changed: Android Auto has stopped, starting it again over %s",
+ alog("setting changed: Android Auto has stopped, starting it again over %s",
usbCableOn() ? "the USB cable" : "wireless");
forgetBootGuard();
launchService();
} else if (restart == PendingRestart::kGiveUp) {
- alog("link changed: Android Auto still there after %ld s, not started again (Start in the menu)",
+ alog("setting changed: Android Auto still there after %ld s, not started again (Start in the menu)",
kRestartGiveUpS);
}
}
@@ -621,6 +647,7 @@ bool appOnInit(bmw::PluginApp* self) {
addAction(self, kActEntry, &onEntry);
addAction(self, kActAutostart, &onAutostartToggle);
addAction(self, kActUsbCable, &onUsbCableToggle);
+ addAction(self, kActPhoneGps, &onPhoneGpsToggle);
addAction(self, kActKeepLogs, &onKeepLogsToggle);
addAction(self, kActCopyLogs, &onCopyLogs);
addAction(self, kActUpdate, &onUpdate);
@@ -633,8 +660,9 @@ bool appOnInit(bmw::PluginApp* self) {
writeIdriveCoding(); // the car's keys, brand and driver's side, for the service
readDriveModePopup(); // only logged here: read again at each driving mode change
g_touch.set(findTouchSwitch());
- alog("onInit: handlers registered, base onInit -> %d, start automatically %s, USB cable %s",
- static_cast(ok), autostartOn() ? "on" : "off", usbCableOn() ? "on" : "off");
+ alog("onInit: handlers registered, base onInit -> %d, start automatically %s, USB cable %s, phone's GPS %s",
+ static_cast(ok), autostartOn() ? "on" : "off", usbCableOn() ? "on" : "off",
+ phoneGpsOn() ? "on" : "off");
g_runApp = self;
makeRunnable(g_subRunnable, &subscribeRun);
postRunnable(self, g_subRunnable, 1500);
diff --git a/hmiapp/make_db.py b/hmiapp/make_db.py
index dc09e56..79d92d4 100644
--- a/hmiapp/make_db.py
+++ b/hmiapp/make_db.py
@@ -43,6 +43,7 @@
16: "Help",
17: "USB cable instead of wireless",
18: "Keep logs",
+ 19: "Use the phone's GPS",
40: "Copy logs to USB stick",
41: "Copying logs...",
42: "Logs copied to the USB stick",
@@ -87,6 +88,7 @@
16: "Aide",
17: "Câble USB au lieu du sans-fil",
18: "Garder les journaux",
+ 19: "Utiliser le GPS du téléphone",
40: "Copier les journaux sur clé USB",
41: "Copie des journaux...",
42: "Journaux copiés sur la clé USB",
@@ -129,6 +131,7 @@
16: "Hilfe",
17: "USB-Kabel statt kabellos",
18: "Protokolle speichern",
+ 19: "GPS des Telefons nutzen",
40: "Protokolle auf USB-Stick kopieren",
41: "Protokolle werden kopiert...",
42: "Protokolle auf USB-Stick kopiert",
@@ -170,6 +173,7 @@
15: "Avvio automatico",
16: "Aiuto",
17: "Cavo USB anziché wireless",
+ 19: "Usa il GPS del telefono",
20: "NAV, MAP: navigazione Android Auto",
21: "MEDIA: musica Android Auto",
22: "COM: telefono Android Auto",
@@ -187,6 +191,7 @@
16: "Pomoc",
17: "Kabel USB zamiast WiFi",
18: "Zachowaj logi",
+ 19: "Używaj GPS telefonu",
40: "Kopiuj logi na USB",
41: "Kopiowanie logów...",
42: "Logi skopiowane na USB",
diff --git a/hmiapp/pending_restart.hpp b/hmiapp/pending_restart.hpp
index 368ed97..d49fb62 100644
--- a/hmiapp/pending_restart.hpp
+++ b/hmiapp/pending_restart.hpp
@@ -1,8 +1,8 @@
// Copyright (c) 2026 Jiraiya43
// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
-// The restart a change of link asks for (the menu's USB checkbox while Android Auto runs): the service reads its link
-// once, at its start, so it is stopped, then started again once nothing of it is left. Pure: tested on the PC
-// (tests/test_pending_restart.cpp).
+// The restart a change of setting asks for (the menu's USB cable or phone's GPS checkbox while Android Auto runs): the
+// service reads them once, at its start, so it is stopped, then started again once nothing of it is left. Pure: tested
+// on the PC (tests/test_pending_restart.cpp).
#ifndef ENTRY_AAD_HMIAPP_PENDING_RESTART_HPP
#define ENTRY_AAD_HMIAPP_PENDING_RESTART_HPP
diff --git a/hmiapp/rhmi_ids.hpp b/hmiapp/rhmi_ids.hpp
index 63d433f..44d157b 100644
--- a/hmiapp/rhmi_ids.hpp
+++ b/hmiapp/rhmi_ids.hpp
@@ -35,6 +35,7 @@ const unsigned kActUsbCable = 26;
const unsigned kActKeepLogs = 27;
const unsigned kActCopyLogs = 28;
const unsigned kActUpdate = 29;
+const unsigned kActPhoneGps = 30;
// ---- the entry button ----------------------------------------------------------------------------------------------
const unsigned kEntryTextModel = 3;
@@ -52,6 +53,7 @@ const unsigned kTextRowConnecting = 13; // "Connecting to the phone..."
const unsigned kTextRowOpen = 14; // "Open Android Auto"
const unsigned kAutostartModel = 34;
const unsigned kUsbCableModel = 38;
+const unsigned kPhoneGpsModel = 44; // "Use the phone's GPS" checkbox
const unsigned kKeepLogsModel = 33; // "Keep logs" checkbox
const unsigned kCopyLogsModel = 42; // the copy button's text, one of these:
const unsigned kTextCopyLogs = 40; // "Copy logs to USB stick"