Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69d815de authored by Jooyung Han's avatar Jooyung Han Committed by Automerger Merge Worker
Browse files

Deprecate flattened apexes am: 2ac1f2fa am: 14f745b4

parents 53665549 14f745b4
Loading
Loading
Loading
Loading
+30 −52
Original line number Diff line number Diff line
@@ -72,7 +72,6 @@ def MergeDexopt(temp_dir, output_target_files_dir):
  #         <contents of vendor dexpreopt_config.zip>
  #     system -> output/SYSTEM
  #     vendor -> output/VENDOR
  #     apex -> output/SYSTEM/apex (only for flattened APEX builds)
  #     apex/ (extracted updatable APEX)
  #         <apex 1>/
  #             ...
@@ -114,19 +113,11 @@ def MergeDexopt(temp_dir, output_target_files_dir):
      os.path.join(output_target_files_dir, 'VENDOR'),
      os.path.join(temp_dir, 'vendor'))

  # The directory structure for flatteded APEXes is:
  #
  # SYSTEM
  #     apex
  #         <APEX name, e.g., com.android.wifi>
  #             apex_manifest.pb
  #             apex_pubkey
  #             etc/
  #             javalib/
  #             lib/
  #             lib64/
  #             priv-app/
  #
  # Extract APEX.
  logging.info('extracting APEX')
  apex_extract_root_dir = os.path.join(temp_dir, 'apex')
  os.makedirs(apex_extract_root_dir)

  # The directory structure for updatable APEXes is:
  #
  # SYSTEM
@@ -136,15 +127,6 @@ def MergeDexopt(temp_dir, output_target_files_dir):
  #         com.android.art.apex
  #         ...
  apex_root = os.path.join(output_target_files_dir, 'SYSTEM', 'apex')

  # Check for flattended versus updatable APEX.
  if OPTIONS.framework_misc_info.get('target_flatten_apex') == 'false':
    # Extract APEX.
    logging.info('extracting APEX')

    apex_extract_root_dir = os.path.join(temp_dir, 'apex')
    os.makedirs(apex_extract_root_dir)

  for apex in (glob.glob(os.path.join(apex_root, '*.apex')) +
                glob.glob(os.path.join(apex_root, '*.capex'))):
    logging.info('  apex: %s', apex)
@@ -159,7 +141,7 @@ def MergeDexopt(temp_dir, output_target_files_dir):
    apex_extract_dir = os.path.join(apex_extract_root_dir, apex_name)
    os.makedirs(apex_extract_dir)

      # deapexer uses debugfs_static, which is part of otatools.zip.
    # deapexer uses debugfs_static/fsck.erofs from otatools.zip.
    command = [
        'deapexer',
        '--debugfs_path',
@@ -172,10 +154,6 @@ def MergeDexopt(temp_dir, output_target_files_dir):
    ]
    logging.info('    running %s', command)
    subprocess.check_call(command)
  else:
    # Flattened APEXes don't need to be extracted since they have the necessary
    # directory structure.
    os.symlink(os.path.join(apex_root), os.path.join(temp_dir, 'apex'))

  # Modify system config to point to the tools that have been extracted.
  # Absolute or .. paths are not allowed  by the dexpreopt_gen tool in