OSDN Git Service

Check partition hash before resorting to block_image_verify
authorSami Tolvanen <samitolvanen@google.com>
Fri, 24 Apr 2015 10:54:01 +0000 (11:54 +0100)
committerSami Tolvanen <samitolvanen@google.com>
Fri, 24 Apr 2015 10:56:59 +0000 (10:56 +0000)
commite09d096ed6015a4e3d24591ce588ecf8fd66b494
tree65e7e1ef060bf35a82a094357ab1f11157263e39
parent529943c7234a20de4eeb489df9f1c896a09b345f
Check partition hash before resorting to block_image_verify

It's not necessary to call block_image_verify for the most common
case where we attempt an update for the first time and the target
partition has expected contents. It is sufficient to confirm that
the target partition is intact.

Computing a hash is much faster than simulating the update, which
means this change should make the update speed for v3 much closer
to v2 for the common case. If the update was interrupted, this is
going to make resuming somewhat slower, of course. Hopefully this
should be rather rare.

Bug: 20309033
Change-Id: I04792f3681bf2cd5d9a4e1c41eb883c7f26c6f58
tools/releasetools/common.py