AOSP OTA incremental version issue

636 views
Skip to first unread message

Aby Mathews

unread,
Mar 5, 2017, 12:49:58 PM3/5/17
to Android Building

I am facing an issue with AOSP incremental OTA build. If I do an incremental build (without make clean), build completes fast and I get a smaller OTA file, and OTA updates successfully on the target system; BUT the incremental build number of target system remains same. (os.build.version.incremental returns old number) So next time when another OTA is generated and tried to update, it fails, giving error : "package expects build fingerprint of ../../../(build number)/.. ". as, incremental build number is part of build fingerprint.

If I do 'make clean' before 'make dist', things work fine; but build time is much more and OTA file is bloated; many packages which are NOT modified are identified as modified by some %, and is added to OTA.

How to increment build number without 'make clean' ?

Dan Willemsen

unread,
Mar 5, 2017, 6:11:38 PM3/5/17
to Android Building
We've only recently begun trusting incremental builds, though all of our release builds (that would go to an OTA system) are still full clean builds.

Which android version are you building? Two clean builds on Android-N should be quite similar, especially once you follow the guidelines here for any code that you've added: http://source.android.com/devices/tech/ota/reduce_size.html

If you still want to use incremental builds, I would suggest running "m installclean" in between the builds -- that "fixes" a number of issues with files being uninstalled in between builds.

It looks like to force regeneration of this file, you could remove $OUT/obj/ETC/system_build_prop_intermediates/system.prop. Or just change the value of BUILD_ID, which should probably change between builds sent to an OTA system anyway.

- Dan

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aby Mathews

unread,
Mar 6, 2017, 10:11:03 AM3/6/17
to Android Building
Hi Dan,

Thank you for your reply.

From your reply what I infer is: better to go for clean build for OTA, as incremental build may have issues.   I think I would follow that; a wrong OTA would be a costly risk for me.
In parallel I will play with build.prop to see if I can rectify the issue.

I am building v5.1.  

I am okay with the additional time taken in build; what I am not happy is the 'wrong diffs' identified by 'ota_from_target_files'.   I use same machine and same set of commands for build.  I do not touch anything, but one app folder. (I want this app as a priv-app; hence the build and OTA. I deploy it to few thousand devices).

Regards,

Aby.

Dan Willemsen

unread,
Mar 6, 2017, 2:23:05 PM3/6/17
to Android Building
I wouldn't trust incremental builds in 5.1 very much at all -- there are many changes that you can make that will not cause a rebuild. Reliability increased in 7.0 significantly with the introduction of Ninja, where we'd actually rebuild a file after the command used to create it changed.

Some of the core changes related to http://source.android.com/devices/tech/ota/reduce_size.html made it into 6.0.1, so there's a lot of core problems in 5.1 related to reproducibility.

- Dan
Reply all
Reply to author
Forward
0 new messages