Skip to content
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

Screenshots and icon #5

Closed
IzzySoft opened this issue Dec 8, 2024 · 10 comments
Closed

Screenshots and icon #5

IzzySoft opened this issue Dec 8, 2024 · 10 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request fixed-next-release Fixed in next version
Milestone

Comments

@IzzySoft
Copy link

IzzySoft commented Dec 8, 2024

Are there any screenshots and an app icon available? I've just stumbled upon your repo here and thought about adding TrilliumDroid to the IzzyOnDroid repo if you don't mind 😉 Thanks in advance!

@FliegendeWurst
Copy link
Owner

The icon should be somewhere in the resources. I can take some screenshots later :)

Should I put all that in a fastlane directory? I have seen that in some repositories already.

@FliegendeWurst FliegendeWurst added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 8, 2024
@IzzySoft
Copy link
Author

IzzySoft commented Dec 8, 2024

The icon should be somewhere in the resources.

I've looked there already, only found XML. We unfortunately cannot use that but need a PNG.

Should I put all that in a fastlane directory?

That would be perfect indeed, thanks! If you need any guidance with that, be welcome to use the IzzyOnDroid Fastlane Documentation as reference 😉

@FliegendeWurst FliegendeWurst added the fixed-next-release Fixed in next version label Dec 9, 2024
@FliegendeWurst FliegendeWurst added this to the Alpha 1 milestone Dec 9, 2024
@FliegendeWurst
Copy link
Owner

I added the fastlane metadata here: https://github.com/FliegendeWurst/TriliumDroid/tree/master/fastlane/metadata/android/en-US

Let me know if it works for you. Then I can tag and upload the next release.

@IzzySoft
Copy link
Author

IzzySoft commented Dec 9, 2024

That looks excellent, please go ahead! I meanwhile work on the integration with IzzyOnDroid (will update you here soon today).

@IzzySoft
Copy link
Author

IzzySoft commented Dec 9, 2024

Quick injection before you make the release, from the scanner report here:

SigningBlock blobs:
-------------------
0x504b4453 (DEPENDENCY_INFO_BLOCK; GOOGLE)

This can easily be avoided with a minor addition to your build.gradle:

android {
    dependenciesInfo {
        // Disables dependency metadata when building APKs.
        includeInApk = false
        // Disables dependency metadata when building Android App Bundles.
        includeInBundle = false
    }
}

For some background: that BLOB is supposed to be just a binary representation of your app's dependency tree. But as it's encrypted with a public key belonging to Google, only Google can read it – and nobody else can even verify what it really contains. More details can be found e.g. here: Ramping up security: additional APK checks are in place with the IzzyOnDroid repo.

Thanks in advance!

@IzzySoft
Copy link
Author

IzzySoft commented Dec 9, 2024

One more thing:

buildConfigField "long", "TIMESTAMP", System.currentTimeMillis() + "L"

Please don't do that. This makes Reproducible Builds impossible, as it is non-deterministic (will have different results on each run), see e.g. Reproducible Builds, special client support and more at IzzyOnDroid. Can you remove that with the upcoming release, please?

@FliegendeWurst
Copy link
Owner

Thanks for the heads-up. I fixed the BLOB for this release, the timestamp will be fixed next release :)
(I think the timestamp configuration was in the default app template.)

@IzzySoft
Copy link
Author

IzzySoft commented Dec 9, 2024

Thanks! Still looking if the APK would otherwise be RB.

package: name='kellerar.triliumdroid' versionCode='1' versionName='0.59.4'

Hope you did not forget to increase versionCode; your fastlane seems to say you thought of it. And it would be great if the tag names could somehow reflect the versionName (or the versionCode), e.g. v0.59.4 or v1.

Meanwhile: Yes, your app would be RB if that timestamp is removed:

       name          : 'TIMESTAMP'
       type          : 'J'
       access        : 0x0019 (PUBLIC STATIC FINAL)
-      value         : 1733310347188
+      value         : 1733750718673
     #4              : (in Leu/fliegendewurst/triliumdroid/BuildConfig;)
       name          : 'VERSION_CODE'
       type          : 'I'
@@ -1500452,7 +1500452,7 @@
 |: const-string v2, "/data/"
 |: invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;.put:(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
 |: sget-object v1, Ljava/time/format/DateTimeFormatter;.ISO_INSTANT:Ljava/time/format/DateTimeFormatter;
-|: const-wide v2, #double 8.56369e-312 // #000001939158f7b4
+|: const-wide v2, #double 8.56587e-312 // #00000193ab9880d1
 |: invoke-static {v2, v3}, Ljava/time/Instant;.ofEpochMilli:(J)Ljava/time/Instant;
 |: move-result-object v2
 |: const-string v3, "UTC"

is all the diff I get.

PackageName changed with the new release I see. This is the final one, right?

So, first impressions from staging:

image

As for RB: expecting the next release to have the timestamp removed, I've patched the build recipe of current one and marked it for manual update on the next release (i.e. when the next release is availabe, I get a notice to manually update the YAML on the builder):

sed -r 's/"TIMESTAMP", System.currentTimeMillis\(\) \+ "L"/"TIMESTAMP", "1733750284644L"/' -i app/build.gradle

As expected, this made the build RB:

BUILD SUCCESSFUL in 2m 24s
46 actionable tasks: 46 executed
+ mv app/build/outputs/apk/release/app-release-unsigned.apk /outputs/unsigned.apk

--- END BUILD LOG ---
Keeping '9a48425095f0b613860de2f03a3cda5b4325dff8e411346eba4c95d881da65e5-eu.fliegendewurst.triliumdroid-alpha1-upstream.apk'...
Keeping '73bb743d6acb17d74f79a79dd62784237dfdc0d8b0696cb7e4c49f4f6466cbfd-eu.fliegendewurst.triliumdroid-alpha1-unsigned.apk'...
Reproducible: True
Tags built: 1.

Welcome aboard then! All shields are up now and green:

image

Be welcome to pick a badge and link to your app at IzzyOnDroid whereit should become avalable within less than 4h from now (with the next sync around 7 pm UTC). 🥳

PS: And feel free to close this issue once the timestamp was removed 😉

@FliegendeWurst
Copy link
Owner

FliegendeWurst commented Dec 9, 2024

Hope you did not forget to increase versionCode; your fastlane seems to say you thought of it. And it would be great if the tag names could somehow reflect the versionName (or the versionCode), e.g. v0.59.4 or v1.

I did increase the version code and also removed the dynamic timestamp :)

versionCode 2
versionName "0.90.12-alpha1"

As for the tag name, "alpha1" corresponds to versionName = "0.90.12-alpha1". The first part of the version is not that relevant to me, it's just the latest version of the desktop app tested for compatibility. I will make the tag name equal to v$versionName in the future.

PackageName changed with the new release I see. This is the final one, right?

Yes. I changed it because I got the domain in the meantime.

@IzzySoft
Copy link
Author

IzzySoft commented Dec 9, 2024

I did increase the version code and also removed the dynamic timestamp

🥳

As for the tag name, "alpha1" corresponds to versionName = "0.90.12-alpha1".

The updater of the IzzyOnDroid repo usually goes by the tag names. It currently would look for any tags greater than "0.90.12-alpha1" then, evaluating them by the standards of semantic versioning – which cannot work.

So I've now configured your app here so the updater ignores the tag name and just compares the date of the attached APK. That usually works, but there are sometimes quirks I could not yet figure how they happen, where at each run it thinks the very same file at Github is newer (by the value Github API reports), leading to the same APK being downloaded over and again, once each day. So I try keeping this kind of configuration to a minimum (that quirk only happens occasionally – but when it happens, the useless download-and-delete-the-file circle goes on until the next release was made).

Well, let's see how it goes. Maybe TrilliumDroid is not affected at all.

Yes. I changed it because I got the domain in the meantime.

Congrats! 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request fixed-next-release Fixed in next version
Projects
None yet
Development

No branches or pull requests

2 participants