summaryrefslogtreecommitdiff
path: root/deps/v8/build/android/gyp/create_app_bundle_minimal_apks.py
blob: f01691e418fca5f5fcf7d9d281aba060ec817856 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python
#
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""Creates an .apks from an .aab with only English strings."""

import argparse
import os
import sys

sys.path.append(
    os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)))
from pylib.utils import app_bundle_utils


def main():
  parser = argparse.ArgumentParser(description=__doc__)
  parser.add_argument(
      '--bundle', required=True, help='Path to input .aab file.')
  parser.add_argument(
      '--output', required=True, help='Path to output .apks file.')
  parser.add_argument('--aapt2-path', required=True, help='Path to aapt2.')
  parser.add_argument(
      '--keystore-path', required=True, help='Path to keystore.')
  parser.add_argument(
      '--keystore-password', required=True, help='Keystore password.')
  parser.add_argument(
      '--keystore-name', required=True, help='Key name within keystore')

  args = parser.parse_args()

  app_bundle_utils.GenerateBundleApks(
      args.bundle,
      args.output,
      args.aapt2_path,
      args.keystore_path,
      args.keystore_password,
      args.keystore_name,
      minimal=True,
      check_for_noop=False)


if __name__ == '__main__':
  main()