apk/dex differences, diffoscope can't really tell what's going on. Any ideas?

Marcus Hoffmann bubu at bubu1.eu
Sat May 29 20:56:33 UTC 2021

On 29.05.21 18:05, Marcus Hoffmann via rb-general wrote:
>> They differ in
>> "pg-map-id":"xxxxxxx"
>> and the 24 differing bytes starting at offset 8 could be a 192 bit
>> checksum over the remaining content.
> Oooh, that makes a lot of sense (and the torproject gitlab issue seems 
> to confirm that). The other thing is proguard/r8 releated, that should 
> help a lot trying to figure that out!

Well, it turns out that our genious plan of on relying on R8/proguard to 
work around a non-deterministic codegen issue in the used navigation 
library didn't quite work out.

Here's what's happening:

* androidx.navigation.safeargs.kotlin *sometimes* (unclear when) 
generates some additional unused methods in some classes.
* R8 removed those from the final dex file, which would make it 
reproducible... but then it calculates a hash over some mapping file 
which at least in this case ends up being different because of exactly 
those additional methods that it did or did not throw out.

Reported this to google now: 

Let's hope it get's fixed this year still :/


More information about the rb-general mailing list