Detect downgrade by checking build time for all partitions
Checking ro.build.date.utc to detect a downgrade is not enough in the case where several target files are merged, as timestamps can differ for each partition. The solution is to check the build timestamp for each partition and ro.build.date.utc. With this change ota generation will be aborted during creation instead of rejected when installing on device. This also fixes the --override_timestamp so it is possible to generate a package where timestamps are reversed, as was added in: 3e6161a3. Issue: 315913966 Test: Manual, confirm that ota generation is aborted when timestamp on post vendor partitions is newer than on pre. Ota created successfully with --override_timestamp parameter and installation successful Test: atest --host releasetools_test Change-Id: I275e67a3840f4ef2263381c253231068e72f47d2
Loading
Please register or sign in to comment