Keytool command does not ask for password

When creating an Android application on fb, I had to fill in the ANDROID HASH KEY field. I am looking for tutorials and successfully executed the command

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

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

Now the problem is that I created the application signature, but this command did not ask for the password. Facebook says a password will be requested and you must enter android as a password

Guide me if on the right track. Help is always welcome

+4
source share
2 answers

What is strange is that he did not ask for your password, he did it for me when I tried it now. According to the documentation:

General rule: if the tool does not ask for a password, your path to the keystore is incorrect.

You must make sure that the ~ / .android / debug.keystore file exists and that keytool and openssl installed on your computer.

If it still does not work, do not worry! Our documentation also provides another alternative by following this tutorial :

  • Enable debugging in our Android SDK by changing Util.java :

    private static boolean ENABLE_LOG = true;

  • Follow steps 6.1 to 6.3, basically just make sure your application has permission to access the Internet and SSO is enabled.

  • Create and run the application on your phone or emulator. You should not see the permissions dialog box because you did not enter the application signature in the application panel. Check the Android SDK debug logs using logcat (since you turned on logging in step 1) and look at the log entries for the entry with "Android Key Mismatch". This error will also provide you with the key that was sent to Facebook. Pay attention to the key value and enter it into your Facebook application settings and do not forget to save the settings.

  • Disable debugging after SSO completes successfully by changing Util.java :

    private static boolean ENABLE_LOG = false;

Let me know if this helps!

+3
source

I am using a Windows machine and have the same problem. Instead of using the environment variable I actually provided a fully qualified path in the keystore (ie "C:\Users\channa.HOME\\.android\debug.keystore" ), and it requested my password as expected.

+1
source

All Articles