-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better version detection #946
Comments
That's where the problem is - the string that comes from the system is the real version string, while the string that comes from GitHub is just the Git tag for that release (for other sources it is similar - a string extracted from somewhere that uniquely identifies a release but isn't necessarily the exact version string for that release). Most developers use version strings as Git tags which is great, but some don't. Some do, but add extra info to the Git tag. For example, you could have any of these cases among others:
So there is no guarantee that the OS-provided "real" version will be in any way comparable to the source-provided "version" which really just needs to uniquely identify a release in order to enable update notifications - it doesn't need to be a real version string. In most cases, where the strings seem to both conform to some standard format, like This is how the various "standard" versions are generated: https://github.com/ImranR98/Obtainium/blob/main/lib/providers/apps_provider.dart#L64 So in general if Obtainium can't resolve the differences between the two strings to a standard format, it disables version detection and hopes the user never has to update the app externally (in which case they would probably never notice the difference). That's important to clarify - version detection is only relevant in 2 situations:
In those cases, version detection will allow Obtainium to detect that the app's real OS version has changed and update it's internal records accordingly, without generating a false update notification. Note: For some sources, the source-provided string is guaranteed to be identical to the APK's real version string. For those sources, we skip all this version detection logic and just do a simple comparison. By default, all sources use the version detection logic, and "naive" version detection is enabled on a per-source basis (this means there may be some sources which don't use it right now, but could). I'm not sure why you mentioned #941 though, I don't think version detection makes any difference there. |
Feel free to re-open if needed. |
I acknowledge the GitHub version detection problems that's why I change the version name for some apps that I compile with GitHub Actions, an example would be my fork of Signal, also KeePassDX when he adds "beta" attached directly to the number. But this rule of removing some suffixes and prefixes can be skipped entirely and just compare the strings from the system and the sites as they are, because they keep the version name as it is in the app, not like apps from GitHub. Examples:
I hope you'll make some changes that will make Obtainium compare them direcly without any changes and keep your method only for specific sites like GitHub. |
I hope you'll see this since I can't reopen the issue, but I will open a new one if I did not get a response. |
Are you confident this is true for all APKPure, Aptoide, and Uptodown apps? It is for the ones I checked, just making sure. |
Also I think I get how this relates to #941 now. Wouldn't fix the issue but would make sure the update would be retried later. |
No, I just assumed that by checking many apps, I see no reason why wouldn't they use the real version name, since they are only hosting them. At least we can try and see :) |
"Naive" version detection for some Sources (#946)
https://github.com/ImranR98/Obtainium/releases/tag/v0.14.22-beta I'll update the comment above with this info so I can link to to explain version detection it in the future. |
Thank you so much, that was insanely fast. I don't want to open another issue because my next suggestion is related to this one. If you can just add a toggle for "use tag as version" in the version detection section and make Obtainium use the tag as provided by GitHub and GitLab without any changes and compare it directly to the version name provided by the system. Situations where this option will be useful: Addy.io (GitLab) And I can think of many scenarios where this option will be very useful and the old method will not detect the version very well. |
This comment was marked as resolved.
This comment was marked as resolved.
having trouble with this one myself. the link i used is https://gitlab.com/AuroraOSS/AuroraStore/-/releases |
@silverwings15 I don't think this is related the issue that we are trying to solve, you better open a dedicated one for it. |
oh i see. in that case i'll do so right away |
@silverwings15 You don't have to, already known issue that couldn't be solved in #697, but the solution I'm personally using is getting it from Uptodown or F-Droid. So please don't open a new issue or close it if you did already. |
whoops, saw this a little too late. let me go ahead and close it will adopt your solution as well, tyvm! |
@M00NJ As for InnerTube why don't you just get it from the official GitHub repo because that's exactly where izzyondroid is getting his apps from, why use Obtainium to get app from a repository that already takes its apps from GitHub? It is exactly the same app. And you can ask the maintainer if you want. |
@JohnBetaro InnerTune hast two flavors. The FOSS flavor is only available on Izzy and F-Droid. The one on GitHub has trackers and uses geolocation see: z-huang/InnerTune#935 |
Maybe the developer will explain the situation of Connect You because I don't know what happened exactly there. But for InnerTune, as I said you can get it from GitHub and there is a FOSS variant in the releases you can see it very clearly here, and I assure you if you can get it from GitHub then Izzyondroid is not needed at all, you can ask the maintainer himself and he will tell you that he gets his apps directly from GitHub, he doesn't build them at all. It is the same app and you can confirm it youserlf by verifying the signature of each one from GitHub and Izzy (I just did now it to confirm). |
Thanks for the InnerTune link. I missed that the FOSS flavor is available on github as well now. I'll switch to that in Obtainium. As for ConnectYou, I'm one of the devs that works on it. I didn't create this release, but checked and everything looks right. I will ask to handle the next release. Let's see if Obtainium detects it when it's out. If not we'll have to take a closer look at this. |
I add (if not clear from above) and example of productFlavors not detected: |
@unbranched Obtainium Is not meant to detect flavors, this will be very hard and complex task I guess, because every developer has its own way to rename and publish apps. Some of them publish all the flavors, some of them don't, some of them change the naming pattern, some of them preserve the original names, ... I don't know why do you want this feature, maybe you can give some examples to understand what problems can this one solve. |
@JohnBetaro it could maybe added a new optional parameter in the single App's page (in this example KeepassDX) to specify the versionName that needs to be checked in installed apps. I'm asking this feature because Obtainium currently doesn't find KeepassDX as installed. |
I have no problems on my end, I tried KeePassDX and everything is working perfectly, Obtainium is supposed to detect it as installed normally, I don't know what is happening on your side. |
Where did you install it from? Play Store, F-Droid or Github? |
From GitHub of course, I use Obtainium. |
@JohnBetaro this is so strange. Retried to add it and has the same problem, look at these two images. What you can't see on the second one is only the enabled "Attempt to filter APKs by CPU..." https://i.postimg.cc/4N3Gwv2t/app-page.png https://i.postimg.cc/s25C1T1F/app-settings.png I added it just by using the url https://github.com/Kunzisoft/KeePassDX/releases |
@unbranched Did you click |
@unbranched could you also see if the package ID of your existing install matches the one found by Obtainium? You might be able to see it in your OS settings under Apps (depends on the OS)? |
Just saw your earlier comment. If your F-Droid version of the app has the |
KeepassDX github version has the EDIT: problem solved, looks like the only solution was to delete KeepassDX and make it install by Obtainium. Now it correctly searches |
@The-Kyber not sure I understand, could you walk through an example? Remember the goal is to reliably detect changes made to an app outside of Obtainium. Let's say Obtainium thinks version 0.1 of an app is installed. If you install version 0.2 using the Play Store, Obtainium should detect that and switch it's own internal record to 0.2 as well. |
I don't see the problem you're trying to solve. If we're only concerned about update tracking within Obtainium, we don't need to deal with the OS version at all. We don't even need a version string of any kind - any release-specific ID will do, like timestamps, url hashes, etc. (we already use those kinds of identifiers in some cases). |
Hi, can I ask why Obtainium does not detect the version very well for apps that do not have a standard format?
This will cause some issues especially when it thinks that the app is updated but the same version was installed as mentioned in #941, can't it just extract the string from the system and compare it to the one indicated on the site?
I know I'm missing something so a brief explanation would be very helpful so I can understand the mechanism.
Thank you.
The text was updated successfully, but these errors were encountered: