140 Android is not reproducible
After fixing the license problem, I found another reproducibility problem. I had to decompile the APK with `apktool d`, and I got these two different files (in `smali_classes3/org/mozilla/experiments/nimbus`): - [Nimbus_setFetchEnabled_1-local.smali](/uploads/0527e48ea27c35f29d634ea701195a82/Nimbus_setFetchEnabled_1-local.smali) - [Nimbus_setFetchEnabled_1-server.smali](/uploads/12bde532c60bf0ec7f42f099e2112780/Nimbus_setFetchEnabled_1-server.smali) From what I understand, the difference is the order in which a couple of values (`this` and a boolean value) are assigned to variables/registers (`v0` and `v1`). And, because of this `v0` and `v1` are also swapped in the following lines. Initially, I thought it was generated code, since it includes Nimbus in its name, but after investigating a while, I started thinking it's a matter of optimization or something that needs to happen at runtime. From `obj-x86_64-unknown-linux-android/gradle/build/mobile/android/fenix/app/outputs/mapping/fenixBeta/mapping.txt`: ``` # {"id":"sourceFile","fileName":"R8$$SyntheticClass"} # {"id":"com.android.tools.r8.synthesized"} [snip] 34:44:kotlin.Unit org.mozilla.experiments.nimbus.Nimbus$setFetchEnabled$1.invokeSuspend$lambda$0(org.mozilla.experiments.nimbus.Nimbus,boolean):266:266 -> invoke 45:47:kotlin.Unit org.mozilla.experiments.nimbus.Nimbus$setFetchEnabled$1.invokeSuspend$lambda$0(org.mozilla.experiments.nimbus.Nimbus,boolean):267:267 -> invoke ``` The only occurrence of `setFetchEnabled` I could find is in `components/nimbus/android/src/main/java/org/mozilla/experiments/nimbus/Nimbus.kt` in Application Services, but the artifacts of A-S are almost reproducible. There are some problems with `.jar`s (filesystem order, and timestamps), and with some metadata (more timestamps). However, all `.aar`s are exactly the same. More docs about R8 and synthetic stuff: - https://r8.googlesource.com/r8/+/refs/heads/main/doc/retrace.md (remaps) - https://r8-docs.preemptive.com/ (unofficial docs with some parameters) - https://medium.com/thoughts-overflow/effects-of-javas-synthetic-accessor-methods-in-android-bb67b3bac22e - https://medium.com/@iateyourmic/synthetic-accessors-in-kotlin-a60184afd94e At this point, I think I need someone more expert of Android stuff to have a look at this. Unless we're lucky and we never hit this again :sweat_smile:.
issue