-
Notifications
You must be signed in to change notification settings - Fork 50
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
Reproducible Builds #180
Comments
@oxyroid you're still around? Any word on the above? |
I have less time to pay my attention in the repos recently. 🥲 |
Eh, that happens. And I didn't exactly expect everyone to jump when I open an issue. I was just hoping for some reaction – so thanks for giving it! Now I know you're aware of the problem, but currently have no time to dig in (totally fair). Can you give me any ETA? Is it fine to give you a heads-up here from time to time (maybe once a month or so)? |
sry I can't. |
I'm stuck in a busy job in a busy department at a busy company. |
OK, no worries. Hope its OK for you if I send a friendly heads-up from time to time (not more often than once a month)? |
I assume the busy-bees are still keeping you busy? |
Ah, a new release! But oh, it got more complicated: -rw-r--r-- 0.0 unx 56 b- 52 defN 1981-01-01 01:01:02 05cd8676 META-INF/com/android/build/gradle/app-metadata.properties
- -rw-r--r-- 0.0 unx 9423 b- 9423 stor 1981-01-01 01:01:02 d6d4af58 assets/dexopt/baseline.prof
+ -rw-r--r-- 0.0 unx 9423 b- 9423 stor 1981-01-01 01:01:02 683d7ae5 assets/dexopt/baseline.prof
-rw-r--r-- 0.0 unx 1036 b- 1036 stor 1981-01-01 01:01:02 a8d037c8 assets/dexopt/baseline.profm
- -rw-r--r-- 0.0 unx 9783488 b- 4431016 defN 1981-01-01 01:01:02 486ab654 classes.dex
+ -rw-r--r-- 0.0 unx 9783488 b- 4431017 defN 1981-01-01 01:01:02 691b20f3 classes.dex
-rw-r--r-- 0.0 unx 4702512 b- 1885053 defN 1981-01-01 01:01:02 59eda247 classes2.dex
-rw-r--r-- 0.0 unx 10096 b- 10096 stor 1981-01-01 01:01:02 9734baa0 lib/arm64-v8a/libandroidx.graphics.path.so
-rw-r--r-- 0.0 unx 4025264 b- 4025264 stor 1981-01-01 01:01:02 65a4761f lib/arm64-v8a/libavcodec.so
@@ -319,7 +319,6 @@
-rw---- 0.0 fat 658 b- 658 stor 1981-01-01 01:01:02 50ee6e75 res/5v1.png
-rw---- 0.0 fat 228 b- 228 stor 1981-01-01 01:01:02 8210f539 res/5w.png
-rw---- 0.0 fat 553 b- 553 stor 1981-01-01 01:01:02 73ee1c5d res/5y.png
- -rw---- 0.0 fat 158240 b- 70753 defN 1981-01-01 01:01:02 96e21ded res/5z.ttf
-rw---- 0.0 fat 1128 b- 395 defN 1981-01-01 01:01:02 0553f94a res/5z.xml
-rw---- 0.0 fat 1633 b- 1633 stor 1981-01-01 01:01:02 7ed7d2b3 res/6-.png
-rw---- 0.0 fat 796 b- 358 defN 1981-01-01 01:01:02 bc60ca5c res/61.xml
@@ -1278,7 +1277,7 @@
-rw---- 0.0 fat 648 b- 648 stor 1981-01-01 01:01:02 e3a292db res/W51.png
-rw---- 0.0 fat 700 b- 276 defN 1981-01-01 01:01:02 cbd12084 res/W8.xml
-rw---- 0.0 fat 792 b- 792 stor 1981-01-01 01:01:02 cd6c6bda res/W9.png
- -rw---- 0.0 fat 1736 b- 368 defN 1981-01-01 01:01:02 01846845 res/W9.xml
+ -rw---- 0.0 fat 1736 b- 368 defN 1981-01-01 01:01:02 6840d983 res/W9.xml
-rw---- 0.0 fat 396 b- 396 stor 1981-01-01 01:01:02 f3a2968a res/WA.png
-rw---- 0.0 fat 388 b- 388 stor 1981-01-01 01:01:02 c753e16d res/WA1.png
-rw---- 0.0 fat 67 b- 67 stor 1981-01-01 01:01:02 88b2a3b0 res/WB.png
@@ -2686,5 +2685,5 @@
-rw---- 0.0 fat 249 b- 249 stor 1981-01-01 01:01:02 72a34e93 res/zv.png
-rw---- 0.0 fat 435 b- 435 stor 1981-01-01 01:01:02 cc705e7f res/zz.png
-rw---- 0.0 fat 67 b- 67 stor 1981-01-01 01:01:02 88b2a3b0 res/zz1.png
- -rw---- 0.0 fat 2086148 b- 2086148 stor 1981-01-01 01:01:02 8b014e1f resources.arsc
+ -rw---- 0.0 fat 2086088 b- 2086088 stor 1981-01-01 01:01:02 d383df68 resources.arsc As there's no build:
- sed -r '/signingConfigs.getByName/d' -i androidApp/build.gradle.kts
- sed -r 's/isUniversalApk = true/isUniversalApk = false/ ; s/include\("x86", "x86_64", "arm64-v8a", "armeabi-v7a"\)/include("arm64-v8a")/' -i androidApp/build.gradle.kts
- chmod +x gradlew
- ./gradlew assembleStableChannelRichCodecRelease
- mv androidApp/build/outputs/apk/stableChannelRichCodec/release/*_arm64-v8a.apk /outputs/unsigned.apk Line 1 disables signing, line 2 makes sure only the needed APK is produced (to not unnecessarily waste resources). The diff of |: invoke-virtual {v10, v11}, Landroid/widget/ImageView;.setImageDrawable:(Landroid/graphics/drawable/Drawable;)V
|: invoke-virtual {v10, v5}, Landroid/view/View;.setOnClickListener:(Landroid/view/View$OnClickListener;)V
-|: const v11, #float 1.82105e+38 // #7f090010
+|: const v11, #float 1.82105e+38 // #7f09000f
|: invoke-static {v1, v11}, Lx3/o;.a:(Landroid/content/Context;I)Landroid/graphics/Typeface; But I've no clue where that TTF in your APK came from if it's not in mine… In case it matters: I built with OpenJDK-17 on Debian bookworm. Any hints? |
Maybe I should consider to generate these config files in CI/CD. I generate them on my local computer is a bit unreliable. :( |
Glad to see you already have an idea 🤗 We can give it another try anytime, all I'd need is an APK built from a clean tree, so I can build from the same commit to compare. |
I've checked your app if its build is reproducible (see: Reproducible bulds, special client support and more in our repo), but while I was able to successfully generate the APK using
./gradlew assembleRelease
, there was a load of differences between the two APKs. Start of the APK diff:Seems like all the differences were caused by assets (here: PNG), while not all of the PNGs had differences. Which might indicate your build process uses some "crunching" mechanism; those are non-deterministic and hence lead to different results on each run.
We'd appreciate if you could help making your build reproducible. We've prepared some hints on reproducible builds for that. If my guess here is right, you should especially look at the section on "Compressing images" – and the following addition to your
build.gradle
could cure this:Though I see you already have
isCrunchPngs = false
set; I'm no Android dev so I cannot tell how the two are related (or if theall
section is also applied to the 2 sections above).Looking forward to your reply!
The text was updated successfully, but these errors were encountered: