ANDROID: dm: android-verity: allow disable dm-verity for Treble VTS
authorBowgo Tsai <bowgotsai@google.com>
Thu, 2 Mar 2017 10:54:15 +0000 (18:54 +0800)
committerAmit Pundir <amit.pundir@linaro.org>
Mon, 10 Apr 2017 07:42:16 +0000 (13:12 +0530)
commitf9d703b1b89943a6944dcdc53f64879d572cc197
tree5538211e77ba999605ed874ed9bbefd0de1e15fd
parenta870c9b4c9404ecb38449e22699ab4e85f996599
ANDROID: dm: android-verity: allow disable dm-verity for Treble VTS

To start Treble VTS test, a single AOSP system.img will be flashed onto
the device. The size of AOSP system.img might be different than the
system partition size on device, making locating verity metadata fail
(at the last fixed size of the partition).

This change allows disabling dm-verity on system partition when the
device is unlocked (orange device state) with invalid metadata.

BUG: 35603549
Test: boot device with a different-sized system.img, checks verity is
      not enabled via:

          "adb shell getprop | grep partition.system.verified"

Change-Id: Ide78dca4eefde4ab019e4b202d3f590dcb1bb506
Signed-off-by: Bowgo Tsai <bowgotsai@google.com>
drivers/md/dm-android-verity.c