Auto-update Android apps with F-Droid & Yalp Store
I consider auto updates of userland software as an important and also convenient security feature, easpecially on mobile platforms. As far as I know this is already the default behaviour for Android systems with Google Play Store preinstalled.
Some time ago I switched from Play Store to the open-source F-Droid market which offers many good free and open-source apps as an alternative. Since I couldn’t yet find a good replacement for Scout, Soundhound etc. I also used the open-source app Yalp store to fetch these apps and updates from Google without requiring Gapps or a Google account.
Usally third-party apps or installation files (apks) can be installed without the need of “rooting” (acquiring super user permissions) the phone. But you have to explicitly grant permissions for every single installation or update. If you want to automate these steps, you have to install Yalp store and F-Droid as system apps.
F-Droid Privileged Extension
Instead of installing the usual F-Droid apk, you can also flash F-Droid as a so called “privileged extension“. It comes as a zip file which you can obtain here. Put this zip file on your mobile phone storage and reboot into your phones recovery mode. In my setup I was using the recovery app TWRP which has to be installed manually on a rooted phone. Unfortunately rooting a phone and installing a recovery app is a difficult step which I’ll cannot cover here. If you already have TWRP or something similar installed, I recommend you to do a full system backup before flashing anything. In recovery, select and install the F-Droid privileged extension zip file.
After rebooting back into your Android, you have to change following settings inside F-Droid to enable auto-updates:
- Enable expert mode
- Enable privileged extension
- Enable auto-update, e.g. in an interval of every day
- Automatically install apps in background
Yalp store auto-update
Yalp store is using a different technique to obtain system permissions. It relies on a backend which, once accepted by the user, will grant super user (short “su”) rights to Yalp store. Instead on relying on closed-source third party apps, I would recommend the offical su addon provided by LineageOS since version 15.1. This “addonsu”-zip file has also to be flashed within your recovery mode. Once installed you have to enable root permissions for apps in the Android developer menu (see here how you can enable and access it).
In the Yalp store settings, you have to enable auto-update:
- Installation method: Use root permissions
- Enable: Install apps as soon as download is finished
- Search for updates: E.g. daily
- Enable: Auto download available updates
- Enable: Automatically install new updates (root)
I also activated the automatic whitelist feature so that auto-updates are only installed for apps managed by Yalp store.
After that everything should work flawlessly and you should be notified when an app has been updated in the background.
Changelog
- 26.07.18: Changed Yalp Store root method to offical su-addon of LineageOS 15.1
- 20.05.18: Changed Yalp Store SuperSU dependency to open source alternative Superuser app.
cool hack, thx for the instructions!