Android: Extend the API with the payload offset and size.

The payload offset and size of the CrAU binary file inside the .zip
file are required parameters to properly apply the payload so we
explicitly required them in the API.

The update_engine_client command was extended to support these two
parameters.

Bug: 25631767
TEST=`mmma system/update_engine` on aosp_arm-eng.

Change-Id: Id5ef2f45b711039309173cb0309b9fe5cc82e485
diff --git a/update_engine_client_android.cc b/update_engine_client_android.cc
index 5cbcd33..3485807 100644
--- a/update_engine_client_android.cc
+++ b/update_engine_client_android.cc
@@ -110,9 +110,16 @@
   DEFINE_string(payload,
                 "http://127.0.0.1:8080/payload",
                 "The URI to the update payload to use.");
+  DEFINE_int64(offset, 0,
+               "The offset in the payload where the CrAU update starts. "
+               "Used when --update is passed.");
+  DEFINE_int64(size, 0,
+               "The size of the CrAU part of the payload. If 0 is passed, it "
+               "will be autodetected. Used when --update is passed.");
   DEFINE_string(headers,
                 "",
-                "A list of key-value pairs, one element of the list per line.");
+                "A list of key-value pairs, one element of the list per line. "
+                "Used when --update is passed.");
 
   DEFINE_bool(suspend, false, "Suspend an ongoing update and exit.");
   DEFINE_bool(resume, false, "Resume a suspended update.");
@@ -187,6 +194,8 @@
     }
     Status status = service_->applyPayload(
         android::String16{FLAGS_payload.data(), FLAGS_payload.size()},
+        FLAGS_offset,
+        FLAGS_size,
         and_headers);
     if (!status.isOk())
       return ExitWhenIdle(status);