ImranR98 / Obtainium

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

support GCAM link. #1182

Closed az-my closed 10 months ago

az-my commented 10 months ago

https://www.celsoazevedo.com/files/android/google-camera/dev-bsg/ is it possible to add this? and get latest version of apk

ImranR98 commented 10 months ago

It should be possible to add it using some of the HTML source's filtering options (see https://github.com/ImranR98/Obtainium/wiki#html), but it seems like there's a bug in generating a version string for this. Will look into it.

ImranR98 commented 10 months ago

Yeah for some reason this source provides APKs where the hash seems to change every time. So you need to turn off the "support fixed link" toggle. You can also use the version extraction option if you want (not required). The following settings should work (I made some assumptions about which variant you want, you can modify accordingly):

Screenshot_1703471558

However, one strange thing about this app is that the app ID seems to contain the version number. You cannot update an app with one ID using an APK that has another ID. So installing updates won't really work through Obtainium (you can still add the app as track-only). I see no reason for the developer to do it this way.

mas-mas-30tahun commented 10 months ago

really appreciated it. thanks really fast responses. again, thanks so much

ThatOneCalculator commented 10 months ago

Awesome, thank you so much! I'd love if this was mentioned in documentation somewhere, as I've been searching for literal years for a good way to keep gcam ports updated.

ThatOneCalculator commented 10 months ago

I'm having some trouble with the filters for Shamim's releases:

SGCAM_(.+)_S

Works, but matches 8.x and 9.x versions (both are published actively). In this case, 8.5 was published after 9.1

image

image

SGCAM_(9.+)_S

Shows an error in the app, but should be valid RegEx.

image

image

ImranR98 commented 10 months ago

@ThatOneCalculator there's no way to grab 9.X releases only. Here's some documentation on the HTML source: https://github.com/ImranR98/Obtainium/wiki#html

The problem is that the "intermediate links" on the main page (https://www.celsoazevedo.com/files/android/google-camera/dev-shamim/) contain version numbers only in the text, not the actual URL itself. For example:

<a href="https://www.celsoazevedo.com/files/android/google-camera/dev-shamim/f/dl63/">SGCAM_9.1.098.24_STABLE_V10</a>

Right now Obtainium only has an option to filter by URL, not link text. But that can be added.

ThatOneCalculator commented 10 months ago

That'd be amazing :pray:

They also have an RSS feed, would this be useful? https://www.celsoazevedo.com/files/android/google-camera/dev-feed.xml

ImranR98 commented 10 months ago

Doesn't seem to be valid XML. Besides it would have the same issue - no way to filter URLs by version since the URL itself doesn't contain the version (and there's no current way to filter by the version text associated with each URL).

ThatOneCalculator commented 10 months ago

Doesn't seem to be valid XML

Weird, it shows up in my RSS reader fine

ImranR98 commented 10 months ago

Hmm, yes it shows up fine in Chrome and Curl but not Firefox.

ImranR98 commented 10 months ago

Done: https://github.com/ImranR98/Obtainium/releases/tag/v0.15.0-beta

This release also lets you now have any number of intermediate links.

ThatOneCalculator commented 10 months ago

Nice! What would the filter look like for SGCAM?

az-my commented 10 months ago

Below is what worked for me.

Base URL https://www.celsoazevedo.com/files/android/google-camera/dev-bsg/

intermediate Link f/dl(\d+)

version extraction (\d+.\d+.\d+)

Filter by Link Text MGC.apk

As of this writing, this config will grab MGC_9.1.098_A11_V5_MGC.apk

az-my commented 10 months ago

https://www.celsoazevedo.com/files/android/google-camera/dev-bsg/

Latest 9.1 version is https://www.celsoazevedo.com/files/android/google-camera/dev-bsg/f/dl185/ Latest 8.9 version is https://www.celsoazevedo.com/files/android/google-camera/dev-bsg/f/dl184/

in above link there is 2 version with same structure of intermediate link. how can we target to only specific version only? for example we only want to add 8.9 version only.

i know the problem its not with obtainium, but the structure of the download-page itself.

update: adding \bMGC_8.9\b as intermediate link, filter link by text works for me.

thanks for great work @ImranR98

ThatOneCalculator commented 10 months ago

Interestingly, I was able to add MGC, but when I wanted to add AGC/BigKaka, it said that the app was already added