mirror of
https://github.com/cylonid/NativeAlphaForAndroid.git
synced 2026-11-05 00:47:30 +00:00
[GH-ISSUE #185] Reproducible builds #169
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cylonid/NativeAlphaForAndroid#169
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @IzzySoft on GitHub (May 6, 2025).
Original GitHub issue: https://github.com/cylonid/NativeAlphaForAndroid/issues/185
Continuing from https://gitlab.com/IzzyOnDroid/repo/-/issues/160 as discussed:
We still cannot reproduce the builds – neither using JDK 17 nor 21. Here are the diffs: diff_jdk17.zip & diff_jdk21.zip
Differences are in
classes.dex. Using JDK 21, the diff seems to indicate our build has additional annotations – which usually means "the other APK" was built with JDK 17 (it's quite typical that 21 has additional annotations). However, using JDK 17 we have a lot of "identical differences" incom/cylonid/nativealpha/__WebViewActivity, mostly addresses not matching. This could mean a "flaky" (aka "non-deterministic) build – or a "dirty build" on your end (i.e. the APK not being built from a clean tree: local changes or, more likely from how the diff looks, artifacts remaining from a previous build).So first questions would be:
cleanbefore you built your APK?We tried last with v1.5.1, and that's where above diffs come from.
@cylonid commented on GitHub (May 8, 2025):
JDK
Oracle OpenJDK 17.0.6 => unlikely to be the culprit.
Cleaning
I did run
make cleanover the Android Studio UI, but as I read in your wiki that may just not be clean enough 😅If the build with extended options over commandline does not fix the issue, I have another suspicion, explicitly because
__WebViewActivityis involved.These files are generated on the fly during build by duplicating the existing "WebViewActivity" class file. (see build.gradle:164 et seq.). This is a necessity for the sandbox feature, so multiple (identical except for the name) WebViewActivities can be run in parallel in separate processes. The only other way would be to hardcode multiple identical files (also in AndroidManifest) which I wanted to avoid for obvious reasons.
Imo, this does not necessarily mean it gets flaky (for all my understanding, I would not know why) but it might a clue because it surely is a highly unusual behaviour for an Android build.
@IzzySoft commented on GitHub (May 8, 2025):
Fun fact is that those
__WebViewActivityare only with JDK 17. What we could try is that you build an APK with JDK 21, and I check against that, also using JDK 21. You could attach the APK here (just rename it to*.zipso Github accepts it) and name the commit you built from (can be the last tag, as the only thing changed would be the JDK, not the code).@cylonid commented on GitHub (May 19, 2025):
@IzzySoft I resetted any cache I could find before this build, could you check again for the newest release (still JDK 17)?
If there are still issues I might have to switch to an Ubuntu VM for building...
@IzzySoft commented on GitHub (May 19, 2025):
Looks like you might need to. This one was clearly built on Windows:
The differences in
asset/news/*we can most likely fix on our end if needed (Windows line endings). But theclasses.dexrather not…diff.zip
@cylonid commented on GitHub (May 21, 2025):
Okay @IzzySoft, will have a closer look before the next release, didn't spend much time on it up until now.
Apart from that, how come the new update is not detected by IzzyOnDroid yet?
@IzzySoft commented on GitHub (May 21, 2025):
Thanks! Looking forward to that.
Maybe because you did not yet release it?
Which "new" update do you mean? The one to your browser cache maybe? 😉