Skip to content

Instantly share code, notes, and snippets.

@viniciusdaniel
Last active January 13, 2016 20:47
Show Gist options
  • Save viniciusdaniel/dfb063914cfc9e4eb969 to your computer and use it in GitHub Desktop.
Save viniciusdaniel/dfb063914cfc9e4eb969 to your computer and use it in GitHub Desktop.
Re-generate a debug.keystore file with defaults passwords and common name data, using SHA-2 and size of 2048bits
# If ~/.android/debug.keystore exists you need remove this previosly
keytool -genkey -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android -keysize 2048 -keyalg RSA -sigalg SHA256withRSA -validity 30000 -dname "CN=Android Debug,O=Android,C=US"
@viniciusdaniel
Copy link
Author

Some notes

  1. This script run using SHA-2 instead of SHA-1. If you wan't SHA-1 change the parameter -sigalg SHA256withRSA to -sigalg SHA1withRSA
  2. You can personalize the Common Names information removing -dname "CN=Android Debug,O=Android,C=US", and prompt the data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment