Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2797)

Unified Diff: build/android/gyp/finalize_apk.py

Issue 207743005: Update APK generation scripts to take custom keystore names and passwords. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/finalize_apk_action.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/finalize_apk.py
===================================================================
--- build/android/gyp/finalize_apk.py (revision 258428)
+++ build/android/gyp/finalize_apk.py (working copy)
@@ -15,16 +15,16 @@
from util import build_utils
-def SignApk(keystore_path, unsigned_path, signed_path):
+def SignApk(key_path, key_name, key_passwd, unsigned_path, signed_path):
shutil.copy(unsigned_path, signed_path)
sign_cmd = [
'jarsigner',
'-sigalg', 'MD5withRSA',
'-digestalg', 'SHA1',
- '-keystore', keystore_path,
- '-storepass', 'chromium',
+ '-keystore', key_path,
+ '-storepass', key_passwd,
signed_path,
- 'chromiumdebugkey',
+ key_name,
]
build_utils.CheckOutput(sign_cmd)
@@ -46,14 +46,17 @@
parser.add_option('--unsigned-apk-path', help='Path to input unsigned APK.')
parser.add_option('--final-apk-path',
help='Path to output signed and aligned APK.')
- parser.add_option('--keystore-path', help='Path to keystore for signing.')
+ parser.add_option('--key-path', help='Path to keystore for signing.')
+ parser.add_option('--key-passwd', help='Keystore password')
+ parser.add_option('--key-name', help='Keystore name')
parser.add_option('--stamp', help='Path to touch on success.')
options, _ = parser.parse_args()
with tempfile.NamedTemporaryFile() as intermediate_file:
signed_apk_path = intermediate_file.name
- SignApk(options.keystore_path, options.unsigned_apk_path, signed_apk_path)
+ SignApk(options.key_path, options.key_name, options.key_passwd,
+ options.unsigned_apk_path, signed_apk_path)
AlignApk(options.android_sdk_root, signed_apk_path, options.final_apk_path)
if options.stamp:
« no previous file with comments | « build/android/finalize_apk_action.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698