def METHOD_NAME(unused_argv):
  if FLAGS.mode == "mobile_install":
    with open(FLAGS.input_manifest, "rb") as input_manifest:
      new_manifest, old_application, app_package = (
          StubifyMobileInstall(input_manifest.read()))
    if FLAGS.override_package:
      app_package = FLAGS.override_package
    with open(FLAGS.output_manifest, "wb") as output_xml:
      output_xml.write(new_manifest)
    with open(FLAGS.output_datafile, "wb") as output_file:
      output_file.write("\n".join([old_application, app_package]).encode())
  elif FLAGS.mode == "instant_run":
    with open(FLAGS.input_manifest, "rb") as input_manifest:
      new_manifest = StubifyInstantRun(input_manifest.read())
    with open(FLAGS.output_manifest, "wb") as output_xml:
      output_xml.write(new_manifest)