public void SignApp() { Process cmd = ProcessProvider.OpenAndRetrieveCmdProcess(); cmd.StandardInput.WriteLine("d:"); cmd.StandardInput.WriteLine("cd " + stringProvider.androidToolsPath); if (Environment.GetEnvironmentVariable("signerTablet") == null) { throw new Exception("Load environment variables."); } string refinedSignCommand = stringProvider.signCommand; refinedSignCommand = refinedSignCommand.Replace("{keystore_file_name}", stringProvider.keyStoreFileTablet); refinedSignCommand = refinedSignCommand.Replace("{envVar}", "signerTablet"); refinedSignCommand = refinedSignCommand.Replace("{signed}", stringProvider.fullTabletOutputPathLocation + fileInfo.ToString() + "_aligned_signed.apk"); refinedSignCommand = refinedSignCommand.Replace("{aligned}", stringProvider.fullTabletOutputPathLocation + fileInfo.ToString() + "_aligned.apk"); cmd.StandardInput.WriteLine(refinedSignCommand); string output = ProcessProvider.CloseProcessAndRetrieveOutput(cmd); Console.WriteLine(output); }
public void GenerateAssembleRelease() { Process cmd = ProcessProvider.OpenAndRetrieveCmdProcess(); cmd.StandardInput.WriteLine("d:"); cmd.StandardInput.WriteLine("cd " + stringProvider.mPocRootFolderPath); cmd.StandardInput.WriteLine("gradlew assembleRelease"); string output = ProcessProvider.CloseProcessAndRetrieveOutput(cmd); Console.WriteLine(output); }
public void VerifySignature() { Process cmd = ProcessProvider.OpenAndRetrieveCmdProcess(); cmd.StandardInput.WriteLine("d:"); cmd.StandardInput.WriteLine("cd " + stringProvider.androidToolsPath); string refinedVerifySignCommand = stringProvider.verifySignatureCommand; refinedVerifySignCommand = refinedVerifySignCommand.Replace("{outputLocation}", stringProvider.fullMobileOutputPathLocation); refinedVerifySignCommand = refinedVerifySignCommand.Replace("{signedAligned}", fileInfo.ToString() + "_aligned_signed.apk"); cmd.StandardInput.WriteLine(refinedVerifySignCommand); string output = ProcessProvider.CloseProcessAndRetrieveOutput(cmd); Console.WriteLine(output); }
public void AlignApp() { Process cmd = ProcessProvider.OpenAndRetrieveCmdProcess(); cmd.StandardInput.WriteLine("d:"); cmd.StandardInput.WriteLine("cd " + stringProvider.androidToolsPath); string refinedAlignCommand = stringProvider.alignCommand .Replace("{unaligned}", stringProvider.fullMobileOutputPathLocation + fileInfo.ToString() + ".apk") .Replace("{aligned}", stringProvider.fullMobileOutputPathLocation + fileInfo.ToString() + "_aligned.apk"); cmd.StandardInput.WriteLine(refinedAlignCommand); string output = ProcessProvider.CloseProcessAndRetrieveOutput(cmd); Console.WriteLine(output); }