elastic-rock/KeepScreenOn

F-Droid reproducible build failed

linsui opened this issue ยท 22 comments

https://gitlab.com/fdroid/fdroiddata/-/issues/3267 We don't know how to fix it currently. It seems it's caused by toolchain update and the reproducible-apk-tools doesn't work with that yet. Could you please take a look? Thanks!

Thank you for opening this issue. Unfortunately, my knowledge in this is rather limited so I am affraid I won't be able to help much.

Trying all sorts of commands combos

but...

Where are these files from anyway? What are they?

fixing 'META-INF/services/P1.w'...
fixing 'META-INF/services/Q1.a'...

They are java spi minigied by r8.

Thank you very much. Once there is a known cause for the issue, let me know.

One thing I notice is that I get this gradle warning:

SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.

It turns out that the new AGP causes this problem. obfusk/reproducible-apk-tools#19

1.19.0 also failed.
com.elasticrock.keepscreenon_v1.19.0.apk.html.zip

Maybe it's caused by cache. Could you please clean the cache and rebuild the apk?

@elastic-rock fun thought, can you build 1.19 with false here https://github.com/elastic-rock/KeepScreenOn/blob/v1.19.0/app/build.gradle.kts#L29 and attach the APK for us to test?

@elastic-rock fun thought, can you build 1.19 with false here https://github.com/elastic-rock/KeepScreenOn/blob/v1.19.0/app/build.gradle.kts#L29 and attach the APK for us to test?

Here it is. Thanks! (note that I also had to set isShrinkResources to false)
keepscreenon_v1.19.0_minifyfalse.zip

@elastic-rock indeed, as with other recent apps, minify introduces non-determinism ๐Ÿ˜ž

the attached APK is repro, then again, it's 10 times bigger too

The res/Hz file is not reproducible. I guess it's generated by com.google.android.gms:oss-licenses-plugin.

Do you have any proposals as to what could be done with this whole situation? ๐Ÿ™‚

I disabled minify but this was only meant as a temporary solution since an APK size of 10 MB and install size of 131 MB is just not feasible in the long term. Well and now I hindered my hopes for a finaly successful build with the oss-licenses-plugin. ๐Ÿ™ƒ I suppose I have to figure out a diferent solution for the licenses and regarding minify , are there any fixes coming?

Thanks!

No idea about minify. For oss-licenses-plugin I thought we'd better just replace it with other license libs.

I switched the oss-licenses-plugin for com.mikepenz.aboutlibraries. If the issue with minify still persists, let me know and I can try and build the app outside Android Studio using gradle directly.

@elastic-rock do add mikepenz/AboutLibraries#784 (comment) else the files have compile dates in them

Done. Thanks! ๐Ÿ™‚

Ref: https://gitlab.com/fdroid/fdroiddata/-/jobs/8243447401#L571

hmm looks like you have the DependencyInfoBlock thing ๐Ÿ˜ž

Can you add this fix: https://gitlab.com/fdroid/fdroidserver/-/issues/1056#note_1218193185 ?

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

we'll need a new version, tag, release

Fix added in 1.20.3

๐ŸŽ‰
/close this

Amazing! Thanks for the help, you have my respect! ๐Ÿ˜ƒ