Deprecate flattened apexes am: 2ac1f2fabc
am: 14f745b4d3
am: 69d815deb1
Original change: https://android-review.googlesource.com/c/platform/build/+/2637110 Change-Id: Id4ca986d0e48d8d1ef82b7e9eee6378e550e329d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -72,7 +72,6 @@ def MergeDexopt(temp_dir, output_target_files_dir):
|
|||||||
# <contents of vendor dexpreopt_config.zip>
|
# <contents of vendor dexpreopt_config.zip>
|
||||||
# system -> output/SYSTEM
|
# system -> output/SYSTEM
|
||||||
# vendor -> output/VENDOR
|
# vendor -> output/VENDOR
|
||||||
# apex -> output/SYSTEM/apex (only for flattened APEX builds)
|
|
||||||
# apex/ (extracted updatable APEX)
|
# apex/ (extracted updatable APEX)
|
||||||
# <apex 1>/
|
# <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(output_target_files_dir, 'VENDOR'),
|
||||||
os.path.join(temp_dir, 'vendor'))
|
os.path.join(temp_dir, 'vendor'))
|
||||||
|
|
||||||
# The directory structure for flatteded APEXes is:
|
# Extract APEX.
|
||||||
#
|
logging.info('extracting APEX')
|
||||||
# SYSTEM
|
apex_extract_root_dir = os.path.join(temp_dir, 'apex')
|
||||||
# apex
|
os.makedirs(apex_extract_root_dir)
|
||||||
# <APEX name, e.g., com.android.wifi>
|
|
||||||
# apex_manifest.pb
|
|
||||||
# apex_pubkey
|
|
||||||
# etc/
|
|
||||||
# javalib/
|
|
||||||
# lib/
|
|
||||||
# lib64/
|
|
||||||
# priv-app/
|
|
||||||
#
|
|
||||||
# The directory structure for updatable APEXes is:
|
# The directory structure for updatable APEXes is:
|
||||||
#
|
#
|
||||||
# SYSTEM
|
# SYSTEM
|
||||||
@@ -136,15 +127,6 @@ def MergeDexopt(temp_dir, output_target_files_dir):
|
|||||||
# com.android.art.apex
|
# com.android.art.apex
|
||||||
# ...
|
# ...
|
||||||
apex_root = os.path.join(output_target_files_dir, 'SYSTEM', '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')) +
|
for apex in (glob.glob(os.path.join(apex_root, '*.apex')) +
|
||||||
glob.glob(os.path.join(apex_root, '*.capex'))):
|
glob.glob(os.path.join(apex_root, '*.capex'))):
|
||||||
logging.info(' apex: %s', apex)
|
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)
|
apex_extract_dir = os.path.join(apex_extract_root_dir, apex_name)
|
||||||
os.makedirs(apex_extract_dir)
|
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 = [
|
command = [
|
||||||
'deapexer',
|
'deapexer',
|
||||||
'--debugfs_path',
|
'--debugfs_path',
|
||||||
@@ -172,10 +154,6 @@ def MergeDexopt(temp_dir, output_target_files_dir):
|
|||||||
]
|
]
|
||||||
logging.info(' running %s', command)
|
logging.info(' running %s', command)
|
||||||
subprocess.check_call(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.
|
# Modify system config to point to the tools that have been extracted.
|
||||||
# Absolute or .. paths are not allowed by the dexpreopt_gen tool in
|
# Absolute or .. paths are not allowed by the dexpreopt_gen tool in
|
||||||
|
Reference in New Issue
Block a user