Coder Social home page Coder Social logo

Comments (9)

ImranR98 avatar ImranR98 commented on September 26, 2024 1

Really good idea 👍
If I can implement it, it should become the default instead of hashing the version string.

from obtainium.

TotallyAvailable avatar TotallyAvailable commented on September 26, 2024 1

How about starting in the opposite end.
If you have a company proudly carrying the Open Source tag, providing you several ways of obtaining their Apps, why not try reaching out and ask.

  • Are they willing to change those things to contain actual useful information.
  • Are they willing to "adopt" certain ways the Open Source community has come up with to get their updates in consistent and trustable ways.
  • Are they willing to give you tips on how to make your preferred way of updating work.

Even if you end up going to implement a feature to allow coverage for a few more use cases, just like with #946, you'll eventually run into issues of keeping all those things working.
Not saying don't do or try it, more resilience is always better of course.
More of a "don't try to brute force it" before kindly asking.

Also related to #1097, if they start seeing behavior they might not like, that would be 1 more available option removed from the "could work" bucket for making it work.

from obtainium.

hurried6158 avatar hurried6158 commented on September 26, 2024 1

@TotallyAvailable while I agree with a lot of what you're saying, in the case of Proton, there are numerous people who have done such inquiries already with no positive outcome. They only support protonapps.com and google play store as channels for downloading their apps. They do however post Proton VPN and Proton Mail (most often a few weeks behind) on Github releases.

from obtainium.

hurried6158 avatar hurried6158 commented on September 26, 2024 1

It seemingly works. Got the Proton Calendar update that was released today. Thanks again for implementing this!

from obtainium.

hurried6158 avatar hurried6158 commented on September 26, 2024

I'm glad you enjoy the idea. I think the ideal way of doing this is with a HTTP range request. Not all servers hosting files support this, but many (or most?) do (this is the case with protonapps). If they do, they should return HTTP response code 206 wheb the HTTP range request is processed. Since not all do, it might be worth having the version string support left as a fallback. And for scenarios with no support for HTTP range request, and no presense of a version string, it would be unsupported by Obtainium I suppose?

from obtainium.

hurried6158 avatar hurried6158 commented on September 26, 2024

(Sorry for accidentally pressing "Close with comment")

from obtainium.

hurried6158 avatar hurried6158 commented on September 26, 2024

So I did some experimenting by curling the Proton Calendar APK with a HTTP range requiest using curl:

> curl -r 0-29 -O https://protonmail.com/download/CalendarAndroid/ProtonCalendar-Android.apk
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    30  100    30    0     0    110      0 --:--:-- --:--:-- --:--:--   109
> xxd -e ProtonCalendar-Android.apk
00000000: 04034b50 00000000 08210000 00000221  PK........!.!...
00000010: 00000000 00000000 00000000     0066  ............f.

Looking at the (APK) ZIP file header, unfortunately the relevant fields in the header such as "File last modification date" and "CRC32 of uncompressed data" are all set to 0. This would probably mean that checksumming/hashing these 30 bytes won't really provide enough information that differs between two releases.

Perhaps one approach would be to checksum/hash something like the first 1KB of the APK. They should reasonably differ I suppose, but I can't say for sure.

EDIT:

Interestingly, this does not seem to be the case with Proton Pass, which has the CRC32 field in the ZIP header set accordingly:

> curl -r 0-29 -O https://proton.me/download/PassAndroid/ProtonPass-Android.apk
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    30  100    30    0     0    131      0 --:--:-- --:--:-- --:--:--   130
> xxd -e ProtonPass-Android.apk
00000000: 04034b50 00000000 08210008 18d90221  PK........!.!...
00000010: 00340e63 00380000 00390000     0000  c.4...8...9...
> xxd -e -s 14 -l 4 ProtonPass-Android.apk  # Retrieve CRC-32 of uncompressed data
0000000e: 0e6318d9

from obtainium.

ImranR98 avatar ImranR98 commented on September 26, 2024

Added: https://github.com/ImranR98/Obtainium/releases/tag/v0.14.35-beta

It's optional but is on by default (for any newly added HTML apps, not for existing ones) since it seemed to work well. Hopefully I don't regret that.

from obtainium.

hurried6158 avatar hurried6158 commented on September 26, 2024

Thanks! I will let you know if it works in the case of protonapps as soon as they release an update for any of the applicable apps.

from obtainium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.