Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6423] Android: Build should accept an alias password

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-11-15T22:17:14.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 23, 2013 Sprint 23 Core, Release 3.2.0
ComponentsAndroid, Tooling
Labelsandroidbuild, cb-verified, qe-closed-3.2.0
ReporterNam Le
AssigneeChris Barber
Created2011-12-01T15:10:11.000+0000
Updated2013-12-12T01:22:15.000+0000

Description

The ADT supports packaging an apk using a specific keystore/password and a key/password. It appears that we require both the keystore and alias passwords to be the same. When I run the builder.py script using the correct keystore password, but use a alias with a different password, the script hangs.

Attachments

FileDateSize
mykeystore2013-11-15T10:45:45.000+00001370
testkeystore2013-11-15T10:45:45.000+00001368

Comments

  1. Don Thorp 2011-12-01

    Why is this needed. I believe our signing guide tells them to use the same password.
  2. Nam Le 2011-12-02

    It provides additional security and flexibility to our users. If this is something that you don't intend to add, then we should at least return some error or response, instead of just hanging
  3. Chris Barber 2013-11-15

    Pull request: https://github.com/appcelerator/titanium_mobile/pull/4980 To test: 1) create an Android project using Studio or the CLI 2) copy attached keystores to your computer 3) perform the following builds below Attached keystore info:
       mykeystore
       store password = 123123
       alias = myalias
       no key password
       
       testkeystore
       store password = 123123
       alias = testalias
       key password = 456456
       
    NOTE: --output-dir has been omitted, but is still required. You will be prompted for the output dir in each scenario below. Test 1) mykeystore: No keystore args
       ti build -p android -T dist-playstore
       
       Where is the keystore file used to sign the app?: /path/to/mykeystore
       
       What is the keystore's password?: <type bad password>
       [ERROR] Keystore was tampered with, or password was incorrect
       
       What is the keystore's password?: <type 123123>
       
       What is the keystore's key password? (leave blank to use the store password): <enter bad password (didn't expect any password)>
       [ERROR] Bad key password
       
       What is the keystore's key password? (leave blank to use the store password): <hit return key>
       
       ... should build successfully
       
    Test 2) mykeystore: Bad --keystore
       ti build -p android -T dist-playstore --keystore ~/badkeystore
       
       [ERROR] Invalid keystore file
       
       Where is the keystore file used to sign the app?: /path/to/keystore
       
       What is the keystore's password?: <type 123123>
       
       What is the keystore's key password? (leave blank to use the store password): <hit return key>
       
       ... should build successfully
       
    Test 3) mykeystore: Good --keystore, missing --store-password
       ti build -p android -T dist-playstore --keystore /path/to/mykeystore
       
       What is the keystore's password?: <enter 123123>
       
       What is the keystore's key password? (leave blank to use the store password): <hit return key>
       
       ... should build successfully
       
    Test 4) mykeystore: Good --keystore, bad --store-password
       ti build -p android -T dist-playstore --keystore /path/to/mykeystore --store-password foo
       
       [ERROR] Keystore was tampered with, or password was incorrect
       
       What is the keystore's password?: <enter 123123>
       
       What is the keystore's key password? (leave blank to use the store password): <hit return key>
       
       ... should build successfully
       
    Test 5) mykeystore: Good --keystore and --store-password (won't prompt for --key-password since mykeystore doesn't have one)
       ti build -p android -T dist-playstore --keystore /path/to/mykeystore --store-password 123123
       
       ... should build successfully
       
    Test 6) testkeystore: No keystore args
       ti build -p android -T dist-playstore
       
       Where is the keystore file used to sign the app?: /path/to/testkeystore
       
       What is the keystore's password?: <type bad password>
       [ERROR] Keystore was tampered with, or password was incorrect
       
       What is the keystore's password?: <type 123123>
       
       What is the keystore's key password? (leave blank to use the store password): <hit return key>
       [ERROR] Bad key password
       
       What is the keystore's key password? (leave blank to use the store password): <enter bad password>
       [ERROR] Bad key password
       
       What is the keystore's key password? (leave blank to use the store password): <enter 456456>
       
       ... should build successfully
       
    Test 7) testkeystore: Good --keystore, missing --store-password
       ti build -p android -T dist-playstore --keystore /path/to/testkeystore
       
       What is the keystore's password?: <enter 123123>
       
       What is the keystore's key password? (leave blank to use the store password): <enter 456456>
       
       ... should build successfully
       
    Test 8) testkeystore: Good --keystore, bad --store-password
       ti build -p android -T dist-playstore --keystore /path/to/testkeystore --store-password foo
       
       [ERROR] Keystore was tampered with, or password was incorrect
       
       What is the keystore's password?: <enter 123123>
       
       What is the keystore's key password? (leave blank to use the store password): <enter 456456>
       
       ... should build successfully
       
    Test 9) testkeystore: Good --keystore and --store-password, missing --key-password
       ti build -p android -T dist-playstore --keystore /path/to/mykeystore --store-password 123123
       
       What is the keystore's key password? (leave blank to use the store password): <enter 456456>
       
       ... should build successfully
       
    Test 10) testkeystore: Good --keystore and --store-password, bad --key-password
       ti build -p android -T dist-playstore --keystore /path/to/mykeystore --store-password 123123 --key-password foo
       
       [ERROR] Bad key password
       
       What is the keystore's key password? (leave blank to use the store password): <enter 456456>
       
       ... should build successfully
       
    Test 11) testkeystore: Good --keystore, --store-password, and --key-password
       ti build -p android -T dist-playstore --keystore /path/to/mykeystore --store-password 123123 --key-password 456456
       
       ... should build successfully
       
  4. Samuel Dowse 2013-12-12

    Verified fixed on: Mac OSX 10.9 Mavericks Appcelerator Studio, build: 3.2.0.201312101708 Titanium SDK, build: 3.2.0.v20131210191510 CLI: 3.2.0-cr Alloy: 1.3.0-cr Ran all the test cases provided in the comments. All examples ran as expected. Closing.

JSON Source