Reland "update_engine: Deprecate major version 1"

This reverts commit fac20229289cf4d4373fffe83037d44b780eabd0.

Reason for revert: <Since the stepping stone on M72 we can revert this now>

Original change's description:
> Revert "update_engine: Deprecate major version 1"
> 
> This partially reverts commit 55c75417e22d5026971276997924a345d9973bbc.
> 
> It turns out that we forgot a scenario when we deprecated major version
> 1. We use update_engine in lab tests (specifically
> autoupdate_EndToEndTests on stable channel) to update a DUT to an
> old (very old) versions using actual update payloads so we can test that
> they can get updated to newer versions. However, deprecating major
> version 1 in the update_engine caused trouble because we no longer can
> update from a newer version to a version before M72 (to prepare the
> device for update test). We need to put this feature back until we find
> a better solution for it.
> 
> On this CL, we only support major version 1 in the client and only for
> test (non-official) images. We don't even bother adding paygen support
> for it.
> 
> This CL should be reverted once we figured out what to do with
> provisioning the autoupdate end to end tests.
> 
> BUG=chromium:1043428
> TEST=FEATURES=test emerge-reef update_engine
> TEST=cros deployed it, then cros flash using an m71 payload, it succeeded.
> 
> Change-Id: I1fecbe3ae845b2e419f0999adc53e4732b1f7696
> Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2013884
> Reviewed-by: Tianjie Xu <xunchang@google.com>
> Reviewed-by: Sen Jiang <senj@chromium.org>
> Tested-by: Amin Hassani <ahassani@chromium.org>
> Commit-Queue: Amin Hassani <ahassani@chromium.org>

TBR=dhaddock@chromium.org,senj@chromium.org,ahassani@chromium.org,xunchang@google.com,kimjae@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:1043428
Change-Id: I011537d4c982fa8f8d6548adddd14d966106ba44
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2096032
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Commit-Queue: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
diff --git a/payload_consumer/payload_metadata.h b/payload_consumer/payload_metadata.h
index 3292351..be43c41 100644
--- a/payload_consumer/payload_metadata.h
+++ b/payload_consumer/payload_metadata.h
@@ -26,7 +26,6 @@
 #include <brillo/secure_blob.h>
 
 #include "update_engine/common/error_code.h"
-#include "update_engine/common/hardware_interface.h"
 #include "update_engine/common/platform_constants.h"
 #include "update_engine/update_metadata.pb.h"
 
@@ -55,11 +54,9 @@
   // metadata. Returns kMetadataParseError if the metadata can't be parsed given
   // the payload.
   MetadataParseResult ParsePayloadHeader(const brillo::Blob& payload,
-                                         HardwareInterface* hardware,
                                          ErrorCode* error);
   // Simpler version of the above, returns true on success.
-  bool ParsePayloadHeader(const brillo::Blob& payload,
-                          HardwareInterface* hardware);
+  bool ParsePayloadHeader(const brillo::Blob& payload);
 
   // Given the |payload|, verifies that the signed hash of its metadata matches
   // |metadata_signature| (if present) or the metadata signature in payload
@@ -97,14 +94,12 @@
                         Signatures* metadata_signatures);
 
  private:
-  // Set |*out_offset| to the byte offset at which the manifest protobuf begins
-  // in a payload. Return true on success, false if the offset is unknown.
-  bool GetManifestOffset(uint64_t* out_offset) const;
+  // Returns the byte offset at which the manifest protobuf begins in a payload.
+  uint64_t GetManifestOffset() const;
 
-  // Set |*out_offset| to the byte offset where the size of the metadata
-  // signature is stored in a payload. Return true on success, if this field is
-  // not present in the payload, return false.
-  bool GetMetadataSignatureSizeOffset(uint64_t* out_offset) const;
+  // Returns the byte offset where the size of the metadata signature is stored
+  // in a payload.
+  uint64_t GetMetadataSignatureSizeOffset() const;
 
   uint64_t metadata_size_{0};
   uint64_t manifest_size_{0};