helloworld1 / AnyMemo

Advanced Spaced Repetition flashcard learning software for Android.
http://www.anymemo.org
GNU General Public License v2.0
151 stars 53 forks source link

F-Droid version not updated #465

Closed esmoak closed 5 years ago

esmoak commented 5 years ago

The F-Droid version is stuck at 10.9.993.

Is this an F-Droid issue or is there something you can do to push an update?

helloworld1 commented 5 years ago

No, AnyMemo is currently using google play client to authenticate the Google Drive since Google has deprecated the web page authentication. F-Droid doesn't seem to allow app referencing proprietary library so the version gets stuck to the old version :(

esmoak commented 5 years ago

Thanks for the response. I'm wondering if this might qualify for the IzzyOnDroid repo.

Going to tag @IzzySoft in hopes he gets notified and responds.

IzzySoft commented 5 years ago

I can respond, @esmoak – but what do you want me to do? Making a good guess: If you'd attach the APK to your tags/releases, I might be able to take it into my repo – if it's just GMS, that would be OK (but add 4 trackers and it is not), provided the size of the APK doesn't exceed 20M (see https://gitlab.com/IzzyOnDroid/repo for details; that's where inclusion requests can be filed; in your case, a simple answer here will do 😃).

esmoak commented 5 years ago

Thank you @IzzySoft

I just wasn't sure if this even met the inclusion criteria.

And thanks for showing me where inclusion requests should go.

IzzySoft commented 5 years ago

Just let me know here when you've attached an APK to the latest release, and I'll take a look.

helloworld1 commented 5 years ago

Thanks @IzzySoft The website for the latest release is here: https://anymemo.org/releases-view And link: https://anymemo.org/api/anymemo_releases/download/AnyMemo-free-release-10.11.2.apk

The App only used Google Play Services for authenticating Google Drive. The tracking is not used.

IzzySoft commented 5 years ago

Why not attaching the APK here? I cannot fetch from "random file names". Either the APK is attached to a tag here, or it has a fixed name and the link gives a LAST_MODIFIED field in the header (details are behind the link I gave to for requests on my repo). All else I'd have to fetch manually – and for that I lack the time to do it regularly. The auto-updater runs daily, so it would stay up-to-date in my repo if that can be used.

esmoak commented 5 years ago

Sorry, I didn't mean to create more work for anyone.

It would be great if @helloworld1 could attach the apk where needed, but beggars can't be choosers, and I don't want to create undesirable work for anyone--I just thought it would be great to have it accessible in an F-Droid repo if possible.

I can close this again or helloworld1 can if needed. Thanks everyone for looking into this.

IzzySoft commented 5 years ago

@esmoak No worries, I gladly help out if I can – and I guess the same can be said for @helloworld1. If the APKs can be attached to the releases (see Github's help on creating releases), I can easily pick it up.

helloworld1 commented 5 years ago

@IzzySoft I can also upload here. Do you need a versioned release like AnyMemo-free-release-10.11.2.apk or un-versioned AnyMemo-free-release-latest.apk here?

esmoak commented 5 years ago

Izzy can correct me if I'm wrong, but the link he gave seems to require a version. See part 4:

https://help.github.com/en/articles/creating-releases

helloworld1 commented 5 years ago

I created the APK release in github. Let me know if it work :)

IzzySoft commented 5 years ago

Thanks, that would work this way! Unfortunately, the APK seems to have an issue:

$ apksigner verify AnyMemo-free-release-10.11.2.apk
Exception in thread "main" com.android.apksig.apk.ApkFormatException: Malformed APK: not a ZIP archive
    at com.android.apksig.ApkVerifier.verify(ApkVerifier.java:142)
    at com.android.apksig.ApkVerifier.verify(ApkVerifier.java:105)
    at com.android.apksigner.ApkSignerTool.verify(ApkSignerTool.java:416)
    at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:91)
Caused by: com.android.apksig.zip.ZipFormatException: ZIP End of Central Directory record not found
    at com.android.apksig.apk.ApkUtils.findZipSections(ApkUtils.java:47)
    at com.android.apksig.ApkVerifier.verify(ApkVerifier.java:140)
    ... 3 more

No idea what the reason is, as I can unzip it fine. But if apksigner complains, fdroidserver won't accept it. :cry:

helloworld1 commented 5 years ago

Dunno what is the problem. I will have a newer release 10.11.3 soon with mostly internal changes. I will release to github first so stay tuned.

IzzySoft commented 5 years ago

Yeah, I'm confused as well. Never seen that before. Either there's no output (all OK) – or it shows some warnings (mostly files in META-INF/ which are not covered by the JAR signature) or even errors (e.g. certs missing) – but I never saw it crashing.

Fun fact: I've just unzipped and rezipped it. Then apksignercomplains:

$ apksigner verify AnyMemo.apk
DOES NOT VERIFY
ERROR: JAR signer LIBERTY-.RSA: Failed to verify JAR signature META-INF/LIBERTY-.RSA against META-INF/LIBERTY-.SF: java.security.SignatureException: Algorithm constraints check failed on disabled algorithm: MD5.

Which means then it can read it. Looks like some ZIP format specifics. I'll wait for 10.11.3 then and hope the problem is gone there.

Thanks, and sorry for annoying you…

helloworld1 commented 5 years ago

No worry. 10.11.3 is now released on github. I checked apksigner verify and it does not return error. Only a bunch warnings. Let me know if it works. Thanks!

IzzySoft commented 5 years ago

Thanks – yes, that one works. Just complains for the deprecated MD5 algo – but finally, fdroidserver doesn't reject it (I've permitted MD5 in my repo as several devs still weren't able to "upgrade their signing keys".

So in the end, you can count this as a work-around for #436 (my repo has less strict inclusion criteria – call it "nonfree" if you think Debian :smile:).

helloworld1 commented 5 years ago

Thanks a lot @IzzySoft, It is unfortunate decoupling the Google Play Services is very challenging and Google has been increasing making tight integration of play services and Android development. I will close #436 and direct people to your IzzyOnDroid repo.
Also thanks @esmoak for suggesting IzzyOnDroid repo!

IzzySoft commented 5 years ago

@helloworld1 maybe you consider dropping GDrive and replacing it with something FOSS, like Nextcloud. Don't let you be forced by proprietary powers. After all, it's not an essential feature – so to get updated in the main repo, you could even make a build variant that comes without that Cloud stuff. Until then, I gladly provide your app via my repo :smile:

PS: people who had it installed from F-Droid before need to uninstall and reinstall if they want to switch to the newer versions in my repo (different signatures). You might wish to point that out.

esmoak commented 5 years ago

You guys are the best.

@IzzySoft @helloworld1

I use this to teach my youngest daughter to read before Kindergarten since it is easier than AnkiDroid, in my opinion.

To have it outside of Play store is icing on the cake. We thank you both, sincerely.