[ android ]

The phone app can update itself without your computer

The Android app gets an Update the app button that downloads the newest version from arcflare.net, with no pairing, no sign-in and no computer. The catch: it has not run on a real phone, and the version you have now does not have the button.

ArcFlare··3 min read
#android#phone
The ArcFlare panda holding the handset of a rotary phone to its ear

What changed

Until now the app could only update from your computer: you published an APK with arcflare phone app publish, signed in, and the Devices screen offered it. A phone that was not paired, or could not reach its computer, had no way to get a fixed version.

Now the pairing screen and the "Can't reach your computer" screen have Update the app. It opens a screen with the panda on the phone:

1. Check for an update reads arcflare.net/downloads/android.json. 2. If that names a newer version, it shows the version and the size. Install update downloads the APK from the same folder. 3. Android asks you to confirm, then installs it over the app you have. Your pairing stays.

The app checks only when you tap. It sends no account or device details; like any download, the site sees your IP address.

What is good about it

  • The page cannot send the download elsewhere. Both addresses are fixed in the app's Java code, and redirects are refused. The file name, size, SHA-256 and version in the manifest are checked before anything is downloaded.
  • The same checks as an update from your computer. The download goes into the same installer session, which checks its size and SHA-256 before Android sees it. Android installs it only if it is signed with the same key as the app you have.
  • Tested where we could. We ran the app's tests today: 335 pass, none fail. Eight new ones drive the real screen code through a check, an install, "you have the newest version", arcflare.net not answering, a failed download, an install Android refused, installs not yet allowed, Back, and a double tap. Two more compile and run the Java that judges the manifest against good and broken ones. The project's CI built the debug and release APKs from it (android workflow runs 48 and 49, on ArcFlare-Code commits 8f0c96a and 65feb8a), and so did a debug build on our own machine.

What is not good yet

  • It has not run on a real phone. Neither the download from arcflare.net nor Android's install screen has been tried on a device.
  • Version 1.0.450271 does not have the button, and it was signed with an older key: uninstall it and install 1.0.458887 from the Android page once (you pair again). After that it can update itself.
  • The button is not on the signed-in screens. Signed in, you still get updates from your computer on the Devices screen. To use arcflare.net instead, go back to the pairing screen.
  • No automatic checks. The app never looks for an update on its own, so it never tells you one is waiting.

What we have not measured

How long a download takes on a phone network, and whether Android's install screen behaves the same on every phone maker's version of Android. We have no figures for either.

Verdict

Install the next version when it is on the Android page; from then on, updating no longer needs your computer. If you use the app only at home next to your computer, the update on the Devices screen does the same job.

How to get it

Download the newest APK from the Android page. Later versions: tap Update the app on the pairing screen. How it works is in the phone hub docs.

Keep reading