tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

create_app_bundle_apks.py (1870B)


      1 #!/usr/bin/env python3
      2 #
      3 # Copyright 2019 The Chromium Authors
      4 # Use of this source code is governed by a BSD-style license that can be
      5 # found in the LICENSE file.
      6 
      7 """Creates an .apks from an .aab."""
      8 
      9 import argparse
     10 import os
     11 import sys
     12 
     13 sys.path.append(
     14    os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)))
     15 from pylib.utils import app_bundle_utils
     16 
     17 
     18 def main():
     19  parser = argparse.ArgumentParser(description=__doc__)
     20  parser.add_argument(
     21      '--bundle', required=True, help='Path to input .aab file.')
     22  parser.add_argument(
     23      '--output', required=True, help='Path to output .apks file.')
     24  parser.add_argument('--aapt2-path', required=True, help='Path to aapt2.')
     25  parser.add_argument(
     26      '--keystore-path', required=True, help='Path to keystore.')
     27  parser.add_argument(
     28      '--keystore-password', required=True, help='Keystore password.')
     29  parser.add_argument(
     30      '--keystore-name', required=True, help='Key name within keystore')
     31  parser.add_argument(
     32      '--minimal',
     33      action='store_true',
     34      help='Create APKs archive with minimal language support.')
     35  parser.add_argument('--local-testing',
     36                      action='store_true',
     37                      help='Create APKs archive with local testing support.')
     38 
     39  args = parser.parse_args()
     40 
     41  app_bundle_utils.GenerateBundleApks(args.bundle,
     42                                      args.output,
     43                                      args.aapt2_path,
     44                                      args.keystore_path,
     45                                      args.keystore_password,
     46                                      args.keystore_name,
     47                                      local_testing=args.local_testing,
     48                                      minimal=args.minimal,
     49                                      check_for_noop=False)
     50 
     51 
     52 if __name__ == '__main__':
     53  main()