Skip Navigation
waydroid

Waydroid - Android apps on Linux!

  • A way to manage autoupdating apps?

    I am currently experimenting with automating app updates.

    Through Android

    This is not an option as android sucks. Even F-Droid Basic cant do full autoupdates for many apps, as they are not on the supported new SDKs

    Externally from F-Droid

    This is way less secure than using the F-Droid store itself poorly, as there is no verification.

    But in theory you could take the release APKs from the F-Droid website, download and install them. A link looks like this:

    https://f-droid.org/repo/com.simplemobiletools.calendar.pro_240.apk

    The problem is the naming, which is a pretty random xxx digit and sometimes the date, so you would have to check 999 possible links only to find out that there is no update? Currently I know no better option, maybe using the F-Droid API like all the Android stores do would work well.

    From Github releases

    This is easier, because https://github.com/creator/app/releases/latest is an alias to the latest tag. Somehow it is possible to get the tag URL there, and an example Download link looks like this

    https://github.com/tw-hx/Signal-Android/releases/download/v6.35.3.0-FOSS/Signal-Android-play-foss-prod-universal-release-signed-6.35.3.apk

    This is possible, a kind AI gave me this code:

    ``` #!/bin/bash

    GitHub repository and release URL

    repo_url="" release_url="$repo_url/releases/latest"

    Extract the latest release tag

    latest_tag=$(curl -sI -o /dev/null -w '%{url_effective}' "$release_url" | awk -F"/" '{print $NF}')

    Construct the download link

    download_url="$repo_url/releases/download/$latest_tag/APPNAME-$latest_tag.apk"

    Define the folder name

    folder_name="APP-Updates-$(date '+%d-%m-%Y')"

    Create the folder

    mkdir -p "$folder_name"

    Download the latest APK

    wget -nv -P "$folder_name" "$download_url"

    Display success message

    echo "Downloaded App APK: APPNAME-$latest_tag.apk"

    Install the app using waydroid

    waydroid app install "$folder_name/APPNAME-$latest_tag.apk"

    Remove the installed APK

    rm -f "$folder_name/APPNAME-$latest_tag.apk"

    Clean up: Remove the folder

    rm -rf "$folder_name"

    Display completion message

    echo "Updates completed." ```

    This is not checked yet.

    What would your solution look like? I guess using Github and FDroid APIs would be best

    0
0 Active user