KeepScreenOn icon indicating copy to clipboard operation
KeepScreenOn copied to clipboard

F-Droid reproducible build failed

Open linsui opened this issue 1 year ago • 15 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!

linsui avatar May 26 '24 08:05 linsui

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.

elastic-rock avatar May 26 '24 11:05 elastic-rock

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'...

licaon-kter avatar May 28 '24 10:05 licaon-kter

They are java spi minigied by r8.

linsui avatar May 28 '24 10:05 linsui

I find an ugly fix. https://gitlab.com/fdroid/fdroiddata/-/merge_requests/15103

linsui avatar May 28 '24 14:05 linsui

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

elastic-rock avatar May 29 '24 15:05 elastic-rock

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.

elastic-rock avatar May 29 '24 15:05 elastic-rock

It turns out that the new AGP causes this problem. https://github.com/obfusk/reproducible-apk-tools/issues/19

linsui avatar May 30 '24 17:05 linsui

please reopen

ref: https://monitor.f-droid.org/builds/log/com.elasticrock.keepscreenon/29#site-footer

diff log: elas29.log

/LE: fyi https://gitlab.com/fdroid/fdroiddata/-/commit/1e20c4b2419d285e7ffc44fa22d0576e8ff92b7c

licaon-kter avatar Aug 08 '24 12:08 licaon-kter

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?

linsui avatar Aug 31 '24 14:08 linsui

@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?

licaon-kter avatar Sep 02 '24 08:09 licaon-kter

@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 avatar Sep 02 '24 08:09 elastic-rock

@elastic-rock indeed, as with other recent apps, minify introduces non-determinism :disappointed:

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

licaon-kter avatar Sep 02 '24 15:09 licaon-kter

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

linsui avatar Sep 08 '24 11:09 linsui

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!

elastic-rock avatar Sep 09 '24 16:09 elastic-rock

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

linsui avatar Sep 29 '24 15:09 linsui

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 avatar Oct 31 '24 11:10 elastic-rock

@elastic-rock do add https://github.com/mikepenz/AboutLibraries/issues/784#issuecomment-1205501876 else the files have compile dates in them

licaon-kter avatar Oct 31 '24 11:10 licaon-kter

Done. Thanks! :slightly_smiling_face:

elastic-rock avatar Oct 31 '24 19:10 elastic-rock

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

hmm looks like you have the DependencyInfoBlock thing :disappointed:

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

licaon-kter avatar Oct 31 '24 21:10 licaon-kter

Fix added in 1.20.3

elastic-rock avatar Nov 01 '24 10:11 elastic-rock

:tada: /close this

licaon-kter avatar Nov 01 '24 10:11 licaon-kter

Amazing! Thanks for the help, you have my respect! 😃

elastic-rock avatar Nov 01 '24 11:11 elastic-rock