├── .gitignore ├── AndroidKeystoreSignatureGenerator ├── AndroidKeystoreSignatureGenerator.csproj ├── Generator.cs ├── LocationHelper.cs ├── LocationHelperUnix.cs ├── LocationHelperWindows.cs ├── PlatformDetection.cs ├── Properties │ └── AssemblyInfo.cs ├── RegistryEx.cs └── androidkeystoresignaturegenerator.snk ├── Assets └── VSIX.Screenshot.png ├── LICENSE.txt ├── README.md ├── VS.Mac ├── AndroidKeystoreSignatureTool.VS.Mac.sln ├── AndroidKeystoreSignatureTool.VS.Mac │ ├── .gitignore │ ├── AndroidKeystoreSignatureTool.VS.Mac.csproj │ ├── Dialogs │ │ └── SignatureToolDialog.cs │ ├── Properties │ │ ├── AndroidSigToolAddin.addin.xml │ │ └── AssemblyInfo.cs │ ├── SignatureToolCommandHandler.cs │ ├── gtk-gui │ │ ├── AndroidKeystoreSignatureTool.Dialogs.SignatureToolDialog.cs │ │ ├── generated.cs │ │ └── gui.stetic │ └── packages.config └── addin-project.xml ├── VS.Win ├── AndroidKeystoreSignatureTool.VSIX.sln └── AndroidKeystoreSignatureTool.VSIX │ ├── AndroidKeystoreSignatureTool.VSIX.csproj │ ├── AndroidSignatureToolCommand.cs │ ├── AndroidSignatureToolCommandPackage.cs │ ├── AndroidSignatureToolCommandPackage.vsct │ ├── Key.snk │ ├── LICENSE.txt │ ├── Properties │ └── AssemblyInfo.cs │ ├── Resources │ ├── AndroidSignatureToolCommand.png │ ├── AndroidSignatureToolCommandPackage.ico │ ├── AndroidSignatureToolWindowCommand.png │ ├── SignaturesToolWindowCommand.png │ └── ToolWindowCommand.png │ ├── ToolWindow.cs │ ├── ToolWindowCommand.cs │ ├── ToolWindowControl.xaml │ ├── ToolWindowControl.xaml.cs │ ├── ToolWindowViewModel.cs │ ├── VSIX.Screenshot.png │ ├── VSPackage.resx │ ├── index.html │ ├── packages.config │ ├── source.extension.vsixmanifest │ └── stylesheet.css └── pack.sh /.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | obj/ 3 | packages/ 4 | *.userprefs 5 | *.user -------------------------------------------------------------------------------- /AndroidKeystoreSignatureGenerator/AndroidKeystoreSignatureGenerator.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {117CD6EF-E33D-4A66-99ED-78CBEA508DB7} 9 | Library 10 | AndroidKeystoreSignatureGenerator 11 | AndroidKeystoreSignatureGenerator 12 | v4.5 13 | 14 | 15 | true 16 | full 17 | false 18 | bin\Debug 19 | DEBUG; 20 | prompt 21 | 4 22 | false 23 | 24 | 25 | true 26 | bin\Release 27 | prompt 28 | 4 29 | false 30 | 31 | 32 | true 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /AndroidKeystoreSignatureGenerator/Generator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using System.IO; 4 | using System.Text.RegularExpressions; 5 | 6 | [assembly: System.Reflection.AssemblyKeyFileAttribute("androidkeystoresignaturegenerator.snk")] 7 | 8 | namespace AndroidKeystoreSignatureGenerator 9 | { 10 | public interface IAndroidKeystoreSignatureGenerator 11 | { 12 | string KeytoolPath { get; } 13 | string KeystorePath { get; } 14 | string KeystoreAlias { get; } 15 | string KeystoreStorepass { get; } 16 | string KeystoreKeypass { get; } 17 | 18 | KeystoreSignatures GenerateSignatures(); 19 | FacebookKeystoreSignatures GenerateFacebookSignatures(); 20 | } 21 | 22 | public static class KeystoreSignatureGeneratorFactory 23 | { 24 | const string XAMARIN_DEFAULT_KEYSTORE_DEBUG_ALIAS = "androiddebugkey"; 25 | const string XAMARIN_DEFAULT_KEYSTORE_DEBUG_STOREPASS = "android"; 26 | const string XAMARIN_DEFAULT_KEYSTORE_DEBUG_KEYPASS = "android"; 27 | 28 | 29 | public static IAndroidKeystoreSignatureGenerator CreateForXamarinDebugKeystore(string keytoolPath) 30 | { 31 | if (string.IsNullOrEmpty(keytoolPath)) 32 | keytoolPath = LocationHelper.GetJavaKeytoolPath(); 33 | 34 | if (!File.Exists(keytoolPath)) 35 | throw new FileNotFoundException("Failed to locate keytool", keytoolPath); 36 | 37 | var debugKeystore = LocationHelper.GetXamarinDebugKeystorePath(); 38 | 39 | if (!File.Exists(debugKeystore)) 40 | throw new FileNotFoundException("Failed to locate debug.keystore", debugKeystore); 41 | 42 | return new KeystoreSignatureGenerator( 43 | keytoolPath, 44 | debugKeystore, 45 | XAMARIN_DEFAULT_KEYSTORE_DEBUG_ALIAS, 46 | XAMARIN_DEFAULT_KEYSTORE_DEBUG_STOREPASS, 47 | XAMARIN_DEFAULT_KEYSTORE_DEBUG_KEYPASS); 48 | } 49 | 50 | public static IAndroidKeystoreSignatureGenerator Create(string keytoolPath, string keystorePath, string keystoreAlias, string keystoreStorepass = "", string keystoreKeypass = "") 51 | { 52 | if (string.IsNullOrEmpty(keytoolPath)) 53 | keytoolPath = LocationHelper.GetJavaKeytoolPath(); 54 | 55 | if (!File.Exists(keytoolPath)) 56 | throw new FileNotFoundException("Failed to locate keytool", keytoolPath); 57 | 58 | if (!File.Exists(keystorePath)) 59 | throw new FileNotFoundException("Failed to locate keystore", keystorePath); 60 | 61 | return new KeystoreSignatureGenerator(keytoolPath, keystorePath, keystoreAlias, keystoreStorepass, keystoreKeypass); 62 | } 63 | } 64 | 65 | class KeystoreSignatureGenerator : IAndroidKeystoreSignatureGenerator 66 | { 67 | public KeystoreSignatureGenerator(string keytoolPath, string keystorePath, string keystoreAlias, string keystoreStorepass, string keystoreKeypass) 68 | { 69 | KeytoolPath = keytoolPath; 70 | KeystorePath = keystorePath; 71 | KeystoreAlias = keystoreAlias; 72 | KeystoreStorepass = keystoreStorepass; 73 | KeystoreKeypass = keystoreKeypass; 74 | } 75 | 76 | public string KeytoolPath { get; private set; } 77 | public string KeystorePath { get; private set; } 78 | public string KeystoreAlias { get; private set; } 79 | public string KeystoreStorepass { get; private set; } 80 | public string KeystoreKeypass { get; private set; } 81 | 82 | public KeystoreSignatures GenerateSignatures () 83 | { 84 | var result = new KeystoreSignatures(); 85 | 86 | var output = RunProcess(KeytoolPath, string.Format("-list -v -keystore \"{0}\" -alias {1} -storepass {2} -keypass {3}", KeystorePath, KeystoreAlias, KeystoreStorepass, KeystoreKeypass)); 87 | 88 | var rxMd5 = "MD5:\\s+(?[A-Za-z0-9:]+)"; 89 | var rxSha1 = "SHA1:\\s+(?[A-Za-z0-9:]+)"; 90 | var rxSha256 = "SHA256:\\s+(?[A-Za-z0-9:]+)"; 91 | 92 | var md5 = Regex.Match(output, rxMd5, RegexOptions.Singleline | RegexOptions.IgnoreCase); 93 | var sha1 = Regex.Match(output, rxSha1, RegexOptions.Singleline | RegexOptions.IgnoreCase); 94 | var sha256 = Regex.Match(output, rxSha256, RegexOptions.Singleline | RegexOptions.IgnoreCase); 95 | 96 | 97 | if (md5 != null && md5.Success) 98 | { 99 | if (md5.Groups["sig"] != null && md5.Groups["sig"] != null && md5.Groups["sig"].Success) 100 | result.Md5 = md5.Groups["sig"].Value; 101 | } 102 | 103 | if (sha1 != null && sha1.Success) 104 | { 105 | if (sha1.Groups["sig"] != null && sha1.Groups["sig"] != null && sha1.Groups["sig"].Success) 106 | result.Sha1 = sha1.Groups["sig"].Value; 107 | } 108 | 109 | if (sha256 != null && sha256.Success) 110 | { 111 | if (sha256.Groups["sig"] != null && sha256.Groups["sig"] != null && sha256.Groups["sig"].Success) 112 | result.Sha256 = sha256.Groups["sig"].Value; 113 | } 114 | 115 | return result; 116 | } 117 | 118 | public FacebookKeystoreSignatures GenerateFacebookSignatures() 119 | { 120 | //keytool -exportcert -alias -keystore | openssl sha1 -binary | openssl base64 121 | 122 | // keytool -exportcert -alias my_key -keystore my.keystore -storepass PASSWORD > mycert.bin 123 | // openssl sha1 - binary mycert.bin > sha1.bin 124 | // openssl base64 -in sha1.bin -out base64.txt 125 | var result = new FacebookKeystoreSignatures(); 126 | 127 | using (var certStream = new MemoryStream()) 128 | using (var sha1Stream = new MemoryStream()) 129 | { 130 | var args = string.Format("-exportcert -alias {0} -keystore \"{1}\" -storepass {2}", KeystoreAlias, KeystorePath, KeystoreStorepass); 131 | RunProcessBinary(KeytoolPath, args, null, certStream); 132 | certStream.Seek(0, SeekOrigin.Begin); 133 | 134 | if (certStream.Length > 0) 135 | { 136 | try 137 | { 138 | var sha1 = System.Security.Cryptography.SHA1.Create(); 139 | var sha1Bytes = sha1.ComputeHash(certStream); 140 | result.Sha1 = Convert.ToBase64String(sha1Bytes); 141 | } 142 | catch { } 143 | 144 | try 145 | { 146 | var sha256 = System.Security.Cryptography.SHA256.Create(); 147 | var sha256Bytes = sha256.ComputeHash(certStream); 148 | result.Sha256 = Convert.ToBase64String(sha256Bytes); 149 | } 150 | catch { } 151 | } 152 | } 153 | 154 | return result; 155 | } 156 | 157 | string RunProcess(string file, string args, Stream stdinStream = null) 158 | { 159 | var sbOut = new StringBuilder(); 160 | 161 | var p = new System.Diagnostics.Process(); 162 | p.StartInfo = new System.Diagnostics.ProcessStartInfo(file, args); 163 | p.StartInfo.UseShellExecute = false; 164 | p.StartInfo.RedirectStandardOutput = true; 165 | if (stdinStream != null) 166 | p.StartInfo.RedirectStandardInput = true; 167 | p.StartInfo.CreateNoWindow = true; 168 | p.OutputDataReceived += (sender, e) => 169 | { 170 | sbOut.Append(e.Data); 171 | }; 172 | 173 | p.Start(); 174 | p.BeginOutputReadLine(); 175 | 176 | if (stdinStream != null) 177 | { 178 | stdinStream.CopyTo(p.StandardInput.BaseStream); 179 | p.StandardInput.Close(); 180 | } 181 | 182 | p.WaitForExit(); 183 | 184 | return sbOut.ToString(); 185 | } 186 | 187 | void RunProcessBinary(string file, string args, Stream stdinStream, Stream stdoutStream) 188 | { 189 | var p = new System.Diagnostics.Process(); 190 | p.StartInfo = new System.Diagnostics.ProcessStartInfo(file, args); 191 | p.StartInfo.UseShellExecute = false; 192 | p.StartInfo.RedirectStandardOutput = true; 193 | if (stdinStream != null) 194 | p.StartInfo.RedirectStandardInput = true; 195 | p.StartInfo.CreateNoWindow = true; 196 | p.Start(); 197 | 198 | if (stdinStream != null) 199 | { 200 | stdinStream.CopyTo(p.StandardInput.BaseStream); 201 | p.StandardInput.Close(); 202 | } 203 | 204 | p.StandardOutput.BaseStream.CopyTo(stdoutStream); 205 | p.WaitForExit(); 206 | } 207 | } 208 | 209 | public class KeystoreSignatures 210 | { 211 | public string Md5 { get; set; } 212 | public string Sha1 { get; set; } 213 | public string Sha256 { get; set; } 214 | } 215 | 216 | public class FacebookKeystoreSignatures 217 | { 218 | public string Sha1 { get; set; } 219 | public string Sha256 { get; set; } 220 | } 221 | } 222 | -------------------------------------------------------------------------------- /AndroidKeystoreSignatureGenerator/LocationHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AndroidKeystoreSignatureGenerator 4 | { 5 | public static class LocationHelper 6 | { 7 | static ILocations locations; 8 | 9 | static LocationHelper() 10 | { 11 | if (PlatformDetection.IsWindows) 12 | locations = new LocationHelperWindows(); 13 | else 14 | locations = new LocationHelperUnix(); 15 | } 16 | 17 | public static string GetXamarinDebugKeystorePath() 18 | { 19 | return locations.GetXamarinDebugKeystorePath(); 20 | } 21 | 22 | public static string GetJavaKeytoolPath() 23 | { 24 | return locations.GetJavaKeytoolPath(); 25 | } 26 | 27 | public static string GetAndroidSdkDirectory() 28 | { 29 | return locations.GetAndroidSdkDirectory(); 30 | } 31 | 32 | public static string GetJavaSdkDirectory() 33 | { 34 | return locations.GetJavaSdkDirectory(); 35 | } 36 | 37 | public static string GetXamarinSdkDirectory() 38 | { 39 | return locations.GetXamarinSdkDirectory(); 40 | } 41 | } 42 | 43 | public interface ILocations 44 | { 45 | string GetXamarinDebugKeystorePath(); 46 | string GetJavaKeytoolPath(); 47 | string GetAndroidSdkDirectory(); 48 | string GetJavaSdkDirectory(); 49 | string GetXamarinSdkDirectory(); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /AndroidKeystoreSignatureGenerator/LocationHelperUnix.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace AndroidKeystoreSignatureGenerator 5 | { 6 | public class LocationHelperUnix : ILocations 7 | { 8 | #region ILocations Members 9 | public string GetJavaSdkDirectory() 10 | { 11 | // Check each directory in $PATH 12 | var path = Environment.GetEnvironmentVariable("PATH"); 13 | var pathDirs = path.Split(new char[] { Path.PathSeparator }, StringSplitOptions.RemoveEmptyEntries); 14 | 15 | foreach (var dir in pathDirs) 16 | if (ValidateJavaSdkLocation(Path.GetDirectoryName(dir))) 17 | return Path.GetDirectoryName(dir); 18 | 19 | // We ran out of things to check.. 20 | return null; 21 | } 22 | 23 | public string GetAndroidSdkDirectory() 24 | { 25 | // Check the environment variable override first 26 | var location = Environment.GetEnvironmentVariable("ANDROID_SDK_PATH"); 27 | 28 | if (ValidateAndroidSdkLocation(location)) 29 | return location; 30 | 31 | // Check each directory in $PATH 32 | var path = Environment.GetEnvironmentVariable("PATH"); 33 | var pathDirs = path.Split(new char[] { Path.PathSeparator }, StringSplitOptions.RemoveEmptyEntries); 34 | 35 | foreach (var dir in pathDirs) 36 | if (ValidateAndroidSdkLocation(dir)) 37 | return dir; 38 | 39 | // We ran out of things to check.. 40 | return null; 41 | } 42 | 43 | public string GetXamarinSdkDirectory() 44 | { 45 | // Right now all we use this for is finding libxoid.so 46 | return Environment.GetEnvironmentVariable("MONO_ANDROID_PATH"); 47 | } 48 | 49 | public string GetJavaKeytoolPath() 50 | { 51 | return Path.Combine(GetJavaSdkDirectory(), "bin", "keytool"); 52 | } 53 | 54 | public string GetXamarinDebugKeystorePath() 55 | { 56 | return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".local/share/Xamarin/Mono for Android/debug.keystore"); 57 | } 58 | #endregion 59 | 60 | public static bool ValidateAndroidSdkLocation(string loc) 61 | { 62 | return !string.IsNullOrEmpty(loc) && File.Exists(Path.Combine(Path.Combine(loc, "platform-tools"), "adb")); 63 | } 64 | 65 | public static bool ValidateJavaSdkLocation(string loc) 66 | { 67 | return !string.IsNullOrEmpty(loc) && File.Exists(Path.Combine(Path.Combine(loc, "bin"), "jarsigner")); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /AndroidKeystoreSignatureGenerator/LocationHelperWindows.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Runtime.InteropServices; 4 | using System.Text; 5 | 6 | namespace AndroidKeystoreSignatureGenerator 7 | { 8 | public class LocationHelperWindows : ILocations 9 | { 10 | const string MDREG_KEY = @"SOFTWARE\Novell\Mono for Android"; 11 | const string MDREG_ANDROID = "AndroidSdkDirectory"; 12 | const string MDREG_JAVA = "JavaSdkDirectory"; 13 | const string MDREG_MONODROID = "InstallDirectory"; 14 | const string ANDROID_INSTALLER_PATH = @"SOFTWARE\Android SDK Tools"; 15 | const string ANDROID_INSTALLER_KEY = "Path"; 16 | 17 | #region ILocations Members 18 | public string GetJavaSdkDirectory() 19 | { 20 | string subkey = @"SOFTWARE\JavaSoft\Java Development Kit"; 21 | 22 | LogMessage("Looking for Java SDK.."); 23 | 24 | // Look for the registry keys written by the Java SDK installer 25 | foreach (var wow64 in new[] { RegistryEx.Wow64.Key32, RegistryEx.Wow64.Key64 }) 26 | { 27 | string key_name = string.Format(@"{0}\{1}\{2}", "HKLM", subkey, "CurrentVersion"); 28 | var currentVersion = RegistryEx.GetValueString(RegistryEx.LocalMachine, subkey, "CurrentVersion", wow64); 29 | 30 | if (!string.IsNullOrEmpty(currentVersion)) 31 | { 32 | LogMessage(" Key {0} found: {1}.", key_name, currentVersion); 33 | 34 | if (CheckRegistryKeyForExecutable(RegistryEx.LocalMachine, subkey + "\\" + currentVersion, "JavaHome", wow64, "bin", "jarsigner.exe")) 35 | return RegistryEx.GetValueString(RegistryEx.LocalMachine, subkey + "\\" + currentVersion, "JavaHome", wow64); 36 | } 37 | 38 | LogMessage(" Key {0} not found.", key_name); 39 | } 40 | 41 | // We ran out of things to check.. 42 | return null; 43 | } 44 | 45 | public string GetAndroidSdkDirectory() 46 | { 47 | var roots = new[] { RegistryEx.CurrentUser, RegistryEx.LocalMachine }; 48 | var wow = RegistryEx.Wow64.Key32; 49 | 50 | LogMessage("Looking for Android SDK.."); 51 | 52 | // Check for the key written by the Android SDK installer first 53 | foreach (var root in roots) 54 | if (CheckRegistryKeyForExecutable(root, ANDROID_INSTALLER_PATH, ANDROID_INSTALLER_KEY, wow, "platform-tools", "adb.exe")) 55 | return RegistryEx.GetValueString(root, ANDROID_INSTALLER_PATH, ANDROID_INSTALLER_KEY, wow); 56 | 57 | // Check for the key the user gave us in the VS options page 58 | foreach (var root in roots) 59 | if (CheckRegistryKeyForExecutable(root, MDREG_KEY, MDREG_ANDROID, wow, "platform-tools", "adb.exe")) 60 | return RegistryEx.GetValueString(root, MDREG_KEY, MDREG_ANDROID, wow); 61 | 62 | // Check 2 default locations 63 | var program_files = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86); 64 | var installerLoc = Path.Combine(program_files, @"\Android\android-sdk-windows"); 65 | var unzipLoc = @"C:\android-sdk-windows"; 66 | 67 | if (ValidateAndroidSdkLocation(installerLoc)) 68 | { 69 | LogMessage(" adb.exe found in {0}", installerLoc); 70 | return installerLoc; 71 | } 72 | 73 | if (ValidateAndroidSdkLocation(unzipLoc)) 74 | { 75 | LogMessage(" adb.exe found in {0}", unzipLoc); 76 | return unzipLoc; 77 | } 78 | 79 | // We ran out of things to check.. 80 | return null; 81 | } 82 | 83 | public string GetXamarinSdkDirectory() 84 | { 85 | // Find user's \Program Files (x86) 86 | var programFilesX86 = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86); 87 | 88 | // We keep our tools in: 89 | // \MSBuild\Xamarin 90 | return Path.Combine(programFilesX86, "MSBuild", "Xamarin"); 91 | } 92 | 93 | public string GetJavaKeytoolPath() 94 | { 95 | return Path.Combine(GetJavaSdkDirectory(), "bin", "keytool.exe"); 96 | } 97 | 98 | public string GetXamarinDebugKeystorePath() 99 | { 100 | return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), @"AppData\Local\Xamarin\Mono for Android\debug.keystore"); 101 | } 102 | #endregion 103 | 104 | private static void LogMessage(string message) 105 | { 106 | Console.WriteLine(message); 107 | } 108 | private static void LogMessage(string message, params object[] args) 109 | { 110 | Console.WriteLine(message, args); 111 | } 112 | private static bool CheckRegistryKeyForExecutable(UIntPtr key, string subkey, string valueName, RegistryEx.Wow64 wow64, string subdir, string exe) 113 | { 114 | string key_name = string.Format(@"{0}\{1}\{2}", key == RegistryEx.CurrentUser ? "HKCU" : "HKLM", subkey, valueName); 115 | 116 | var path = NullIfEmpty(RegistryEx.GetValueString(key, subkey, valueName, wow64)); 117 | 118 | if (path == null) 119 | { 120 | LogMessage(" Key {0} not found.", key_name); 121 | return false; 122 | } 123 | 124 | if (!File.Exists(Path.Combine(path, subdir, exe))) 125 | { 126 | LogMessage(" Key {0} found:\n Path does not contain {1} in \\{2} ({3}).", key_name, exe, subdir, path); 127 | return false; 128 | } 129 | 130 | LogMessage(" Key {0} found:\n Path contains {1} in \\{2} ({3}).", key_name, exe, subdir, path); 131 | 132 | return true; 133 | } 134 | 135 | static string NullIfEmpty(string s) 136 | { 137 | if (s == null || s.Length != 0) 138 | return s; 139 | return null; 140 | } 141 | 142 | public static bool ValidateAndroidSdkLocation(string loc) 143 | { 144 | return !string.IsNullOrEmpty(loc) && File.Exists(Path.Combine(Path.Combine(loc, "platform-tools"), "adb.exe")); 145 | } 146 | 147 | class RegistryEx 148 | { 149 | const string ADVAPI = "advapi32.dll"; 150 | 151 | public static UIntPtr CurrentUser = (UIntPtr)0x80000001; 152 | public static UIntPtr LocalMachine = (UIntPtr)0x80000002; 153 | 154 | [DllImport(ADVAPI, CharSet = CharSet.Unicode, SetLastError = true)] 155 | static extern int RegOpenKeyEx(UIntPtr hKey, string subKey, uint reserved, uint sam, out UIntPtr phkResult); 156 | 157 | [DllImport(ADVAPI, CharSet = CharSet.Unicode, SetLastError = true)] 158 | static extern int RegQueryValueExW(UIntPtr hKey, string lpValueName, int lpReserved, out uint lpType, 159 | StringBuilder lpData, ref uint lpcbData); 160 | 161 | [DllImport(ADVAPI, CharSet = CharSet.Unicode, SetLastError = true)] 162 | static extern int RegSetValueExW(UIntPtr hKey, string lpValueName, int lpReserved, 163 | uint dwType, string data, uint cbData); 164 | 165 | [DllImport(ADVAPI, CharSet = CharSet.Unicode, SetLastError = true)] 166 | static extern int RegSetValueExW(UIntPtr hKey, string lpValueName, int lpReserved, 167 | uint dwType, IntPtr data, uint cbData); 168 | 169 | [DllImport(ADVAPI, CharSet = CharSet.Unicode, SetLastError = true)] 170 | static extern int RegCreateKeyEx(UIntPtr hKey, string subKey, uint reserved, string @class, uint options, 171 | uint samDesired, IntPtr lpSecurityAttributes, out UIntPtr phkResult, out Disposition lpdwDisposition); 172 | 173 | [DllImport("advapi32.dll", SetLastError = true)] 174 | static extern int RegCloseKey(UIntPtr hKey); 175 | 176 | public static string GetValueString(UIntPtr key, string subkey, string valueName, Wow64 wow64) 177 | { 178 | UIntPtr regKeyHandle; 179 | uint sam = (uint)Rights.QueryValue + (uint)wow64; 180 | if (RegOpenKeyEx(key, subkey, 0, sam, out regKeyHandle) != 0) 181 | return null; 182 | 183 | try 184 | { 185 | uint type; 186 | var sb = new StringBuilder(2048); 187 | uint cbData = (uint)sb.Capacity; 188 | if (RegQueryValueExW(regKeyHandle, valueName, 0, out type, sb, ref cbData) == 0) 189 | { 190 | return sb.ToString(); 191 | } 192 | return null; 193 | } 194 | finally 195 | { 196 | RegCloseKey(regKeyHandle); 197 | } 198 | } 199 | 200 | public static void SetValueString(UIntPtr key, string subkey, string valueName, string value, Wow64 wow64) 201 | { 202 | UIntPtr regKeyHandle; 203 | uint sam = (uint)(Rights.CreateSubKey | Rights.SetValue) + (uint)wow64; 204 | uint options = (uint)Options.NonVolatile; 205 | Disposition disposition; 206 | if (RegCreateKeyEx(key, subkey, 0, null, options, sam, IntPtr.Zero, out regKeyHandle, out disposition) != 0) 207 | { 208 | throw new Exception("Could not open or craete key"); 209 | } 210 | 211 | try 212 | { 213 | uint type = (uint)ValueType.String; 214 | uint lenBytesPlusNull = ((uint)value.Length + 1) * 2; 215 | var result = RegSetValueExW(regKeyHandle, valueName, 0, type, value, lenBytesPlusNull); 216 | if (result != 0) 217 | throw new Exception(string.Format("Error {0} setting registry key '{1}{2}@{3}'='{4}'", 218 | result, key, subkey, valueName, value)); 219 | } 220 | finally 221 | { 222 | RegCloseKey(regKeyHandle); 223 | } 224 | } 225 | 226 | [Flags] 227 | enum Rights : uint 228 | { 229 | None = 0, 230 | QueryValue = 0x0001, 231 | SetValue = 0x0002, 232 | CreateSubKey = 0x0004, 233 | EnumerateSubKey = 0x0008, 234 | } 235 | 236 | enum Options 237 | { 238 | BackupRestore = 0x00000004, 239 | CreateLink = 0x00000002, 240 | NonVolatile = 0x00000000, 241 | Volatile = 0x00000001, 242 | } 243 | 244 | public enum Wow64 : uint 245 | { 246 | Key64 = 0x0100, 247 | Key32 = 0x0200, 248 | } 249 | 250 | enum ValueType : uint 251 | { 252 | None = 0, //REG_NONE 253 | String = 1, //REG_SZ 254 | UnexpandedString = 2, //REG_EXPAND_SZ 255 | Binary = 3, //REG_BINARY 256 | DWord = 4, //REG_DWORD 257 | DWordLittleEndian = 4, //REG_DWORD_LITTLE_ENDIAN 258 | DWordBigEndian = 5, //REG_DWORD_BIG_ENDIAN 259 | Link = 6, //REG_LINK 260 | MultiString = 7, //REG_MULTI_SZ 261 | ResourceList = 8, //REG_RESOURCE_LIST 262 | FullResourceDescriptor = 9, //REG_FULL_RESOURCE_DESCRIPTOR 263 | ResourceRequirementsList = 10, //REG_RESOURCE_REQUIREMENTS_LIST 264 | QWord = 11, //REG_QWORD 265 | QWordLittleEndian = 11, //REG_QWORD_LITTLE_ENDIAN 266 | } 267 | 268 | enum Disposition : uint 269 | { 270 | CreatedNewKey = 0x00000001, 271 | OpenedExistingKey = 0x00000002, 272 | } 273 | } 274 | 275 | } 276 | } 277 | -------------------------------------------------------------------------------- /AndroidKeystoreSignatureGenerator/PlatformDetection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace AndroidKeystoreSignatureGenerator 5 | { 6 | public static class PlatformDetection 7 | { 8 | public static bool IsMac 9 | { 10 | get 11 | { 12 | if (IsWindows) 13 | return false; 14 | 15 | return MacDetector.IsRunningOnMac(); 16 | } 17 | } 18 | 19 | public static bool IsLinux 20 | { 21 | get 22 | { 23 | if (IsWindows) 24 | return false; 25 | 26 | return !IsMac; 27 | } 28 | } 29 | 30 | public static bool IsWindows 31 | { 32 | get 33 | { 34 | var p = Environment.OSVersion.Platform; 35 | 36 | return p != PlatformID.Unix && p != PlatformID.MacOSX; 37 | } 38 | } 39 | } 40 | 41 | static class MacDetector 42 | { 43 | static MacDetector() 44 | { 45 | System.Diagnostics.Debug.WriteLine("MacDetector ctor"); 46 | 47 | } 48 | 49 | public static bool IsRunningOnMac() 50 | { 51 | IntPtr buf = IntPtr.Zero; 52 | try 53 | { 54 | buf = System.Runtime.InteropServices.Marshal.AllocHGlobal(8192); 55 | // This is a hacktastic way of getting sysname from uname () 56 | if (uname(buf) == 0) 57 | { 58 | string os = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(buf); 59 | if (os == "Darwin") 60 | return true; 61 | } 62 | } 63 | catch 64 | { 65 | } 66 | finally 67 | { 68 | if (buf != IntPtr.Zero) 69 | System.Runtime.InteropServices.Marshal.FreeHGlobal(buf); 70 | } 71 | return false; 72 | } 73 | 74 | [System.Runtime.InteropServices.DllImport("libc")] 75 | static extern int uname(IntPtr buf); 76 | } 77 | } 78 | 79 | -------------------------------------------------------------------------------- /AndroidKeystoreSignatureGenerator/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | 5 | // Information about this assembly is defined by the following attributes. 6 | // Change them to the values specific to your project. 7 | 8 | [assembly: AssemblyTitle("AndroidKeystoreSignatureGenerator")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("")] 13 | [assembly: AssemblyCopyright("${AuthorCopyright}")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 20 | 21 | [assembly: AssemblyVersion("1.0.*")] 22 | [assembly: ComVisible(false)] 23 | [assembly: Guid("c1b93127-159a-4f9c-b0c1-fab5c775c94e")] 24 | 25 | // The following attributes are used to specify the signing key for the assembly, 26 | // if desired. See the Mono documentation for more information about signing. 27 | 28 | //[assembly: AssemblyDelaySign(false)] 29 | //[assembly: AssemblyKeyFile("")] 30 | -------------------------------------------------------------------------------- /AndroidKeystoreSignatureGenerator/RegistryEx.cs: -------------------------------------------------------------------------------- 1 | // 2 | // RegistryEx.cs 3 | // 4 | // Authors: 5 | // Michael Hutchinson 6 | // 7 | // Copyright 2012 Xamarin Inc. All rights reserved. 8 | // 9 | 10 | using System; 11 | using System.Runtime.InteropServices; 12 | using System.Text; 13 | 14 | namespace Xamarin.AndroidTools.Sdks 15 | { 16 | internal static class RegistryEx 17 | { 18 | const string ADVAPI = "advapi32.dll"; 19 | 20 | public static UIntPtr CurrentUser = (UIntPtr)0x80000001; 21 | public static UIntPtr LocalMachine = (UIntPtr)0x80000002; 22 | 23 | [DllImport (ADVAPI, CharSet = CharSet.Unicode, SetLastError = true)] 24 | static extern int RegOpenKeyEx (UIntPtr hKey, string subKey, uint reserved, uint sam, out UIntPtr phkResult); 25 | 26 | [DllImport (ADVAPI, CharSet = CharSet.Unicode, SetLastError = true)] 27 | static extern int RegQueryValueExW (UIntPtr hKey, string lpValueName, int lpReserved, out uint lpType, 28 | StringBuilder lpData, ref uint lpcbData); 29 | 30 | [DllImport (ADVAPI, CharSet = CharSet.Unicode, SetLastError = true)] 31 | static extern int RegSetValueExW (UIntPtr hKey, string lpValueName, int lpReserved, 32 | uint dwType, string data, uint cbData); 33 | 34 | [DllImport (ADVAPI, CharSet = CharSet.Unicode, SetLastError = true)] 35 | static extern int RegSetValueExW (UIntPtr hKey, string lpValueName, int lpReserved, 36 | uint dwType, IntPtr data, uint cbData); 37 | 38 | [DllImport (ADVAPI, CharSet = CharSet.Unicode, SetLastError = true)] 39 | static extern int RegCreateKeyEx (UIntPtr hKey, string subKey, uint reserved, string @class, uint options, 40 | uint samDesired, IntPtr lpSecurityAttributes, out UIntPtr phkResult, out Disposition lpdwDisposition); 41 | 42 | [DllImport ("advapi32.dll", SetLastError = true)] 43 | static extern int RegCloseKey (UIntPtr hKey); 44 | 45 | public static string GetValueString (UIntPtr key, string subkey, string valueName, Wow64 wow64) 46 | { 47 | UIntPtr regKeyHandle; 48 | uint sam = (uint)Rights.QueryValue + (uint)wow64; 49 | if (RegOpenKeyEx (key, subkey, 0, sam, out regKeyHandle) != 0) 50 | return null; 51 | 52 | try { 53 | uint type; 54 | var sb = new StringBuilder (2048); 55 | uint cbData = (uint)sb.Capacity; 56 | if (RegQueryValueExW (regKeyHandle, valueName, 0, out type, sb, ref cbData) == 0) { 57 | return sb.ToString (); 58 | } 59 | return null; 60 | } finally { 61 | RegCloseKey (regKeyHandle); 62 | } 63 | } 64 | 65 | public static void SetValueString (UIntPtr key, string subkey, string valueName, string value, Wow64 wow64) 66 | { 67 | UIntPtr regKeyHandle; 68 | uint sam = (uint)(Rights.CreateSubKey | Rights.SetValue) + (uint)wow64; 69 | uint options = (uint)Options.NonVolatile; 70 | Disposition disposition; 71 | if (RegCreateKeyEx (key, subkey, 0, null, options, sam, IntPtr.Zero, out regKeyHandle, out disposition) != 0) { 72 | throw new Exception ("Could not open or craete key"); 73 | } 74 | 75 | try { 76 | uint type = (uint)ValueType.String; 77 | uint lenBytesPlusNull = ((uint)value.Length + 1) * 2; 78 | var result = RegSetValueExW (regKeyHandle, valueName, 0, type, value, lenBytesPlusNull); 79 | if (result != 0) 80 | throw new Exception (string.Format ("Error {0} setting registry key '{1}{2}@{3}'='{4}'", 81 | result, key, subkey, valueName, value)); 82 | } finally { 83 | RegCloseKey (regKeyHandle); 84 | } 85 | } 86 | 87 | [Flags] 88 | enum Rights : uint 89 | { 90 | None = 0, 91 | QueryValue = 0x0001, 92 | SetValue = 0x0002, 93 | CreateSubKey = 0x0004, 94 | EnumerateSubKey = 0x0008, 95 | } 96 | 97 | enum Options 98 | { 99 | BackupRestore = 0x00000004, 100 | CreateLink = 0x00000002, 101 | NonVolatile = 0x00000000, 102 | Volatile = 0x00000001, 103 | } 104 | 105 | public enum Wow64 : uint 106 | { 107 | Key64 = 0x0100, 108 | Key32 = 0x0200, 109 | } 110 | 111 | enum ValueType : uint 112 | { 113 | None = 0, //REG_NONE 114 | String = 1, //REG_SZ 115 | UnexpandedString = 2, //REG_EXPAND_SZ 116 | Binary = 3, //REG_BINARY 117 | DWord = 4, //REG_DWORD 118 | DWordLittleEndian = 4, //REG_DWORD_LITTLE_ENDIAN 119 | DWordBigEndian = 5, //REG_DWORD_BIG_ENDIAN 120 | Link = 6, //REG_LINK 121 | MultiString = 7, //REG_MULTI_SZ 122 | ResourceList = 8, //REG_RESOURCE_LIST 123 | FullResourceDescriptor = 9, //REG_FULL_RESOURCE_DESCRIPTOR 124 | ResourceRequirementsList = 10, //REG_RESOURCE_REQUIREMENTS_LIST 125 | QWord = 11, //REG_QWORD 126 | QWordLittleEndian = 11, //REG_QWORD_LITTLE_ENDIAN 127 | } 128 | 129 | enum Disposition : uint 130 | { 131 | CreatedNewKey = 0x00000001, 132 | OpenedExistingKey = 0x00000002, 133 | } 134 | } 135 | } -------------------------------------------------------------------------------- /AndroidKeystoreSignatureGenerator/androidkeystoresignaturegenerator.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Redth/AndroidSignatureToolAddin/dd093a340c138534e206a9f30bf3e50ae1ea9125/AndroidKeystoreSignatureGenerator/androidkeystoresignaturegenerator.snk -------------------------------------------------------------------------------- /Assets/VSIX.Screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Redth/AndroidSignatureToolAddin/dd093a340c138534e206a9f30bf3e50ae1ea9125/Assets/VSIX.Screenshot.png -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 newky2k 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Android Signature Tool Addin 2 | ======================== 3 | 4 | An addin for Xamarin Studio which helps you find your MD5 and SHA1 signatures of your .keystore files, including the default Xamarin.Android generated debug.keystore file. 5 | -------------------------------------------------------------------------------- /VS.Mac/AndroidKeystoreSignatureTool.VS.Mac.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AndroidKeystoreSignatureGenerator", "..\AndroidKeystoreSignatureGenerator\AndroidKeystoreSignatureGenerator.csproj", "{117CD6EF-E33D-4A66-99ED-78CBEA508DB7}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AndroidKeystoreSignatureTool.VS.Mac", "AndroidKeystoreSignatureTool.VS.Mac\AndroidKeystoreSignatureTool.VS.Mac.csproj", "{822ABB71-1C84-442B-9347-341FAD978728}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {117CD6EF-E33D-4A66-99ED-78CBEA508DB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {117CD6EF-E33D-4A66-99ED-78CBEA508DB7}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {117CD6EF-E33D-4A66-99ED-78CBEA508DB7}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {117CD6EF-E33D-4A66-99ED-78CBEA508DB7}.Release|Any CPU.Build.0 = Release|Any CPU 18 | {822ABB71-1C84-442B-9347-341FAD978728}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {822ABB71-1C84-442B-9347-341FAD978728}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {822ABB71-1C84-442B-9347-341FAD978728}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {822ABB71-1C84-442B-9347-341FAD978728}.Release|Any CPU.Build.0 = Release|Any CPU 22 | EndGlobalSection 23 | GlobalSection(MonoDevelopProperties) = preSolution 24 | StartupItem = AndroidSigToolAddin\AndroidSigToolAddin.csproj 25 | EndGlobalSection 26 | EndGlobal 27 | -------------------------------------------------------------------------------- /VS.Mac/AndroidKeystoreSignatureTool.VS.Mac/.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | -------------------------------------------------------------------------------- /VS.Mac/AndroidKeystoreSignatureTool.VS.Mac/AndroidKeystoreSignatureTool.VS.Mac.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | 8.0.30703 8 | 2.0 9 | {822ABB71-1C84-442B-9347-341FAD978728} 10 | {86F6BF2A-E449-4B3E-813B-9ACC37E5545F};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 11 | v4.5 12 | Library 13 | AndroidKeystoreSignatureTool 14 | AndroidKeystoreSignatureTool.VS.Mac 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug 21 | DEBUG; 22 | prompt 23 | 4 24 | false 25 | 26 | 27 | full 28 | true 29 | bin\Release 30 | prompt 31 | 4 32 | false 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | gui.stetic 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | {117CD6EF-E33D-4A66-99ED-78CBEA508DB7} 67 | AndroidKeystoreSignatureGenerator 68 | 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /VS.Mac/AndroidKeystoreSignatureTool.VS.Mac/Dialogs/SignatureToolDialog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using MonoDevelop.Projects; 3 | using MonoDevelop.Core.ProgressMonitoring; 4 | using System.Threading.Tasks; 5 | using System.Collections.Generic; 6 | using Gdk; 7 | using AndroidKeystoreSignatureGenerator; 8 | using System.IO; 9 | using Gtk; 10 | 11 | namespace AndroidKeystoreSignatureTool.Dialogs 12 | { 13 | public partial class SignatureToolDialog : Gtk.Dialog 14 | { 15 | public SignatureToolDialog() 16 | { 17 | Build(); 18 | 19 | FieldEditable(); 20 | 21 | entryKeytool.Text = LocationHelper.GetJavaKeytoolPath(); 22 | } 23 | 24 | protected void buttonSha1Copy_Clicked(object sender, EventArgs e) 25 | { 26 | var clipboard = GetClipboard(Gdk.Selection.Clipboard); 27 | clipboard.Text = entrySha1.Text; 28 | } 29 | 30 | protected void buttonMd5Copy_Clicked(object sender, EventArgs e) 31 | { 32 | var clipboard = GetClipboard(Gdk.Selection.Clipboard); 33 | clipboard.Text = entryMd5.Text; 34 | } 35 | 36 | protected void buttonCopySha256_Clicked(System.Object sender, System.EventArgs e) 37 | { 38 | var clipboard = GetClipboard(Gdk.Selection.Clipboard); 39 | clipboard.Text = entrySha256.Text; 40 | } 41 | 42 | protected void buttonCopyFacebookSHA1_Clicked(System.Object sender, System.EventArgs e) 43 | { 44 | var clipboard = GetClipboard(Gdk.Selection.Clipboard); 45 | clipboard.Text = entryFacebookSHA1.Text; 46 | } 47 | 48 | protected async void buttonGenerate_Clicked(object sender, EventArgs e) 49 | { 50 | buttonGenerate.Sensitive = false; 51 | buttonGenerate.Label = "Generating Signtures..."; 52 | 53 | try 54 | { 55 | await Task.Run(() => generate()); 56 | } 57 | catch { } 58 | 59 | buttonGenerate.Label = "Generate Signtures"; 60 | buttonGenerate.Sensitive = true; 61 | } 62 | 63 | void generate() 64 | { 65 | var keytoolPath = entryKeytool.Text; 66 | 67 | if (string.IsNullOrEmpty(keytoolPath)) 68 | { 69 | MsgBox("Unable to locate keytool", "Java Keytool is needed to generate signatures. We were unable to automatically locate keytool. Please enter the location manually."); 70 | return; 71 | } 72 | 73 | IAndroidKeystoreSignatureGenerator generator; 74 | 75 | if (radioDefault.Active) 76 | { 77 | 78 | generator = KeystoreSignatureGeneratorFactory.CreateForXamarinDebugKeystore(keytoolPath); 79 | 80 | } 81 | else 82 | { 83 | 84 | if (!File.Exists(entryCustomKeystore.Text)) 85 | { 86 | MsgBox("Invalid .Keystore File", "The .keystore file you selected was invalid or not found"); 87 | return; 88 | } 89 | 90 | var keystore = entryCustomKeystore.Text; 91 | var alias = entryCustomAlias.Text; 92 | var storepass = entryCustomStorePass.Text; 93 | var keypass = entryCustomKeyPass.Text; 94 | 95 | generator = KeystoreSignatureGeneratorFactory.Create(keytoolPath, keystore, alias, storepass, keypass); 96 | } 97 | 98 | try 99 | { 100 | var sigs = generator.GenerateSignatures(); 101 | entryMd5.Text = sigs.Md5; 102 | entrySha1.Text = sigs.Sha1; 103 | entrySha256.Text = sigs.Sha256; 104 | } 105 | catch (Exception ex) 106 | { 107 | Console.WriteLine(ex); 108 | MsgBox("Error Generating Signatures", "Please make sure you have the correct Keystore alias, store pass, and keypass values!"); 109 | } 110 | 111 | try 112 | { 113 | var fbSigs = generator.GenerateFacebookSignatures(); 114 | entryFacebookSHA1.Text = fbSigs.Sha1; 115 | } 116 | catch (Exception ex) 117 | { 118 | Console.WriteLine(ex); 119 | MsgBox("Error Generating Signatures", "Please make sure you have the correct Keystore alias, store pass, and keypass values!"); 120 | } 121 | } 122 | 123 | protected void buttonBrowseKeystore_Clicked(object sender, EventArgs e) 124 | { 125 | OpenFile("Choose a .keystore file", ".keystore", "*.keystore"); 126 | } 127 | 128 | protected void buttonBrowseKeytool_Clicked(object sender, EventArgs e) 129 | { 130 | var pattern = "keytool.exe"; 131 | if (PlatformDetection.IsMac || PlatformDetection.IsLinux) 132 | pattern = "keytool"; 133 | 134 | OpenFile("Java keytool Location", "keytool", pattern); 135 | } 136 | 137 | protected void buttonCancel_Clicked(object sender, EventArgs e) 138 | { 139 | this.Destroy(); 140 | } 141 | 142 | 143 | void OpenFile(string title, string filterName, string filter) 144 | { 145 | var fc = new Gtk.FileChooserDialog(title, 146 | this, Gtk.FileChooserAction.Open, "Cancel", Gtk.ResponseType.Cancel, 147 | "Open", Gtk.ResponseType.Accept); 148 | 149 | var f = new Gtk.FileFilter(); 150 | f.Name = filterName; 151 | f.AddPattern(filter); 152 | 153 | fc.AddFilter(f); 154 | 155 | if (fc.Run() == (int)Gtk.ResponseType.Accept) 156 | { 157 | if (filterName == ".keystore") 158 | { 159 | entryCustomKeystore.Text = fc.Filename; 160 | } 161 | else if (filterName == "keytool") 162 | { 163 | entryKeytool.Text = fc.Filename; 164 | } 165 | } 166 | fc.Destroy(); 167 | } 168 | 169 | void MsgBox(string title, string body) 170 | { 171 | var md = new MessageDialog(this, 172 | DialogFlags.DestroyWithParent, MessageType.Info, 173 | ButtonsType.Close, body); 174 | md.Title = Title; 175 | md.Run(); 176 | md.Destroy(); 177 | } 178 | 179 | protected void radioDefault_Toggled(object sender, EventArgs e) 180 | { 181 | FieldEditable(); 182 | } 183 | 184 | void FieldEditable() 185 | { 186 | var enabled = !radioDefault.Active; 187 | 188 | entryCustomAlias.IsEditable = enabled; 189 | entryCustomKeyPass.IsEditable = enabled; 190 | entryCustomKeystore.IsEditable = enabled; 191 | entryCustomStorePass.IsEditable = enabled; 192 | } 193 | } 194 | } 195 | 196 | -------------------------------------------------------------------------------- /VS.Mac/AndroidKeystoreSignatureTool.VS.Mac/Properties/AndroidSigToolAddin.addin.xml: -------------------------------------------------------------------------------- 1 |  2 | 12 | 13 | 14 | 15 | 21 | 22 | 26 | 27 | 33 | 34 | 35 | 36 | 37 | 38 | 43 | 44 | -------------------------------------------------------------------------------- /VS.Mac/AndroidKeystoreSignatureTool.VS.Mac/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | [assembly: AssemblyTitle ("AndroidKeystoreSignatureTool.VS.Mac")] 7 | [assembly: AssemblyDescription ("")] 8 | [assembly: AssemblyConfiguration ("")] 9 | [assembly: AssemblyCompany ("")] 10 | [assembly: AssemblyProduct ("")] 11 | [assembly: AssemblyCopyright ("redth")] 12 | [assembly: AssemblyTrademark ("")] 13 | [assembly: AssemblyCulture ("")] 14 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 15 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 16 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 17 | [assembly: AssemblyVersion ("1.0.*")] 18 | // The following attributes are used to specify the signing key for the assembly, 19 | // if desired. See the Mono documentation for more information about signing. 20 | //[assembly: AssemblyDelaySign(false)] 21 | //[assembly: AssemblyKeyFile("")] 22 | 23 | -------------------------------------------------------------------------------- /VS.Mac/AndroidKeystoreSignatureTool.VS.Mac/SignatureToolCommandHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using MonoDevelop.Components.Commands; 3 | using MonoDevelop.Ide; 4 | using MonoDevelop.Ide.Gui.Content; 5 | using MonoDevelop.Projects; 6 | using AndroidKeystoreSignatureTool.Dialogs; 7 | 8 | namespace AndroidKeystoreSignatureTool 9 | { 10 | public enum SignatureToolCommands 11 | { 12 | ShowDialog, 13 | } 14 | 15 | public class SignatureToolCommandHandler : CommandHandler 16 | { 17 | protected override void Run () 18 | { 19 | try 20 | { 21 | var dialog = new SignatureToolDialog (); 22 | MessageService.ShowCustomDialog (dialog); 23 | } 24 | catch (Exception ex) 25 | { 26 | MessageService.ShowError ("Error", ex); 27 | } 28 | } 29 | 30 | protected override void Update (CommandInfo info) 31 | { 32 | info.Enabled = true; 33 | } 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /VS.Mac/AndroidKeystoreSignatureTool.VS.Mac/gtk-gui/AndroidKeystoreSignatureTool.Dialogs.SignatureToolDialog.cs: -------------------------------------------------------------------------------- 1 | 2 | // This file has been generated by the GUI designer. Do not modify. 3 | namespace AndroidKeystoreSignatureTool.Dialogs 4 | { 5 | public partial class SignatureToolDialog 6 | { 7 | private global::Gtk.Frame frame2; 8 | 9 | private global::Gtk.Alignment GtkAlignment1; 10 | 11 | private global::Gtk.HBox hbox1; 12 | 13 | private global::Gtk.Entry entryKeytool; 14 | 15 | private global::Gtk.Button buttonBrowseKeytool; 16 | 17 | private global::Gtk.Label GtkLabel2; 18 | 19 | private global::Gtk.Frame frame3; 20 | 21 | private global::Gtk.Alignment GtkAlignment2; 22 | 23 | private global::Gtk.VBox vbox2; 24 | 25 | private global::Gtk.RadioButton radioDefault; 26 | 27 | private global::Gtk.RadioButton radioCustom; 28 | 29 | private global::Gtk.Table table1; 30 | 31 | private global::Gtk.Button button15; 32 | 33 | private global::Gtk.Entry entryCustomAlias; 34 | 35 | private global::Gtk.Entry entryCustomKeyPass; 36 | 37 | private global::Gtk.Entry entryCustomKeystore; 38 | 39 | private global::Gtk.Entry entryCustomStorePass; 40 | 41 | private global::Gtk.Label label1; 42 | 43 | private global::Gtk.Label label2; 44 | 45 | private global::Gtk.Label label3; 46 | 47 | private global::Gtk.Label label4; 48 | 49 | private global::Gtk.Label GtkLabel5; 50 | 51 | private global::Gtk.Button buttonGenerate; 52 | 53 | private global::Gtk.Frame frame6; 54 | 55 | private global::Gtk.Alignment GtkAlignment4; 56 | 57 | private global::Gtk.HBox hbox2; 58 | 59 | private global::Gtk.Entry entryMd5; 60 | 61 | private global::Gtk.Button buttonCopyMd5; 62 | 63 | private global::Gtk.Label GtkLabel10; 64 | 65 | private global::Gtk.Frame frame4; 66 | 67 | private global::Gtk.Alignment GtkAlignment3; 68 | 69 | private global::Gtk.HBox hbox3; 70 | 71 | private global::Gtk.Entry entrySha1; 72 | 73 | private global::Gtk.Button buttonCopySha1; 74 | 75 | private global::Gtk.Label GtkLabel9; 76 | 77 | private global::Gtk.Frame frame5; 78 | 79 | private global::Gtk.Alignment GtkAlignment5; 80 | 81 | private global::Gtk.HBox hbox5; 82 | 83 | private global::Gtk.Entry entryFacebookSHA1; 84 | 85 | private global::Gtk.Button buttonCopyFacebookSHA1; 86 | 87 | private global::Gtk.Label GtkLabel14; 88 | 89 | private global::Gtk.Frame frame1; 90 | 91 | private global::Gtk.Alignment GtkAlignment; 92 | 93 | private global::Gtk.HBox hbox4; 94 | 95 | private global::Gtk.Entry entrySha256; 96 | 97 | private global::Gtk.Button buttonCopySha256; 98 | 99 | private global::Gtk.Label GtkLabel12; 100 | 101 | private global::Gtk.Button buttonCancel; 102 | 103 | protected virtual void Build() 104 | { 105 | global::Stetic.Gui.Initialize(this); 106 | // Widget AndroidKeystoreSignatureTool.Dialogs.SignatureToolDialog 107 | this.WidthRequest = 700; 108 | this.Name = "AndroidKeystoreSignatureTool.Dialogs.SignatureToolDialog"; 109 | this.Title = global::Mono.Unix.Catalog.GetString("Android Keystore Signature Tool"); 110 | this.WindowPosition = ((global::Gtk.WindowPosition)(4)); 111 | this.Modal = true; 112 | this.Resizable = false; 113 | this.AllowGrow = false; 114 | // Internal child AndroidKeystoreSignatureTool.Dialogs.SignatureToolDialog.VBox 115 | global::Gtk.VBox w1 = this.VBox; 116 | w1.Name = "dialog1_VBox"; 117 | // Container child dialog1_VBox.Gtk.Box+BoxChild 118 | this.frame2 = new global::Gtk.Frame(); 119 | this.frame2.Name = "frame2"; 120 | this.frame2.ShadowType = ((global::Gtk.ShadowType)(0)); 121 | // Container child frame2.Gtk.Container+ContainerChild 122 | this.GtkAlignment1 = new global::Gtk.Alignment(0F, 0F, 1F, 1F); 123 | this.GtkAlignment1.Name = "GtkAlignment1"; 124 | this.GtkAlignment1.LeftPadding = ((uint)(12)); 125 | // Container child GtkAlignment1.Gtk.Container+ContainerChild 126 | this.hbox1 = new global::Gtk.HBox(); 127 | this.hbox1.Name = "hbox1"; 128 | this.hbox1.Spacing = 6; 129 | // Container child hbox1.Gtk.Box+BoxChild 130 | this.entryKeytool = new global::Gtk.Entry(); 131 | this.entryKeytool.CanFocus = true; 132 | this.entryKeytool.Name = "entryKeytool"; 133 | this.entryKeytool.IsEditable = true; 134 | this.entryKeytool.InvisibleChar = '●'; 135 | this.hbox1.Add(this.entryKeytool); 136 | global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.entryKeytool])); 137 | w2.Position = 0; 138 | // Container child hbox1.Gtk.Box+BoxChild 139 | this.buttonBrowseKeytool = new global::Gtk.Button(); 140 | this.buttonBrowseKeytool.CanFocus = true; 141 | this.buttonBrowseKeytool.Name = "buttonBrowseKeytool"; 142 | this.buttonBrowseKeytool.UseUnderline = true; 143 | this.buttonBrowseKeytool.Label = global::Mono.Unix.Catalog.GetString("..."); 144 | this.hbox1.Add(this.buttonBrowseKeytool); 145 | global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.buttonBrowseKeytool])); 146 | w3.Position = 1; 147 | w3.Expand = false; 148 | w3.Fill = false; 149 | this.GtkAlignment1.Add(this.hbox1); 150 | this.frame2.Add(this.GtkAlignment1); 151 | this.GtkLabel2 = new global::Gtk.Label(); 152 | this.GtkLabel2.Name = "GtkLabel2"; 153 | this.GtkLabel2.LabelProp = global::Mono.Unix.Catalog.GetString("Java keytool Location:"); 154 | this.GtkLabel2.UseMarkup = true; 155 | this.frame2.LabelWidget = this.GtkLabel2; 156 | w1.Add(this.frame2); 157 | global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(w1[this.frame2])); 158 | w6.Position = 0; 159 | w6.Expand = false; 160 | w6.Fill = false; 161 | // Container child dialog1_VBox.Gtk.Box+BoxChild 162 | this.frame3 = new global::Gtk.Frame(); 163 | this.frame3.Name = "frame3"; 164 | this.frame3.ShadowType = ((global::Gtk.ShadowType)(0)); 165 | // Container child frame3.Gtk.Container+ContainerChild 166 | this.GtkAlignment2 = new global::Gtk.Alignment(0F, 0F, 1F, 1F); 167 | this.GtkAlignment2.Name = "GtkAlignment2"; 168 | this.GtkAlignment2.LeftPadding = ((uint)(12)); 169 | // Container child GtkAlignment2.Gtk.Container+ContainerChild 170 | this.vbox2 = new global::Gtk.VBox(); 171 | this.vbox2.Name = "vbox2"; 172 | this.vbox2.Spacing = 6; 173 | // Container child vbox2.Gtk.Box+BoxChild 174 | this.radioDefault = new global::Gtk.RadioButton(global::Mono.Unix.Catalog.GetString("Default Xamarin.Android generated debug.keystore")); 175 | this.radioDefault.CanFocus = true; 176 | this.radioDefault.Name = "radioDefault"; 177 | this.radioDefault.Active = true; 178 | this.radioDefault.DrawIndicator = true; 179 | this.radioDefault.UseUnderline = true; 180 | this.radioDefault.Group = new global::GLib.SList(global::System.IntPtr.Zero); 181 | this.vbox2.Add(this.radioDefault); 182 | global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.radioDefault])); 183 | w7.Position = 0; 184 | w7.Expand = false; 185 | w7.Fill = false; 186 | // Container child vbox2.Gtk.Box+BoxChild 187 | this.radioCustom = new global::Gtk.RadioButton(global::Mono.Unix.Catalog.GetString("Choose your own custom created .keystore file")); 188 | this.radioCustom.CanFocus = true; 189 | this.radioCustom.Name = "radioCustom"; 190 | this.radioCustom.DrawIndicator = true; 191 | this.radioCustom.UseUnderline = true; 192 | this.radioCustom.Group = this.radioDefault.Group; 193 | this.vbox2.Add(this.radioCustom); 194 | global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.radioCustom])); 195 | w8.Position = 1; 196 | w8.Expand = false; 197 | w8.Fill = false; 198 | // Container child vbox2.Gtk.Box+BoxChild 199 | this.table1 = new global::Gtk.Table(((uint)(4)), ((uint)(3)), false); 200 | this.table1.Name = "table1"; 201 | this.table1.RowSpacing = ((uint)(6)); 202 | this.table1.ColumnSpacing = ((uint)(6)); 203 | // Container child table1.Gtk.Table+TableChild 204 | this.button15 = new global::Gtk.Button(); 205 | this.button15.CanFocus = true; 206 | this.button15.Name = "button15"; 207 | this.button15.UseUnderline = true; 208 | this.button15.Label = global::Mono.Unix.Catalog.GetString("..."); 209 | this.table1.Add(this.button15); 210 | global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table1[this.button15])); 211 | w9.LeftAttach = ((uint)(2)); 212 | w9.RightAttach = ((uint)(3)); 213 | w9.XOptions = ((global::Gtk.AttachOptions)(4)); 214 | w9.YOptions = ((global::Gtk.AttachOptions)(4)); 215 | // Container child table1.Gtk.Table+TableChild 216 | this.entryCustomAlias = new global::Gtk.Entry(); 217 | this.entryCustomAlias.CanFocus = true; 218 | this.entryCustomAlias.Name = "entryCustomAlias"; 219 | this.entryCustomAlias.IsEditable = true; 220 | this.entryCustomAlias.InvisibleChar = '●'; 221 | this.table1.Add(this.entryCustomAlias); 222 | global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.table1[this.entryCustomAlias])); 223 | w10.TopAttach = ((uint)(1)); 224 | w10.BottomAttach = ((uint)(2)); 225 | w10.LeftAttach = ((uint)(1)); 226 | w10.RightAttach = ((uint)(2)); 227 | w10.XOptions = ((global::Gtk.AttachOptions)(4)); 228 | w10.YOptions = ((global::Gtk.AttachOptions)(4)); 229 | // Container child table1.Gtk.Table+TableChild 230 | this.entryCustomKeyPass = new global::Gtk.Entry(); 231 | this.entryCustomKeyPass.CanFocus = true; 232 | this.entryCustomKeyPass.Name = "entryCustomKeyPass"; 233 | this.entryCustomKeyPass.IsEditable = true; 234 | this.entryCustomKeyPass.InvisibleChar = '●'; 235 | this.table1.Add(this.entryCustomKeyPass); 236 | global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table1[this.entryCustomKeyPass])); 237 | w11.TopAttach = ((uint)(3)); 238 | w11.BottomAttach = ((uint)(4)); 239 | w11.LeftAttach = ((uint)(1)); 240 | w11.RightAttach = ((uint)(2)); 241 | w11.XOptions = ((global::Gtk.AttachOptions)(4)); 242 | w11.YOptions = ((global::Gtk.AttachOptions)(4)); 243 | // Container child table1.Gtk.Table+TableChild 244 | this.entryCustomKeystore = new global::Gtk.Entry(); 245 | this.entryCustomKeystore.CanFocus = true; 246 | this.entryCustomKeystore.Name = "entryCustomKeystore"; 247 | this.entryCustomKeystore.IsEditable = true; 248 | this.entryCustomKeystore.InvisibleChar = '●'; 249 | this.table1.Add(this.entryCustomKeystore); 250 | global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table1[this.entryCustomKeystore])); 251 | w12.LeftAttach = ((uint)(1)); 252 | w12.RightAttach = ((uint)(2)); 253 | w12.YOptions = ((global::Gtk.AttachOptions)(4)); 254 | // Container child table1.Gtk.Table+TableChild 255 | this.entryCustomStorePass = new global::Gtk.Entry(); 256 | this.entryCustomStorePass.CanFocus = true; 257 | this.entryCustomStorePass.Name = "entryCustomStorePass"; 258 | this.entryCustomStorePass.IsEditable = true; 259 | this.entryCustomStorePass.InvisibleChar = '●'; 260 | this.table1.Add(this.entryCustomStorePass); 261 | global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table1[this.entryCustomStorePass])); 262 | w13.TopAttach = ((uint)(2)); 263 | w13.BottomAttach = ((uint)(3)); 264 | w13.LeftAttach = ((uint)(1)); 265 | w13.RightAttach = ((uint)(2)); 266 | w13.XOptions = ((global::Gtk.AttachOptions)(4)); 267 | w13.YOptions = ((global::Gtk.AttachOptions)(4)); 268 | // Container child table1.Gtk.Table+TableChild 269 | this.label1 = new global::Gtk.Label(); 270 | this.label1.Name = "label1"; 271 | this.label1.LabelProp = global::Mono.Unix.Catalog.GetString("Keystore File:"); 272 | this.table1.Add(this.label1); 273 | global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1[this.label1])); 274 | w14.XOptions = ((global::Gtk.AttachOptions)(4)); 275 | w14.YOptions = ((global::Gtk.AttachOptions)(4)); 276 | // Container child table1.Gtk.Table+TableChild 277 | this.label2 = new global::Gtk.Label(); 278 | this.label2.Name = "label2"; 279 | this.label2.LabelProp = global::Mono.Unix.Catalog.GetString("Alias:"); 280 | this.table1.Add(this.label2); 281 | global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1[this.label2])); 282 | w15.TopAttach = ((uint)(1)); 283 | w15.BottomAttach = ((uint)(2)); 284 | w15.XOptions = ((global::Gtk.AttachOptions)(4)); 285 | w15.YOptions = ((global::Gtk.AttachOptions)(4)); 286 | // Container child table1.Gtk.Table+TableChild 287 | this.label3 = new global::Gtk.Label(); 288 | this.label3.Name = "label3"; 289 | this.label3.LabelProp = global::Mono.Unix.Catalog.GetString("Store Password:"); 290 | this.table1.Add(this.label3); 291 | global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table1[this.label3])); 292 | w16.TopAttach = ((uint)(2)); 293 | w16.BottomAttach = ((uint)(3)); 294 | w16.XOptions = ((global::Gtk.AttachOptions)(4)); 295 | w16.YOptions = ((global::Gtk.AttachOptions)(4)); 296 | // Container child table1.Gtk.Table+TableChild 297 | this.label4 = new global::Gtk.Label(); 298 | this.label4.Name = "label4"; 299 | this.label4.LabelProp = global::Mono.Unix.Catalog.GetString("Key Password:"); 300 | this.table1.Add(this.label4); 301 | global::Gtk.Table.TableChild w17 = ((global::Gtk.Table.TableChild)(this.table1[this.label4])); 302 | w17.TopAttach = ((uint)(3)); 303 | w17.BottomAttach = ((uint)(4)); 304 | w17.XOptions = ((global::Gtk.AttachOptions)(4)); 305 | w17.YOptions = ((global::Gtk.AttachOptions)(4)); 306 | this.vbox2.Add(this.table1); 307 | global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.table1])); 308 | w18.Position = 2; 309 | w18.Expand = false; 310 | w18.Fill = false; 311 | this.GtkAlignment2.Add(this.vbox2); 312 | this.frame3.Add(this.GtkAlignment2); 313 | this.GtkLabel5 = new global::Gtk.Label(); 314 | this.GtkLabel5.Name = "GtkLabel5"; 315 | this.GtkLabel5.LabelProp = global::Mono.Unix.Catalog.GetString("Choose your keystore to generate signatures from"); 316 | this.GtkLabel5.UseMarkup = true; 317 | this.frame3.LabelWidget = this.GtkLabel5; 318 | w1.Add(this.frame3); 319 | global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(w1[this.frame3])); 320 | w21.Position = 1; 321 | w21.Expand = false; 322 | w21.Fill = false; 323 | w21.Padding = ((uint)(10)); 324 | // Container child dialog1_VBox.Gtk.Box+BoxChild 325 | this.buttonGenerate = new global::Gtk.Button(); 326 | this.buttonGenerate.WidthRequest = 100; 327 | this.buttonGenerate.CanFocus = true; 328 | this.buttonGenerate.Name = "buttonGenerate"; 329 | this.buttonGenerate.UseUnderline = true; 330 | this.buttonGenerate.Label = global::Mono.Unix.Catalog.GetString("Generate Signatures"); 331 | w1.Add(this.buttonGenerate); 332 | global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(w1[this.buttonGenerate])); 333 | w22.Position = 2; 334 | w22.Expand = false; 335 | w22.Fill = false; 336 | w22.Padding = ((uint)(10)); 337 | // Container child dialog1_VBox.Gtk.Box+BoxChild 338 | this.frame6 = new global::Gtk.Frame(); 339 | this.frame6.Name = "frame6"; 340 | this.frame6.ShadowType = ((global::Gtk.ShadowType)(0)); 341 | // Container child frame6.Gtk.Container+ContainerChild 342 | this.GtkAlignment4 = new global::Gtk.Alignment(0F, 0F, 1F, 1F); 343 | this.GtkAlignment4.Name = "GtkAlignment4"; 344 | this.GtkAlignment4.LeftPadding = ((uint)(12)); 345 | // Container child GtkAlignment4.Gtk.Container+ContainerChild 346 | this.hbox2 = new global::Gtk.HBox(); 347 | this.hbox2.Name = "hbox2"; 348 | this.hbox2.Spacing = 6; 349 | // Container child hbox2.Gtk.Box+BoxChild 350 | this.entryMd5 = new global::Gtk.Entry(); 351 | this.entryMd5.CanFocus = true; 352 | this.entryMd5.Name = "entryMd5"; 353 | this.entryMd5.IsEditable = false; 354 | this.entryMd5.InvisibleChar = '●'; 355 | this.hbox2.Add(this.entryMd5); 356 | global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.entryMd5])); 357 | w23.Position = 0; 358 | // Container child hbox2.Gtk.Box+BoxChild 359 | this.buttonCopyMd5 = new global::Gtk.Button(); 360 | this.buttonCopyMd5.CanFocus = true; 361 | this.buttonCopyMd5.Name = "buttonCopyMd5"; 362 | this.buttonCopyMd5.UseUnderline = true; 363 | this.buttonCopyMd5.Label = global::Mono.Unix.Catalog.GetString("Copy"); 364 | this.hbox2.Add(this.buttonCopyMd5); 365 | global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.buttonCopyMd5])); 366 | w24.Position = 1; 367 | w24.Expand = false; 368 | w24.Fill = false; 369 | this.GtkAlignment4.Add(this.hbox2); 370 | this.frame6.Add(this.GtkAlignment4); 371 | this.GtkLabel10 = new global::Gtk.Label(); 372 | this.GtkLabel10.Name = "GtkLabel10"; 373 | this.GtkLabel10.LabelProp = global::Mono.Unix.Catalog.GetString("MD5 Signature"); 374 | this.GtkLabel10.UseMarkup = true; 375 | this.frame6.LabelWidget = this.GtkLabel10; 376 | w1.Add(this.frame6); 377 | global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(w1[this.frame6])); 378 | w27.Position = 3; 379 | w27.Expand = false; 380 | w27.Fill = false; 381 | // Container child dialog1_VBox.Gtk.Box+BoxChild 382 | this.frame4 = new global::Gtk.Frame(); 383 | this.frame4.Name = "frame4"; 384 | this.frame4.ShadowType = ((global::Gtk.ShadowType)(0)); 385 | // Container child frame4.Gtk.Container+ContainerChild 386 | this.GtkAlignment3 = new global::Gtk.Alignment(0F, 0F, 1F, 1F); 387 | this.GtkAlignment3.Name = "GtkAlignment3"; 388 | this.GtkAlignment3.LeftPadding = ((uint)(12)); 389 | // Container child GtkAlignment3.Gtk.Container+ContainerChild 390 | this.hbox3 = new global::Gtk.HBox(); 391 | this.hbox3.Name = "hbox3"; 392 | this.hbox3.Spacing = 6; 393 | // Container child hbox3.Gtk.Box+BoxChild 394 | this.entrySha1 = new global::Gtk.Entry(); 395 | this.entrySha1.CanFocus = true; 396 | this.entrySha1.Name = "entrySha1"; 397 | this.entrySha1.IsEditable = false; 398 | this.entrySha1.InvisibleChar = '●'; 399 | this.hbox3.Add(this.entrySha1); 400 | global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.entrySha1])); 401 | w28.Position = 0; 402 | // Container child hbox3.Gtk.Box+BoxChild 403 | this.buttonCopySha1 = new global::Gtk.Button(); 404 | this.buttonCopySha1.CanFocus = true; 405 | this.buttonCopySha1.Name = "buttonCopySha1"; 406 | this.buttonCopySha1.UseUnderline = true; 407 | this.buttonCopySha1.Label = global::Mono.Unix.Catalog.GetString("Copy"); 408 | this.hbox3.Add(this.buttonCopySha1); 409 | global::Gtk.Box.BoxChild w29 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.buttonCopySha1])); 410 | w29.Position = 1; 411 | w29.Expand = false; 412 | w29.Fill = false; 413 | this.GtkAlignment3.Add(this.hbox3); 414 | this.frame4.Add(this.GtkAlignment3); 415 | this.GtkLabel9 = new global::Gtk.Label(); 416 | this.GtkLabel9.Name = "GtkLabel9"; 417 | this.GtkLabel9.LabelProp = global::Mono.Unix.Catalog.GetString("SHA1 Signature"); 418 | this.GtkLabel9.UseMarkup = true; 419 | this.frame4.LabelWidget = this.GtkLabel9; 420 | w1.Add(this.frame4); 421 | global::Gtk.Box.BoxChild w32 = ((global::Gtk.Box.BoxChild)(w1[this.frame4])); 422 | w32.Position = 4; 423 | w32.Expand = false; 424 | w32.Fill = false; 425 | // Container child dialog1_VBox.Gtk.Box+BoxChild 426 | this.frame5 = new global::Gtk.Frame(); 427 | this.frame5.Name = "frame5"; 428 | this.frame5.ShadowType = ((global::Gtk.ShadowType)(0)); 429 | // Container child frame5.Gtk.Container+ContainerChild 430 | this.GtkAlignment5 = new global::Gtk.Alignment(0F, 0F, 1F, 1F); 431 | this.GtkAlignment5.Name = "GtkAlignment5"; 432 | this.GtkAlignment5.LeftPadding = ((uint)(12)); 433 | // Container child GtkAlignment5.Gtk.Container+ContainerChild 434 | this.hbox5 = new global::Gtk.HBox(); 435 | this.hbox5.Name = "hbox5"; 436 | this.hbox5.Spacing = 6; 437 | // Container child hbox5.Gtk.Box+BoxChild 438 | this.entryFacebookSHA1 = new global::Gtk.Entry(); 439 | this.entryFacebookSHA1.CanFocus = true; 440 | this.entryFacebookSHA1.Name = "entryFacebookSHA1"; 441 | this.entryFacebookSHA1.IsEditable = false; 442 | this.entryFacebookSHA1.InvisibleChar = '●'; 443 | this.hbox5.Add(this.entryFacebookSHA1); 444 | global::Gtk.Box.BoxChild w33 = ((global::Gtk.Box.BoxChild)(this.hbox5[this.entryFacebookSHA1])); 445 | w33.Position = 0; 446 | // Container child hbox5.Gtk.Box+BoxChild 447 | this.buttonCopyFacebookSHA1 = new global::Gtk.Button(); 448 | this.buttonCopyFacebookSHA1.CanFocus = true; 449 | this.buttonCopyFacebookSHA1.Name = "buttonCopyFacebookSHA1"; 450 | this.buttonCopyFacebookSHA1.UseUnderline = true; 451 | this.buttonCopyFacebookSHA1.Label = global::Mono.Unix.Catalog.GetString("Copy"); 452 | this.hbox5.Add(this.buttonCopyFacebookSHA1); 453 | global::Gtk.Box.BoxChild w34 = ((global::Gtk.Box.BoxChild)(this.hbox5[this.buttonCopyFacebookSHA1])); 454 | w34.Position = 1; 455 | w34.Expand = false; 456 | w34.Fill = false; 457 | this.GtkAlignment5.Add(this.hbox5); 458 | this.frame5.Add(this.GtkAlignment5); 459 | this.GtkLabel14 = new global::Gtk.Label(); 460 | this.GtkLabel14.Name = "GtkLabel14"; 461 | this.GtkLabel14.LabelProp = global::Mono.Unix.Catalog.GetString("Facebook SHA1 Signature"); 462 | this.GtkLabel14.UseMarkup = true; 463 | this.frame5.LabelWidget = this.GtkLabel14; 464 | w1.Add(this.frame5); 465 | global::Gtk.Box.BoxChild w37 = ((global::Gtk.Box.BoxChild)(w1[this.frame5])); 466 | w37.PackType = ((global::Gtk.PackType)(1)); 467 | w37.Position = 6; 468 | w37.Expand = false; 469 | w37.Fill = false; 470 | // Container child dialog1_VBox.Gtk.Box+BoxChild 471 | this.frame1 = new global::Gtk.Frame(); 472 | this.frame1.Name = "frame1"; 473 | this.frame1.ShadowType = ((global::Gtk.ShadowType)(0)); 474 | // Container child frame1.Gtk.Container+ContainerChild 475 | this.GtkAlignment = new global::Gtk.Alignment(0F, 0F, 1F, 1F); 476 | this.GtkAlignment.Name = "GtkAlignment"; 477 | this.GtkAlignment.LeftPadding = ((uint)(12)); 478 | // Container child GtkAlignment.Gtk.Container+ContainerChild 479 | this.hbox4 = new global::Gtk.HBox(); 480 | this.hbox4.Name = "hbox4"; 481 | this.hbox4.Spacing = 6; 482 | // Container child hbox4.Gtk.Box+BoxChild 483 | this.entrySha256 = new global::Gtk.Entry(); 484 | this.entrySha256.CanFocus = true; 485 | this.entrySha256.Name = "entrySha256"; 486 | this.entrySha256.IsEditable = false; 487 | this.entrySha256.InvisibleChar = '●'; 488 | this.hbox4.Add(this.entrySha256); 489 | global::Gtk.Box.BoxChild w38 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.entrySha256])); 490 | w38.Position = 0; 491 | // Container child hbox4.Gtk.Box+BoxChild 492 | this.buttonCopySha256 = new global::Gtk.Button(); 493 | this.buttonCopySha256.CanFocus = true; 494 | this.buttonCopySha256.Name = "buttonCopySha256"; 495 | this.buttonCopySha256.UseUnderline = true; 496 | this.buttonCopySha256.Label = global::Mono.Unix.Catalog.GetString("Copy"); 497 | this.hbox4.Add(this.buttonCopySha256); 498 | global::Gtk.Box.BoxChild w39 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.buttonCopySha256])); 499 | w39.Position = 1; 500 | w39.Expand = false; 501 | w39.Fill = false; 502 | this.GtkAlignment.Add(this.hbox4); 503 | this.frame1.Add(this.GtkAlignment); 504 | this.GtkLabel12 = new global::Gtk.Label(); 505 | this.GtkLabel12.Name = "GtkLabel12"; 506 | this.GtkLabel12.LabelProp = global::Mono.Unix.Catalog.GetString("SHA256 Signature"); 507 | this.GtkLabel12.UseMarkup = true; 508 | this.frame1.LabelWidget = this.GtkLabel12; 509 | w1.Add(this.frame1); 510 | global::Gtk.Box.BoxChild w42 = ((global::Gtk.Box.BoxChild)(w1[this.frame1])); 511 | w42.PackType = ((global::Gtk.PackType)(1)); 512 | w42.Position = 7; 513 | w42.Expand = false; 514 | w42.Fill = false; 515 | // Internal child AndroidKeystoreSignatureTool.Dialogs.SignatureToolDialog.ActionArea 516 | global::Gtk.HButtonBox w43 = this.ActionArea; 517 | w43.Name = "dialog1_ActionArea"; 518 | w43.Spacing = 10; 519 | w43.BorderWidth = ((uint)(5)); 520 | w43.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); 521 | // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild 522 | this.buttonCancel = new global::Gtk.Button(); 523 | this.buttonCancel.CanFocus = true; 524 | this.buttonCancel.Name = "buttonCancel"; 525 | this.buttonCancel.UseUnderline = true; 526 | this.buttonCancel.Label = global::Mono.Unix.Catalog.GetString("Close"); 527 | this.AddActionWidget(this.buttonCancel, 0); 528 | global::Gtk.ButtonBox.ButtonBoxChild w44 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w43[this.buttonCancel])); 529 | w44.Expand = false; 530 | w44.Fill = false; 531 | if ((this.Child != null)) 532 | { 533 | this.Child.ShowAll(); 534 | } 535 | this.DefaultWidth = 800; 536 | this.DefaultHeight = 719; 537 | this.Show(); 538 | this.buttonGenerate.Clicked += new global::System.EventHandler(this.buttonGenerate_Clicked); 539 | this.buttonCopyMd5.Clicked += new global::System.EventHandler(this.buttonMd5Copy_Clicked); 540 | this.buttonCopySha1.Clicked += new global::System.EventHandler(this.buttonSha1Copy_Clicked); 541 | this.buttonCopySha256.Clicked += new global::System.EventHandler(this.buttonCopySha256_Clicked); 542 | this.buttonCopyFacebookSHA1.Clicked += new global::System.EventHandler(this.buttonCopyFacebookSHA1_Clicked); 543 | this.buttonBrowseKeytool.Clicked += new global::System.EventHandler(this.buttonBrowseKeytool_Clicked); 544 | this.button15.Clicked += new global::System.EventHandler(this.buttonBrowseKeystore_Clicked); 545 | this.radioDefault.Toggled += new global::System.EventHandler(this.radioDefault_Toggled); 546 | 547 | } 548 | } 549 | } 550 | -------------------------------------------------------------------------------- /VS.Mac/AndroidKeystoreSignatureTool.VS.Mac/gtk-gui/generated.cs: -------------------------------------------------------------------------------- 1 | 2 | // This file has been generated by the GUI designer. Do not modify. 3 | namespace Stetic 4 | { 5 | internal class Gui 6 | { 7 | private static bool initialized; 8 | 9 | internal static void Initialize(Gtk.Widget iconRenderer) 10 | { 11 | if ((Stetic.Gui.initialized == false)) 12 | { 13 | Stetic.Gui.initialized = true; 14 | } 15 | } 16 | } 17 | 18 | internal class ActionGroups 19 | { 20 | public static Gtk.ActionGroup GetActionGroup(System.Type type) 21 | { 22 | return Stetic.ActionGroups.GetActionGroup(type.FullName); 23 | } 24 | 25 | public static Gtk.ActionGroup GetActionGroup(string name) 26 | { 27 | return null; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /VS.Mac/AndroidKeystoreSignatureTool.VS.Mac/gtk-gui/gui.stetic: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | .. 5 | 2.12 6 | 7 | 8 | 9 | 10 | 11 | 12 | 700 13 | Android Keystore Signature Tool 14 | CenterOnParent 15 | True 16 | False 17 | False 18 | 1 19 | False 20 | 21 | 22 | 23 | 24 | 25 | 26 | None 27 | 28 | 29 | 30 | 0 31 | 0 32 | 12 33 | 34 | 35 | 36 | 6 37 | 38 | 39 | 40 | True 41 | True 42 | 43 | 44 | 45 | 0 46 | True 47 | 48 | 49 | 50 | 51 | 52 | True 53 | TextOnly 54 | ... 55 | True 56 | 57 | 58 | 1 59 | True 60 | False 61 | False 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | <b>Java keytool Location:</b> 72 | True 73 | 74 | 75 | label_item 76 | 77 | 78 | 79 | 80 | 0 81 | True 82 | False 83 | False 84 | 85 | 86 | 87 | 88 | 89 | None 90 | 91 | 92 | 93 | 0 94 | 0 95 | 12 96 | 97 | 98 | 99 | 6 100 | 101 | 102 | 103 | True 104 | Default Xamarin.Android generated debug.keystore 105 | True 106 | True 107 | True 108 | True 109 | group1 110 | 111 | 112 | 0 113 | True 114 | False 115 | False 116 | 117 | 118 | 119 | 120 | 121 | True 122 | Choose your own custom created .keystore file 123 | True 124 | True 125 | True 126 | group1 127 | 128 | 129 | 1 130 | True 131 | False 132 | False 133 | 134 | 135 | 136 | 137 | 138 | 4 139 | 3 140 | 6 141 | 6 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | True 155 | TextOnly 156 | ... 157 | True 158 | 159 | 160 | 2 161 | 3 162 | True 163 | Fill 164 | Fill 165 | False 166 | True 167 | False 168 | False 169 | True 170 | False 171 | 172 | 173 | 174 | 175 | 176 | True 177 | True 178 | 179 | 180 | 181 | 1 182 | 2 183 | 1 184 | 2 185 | True 186 | Fill 187 | Fill 188 | False 189 | True 190 | False 191 | False 192 | True 193 | False 194 | 195 | 196 | 197 | 198 | 199 | True 200 | True 201 | 202 | 203 | 204 | 3 205 | 4 206 | 1 207 | 2 208 | True 209 | Fill 210 | Fill 211 | False 212 | True 213 | False 214 | False 215 | True 216 | False 217 | 218 | 219 | 220 | 221 | 222 | True 223 | True 224 | 225 | 226 | 227 | 1 228 | 2 229 | False 230 | Fill 231 | True 232 | True 233 | False 234 | False 235 | True 236 | False 237 | 238 | 239 | 240 | 241 | 242 | True 243 | True 244 | 245 | 246 | 247 | 2 248 | 3 249 | 1 250 | 2 251 | True 252 | Fill 253 | Fill 254 | False 255 | True 256 | False 257 | False 258 | True 259 | False 260 | 261 | 262 | 263 | 264 | 265 | Keystore File: 266 | 267 | 268 | True 269 | Fill 270 | Fill 271 | False 272 | True 273 | False 274 | False 275 | True 276 | False 277 | 278 | 279 | 280 | 281 | 282 | Alias: 283 | 284 | 285 | 1 286 | 2 287 | True 288 | Fill 289 | Fill 290 | False 291 | True 292 | False 293 | False 294 | True 295 | False 296 | 297 | 298 | 299 | 300 | 301 | Store Password: 302 | 303 | 304 | 2 305 | 3 306 | True 307 | Fill 308 | Fill 309 | False 310 | True 311 | False 312 | False 313 | True 314 | False 315 | 316 | 317 | 318 | 319 | 320 | Key Password: 321 | 322 | 323 | 3 324 | 4 325 | True 326 | Fill 327 | Fill 328 | False 329 | True 330 | False 331 | False 332 | True 333 | False 334 | 335 | 336 | 337 | 338 | 2 339 | True 340 | False 341 | False 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | <b>Choose your keystore to generate signatures from</b> 352 | True 353 | 354 | 355 | label_item 356 | 357 | 358 | 359 | 360 | 1 361 | True 362 | False 363 | False 364 | 10 365 | 366 | 367 | 368 | 369 | 370 | 100 371 | True 372 | TextOnly 373 | Generate Signatures 374 | True 375 | 376 | 377 | 378 | 2 379 | True 380 | False 381 | False 382 | 10 383 | 384 | 385 | 386 | 387 | 388 | None 389 | 390 | 391 | 392 | 0 393 | 0 394 | 12 395 | 396 | 397 | 398 | 6 399 | 400 | 401 | 402 | True 403 | False 404 | 405 | 406 | 407 | 0 408 | True 409 | 410 | 411 | 412 | 413 | 414 | True 415 | TextOnly 416 | Copy 417 | True 418 | 419 | 420 | 421 | 1 422 | True 423 | False 424 | False 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | <b>MD5 Signature</b> 435 | True 436 | 437 | 438 | label_item 439 | 440 | 441 | 442 | 443 | 3 444 | True 445 | False 446 | False 447 | 448 | 449 | 450 | 451 | 452 | None 453 | 454 | 455 | 456 | 0 457 | 0 458 | 12 459 | 460 | 461 | 462 | 6 463 | 464 | 465 | 466 | True 467 | False 468 | 469 | 470 | 471 | 0 472 | True 473 | 474 | 475 | 476 | 477 | 478 | True 479 | TextOnly 480 | Copy 481 | True 482 | 483 | 484 | 485 | 1 486 | True 487 | False 488 | False 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | <b>SHA1 Signature</b> 499 | True 500 | 501 | 502 | label_item 503 | 504 | 505 | 506 | 507 | 4 508 | True 509 | False 510 | False 511 | 512 | 513 | 514 | 515 | 516 | None 517 | 518 | 519 | 520 | 0 521 | 0 522 | 12 523 | 524 | 525 | 526 | 6 527 | 528 | 529 | 530 | True 531 | False 532 | 533 | 534 | 535 | 0 536 | True 537 | 538 | 539 | 540 | 541 | 542 | True 543 | TextOnly 544 | Copy 545 | True 546 | 547 | 548 | 549 | 1 550 | True 551 | False 552 | False 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | <b>Facebook SHA1 Signature</b> 563 | True 564 | 565 | 566 | label_item 567 | 568 | 569 | 570 | 571 | End 572 | 6 573 | True 574 | False 575 | False 576 | 577 | 578 | 579 | 580 | 581 | None 582 | 583 | 584 | 585 | 0 586 | 0 587 | 12 588 | 589 | 590 | 591 | 6 592 | 593 | 594 | 595 | True 596 | False 597 | 598 | 599 | 600 | 0 601 | True 602 | 603 | 604 | 605 | 606 | 607 | True 608 | TextOnly 609 | Copy 610 | True 611 | 612 | 613 | 614 | 1 615 | True 616 | False 617 | False 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | <b>SHA256 Signature</b> 628 | True 629 | 630 | 631 | label_item 632 | 633 | 634 | 635 | 636 | End 637 | 7 638 | True 639 | False 640 | False 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 10 649 | 5 650 | 1 651 | End 652 | 653 | 654 | 655 | True 656 | TextOnly 657 | Close 658 | True 659 | 0 660 | 661 | 662 | False 663 | False 664 | 665 | 666 | 667 | 668 | 669 | -------------------------------------------------------------------------------- /VS.Mac/AndroidKeystoreSignatureTool.VS.Mac/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /VS.Mac/addin-project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | AndroidKeystoreSignatureTool.VS.Mac/bin/Release/AndroidKeystoreSignatureTool.VS.Mac.dll 4 | AndroidKeystoreSignatureTool.VS.Mac.sln 5 | Release 6 | 7 | 8 | -------------------------------------------------------------------------------- /VS.Win/AndroidKeystoreSignatureTool.VSIX.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26206.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AndroidKeystoreSignatureTool.VSIX", "AndroidKeystoreSignatureTool.VSIX\AndroidKeystoreSignatureTool.VSIX.csproj", "{F53F7461-048C-414D-8CB3-094431AE86DF}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AndroidKeystoreSignatureGenerator", "..\AndroidKeystoreSignatureGenerator\AndroidKeystoreSignatureGenerator.csproj", "{117CD6EF-E33D-4A66-99ED-78CBEA508DB7}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {F53F7461-048C-414D-8CB3-094431AE86DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {F53F7461-048C-414D-8CB3-094431AE86DF}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {F53F7461-048C-414D-8CB3-094431AE86DF}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {F53F7461-048C-414D-8CB3-094431AE86DF}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {117CD6EF-E33D-4A66-99ED-78CBEA508DB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {117CD6EF-E33D-4A66-99ED-78CBEA508DB7}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {117CD6EF-E33D-4A66-99ED-78CBEA508DB7}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {117CD6EF-E33D-4A66-99ED-78CBEA508DB7}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /VS.Win/AndroidKeystoreSignatureTool.VSIX/AndroidKeystoreSignatureTool.VSIX.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 15.0 6 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 7 | 8 | 9 | true 10 | 11 | 12 | 13 | 14 | 14.0 15 | publish\ 16 | true 17 | Disk 18 | false 19 | Foreground 20 | 7 21 | Days 22 | false 23 | false 24 | true 25 | 0 26 | 1.0.0.%2a 27 | false 28 | false 29 | true 30 | 31 | 32 | 33 | true 34 | 35 | 36 | Key.snk 37 | 38 | 39 | 40 | Debug 41 | AnyCPU 42 | 2.0 43 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 44 | {F53F7461-048C-414D-8CB3-094431AE86DF} 45 | Library 46 | Properties 47 | AndroidKeystoreSignatureTool.VSIX 48 | AndroidKeystoreSignatureTool.VSIX 49 | v4.6 50 | true 51 | true 52 | true 53 | true 54 | true 55 | false 56 | 57 | 58 | true 59 | full 60 | false 61 | bin\Debug\ 62 | DEBUG;TRACE 63 | prompt 64 | 4 65 | 66 | 67 | pdbonly 68 | true 69 | bin\Release\ 70 | TRACE 71 | prompt 72 | 4 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | ToolWindowControl.xaml 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | Designer 90 | 91 | 92 | 93 | 94 | 95 | Always 96 | true 97 | 98 | 99 | Menus.ctmenu 100 | 101 | 102 | 103 | Always 104 | true 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | False 115 | 116 | 117 | False 118 | 119 | 120 | False 121 | 122 | 123 | False 124 | 125 | 126 | 127 | 128 | False 129 | 130 | 131 | ..\packages\Microsoft.VisualStudio.CoreUtility.15.0.26201\lib\net45\Microsoft.VisualStudio.CoreUtility.dll 132 | True 133 | 134 | 135 | ..\packages\Microsoft.VisualStudio.Imaging.15.0.26201\lib\net45\Microsoft.VisualStudio.Imaging.dll 136 | True 137 | 138 | 139 | ..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll 140 | True 141 | 142 | 143 | ..\packages\Microsoft.VisualStudio.Shell.15.0.15.0.26201\lib\Microsoft.VisualStudio.Shell.15.0.dll 144 | True 145 | 146 | 147 | ..\packages\Microsoft.VisualStudio.Shell.Framework.15.0.26201\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll 148 | True 149 | 150 | 151 | ..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll 152 | True 153 | 154 | 155 | True 156 | ..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll 157 | True 158 | 159 | 160 | True 161 | ..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll 162 | True 163 | 164 | 165 | True 166 | ..\packages\Microsoft.VisualStudio.Shell.Interop.12.0.12.0.30110\lib\Microsoft.VisualStudio.Shell.Interop.12.0.dll 167 | True 168 | 169 | 170 | ..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll 171 | True 172 | 173 | 174 | ..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll 175 | True 176 | 177 | 178 | ..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll 179 | True 180 | 181 | 182 | ..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll 183 | True 184 | 185 | 186 | ..\packages\Microsoft.VisualStudio.Threading.15.0.240\lib\net45\Microsoft.VisualStudio.Threading.dll 187 | True 188 | 189 | 190 | ..\packages\Microsoft.VisualStudio.Utilities.15.0.26201\lib\net45\Microsoft.VisualStudio.Utilities.dll 191 | True 192 | 193 | 194 | ..\packages\Microsoft.VisualStudio.Validation.15.0.82\lib\net45\Microsoft.VisualStudio.Validation.dll 195 | True 196 | 197 | 198 | 199 | 200 | False 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | true 214 | VSPackage 215 | Designer 216 | 217 | 218 | 219 | 220 | Designer 221 | MSBuild:Compile 222 | 223 | 224 | 225 | 226 | {117cd6ef-e33d-4a66-99ed-78cbea508db7} 227 | AndroidKeystoreSignatureGenerator 228 | 229 | 230 | 231 | 232 | False 233 | Microsoft .NET Framework 4.5.2 %28x86 and x64%29 234 | true 235 | 236 | 237 | False 238 | .NET Framework 3.5 SP1 239 | false 240 | 241 | 242 | 243 | 244 | 245 | 246 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 247 | 248 | 249 | 250 | 251 | 252 | 259 | -------------------------------------------------------------------------------- /VS.Win/AndroidKeystoreSignatureTool.VSIX/AndroidSignatureToolCommand.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Copyright (c) Company. All rights reserved. 4 | // 5 | //------------------------------------------------------------------------------ 6 | 7 | using System; 8 | using System.ComponentModel.Design; 9 | using System.Globalization; 10 | using Microsoft.VisualStudio.Shell; 11 | using Microsoft.VisualStudio.Shell.Interop; 12 | 13 | namespace AndroidKeystoreSignatureTool.VSIX 14 | { 15 | /// 16 | /// Command handler 17 | /// 18 | internal sealed class AndroidSignatureToolCommand 19 | { 20 | /// 21 | /// Command ID. 22 | /// 23 | public const int CommandId = 0x0100; 24 | 25 | /// 26 | /// Command menu group (command set GUID). 27 | /// 28 | public static readonly Guid CommandSet = new Guid("ec70d67d-d10a-4c82-94bf-e3f8049e6ad2"); 29 | 30 | /// 31 | /// VS Package that provides this command, not null. 32 | /// 33 | private readonly Package package; 34 | 35 | /// 36 | /// Initializes a new instance of the class. 37 | /// Adds our command handlers for menu (commands must exist in the command table file) 38 | /// 39 | /// Owner package, not null. 40 | private AndroidSignatureToolCommand(Package package) 41 | { 42 | if (package == null) 43 | { 44 | throw new ArgumentNullException("package"); 45 | } 46 | 47 | this.package = package; 48 | 49 | OleMenuCommandService commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService; 50 | if (commandService != null) 51 | { 52 | var menuCommandID = new CommandID(CommandSet, CommandId); 53 | var menuItem = new MenuCommand(this.MenuItemCallback, menuCommandID); 54 | commandService.AddCommand(menuItem); 55 | } 56 | } 57 | 58 | /// 59 | /// Gets the instance of the command. 60 | /// 61 | public static AndroidSignatureToolCommand Instance 62 | { 63 | get; 64 | private set; 65 | } 66 | 67 | /// 68 | /// Gets the service provider from the owner package. 69 | /// 70 | private IServiceProvider ServiceProvider 71 | { 72 | get 73 | { 74 | return this.package; 75 | } 76 | } 77 | 78 | /// 79 | /// Initializes the singleton instance of the command. 80 | /// 81 | /// Owner package, not null. 82 | public static void Initialize(Package package) 83 | { 84 | Instance = new AndroidSignatureToolCommand(package); 85 | } 86 | 87 | /// 88 | /// This function is the callback used to execute the command when the menu item is clicked. 89 | /// See the constructor to see how the menu item is associated with this function using 90 | /// OleMenuCommandService service and MenuCommand class. 91 | /// 92 | /// Event sender. 93 | /// Event args. 94 | private void MenuItemCallback(object sender, EventArgs e) 95 | { 96 | 97 | // Get the instance number 0 of this tool window. This window is single instance so this instance 98 | // is actually the only one. 99 | // The last flag is set to true so that if the tool window does not exists it will be created. 100 | ToolWindowPane window = this.package.FindToolWindow(typeof(ToolWindow), 0, true); 101 | if ((null == window) || (null == window.Frame)) 102 | { 103 | throw new NotSupportedException("Cannot create tool window"); 104 | } 105 | 106 | IVsWindowFrame windowFrame = (IVsWindowFrame)window.Frame; 107 | Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(windowFrame.Show()); 108 | 109 | //string message = string.Format(CultureInfo.CurrentCulture, "Inside {0}.MenuItemCallback()", this.GetType().FullName); 110 | //string title = "AndroidSignatureToolCommand"; 111 | 112 | //// Show a message box to prove we were here 113 | //VsShellUtilities.ShowMessageBox( 114 | // this.ServiceProvider, 115 | // message, 116 | // title, 117 | // OLEMSGICON.OLEMSGICON_INFO, 118 | // OLEMSGBUTTON.OLEMSGBUTTON_OK, 119 | // OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST); 120 | } 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /VS.Win/AndroidKeystoreSignatureTool.VSIX/AndroidSignatureToolCommandPackage.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Copyright (c) Company. All rights reserved. 4 | // 5 | //------------------------------------------------------------------------------ 6 | 7 | using System; 8 | using System.ComponentModel.Design; 9 | using System.Diagnostics; 10 | using System.Diagnostics.CodeAnalysis; 11 | using System.Globalization; 12 | using System.Runtime.InteropServices; 13 | using Microsoft.VisualStudio; 14 | using Microsoft.VisualStudio.OLE.Interop; 15 | using Microsoft.VisualStudio.Shell; 16 | using Microsoft.VisualStudio.Shell.Interop; 17 | using Microsoft.Win32; 18 | 19 | namespace AndroidKeystoreSignatureTool.VSIX 20 | { 21 | /// 22 | /// This is the class that implements the package exposed by this assembly. 23 | /// 24 | /// 25 | /// 26 | /// The minimum requirement for a class to be considered a valid package for Visual Studio 27 | /// is to implement the IVsPackage interface and register itself with the shell. 28 | /// This package uses the helper classes defined inside the Managed Package Framework (MPF) 29 | /// to do it: it derives from the Package class that provides the implementation of the 30 | /// IVsPackage interface and uses the registration attributes defined in the framework to 31 | /// register itself and its components with the shell. These attributes tell the pkgdef creation 32 | /// utility what data to put into .pkgdef file. 33 | /// 34 | /// 35 | /// To get loaded into VS, the package must be referred by <Asset Type="Microsoft.VisualStudio.VsPackage" ...> in .vsixmanifest file. 36 | /// 37 | /// 38 | [PackageRegistration(UseManagedResourcesOnly = true)] 39 | [InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)] // Info on this package for Help/About 40 | [ProvideMenuResource("Menus.ctmenu", 1)] 41 | [Guid(AndroidSignatureToolCommandPackage.PackageGuidString)] 42 | [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "pkgdef, VS and vsixmanifest are valid VS terms")] 43 | [ProvideToolWindow(typeof(AndroidKeystoreSignatureTool.VSIX.ToolWindow))] 44 | public sealed class AndroidSignatureToolCommandPackage : Package 45 | { 46 | /// 47 | /// AndroidSignatureToolCommandPackage GUID string. 48 | /// 49 | public const string PackageGuidString = "e7ae66a4-7dde-47d5-8e33-5c375cc5a236"; 50 | 51 | /// 52 | /// Initializes a new instance of the class. 53 | /// 54 | public AndroidSignatureToolCommandPackage() 55 | { 56 | // Inside this method you can place any initialization code that does not require 57 | // any Visual Studio service because at this point the package object is created but 58 | // not sited yet inside Visual Studio environment. The place to do all the other 59 | // initialization is the Initialize method. 60 | } 61 | 62 | #region Package Members 63 | 64 | /// 65 | /// Initialization of the package; this method is called right after the package is sited, so this is the place 66 | /// where you can put all the initialization code that rely on services provided by VisualStudio. 67 | /// 68 | protected override void Initialize() 69 | { 70 | AndroidSignatureToolCommand.Initialize(this); 71 | base.Initialize(); 72 | AndroidKeystoreSignatureTool.VSIX.ToolWindowCommand.Initialize(this); 73 | } 74 | 75 | #endregion 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /VS.Win/AndroidKeystoreSignatureTool.VSIX/AndroidSignatureToolCommandPackage.vsct: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 9 | 10 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 33 | 34 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 47 | 48 | 55 | 62 | 69 | 76 | 83 | 84 | 85 | 86 | 87 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /VS.Win/AndroidKeystoreSignatureTool.VSIX/Key.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Redth/AndroidSignatureToolAddin/dd093a340c138534e206a9f30bf3e50ae1ea9125/VS.Win/AndroidKeystoreSignatureTool.VSIX/Key.snk -------------------------------------------------------------------------------- /VS.Win/AndroidKeystoreSignatureTool.VSIX/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 newky2k 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /VS.Win/AndroidKeystoreSignatureTool.VSIX/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("AndroidKeystoreSignatureTool.VSIX")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("AndroidKeystoreSignatureTool.VSIX")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /VS.Win/AndroidKeystoreSignatureTool.VSIX/Resources/AndroidSignatureToolCommand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Redth/AndroidSignatureToolAddin/dd093a340c138534e206a9f30bf3e50ae1ea9125/VS.Win/AndroidKeystoreSignatureTool.VSIX/Resources/AndroidSignatureToolCommand.png -------------------------------------------------------------------------------- /VS.Win/AndroidKeystoreSignatureTool.VSIX/Resources/AndroidSignatureToolCommandPackage.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Redth/AndroidSignatureToolAddin/dd093a340c138534e206a9f30bf3e50ae1ea9125/VS.Win/AndroidKeystoreSignatureTool.VSIX/Resources/AndroidSignatureToolCommandPackage.ico -------------------------------------------------------------------------------- /VS.Win/AndroidKeystoreSignatureTool.VSIX/Resources/AndroidSignatureToolWindowCommand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Redth/AndroidSignatureToolAddin/dd093a340c138534e206a9f30bf3e50ae1ea9125/VS.Win/AndroidKeystoreSignatureTool.VSIX/Resources/AndroidSignatureToolWindowCommand.png -------------------------------------------------------------------------------- /VS.Win/AndroidKeystoreSignatureTool.VSIX/Resources/SignaturesToolWindowCommand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Redth/AndroidSignatureToolAddin/dd093a340c138534e206a9f30bf3e50ae1ea9125/VS.Win/AndroidKeystoreSignatureTool.VSIX/Resources/SignaturesToolWindowCommand.png -------------------------------------------------------------------------------- /VS.Win/AndroidKeystoreSignatureTool.VSIX/Resources/ToolWindowCommand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Redth/AndroidSignatureToolAddin/dd093a340c138534e206a9f30bf3e50ae1ea9125/VS.Win/AndroidKeystoreSignatureTool.VSIX/Resources/ToolWindowCommand.png -------------------------------------------------------------------------------- /VS.Win/AndroidKeystoreSignatureTool.VSIX/ToolWindow.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Copyright (c) Company. All rights reserved. 4 | // 5 | //------------------------------------------------------------------------------ 6 | 7 | namespace AndroidKeystoreSignatureTool.VSIX 8 | { 9 | using System; 10 | using System.Runtime.InteropServices; 11 | using Microsoft.VisualStudio.Shell; 12 | 13 | /// 14 | /// This class implements the tool window exposed by this package and hosts a user control. 15 | /// 16 | /// 17 | /// In Visual Studio tool windows are composed of a frame (implemented by the shell) and a pane, 18 | /// usually implemented by the package implementer. 19 | /// 20 | /// This class derives from the ToolWindowPane class provided from the MPF in order to use its 21 | /// implementation of the IVsUIElementPane interface. 22 | /// 23 | /// 24 | [Guid("38693be7-e327-4e3b-a541-2b2113462b9d")] 25 | public class ToolWindow : ToolWindowPane 26 | { 27 | /// 28 | /// Initializes a new instance of the class. 29 | /// 30 | public ToolWindow() : base(null) 31 | { 32 | this.Caption = "Android Keystore Signature Tool"; 33 | 34 | // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable, 35 | // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on 36 | // the object returned by the Content property. 37 | this.Content = new ToolWindowControl(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /VS.Win/AndroidKeystoreSignatureTool.VSIX/ToolWindowCommand.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Copyright (c) Company. All rights reserved. 4 | // 5 | //------------------------------------------------------------------------------ 6 | 7 | using System; 8 | using System.ComponentModel.Design; 9 | using System.Globalization; 10 | using Microsoft.VisualStudio.Shell; 11 | using Microsoft.VisualStudio.Shell.Interop; 12 | 13 | namespace AndroidKeystoreSignatureTool.VSIX 14 | { 15 | /// 16 | /// Command handler 17 | /// 18 | internal sealed class ToolWindowCommand 19 | { 20 | /// 21 | /// Command ID. 22 | /// 23 | public const int CommandId = 4130; 24 | 25 | /// 26 | /// Command menu group (command set GUID). 27 | /// 28 | public static readonly Guid CommandSet = new Guid("ec70d67d-d10a-4c82-94bf-e3f8049e6ad2"); 29 | 30 | /// 31 | /// VS Package that provides this command, not null. 32 | /// 33 | private readonly Package package; 34 | 35 | /// 36 | /// Initializes a new instance of the class. 37 | /// Adds our command handlers for menu (commands must exist in the command table file) 38 | /// 39 | /// Owner package, not null. 40 | private ToolWindowCommand(Package package) 41 | { 42 | if (package == null) 43 | { 44 | throw new ArgumentNullException("package"); 45 | } 46 | 47 | this.package = package; 48 | 49 | OleMenuCommandService commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService; 50 | if (commandService != null) 51 | { 52 | var menuCommandID = new CommandID(CommandSet, CommandId); 53 | var menuItem = new MenuCommand(this.ShowToolWindow, menuCommandID); 54 | commandService.AddCommand(menuItem); 55 | } 56 | } 57 | 58 | /// 59 | /// Gets the instance of the command. 60 | /// 61 | public static ToolWindowCommand Instance 62 | { 63 | get; 64 | private set; 65 | } 66 | 67 | /// 68 | /// Gets the service provider from the owner package. 69 | /// 70 | private IServiceProvider ServiceProvider 71 | { 72 | get 73 | { 74 | return this.package; 75 | } 76 | } 77 | 78 | /// 79 | /// Initializes the singleton instance of the command. 80 | /// 81 | /// Owner package, not null. 82 | public static void Initialize(Package package) 83 | { 84 | Instance = new ToolWindowCommand(package); 85 | } 86 | 87 | /// 88 | /// Shows the tool window when the menu item is clicked. 89 | /// 90 | /// The event sender. 91 | /// The event args. 92 | private void ShowToolWindow(object sender, EventArgs e) 93 | { 94 | // Get the instance number 0 of this tool window. This window is single instance so this instance 95 | // is actually the only one. 96 | // The last flag is set to true so that if the tool window does not exists it will be created. 97 | ToolWindowPane window = this.package.FindToolWindow(typeof(ToolWindow), 0, true); 98 | if ((null == window) || (null == window.Frame)) 99 | { 100 | throw new NotSupportedException("Cannot create tool window"); 101 | } 102 | 103 | IVsWindowFrame windowFrame = (IVsWindowFrame)window.Frame; 104 | Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(windowFrame.Show()); 105 | } 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /VS.Win/AndroidKeystoreSignatureTool.VSIX/ToolWindowControl.xaml: -------------------------------------------------------------------------------- 1 |  12 | 13 | 14 | 15 | 16 | Java keytool.exe Location: 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | MD5 Signature: 101 | 102 |