What should this work do?
When using debug keystore we should attempt to locate $HOME/.android/debug.keystore as per Android API docs here. Failing finding it, we should consider trying to generate the debug key and placing it in this directory (if it exists)
What is the motivation?
We won't end up blowing away the keystore generated in .zig-cache anymore which means when developers delete .zig-cache and re-build / upload their APK to their Android devices, they won't need to run uninstall. So this will improve the developer user experience.
What should be changed?
Example of generating debug keystore
keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000
- Keystore name: "debug.keystore"
- Keystore password: "android"
- Key alias: "androiddebugkey"
- Key password: "android"
- CN: "CN=Android Debug,O=Android,C=US"
Example directories of debug.keystore
~/.android/ on OS X and Linux
C:\Users\user\.android\ on Windows Vista and Windows 7, 8, and 10
C:\Documents and Settings\user\.android\ on Windows XP
Android Keystore location and example output
These files were created by Android Studio after installing/running on Linux. You can make out that androiddebugkey is in the keystore file, so this is likely still the default way to generate a key.
Related resources
What should this work do?
When using
debugkeystore we should attempt to locate$HOME/.android/debug.keystoreas per Android API docs here. Failing finding it, we should consider trying to generate the debug key and placing it in this directory (if it exists)What is the motivation?
We won't end up blowing away the keystore generated in
.zig-cacheanymore which means when developers delete.zig-cacheand re-build / upload their APK to their Android devices, they won't need to run uninstall. So this will improve the developer user experience.What should be changed?
debug(ie.const debug: CreateKey =), this should use the example below as that follows Googles expected debug format. ie. What comes from usingkeytoolconst example: CreateKeypoint atdebugand add a comment saying it is deprecated.debugfirst check for its own existence in the example directories listed below.~/.android/on OS X and LinuxC:\Users\user\.android\on Windows Vista and Windows 7, 8, and 10debuginstead of deprecatedexampleconstant.CreateKeyname toKeyToolOptionsconst CreateKey = KeyToolOptionsthat has a/// Deprecated: Use KeyToolOptions insteadExample of generating debug keystore
Example directories of debug.keystore
~/.android/on OS X and LinuxC:\Users\user\.android\on Windows Vista and Windows 7, 8, and 10C:\Documents and Settings\user\.android\on Windows XPAndroid Keystore location and example output
These files were created by Android Studio after installing/running on Linux. You can make out that
androiddebugkeyis in the keystore file, so this is likely still the default way to generate a key.Related resources