Khurram W. Malik
Khurram W. Malik

Reputation: 2895

Keytool command does not asks for password

While making an android app on fb I had to fill in the field ANDROID HASH KEY I look for the tutorials and was successful in running the command

    keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

I did set the environment variables of keytool and openssl in my windows to make it run.

Now the problem is I have generated the application signature but this command did not asked for password. Facebook says that a password will be asked for and you should enter android as password

Guide me if on right path. Help is always appreciated

Upvotes: 4

Views: 3580

Answers (2)

Channa
Channa

Reputation: 11

I use a Windows machine and had the same problem. Instead of using the environment variable I actually provided the fully qualified path to the keystore (i.e "C:\Users\channa.HOME\\.android\debug.keystore") and it requested my password as expected.

Upvotes: 1

Jesse Chen
Jesse Chen

Reputation: 4928

That's odd that it didn't prompt for your password, it did for me when I tried it just now. According to the documentation:

General Rule: If the tool does not ask for password, your keystore path is incorrect.

You should verify that ~/.android/debug.keystore exists, and that keytool and openssl is installed on your machine.

If it still doesn't work don't worry! Our documentation also provides another alternative by following this tutorial:

  1. Enable debugging in our Android SDK by modifying Util.java:

    private static boolean ENABLE_LOG = true;

  2. Follow steps 6.1 to 6.3, which is mainly just making sure your app has permission to access the Internet, and SSO enabled.

  3. Build and run the app on your phone or emulator. You should not see the permissions dialog because you did not input the application signature in your app's dashboard. Check the Android SDK debug logs via logcat (since you enabled logging in step 1), and look at your log entries for an entry with ''Android key mismatch''. This error will also provide you with the key that was sent to Facebook. Note the key's value and enter it into your Facebook app settings and make sure to save your settings.

  4. Turn off debugging once SSO completes successfully by modifying Util.java:

    private static boolean ENABLE_LOG = false;

Let me know if that helps!

Upvotes: 4

Related Questions