Auto Upgrade
Auto Upgrade is a feature of the Serval Mesh (app for Android) which allows upgrades to be distributed via Rhizome.
The Auto Upgrade technical document gives more detail. In brief:
- the Batphone build script injects every built release APK file into Rhizome under a single, well-known Bundle ID (the “release bundle”)
- successive releases of Serval Mesh (app for Android) use the same Bundle ID with increased bundle version numbers, which causes Rhizome to prefer them over prior bundles
- whenever Batphone receives a newer version of the release bundle, it passes the payload (APK file) to the Android app manager, which prompts the user to upgrade
- if the user agrees, then Serval Mesh (app for Android) is upgraded on that device
- Rhizome's cryptographic content integrity and authentication mechanisms prevent any forgery of APK files which could lead to installation of a trojan app
In order to reach the vast majority of devices that are outside Wi-Fi range of The Serval Project (and without Serval Infrastructure access to The Serval Project), a couple of tricks are used to seed Rhizome networks with new APK files:
- whenever Serval Mesh (app for Android) is first started after installation or upgrade, it injects its own APK file into its own Rhizome store; this APK file will then spread to nearby devices via the Mesh network
- Rhizome will prioritise release bundles, so that upgrades will persist in Rhizome networks, making sure that all devices in an area will encounter it sooner or later