| # Copyright (c) 2018, the R8 project authors. Please see the AUTHORS file |
| # for details. All rights reserved. Use of this source code is governed by a |
| # BSD-style license that can be found in the LICENSE file. |
| def sign(unsigned_apk, signed_apk, keystore): |
| print 'Signing (ignore the warnings)' |
| cmd = ['zip', '-d', unsigned_apk, 'META-INF/*'] |
| '-sigalg', 'SHA1withRSA', |
| '-signedjar', signed_apk, |
| subprocess.check_call(cmd) |
| def sign_with_apksigner(build_tools_dir, unsigned_apk, signed_apk, keystore, password): |
| os.path.join(build_tools_dir, 'apksigner'), |
| '--ks-pass', 'pass:' + password, |
| '--min-sdk-version', '19', |
| subprocess.check_call(cmd) |