init: set ro.boot.avb_version in recovery mode
Previously we set ro.boot.avb_version during the first stage mount in normal mode:
- https://android-review.googlesource.com/#/c/371774/
As the first stage mount is not performed in recovery mode, we need to set the
property separately in recovery mode.
Bug: 37414003
Test: first stage mount /vendor with vboot 2.0 (avb) on bullhead in normal mode
Test: first stage mount /system without verity on bullhead in normal mode
Test: checks ro.boot.avb_version is 1.0 on bullhead in recovery mode
Test: first mount /vendor with with vboot 1.0 on sailfish in normal mode
Test: checks ro.boot.avb_version doesn't exist on sailfish in recovery mode
Change-Id: I262e75b8b557c4de7609b4049ccb01793644245e
Merged-In: I262e75b8b557c4de7609b4049ccb01793644245e
(cherry picked from commit fd18a452be7d89bc0338035708bded57e4ca5595)
diff --git a/init/init.cpp b/init/init.cpp
index 4f01753..1b738aa 100644
--- a/init/init.cpp
+++ b/init/init.cpp
@@ -996,6 +996,8 @@
panic();
}
+ SetInitAvbVersionInRecovery();
+
// Set up SELinux, loading the SELinux policy.
selinux_initialize(true);