Base the update complete marker on persisted data.
The update complete marker was stored in /var/run, a fixed volatile
location. The marker would signal that an update was already applied
even after an update_engine crash and subsequent restart.
This location, while quite standard on the Unix FHS, is not
available in Android. This patch achieves the same goal by storing the
boot_id in the persisted prefs directory.
Bug: 24868648
Test: Unittests. Restarted update_engine after an update, keeps saying NEED_REBOOT.
Change-Id: I4dc2cbaeaeb0fd3197fa89168deaa042cb776d61
5 files changed