Loading tools/releasetools/apex_utils.py +11 −4 Original line number Diff line number Diff line Loading @@ -51,6 +51,8 @@ class ApexApkSigner(object): self.apex_path = apex_path self.key_passwords = key_passwords self.codename_to_api_level_map = codename_to_api_level_map self.debugfs_path = os.path.join( OPTIONS.search_path, "bin", "debugfs_static") def ProcessApexFile(self, apk_keys, payload_key, signing_args=None): """Scans and signs the apk files and repack the apex Loading @@ -61,14 +63,13 @@ class ApexApkSigner(object): Returns: The repacked apex file containing the signed apk files. """ debugfs_path = os.path.join(OPTIONS.search_path, "bin", "debugfs_static") if not os.path.exists(debugfs_path): if not os.path.exists(self.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] self.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')] Loading Loading @@ -98,8 +99,14 @@ class ApexApkSigner(object): def ExtractApexPayloadAndSignApks(self, apk_entries, apk_keys): """Extracts the payload image and signs the containing apk files.""" if not os.path.exists(self.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>") payload_dir = common.MakeTempDir() extract_cmd = ['deapexer', 'extract', self.apex_path, payload_dir] extract_cmd = ['deapexer', '--debugfs_path', self.debugfs_path, 'extract', self.apex_path, payload_dir] common.RunAndCheckOutput(extract_cmd) has_signed_apk = False Loading Loading
tools/releasetools/apex_utils.py +11 −4 Original line number Diff line number Diff line Loading @@ -51,6 +51,8 @@ class ApexApkSigner(object): self.apex_path = apex_path self.key_passwords = key_passwords self.codename_to_api_level_map = codename_to_api_level_map self.debugfs_path = os.path.join( OPTIONS.search_path, "bin", "debugfs_static") def ProcessApexFile(self, apk_keys, payload_key, signing_args=None): """Scans and signs the apk files and repack the apex Loading @@ -61,14 +63,13 @@ class ApexApkSigner(object): Returns: The repacked apex file containing the signed apk files. """ debugfs_path = os.path.join(OPTIONS.search_path, "bin", "debugfs_static") if not os.path.exists(debugfs_path): if not os.path.exists(self.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] self.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')] Loading Loading @@ -98,8 +99,14 @@ class ApexApkSigner(object): def ExtractApexPayloadAndSignApks(self, apk_entries, apk_keys): """Extracts the payload image and signs the containing apk files.""" if not os.path.exists(self.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>") payload_dir = common.MakeTempDir() extract_cmd = ['deapexer', 'extract', self.apex_path, payload_dir] extract_cmd = ['deapexer', '--debugfs_path', self.debugfs_path, 'extract', self.apex_path, payload_dir] common.RunAndCheckOutput(extract_cmd) has_signed_apk = False Loading