ImranR98 / Obtainium

Get Android app updates straight from the source.
https://obtainium.imranr.dev
GNU General Public License v3.0
6.82k stars 159 forks source link

APKPure apps are not filtered by architecture #598

Closed maah closed 1 week ago

maah commented 1 year ago

Apps from APKPure are not filtered by CPU architecture, and are wrongly detected as an update.
The APKPure download page specifies the supported architecture(s) of the (X)APK so this should be trivial to implement.

Example with Discord:

Obtainium will install v180.15, making Discord crash on launch (because of the architecture mismatch).

ImranR98 commented 1 year ago

Obtainium assumes that for any given version of an App, all architectures will be available. The latest version (along with all available APK URLs for that version) is grabbed, then that list is filtered for a specific architecture. That code applies to the "general" source on top of which all source-specific code is implemented. So reversing that for ApkPure is not so simple. Could probably be done through a "fallback to older releases" toggle like GitHub has, but not a high priority. Also not sure how/where the app would tell the user that APK filters work differently for APKPure compared to other sources.

maah commented 1 year ago

Obtainium assumes that [...] all architectures will be available.

Which is never guaranteed for APKPure releases.

I'm not sure how Obtainium filters the version list, but since the supported architectures are show on the download page, unsupported ones could simply not be added to the list (as a workaround) in getLatestAPKDetails(), no? Either way, a "fallback to older releases" is likely necessary for APKPure, as many (but not all) apps unfortunately have this issue.

A "preferred architecture" setting could work, and be used by other sources for automatic detection too (e.g filenames like app-arm64-v8a-release.apk)

ImranR98 commented 1 week ago

https://github.com/ImranR98/Obtainium/releases/tag/v1.1.16