Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseCarlosGarcia95 committed Aug 28, 2016
1 parent 168263b commit d2d3857
Show file tree
Hide file tree
Showing 43 changed files with 812 additions and 0 deletions.
6 changes: 6 additions & 0 deletions App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>
206 changes: 206 additions & 0 deletions MainWindow.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

107 changes: 107 additions & 0 deletions MainWindow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
using System;
using System.Text;
using System.Diagnostics;

using System.Windows.Forms;

namespace IPSW_Restorer
{
public partial class MainWindow : Form
{
private string ipswFilePath;

public MainWindow()
{
InitializeComponent();
}

private void MainWindow_Load(object sender, EventArgs e)
{
StringBuilder information = new StringBuilder();
information.AppendLine("- iOS 10<= support.");
information.AppendLine("- No iTunes needed.");
information.AppendLine("- Using a precompiled version for Windows! / https://github.com/elrhk/Libimobiledevice-idevicerestore-for-Windows");
information.AppendLine("- Using libimobiledevice, libirecovery & idevicerestore.");

MessageBox.Show(information.ToString(), "IPSW Restore about", MessageBoxButtons.OK, MessageBoxIcon.Information);
}

private void fileButton_Click(object sender, EventArgs e)
{
openIPSW.Filter = "IPSW files|*.ipsw;*.zip";
if(openIPSW.ShowDialog() == DialogResult.OK)
{
ipswFilePath = openIPSW.FileName;
}


}

private void button1_Click(object sender, EventArgs e)
{
StringBuilder cmd = new StringBuilder();
// cmd.Append("idevicrestore.exe ");

// Step 1
if (latestFirmware.Checked)
{
cmd.Append("-l ");
}
else if (ipswFilePath == null)
{
MessageBox.Show("No ipsw selected!", "Select one option in the first step", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}

// Step 2

if(basebandOption.Checked)
{
cmd.Append("-x ");
}

if(tssFromCydia.Checked)
{
cmd.Append("-s ");
}

if(fetchTSS.Checked)
{
cmd.Append("-t ");
}

if(limer4in.Checked)
{
cmd.Append("-p ");
}

if(fullyRestore.Checked)
{
cmd.Append("-e ");
}

if(ipswFilePath != null)
{
cmd.Append(" \"" + ipswFilePath + "\" ");
}

var process = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "idevicerestore.exe",
Arguments = cmd.ToString()
}
};
process.Start();
process.WaitForExit();

MessageBox.Show("Everything done!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start("https://github.com/BananaProject/idevicerestore-gui/");
}
}
}
Loading

0 comments on commit d2d3857

Please sign in to comment.