[Android-tools-devel] Make framework-res.apk deterministic, making this package reproducible

Hans-Christoph Steiner hans at at.or.at
Wed Aug 24 09:45:01 UTC 2016


Chris Lamb:
> Chris Lamb wrote:
> 
>>>> I recommend you revert this commit
>>>
>>> A version containing the change has already been uploaded, so should I
>>> revert it now anyways or revert it later when a new version has landed
>>> and can be used.
>>
>> Personally, I would revert it now so that you don't have to think about
>> it anymore.
>>
>> (Expect a strip-nondeterminism upload very soon.)
> 
> https://tracker.debian.org/news/792561 :)
> 
> 
> Regards,

Careful with using strip-nondeterminism for APKs.  strip-nondeterminism
is not good for Android APKs, it changes too much, and Android uses lots
of odd tricks with its ZIP format.  It forces the APK into the ZIP
standard in ways that APKs are never built.  Google has its new
`ziptime`, which changes much less about the ZIP format of the APK.
ziptime just resets the timestamp fields only.

The problem with strip-nondeterminism is that it totally rewrites the
ZIP headers, and that could cause issues.  strip-nondeterminism for
framework-res.apk should be fine, since its not used on a device.

I have a patch to make a Debian package for ziptime.  I haven't uploaded
it yet because I didn't want to have a package for something that Google
is not even using.  cdesai confirmed that Google is using it in the ROM
builds, so I'll add my patch and upload it so we can `apt-get install
ziptime` :-)

.hc



More information about the Android-tools-devel mailing list