diff options
| author | 2020-08-19 23:27:08 +0000 | |
|---|---|---|
| committer | 2020-08-19 23:27:08 +0000 | |
| commit | 78439f466813bd93d2575e2c50aa2c81c85787ab (patch) | |
| tree | 1910b116fb2941b2f6708e8cfb8ab37263c2026e | |
| parent | ec23cbb7d6359094c7ed5076e205b6f5905e1ddc (diff) | |
| parent | d6b799a6271c0da185b1859446612703d49fb717 (diff) | |
Merge "Searches for debugfs_static in search path"
| -rw-r--r-- | tools/releasetools/apex_utils.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/releasetools/apex_utils.py b/tools/releasetools/apex_utils.py index afebc40f1b..3d24310039 100644 --- a/tools/releasetools/apex_utils.py +++ b/tools/releasetools/apex_utils.py @@ -61,7 +61,14 @@ class ApexApkSigner(object): Returns: The repacked apex file containing the signed apk files. """ - list_cmd = ['deapexer', 'list', self.apex_path] + debugfs_path = os.path.join(OPTIONS.search_path, "bin", "debugfs_static") + if not os.path.exists(debugfs_path): + raise ApexSigningError( + "Couldn't find location of debugfs_static: " + + "Path {} does not exist. ".format(debugfs_path) + + "Make sure bin/debugfs_static can be found in -p <path>") + list_cmd = ['deapexer', '--debugfs_path', + debugfs_path, 'list', self.apex_path] entries_names = common.RunAndCheckOutput(list_cmd).split() apk_entries = [name for name in entries_names if name.endswith('.apk')] @@ -149,7 +156,8 @@ class ApexApkSigner(object): # Add quote to the signing_args as we will pass # --signing_args "--signing_helper_with_files=%path" to apexer if signing_args: - generate_image_cmd.extend(['--signing_args', '"{}"'.format(signing_args)]) + generate_image_cmd.extend( + ['--signing_args', '"{}"'.format(signing_args)]) # optional arguments for apex repacking manifest_json = os.path.join(apex_dir, 'apex_manifest.json') |