summaryrefslogtreecommitdiffstats
path: root/heimdall
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell@glassechidna.com.au>2011-07-17 11:50:07 +0200
committerBenjamin Dobell <benjamin.dobell@glassechidna.com.au>2011-07-17 11:50:07 +0200
commit8cb7f6ee8f872938e257541c07d0e4b2ad0e3f35 (patch)
tree7b40d7e1a5c28b2e05b01cd9e348aabd60f2d19c /heimdall
parentAltered the user interface slightly to prevent clipping on certain OS. (diff)
downloadHeimdall-8cb7f6ee8f872938e257541c07d0e4b2ad0e3f35.tar
Heimdall-8cb7f6ee8f872938e257541c07d0e4b2ad0e3f35.tar.gz
Heimdall-8cb7f6ee8f872938e257541c07d0e4b2ad0e3f35.tar.bz2
Heimdall-8cb7f6ee8f872938e257541c07d0e4b2ad0e3f35.tar.lz
Heimdall-8cb7f6ee8f872938e257541c07d0e4b2ad0e3f35.tar.xz
Heimdall-8cb7f6ee8f872938e257541c07d0e4b2ad0e3f35.tar.zst
Heimdall-8cb7f6ee8f872938e257541c07d0e4b2ad0e3f35.zip
Diffstat (limited to '')
-rw-r--r--heimdall-frontend/Source/mainwindow.cpp360
-rw-r--r--heimdall-frontend/Source/mainwindow.h34
-rw-r--r--heimdall-frontend/heimdall-frontend.vcxproj56
-rw-r--r--heimdall-frontend/mainwindow.ui695
-rw-r--r--heimdall/heimdall.vcxproj59
-rw-r--r--heimdall/source/BridgeManager.cpp35
-rw-r--r--heimdall/source/Interface.cpp40
-rw-r--r--heimdall/source/Interface.h35
-rw-r--r--heimdall/source/main.cpp85
9 files changed, 1082 insertions, 317 deletions
diff --git a/heimdall-frontend/Source/mainwindow.cpp b/heimdall-frontend/Source/mainwindow.cpp
index a777c77..b71aef1 100644
--- a/heimdall-frontend/Source/mainwindow.cpp
+++ b/heimdall-frontend/Source/mainwindow.cpp
@@ -34,6 +34,64 @@
using namespace HeimdallFrontend;
+void MainWindow::StartHeimdall(const QStringList& arguments)
+{
+ flashProgressBar->setEnabled(true);
+ UpdateInterfaceAvailability();
+
+ int pathIndex = -1;
+ process.setReadChannel(QProcess::StandardOutput);
+
+ process.start("heimdall", arguments);
+ process.waitForStarted(3000);
+
+ // OS X was playing up and not finding heimdall, so we're manually checking the PATH.
+ if (heimdallFailed)
+ {
+ QStringList environment = QProcess::systemEnvironment();
+
+ QStringList paths;
+
+ // Ensure /usr/bin is in PATH
+ for (int i = 0; i < environment.length(); i++)
+ {
+ if (environment[i].left(5) == "PATH=")
+ {
+ paths = environment[i].mid(5).split(':');
+ paths.prepend("/usr/bin");
+ break;
+ }
+ }
+
+ while (heimdallFailed && ++pathIndex < paths.length())
+ {
+ QString heimdallPath = paths[pathIndex];
+
+ if (heimdallPath.length() > 0)
+ {
+ heimdallFailed = false;
+
+ if (heimdallPath[heimdallPath.length() - 1] != QDir::separator())
+ heimdallPath += QDir::separator();
+
+ heimdallPath += "heimdall";
+
+ process.start(heimdallPath, arguments);
+ process.waitForStarted(3000);
+ }
+ }
+
+ if (heimdallFailed)
+ {
+ flashLabel->setText("Failed to start Heimdall!");
+
+ heimdallState = MainWindow::kHeimdallStateStopped;
+ flashProgressBar->setEnabled(false);
+ UpdateInterfaceAvailability();
+ }
+ }
+}
+
void MainWindow::UpdateUnusedPartitionIds(void)
{
unusedPartitionIds.clear();
@@ -199,13 +257,33 @@ void MainWindow::UpdatePartitionNamesInterface(void)
populatingPartitionNames = false;
}
-void MainWindow::UpdateStartButton(void)
+void MainWindow::UpdateInterfaceAvailability(void)
{
- if (heimdallRunning)
+ if (heimdallState != MainWindow::kHeimdallStateStopped)
{
startFlashButton->setEnabled(false);
+
+ detectDeviceButton->setEnabled(false);
+ closePcScreenButton->setEnabled(false);
+ pitSaveAsButton->setEnabled(false);
+ downloadPitButton->setEnabled(false);
+ printPitButton->setEnabled(false);
+
return;
}
+ else
+ {
+ detectDeviceButton->setEnabled(true);
+ closePcScreenButton->setEnabled(true);
+ pitSaveAsButton->setEnabled(true);
+
+ if (!pitDestinationLineEdit->text().isEmpty())
+ downloadPitButton->setEnabled(true);
+ else
+ downloadPitButton->setEnabled(false);
+
+ printPitButton->setEnabled(true);
+ }
bool allPartitionsValid = true;
@@ -223,6 +301,7 @@ void MainWindow::UpdateStartButton(void)
bool validSettings = allPartitionsValid && fileList.length() > 0;
startFlashButton->setEnabled(validSettings);
+
functionTabWidget->setTabEnabled(functionTabWidget->indexOf(createPackageTab), validSettings);
}
@@ -245,7 +324,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
setupUi(this);
- heimdallRunning = false;
+ heimdallState = MainWindow::kHeimdallStateStopped;
lastDirectory = QDir::toNativeSeparators(QApplication::applicationDirPath());
@@ -253,12 +332,17 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
verboseOutput = false;
+ tabIndex = functionTabWidget->currentIndex();
functionTabWidget->setTabEnabled(functionTabWidget->indexOf(createPackageTab), false);
+ QObject::connect(functionTabWidget, SIGNAL(currentChanged(int)), this, SLOT(FunctionTabChanged(int)));
+
+ // Menu
QObject::connect(actionDonate, SIGNAL(triggered()), this, SLOT(OpenDonationWebpage()));
QObject::connect(actionVerboseOutput, SIGNAL(toggled(bool)), this, SLOT(SetVerboseOutput(bool)));
QObject::connect(actionAboutHeimdall, SIGNAL(triggered()), this, SLOT(ShowAbout()));
+ // Load Package Tab
QObject::connect(browseFirmwarePackageButton, SIGNAL(clicked()), this, SLOT(SelectFirmwarePackage()));
QObject::connect(developerHomepageButton, SIGNAL(clicked()), this, SLOT(OpenDeveloperHomepage()));
QObject::connect(developerDonateButton, SIGNAL(clicked()), this, SLOT(OpenDeveloperDonationWebpage()));
@@ -268,6 +352,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
QObject::connect(addPartitionButton, SIGNAL(clicked()), this, SLOT(AddPartition()));
QObject::connect(removePartitionButton, SIGNAL(clicked()), this, SLOT(RemovePartition()));
+ // Flash Tab
QObject::connect(partitionNameComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(SelectPartitionName(int)));
QObject::connect(partitionFileBrowseButton, SIGNAL(clicked()), this, SLOT(SelectPartitionFile()));
@@ -278,6 +363,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
QObject::connect(startFlashButton, SIGNAL(clicked()), this, SLOT(StartFlash()));
+ // Create Package Tab
QObject::connect(createFirmwareNameLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(FirmwareNameChanged(const QString&)));
QObject::connect(createFirmwareVersionLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(FirmwareVersionChanged(const QString&)));
QObject::connect(createPlatformNameLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(PlatformNameChanged(const QString&)));
@@ -300,6 +386,14 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
QObject::connect(buildPackageButton, SIGNAL(clicked()), this, SLOT(BuildPackage()));
+ // Utilities Tab
+ QObject::connect(detectDeviceButton, SIGNAL(clicked()), this, SLOT(DetectDevice()));
+ QObject::connect(closePcScreenButton, SIGNAL(clicked()), this, SLOT(ClosePcScreen()));
+ QObject::connect(printPitButton, SIGNAL(clicked()), this, SLOT(PrintPit()));
+ QObject::connect(pitSaveAsButton, SIGNAL(clicked()), this, SLOT(SelectPitDestination()));
+ QObject::connect(downloadPitButton, SIGNAL(clicked()), this, SLOT(DownloadPit()));
+
+ // Heimdall Command Line
QObject::connect(&process, SIGNAL(readyRead()), this, SLOT(HandleHeimdallStdout()));
QObject::connect(&process, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(HandleHeimdallReturned(int, QProcess::ExitStatus)));
QObject::connect(&process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(HandleHeimdallError(QProcess::ProcessError)));
@@ -324,6 +418,12 @@ void MainWindow::ShowAbout(void)
aboutForm.show();
}
+void MainWindow::FunctionTabChanged(int index)
+{
+ tabIndex = index;
+ deviceDetectedRadioButton->setChecked(false);
+}
+
void MainWindow::SelectFirmwarePackage(void)
{
loadedPackageData.Clear();
@@ -461,7 +561,7 @@ void MainWindow::LoadFirmwarePackage(void)
functionTabWidget->setCurrentWidget(flashTab);
- UpdateStartButton();
+ UpdateInterfaceAvailability();
}
void MainWindow::SelectPartitionName(int index)
@@ -495,7 +595,7 @@ void MainWindow::SelectPartitionFile(void)
pitBrowseButton->setEnabled(true);
partitionsListWidget->setEnabled(true);
- UpdateStartButton();
+ UpdateInterfaceAvailability();
if (unusedPartitionIds.length() > 0)
addPartitionButton->setEnabled(true);
@@ -540,7 +640,7 @@ void MainWindow::AddPartition(void)
partitionsListWidget->addItem(currentPitData.FindEntry(partitionInfo.GetPartitionId())->GetPartitionName());
partitionsListWidget->setCurrentRow(partitionsListWidget->count() - 1);
partitionsListWidget->setEnabled(false);
- UpdateStartButton();
+ UpdateInterfaceAvailability();
}
void MainWindow::RemovePartition(void)
@@ -555,7 +655,7 @@ void MainWindow::RemovePartition(void)
pitBrowseButton->setEnabled(true);
addPartitionButton->setEnabled(true);
partitionsListWidget->setEnabled(true);
- UpdateStartButton();
+ UpdateInterfaceAvailability();
}
void MainWindow::SelectPit(void)
@@ -640,7 +740,7 @@ void MainWindow::SelectPit(void)
addPartitionButton->setEnabled(validPit);
removePartitionButton->setEnabled(validPit && partitionsListWidget->currentRow() >= 0);
- UpdateStartButton();
+ UpdateInterfaceAvailability();
}
}
@@ -657,7 +757,7 @@ void MainWindow::StartFlash(void)
{
outputPlainTextEdit->clear();
- heimdallRunning = true;
+ heimdallState = MainWindow::kHeimdallStateFlashing;
heimdallFailed = false;
const FirmwareInfo& firmwareInfo = workingPackageData.GetFirmwareInfo();
@@ -689,59 +789,7 @@ void MainWindow::StartFlash(void)
arguments.append("--stdout-errors");
- flashProgressBar->setEnabled(true);
- UpdateStartButton();
-
- int pathIndex = -1;
- process.setReadChannel(QProcess::StandardOutput);
-
- process.start("heimdall", arguments);
- process.waitForStarted(1000);
-
- // OS X was playing up and not finding heimdall, so we're manually checking the PATH.
- if (heimdallFailed)
- {
- QStringList environment = QProcess::systemEnvironment();
-
- QStringList paths;
- // Ensure /usr/bin is in PATH
- for (int i = 0; i < environment.length(); i++)
- {
- if (environment[i].left(5) == "PATH=")
- {
- paths = environment[i].mid(5).split(':');
- paths.prepend("/usr/bin");
- break;
- }
- }
-
- while (heimdallFailed && ++pathIndex < paths.length())
- {
- QString heimdallPath = paths[pathIndex];
-
- if (heimdallPath.length() > 0)
- {
- heimdallFailed = false;
-
- if (heimdallPath[heimdallPath.length() - 1] != QDir::separator())
- heimdallPath += QDir::separator();
-
- heimdallPath += "heimdall";
-
- process.start(heimdallPath, arguments);
- process.waitForStarted(1000);
- }
- }
-
- if (heimdallFailed)
- {
- flashLabel->setText("Failed to start Heimdall!");
-
- heimdallRunning = false;
- flashProgressBar->setEnabled(false);
- UpdateStartButton();
- }
- }
+ StartHeimdall(arguments);
}
void MainWindow::FirmwareNameChanged(const QString& text)
@@ -863,19 +911,102 @@ void MainWindow::BuildPackage(void)
{
QString packagePath = PromptFileCreation();
- if (!packagePath.endsWith(".tar.gz", Qt::CaseInsensitive))
+ if (!packagePath.isEmpty())
{
- if (packagePath.endsWith(".tar", Qt::CaseInsensitive))
- packagePath.append(".gz");
- else if (packagePath.endsWith(".gz", Qt::CaseInsensitive))
- packagePath.replace(packagePath.length() - 3, ".tar.gz");
- else if (packagePath.endsWith(".tgz", Qt::CaseInsensitive))
- packagePath.replace(packagePath.length() - 4, ".tar.gz");
- else
- packagePath.append(".tar.gz");
+ if (!packagePath.endsWith(".tar.gz", Qt::CaseInsensitive))
+ {
+ if (packagePath.endsWith(".tar", Qt::CaseInsensitive))
+ packagePath.append(".gz");
+ else if (packagePath.endsWith(".gz", Qt::CaseInsensitive))
+ packagePath.replace(packagePath.length() - 3, ".tar.gz");
+ else if (packagePath.endsWith(".tgz", Qt::CaseInsensitive))
+ packagePath.replace(packagePath.length() - 4, ".tar.gz");
+ else
+ packagePath.append(".tar.gz");
+ }
+
+ Packaging::BuildPackage(packagePath, workingPackageData.GetFirmwareInfo());
+ }
+}
+
+void MainWindow::DetectDevice(void)
+{
+ deviceDetectedRadioButton->setChecked(false);
+ utilityOutputPlainTextEdit->clear();
+
+ heimdallState = MainWindow::kHeimdallStateDetectingDevice;
+ heimdallFailed = false;
+
+ QStringList arguments;
+ arguments.append("detect");
+
+ arguments.append("--stdout-errors");
+
+ StartHeimdall(arguments);
+}
+
+void MainWindow::ClosePcScreen(void)
+{
+ utilityOutputPlainTextEdit->clear();
+
+ heimdallState = MainWindow::kHeimdallStateClosingPcScreen;
+ heimdallFailed = false;
+
+ QStringList arguments;
+ arguments.append("close-pc-screen");
+
+ arguments.append("--stdout-errors");
+
+ StartHeimdall(arguments);
+}
+
+void MainWindow::SelectPitDestination(void)
+{
+ QString path = PromptFileCreation();
+
+ if (path != "")
+ {
+ if (!path.endsWith(".pit"))
+ path.append(".pit");
+
+ pitDestinationLineEdit->setText(path);
+
+ UpdateInterfaceAvailability();
}
+}
+
+void MainWindow::DownloadPit(void)
+{
+ deviceDetectedRadioButton->setChecked(false);
+ utilityOutputPlainTextEdit->clear();
- Packaging::BuildPackage(packagePath, workingPackageData.GetFirmwareInfo());
+ heimdallState = MainWindow::kHeimdallStateDetectingDevice;
+ heimdallFailed = false;
+
+ QStringList arguments;
+ arguments.append("download-pit");
+
+ arguments.append("--output");
+ arguments.append(pitDestinationLineEdit->text());
+
+ arguments.append("--stdout-errors");
+
+ StartHeimdall(arguments);
+}
+
+void MainWindow::PrintPit(void)
+{
+ utilityOutputPlainTextEdit->clear();
+
+ heimdallState = MainWindow::kHeimdallStatePrintingPit;
+ heimdallFailed = false;
+
+ QStringList arguments;
+ arguments.append("print-pit");
+
+ arguments.append("--stdout-errors");
+
+ StartHeimdall(arguments);
}
void MainWindow::HandleHeimdallStdout(void)
@@ -897,8 +1028,17 @@ void MainWindow::HandleHeimdallStdout(void)
output.remove(QChar('\b'));
output.replace(QChar('%'), QString("%\n"));
- outputPlainTextEdit->insertPlainText(output);
- outputPlainTextEdit->ensureCursorVisible();
+
+ if (heimdallState == MainWindow::kHeimdallStateFlashing)
+ {
+ outputPlainTextEdit->insertPlainText(output);
+ outputPlainTextEdit->ensureCursorVisible();
+ }
+ else
+ {
+ utilityOutputPlainTextEdit->insertPlainText(output);
+ utilityOutputPlainTextEdit->ensureCursorVisible();
+ }
}
void MainWindow::HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus)
@@ -906,50 +1046,82 @@ void MainWindow::HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitS
// This is a work-around for strange issues as a result of a exitCode being cast to
// a unsigned char.
char byteExitCode = exitCode;
-
- heimdallRunning = false;
- flashProgressBar->setEnabled(false);
- UpdateStartButton();
if (exitStatus == QProcess::NormalExit && byteExitCode >= 0)
{
- flashLabel->setText("Flash completed sucessfully!");
+ if (heimdallState == MainWindow::kHeimdallStateFlashing)
+ flashLabel->setText("Flash completed sucessfully!");
+ else if (heimdallState == MainWindow::kHeimdallStateDetectingDevice)
+ deviceDetectedRadioButton->setChecked(byteExitCode == 0);
}
else
{
- QString error = process.readAllStandardError();
+ if (heimdallState == MainWindow::kHeimdallStateFlashing)
+ {
+ QString error = process.readAllStandardError();
- int lastNewLineChar = error.lastIndexOf('\n');
+ int lastNewLineChar = error.lastIndexOf('\n');
- if (lastNewLineChar == 0)
- error = error.mid(1).remove("ERROR: ");
- else
- error = error.left(lastNewLineChar).remove("ERROR: ");
+ if (lastNewLineChar == 0)
+ error = error.mid(1).remove("ERROR: ");
+ else
+ error = error.left(lastNewLineChar).remove("ERROR: ");
- flashLabel->setText(error);
+ flashLabel->setText(error);
+ }
}
+
+ heimdallState = MainWindow::kHeimdallStateStopped;
+ flashProgressBar->setEnabled(false);
+ UpdateInterfaceAvailability();
}
void MainWindow::HandleHeimdallError(QProcess::ProcessError error)
{
if (error == QProcess::FailedToStart || error == QProcess::Timedout)
{
+ if (heimdallState == kHeimdallStateFlashing)
+ {
+ flashLabel->setText("Failed to start Heimdall!");
+ flashProgressBar->setEnabled(false);
+ }
+ else
+ {
+ utilityOutputPlainTextEdit->setPlainText("\nFRONTEND ERROR: Failed to start Heimdall!");
+ }
+
heimdallFailed = true;
+ heimdallState = MainWindow::kHeimdallStateStopped;
+ UpdateInterfaceAvailability();
}
else if (error == QProcess::Crashed)
{
- flashLabel->setText("Heimdall crashed!");
+ if (heimdallState == kHeimdallStateFlashing)
+ {
+ flashLabel->setText("Heimdall crashed!");
+ flashProgressBar->setEnabled(false);
+ }
+ else
+ {
+ utilityOutputPlainTextEdit->appendPlainText("\nFRONTEND ERROR: Heimdall crashed!");
+ }
- heimdallRunning = false;
- flashProgressBar->setEnabled(false);
- UpdateStartButton();
+ heimdallState = MainWindow::kHeimdallStateStopped;
+ UpdateInterfaceAvailability();
}
else
{
- flashLabel->setText("Heimdall reported an unknown error!");
+ if (heimdallState == kHeimdallStateFlashing)
+ {
+ flashLabel->setText("Heimdall reported an unknown error!");
+ flashProgressBar->setEnabled(false);
+ }
+ else
+ {
+ utilityOutputPlainTextEdit->appendPlainText("\nFRONTEND ERROR: Heimdall reported an unknown error!");
+ }
- heimdallRunning = false;
- flashProgressBar->setEnabled(false);
- UpdateStartButton();
+ heimdallState = MainWindow::kHeimdallStateStopped;
+ UpdateInterfaceAvailability();
}
}
diff --git a/heimdall-frontend/Source/mainwindow.h b/heimdall-frontend/Source/mainwindow.h
index b041dab..e4ca08d 100644
--- a/heimdall-frontend/Source/mainwindow.h
+++ b/heimdall-frontend/Source/mainwindow.h
@@ -45,12 +45,25 @@ namespace HeimdallFrontend
private:
+ enum
+ {
+ kHeimdallStateStopped = 0,
+ kHeimdallStateFlashing,
+ kHeimdallStateDetectingDevice,
+ kHeimdallStateClosingPcScreen,
+ kHeimdallStatePrintingPit,
+ kHeimdallStateDownloadingPit,
+ kHeimdallStateCount
+ };
+
AboutForm aboutForm;
QString lastDirectory;
+ int tabIndex;
+
bool heimdallFailed;
- bool heimdallRunning;
+ int heimdallState;
QProcess process;
PackageData loadedPackageData;
@@ -63,6 +76,8 @@ namespace HeimdallFrontend
bool verboseOutput;
+ void StartHeimdall(const QStringList& arguments);
+
void UpdateUnusedPartitionIds(void);
bool ReadPit(QFile *file);
@@ -74,7 +89,7 @@ namespace HeimdallFrontend
QString PromptFileCreation(void);
void UpdatePartitionNamesInterface(void);
- void UpdateStartButton(void);
+ void UpdateInterfaceAvailability(void);
void UpdateBuildPackageButton(void);
@@ -89,11 +104,15 @@ namespace HeimdallFrontend
void SetVerboseOutput(bool enabled);
void ShowAbout(void);
+ void FunctionTabChanged(int index);
+
+ // Load Package Tab
void SelectFirmwarePackage(void);
void OpenDeveloperHomepage(void);
void OpenDeveloperDonationWebpage(void);
void LoadFirmwarePackage(void);
+ // Flash Tab
void SelectPartitionName(int index);
void SelectPartitionFile(void);
@@ -108,6 +127,7 @@ namespace HeimdallFrontend
void StartFlash(void);
+ // Create Package Tab
void FirmwareNameChanged(const QString& text);
void FirmwareVersionChanged(const QString& text);
void PlatformNameChanged(const QString& text);
@@ -128,6 +148,16 @@ namespace HeimdallFrontend
void BuildPackage(void);
+ // Utilities Tab
+ void DetectDevice(void);
+ void ClosePcScreen(void);
+
+ void SelectPitDestination(void);
+ void DownloadPit(void);
+
+ void PrintPit(void);
+
+ // Heimdall Command Line
void HandleHeimdallStdout(void);
void HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus);
void HandleHeimdallError(QProcess::ProcessError error);
diff --git a/heimdall-frontend/heimdall-frontend.vcxproj b/heimdall-frontend/heimdall-frontend.vcxproj
index bb7e184..87be4e2 100644
--- a/heimdall-frontend/heimdall-frontend.vcxproj
+++ b/heimdall-frontend/heimdall-frontend.vcxproj
@@ -26,9 +26,6 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
@@ -40,10 +37,6 @@
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="Qt4VSPropertySheet.props" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="Qt4VSPropertySheet.props" />
- </ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
@@ -51,24 +44,16 @@
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)include;$(SolutionDir)libpit\Source;$(IncludePath)</IncludePath>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">false</LinkIncremental>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)include;$(SolutionDir)libpit\Source;$(IncludePath)</IncludePath>
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">$(ProjectDir)include;$(SolutionDir)libpit\Source;$(IncludePath)</IncludePath>
- <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath)</LibraryPath>
- <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">$(LibraryPath)</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)lib\win32;$(LibraryPath)</LibraryPath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)lib\win32;$(LibraryPath)</LibraryPath>
<SourcePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SourcePath)</SourcePath>
</PropertyGroup>
@@ -112,27 +97,6 @@
<AdditionalDependencies>qtmain.lib;QtCore4.lib;QtGui4.lib;QtXml4.lib;libpit.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>.\GeneratedFiles;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\qtmain;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtXml;..\libpit\Source;.\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <DebugInformationFormat>
- </DebugInformationFormat>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
- <PrecompiledHeaderFile>
- </PrecompiledHeaderFile>
- <PrecompiledHeaderOutputFile>
- </PrecompiledHeaderOutputFile>
- </ClCompile>
- <Link>
- <SubSystem>Windows</SubSystem>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <AdditionalLibraryDirectories>$(QTDIR)\lib;$(SolutionDir)$(Platform)\$(Configuration)\lib\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>false</GenerateDebugInformation>
- <AdditionalDependencies>qtmains.lib;QtCore4s.lib;QtGui4s.lib;QtXml4s.lib;libpit.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="GeneratedFiles\Debug\moc_mainwindow.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
@@ -143,8 +107,6 @@
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">
- </PrecompiledHeader>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_mainwindow.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
@@ -166,13 +128,9 @@
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Uic%27ing %(Identity)...</Message>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">Uic%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
</CustomBuild>
</ItemGroup>
<ItemGroup>
@@ -189,13 +147,9 @@
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -D_UNICODE "-I." "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtXml" "-I.\..\libpit\Source" "-I." "-I." "-I." "-I." "-I." "-I." "Source\mainwindow.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing %(Identity)...</Message>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">Moc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB "-I." "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtXml" "-I.\..\libpit\Source" "-I." "-I." "-I." "-I." "-I." "Source\mainwindow.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">"$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB "-I." "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtXml" "-I.\..\libpit\Source" "-I." "-I." "-I." "-I." "-I." "Source\mainwindow.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"</Command>
</CustomBuild>
</ItemGroup>
<ItemGroup>
@@ -206,13 +160,9 @@
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rcc%27ing %(Identity)...</Message>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">Rcc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs)</Outputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">.\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">"$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp</Command>
</CustomBuild>
</ItemGroup>
<ItemGroup>
@@ -223,13 +173,9 @@
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
- <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Uic%27ing %(Identity)...</Message>
- <Message Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">Uic%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
diff --git a/heimdall-frontend/mainwindow.ui b/heimdall-frontend/mainwindow.ui
index 0dba976..985fe10 100644
--- a/heimdall-frontend/mainwindow.ui
+++ b/heimdall-frontend/mainwindow.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>788</width>
- <height>505</height>
+ <height>525</height>
</rect>
</property>
<property name="sizePolicy">
@@ -19,13 +19,13 @@
<property name="minimumSize">
<size>
<width>788</width>
- <height>505</height>
+ <height>525</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>788</width>
- <height>505</height>
+ <height>525</height>
</size>
</property>
<property name="windowTitle">
@@ -73,7 +73,7 @@
<x>5</x>
<y>0</y>
<width>780</width>
- <height>481</height>
+ <height>501</height>
</rect>
</property>
<property name="sizePolicy">
@@ -162,7 +162,7 @@
<x>10</x>
<y>220</y>
<width>491</width>
- <height>231</height>
+ <height>241</height>
</rect>
</property>
<property name="title">
@@ -172,7 +172,7 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
+ <y>30</y>
<width>471</width>
<height>201</height>
</rect>
@@ -186,7 +186,7 @@
<property name="geometry">
<rect>
<x>520</x>
- <y>350</y>
+ <y>360</y>
<width>241</width>
<height>21</height>
</rect>
@@ -202,7 +202,7 @@
<property name="geometry">
<rect>
<x>550</x>
- <y>410</y>
+ <y>420</y>
<width>171</width>
<height>31</height>
</rect>
@@ -382,7 +382,7 @@
<property name="geometry">
<rect>
<x>520</x>
- <y>380</y>
+ <y>390</y>
<width>241</width>
<height>21</height>
</rect>
@@ -400,7 +400,7 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>280</y>
+ <y>300</y>
<width>751</width>
<height>171</height>
</rect>
@@ -414,7 +414,7 @@
</property>
<property name="geometry">
<rect>
- <x>320</x>
+ <x>310</x>
<y>130</y>
<width>311</width>
<height>31</height>
@@ -451,7 +451,7 @@
<rect>
<x>10</x>
<y>130</y>
- <width>301</width>
+ <width>291</width>
<height>21</height>
</rect>
</property>
@@ -474,7 +474,7 @@
</property>
<property name="geometry">
<rect>
- <x>640</x>
+ <x>620</x>
<y>130</y>
<width>91</width>
<height>31</height>
@@ -484,6 +484,43 @@
<string>Start</string>
</property>
</widget>
+ <widget class="QLabel" name="startFlashTipLabel">
+ <property name="geometry">
+ <rect>
+ <x>720</x>
+ <y>130</y>
+ <width>21</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="toolTip">
+ <string notr="true">The &quot;Start&quot; button will remain inactive until at least one partition/file is added.</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth">
+ <number>2</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="text">
+ <string>?</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
</widget>
<widget class="QGroupBox" name="optionsGroup">
<property name="geometry">
@@ -491,7 +528,7 @@
<x>10</x>
<y>10</y>
<width>751</width>
- <height>271</height>
+ <height>281</height>
</rect>
</property>
<property name="title">
@@ -502,7 +539,7 @@
<rect>
<x>10</x>
<y>20</y>
- <width>381</width>
+ <width>391</width>
<height>61</height>
</rect>
</property>
@@ -517,7 +554,7 @@
<rect>
<x>10</x>
<y>30</y>
- <width>281</width>
+ <width>261</width>
<height>21</height>
</rect>
</property>
@@ -531,7 +568,7 @@
</property>
<property name="geometry">
<rect>
- <x>300</x>
+ <x>280</x>
<y>30</y>
<width>71</width>
<height>23</height>
@@ -541,34 +578,64 @@
<string>Browse</string>
</property>
</widget>
- </widget>
- <widget class="QPushButton" name="removePartitionButton">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="geometry">
- <rect>
- <x>660</x>
- <y>240</y>
- <width>81</width>
- <height>23</height>
- </rect>
- </property>
- <property name="text">
- <string>Remove</string>
- </property>
+ <widget class="QLabel" name="pitBrowseTipLabel">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>360</x>
+ <y>30</y>
+ <width>21</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="toolTip">
+ <string notr="true">You can retrieve/download your device's PIT file from the Utilities tab.</string>
+ </property>
+ <property name="statusTip">
+ <string notr="true"/>
+ </property>
+ <property name="whatsThis">
+ <string notr="true"/>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth">
+ <number>2</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="text">
+ <string>?</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
</widget>
<widget class="QGroupBox" name="partitionGroup">
<property name="geometry">
<rect>
<x>10</x>
<y>120</y>
- <width>381</width>
- <height>141</height>
+ <width>391</width>
+ <height>151</height>
</rect>
</property>
<property name="title">
- <string>File / Partition</string>
+ <string>Partition Details</string>
</property>
<widget class="QComboBox" name="partitionNameComboBox">
<property name="enabled">
@@ -576,7 +643,7 @@
</property>
<property name="geometry">
<rect>
- <x>110</x>
+ <x>120</x>
<y>30</y>
<width>261</width>
<height>22</height>
@@ -588,7 +655,7 @@
<rect>
<x>10</x>
<y>30</y>
- <width>91</width>
+ <width>101</width>
<height>16</height>
</rect>
</property>
@@ -601,7 +668,7 @@
<rect>
<x>10</x>
<y>60</y>
- <width>91</width>
+ <width>101</width>
<height>16</height>
</rect>
</property>
@@ -614,8 +681,8 @@
<rect>
<x>10</x>
<y>80</y>
- <width>361</width>
- <height>51</height>
+ <width>371</width>
+ <height>61</height>
</rect>
</property>
<property name="title">
@@ -628,8 +695,8 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
- <width>261</width>
+ <y>30</y>
+ <width>271</width>
<height>21</height>
</rect>
</property>
@@ -643,8 +710,8 @@
</property>
<property name="geometry">
<rect>
- <x>280</x>
- <y>20</y>
+ <x>290</x>
+ <y>30</y>
<width>71</width>
<height>23</height>
</rect>
@@ -660,7 +727,7 @@
</property>
<property name="geometry">
<rect>
- <x>110</x>
+ <x>120</x>
<y>60</y>
<width>261</width>
<height>21</height>
@@ -671,47 +738,21 @@
</property>
</widget>
</widget>
- <widget class="QPushButton" name="addPartitionButton">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="geometry">
- <rect>
- <x>400</x>
- <y>240</y>
- <width>81</width>
- <height>23</height>
- </rect>
- </property>
- <property name="text">
- <string>Add</string>
- </property>
- </widget>
- <widget class="QListWidget" name="partitionsListWidget">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="geometry">
- <rect>
- <x>400</x>
- <y>30</y>
- <width>341</width>
- <height>201</height>
- </rect>
- </property>
- </widget>
<widget class="QCheckBox" name="noRebootCheckBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
- <x>150</x>
+ <x>250</x>
<y>90</y>
- <width>121</width>
+ <width>151</width>
<height>21</height>
</rect>
</property>
+ <property name="toolTip">
+ <string notr="true">Can be enabled to prevent your device rebooting after the flash finishes.</string>
+ </property>
<property name="text">
<string>No Reboot</string>
</property>
@@ -724,14 +765,112 @@
<rect>
<x>20</x>
<y>90</y>
- <width>121</width>
+ <width>151</width>
<height>21</height>
</rect>
</property>
+ <property name="toolTip">
+ <string notr="true">Repartitioning will wipe all data for your phone and install the selected PIT file.</string>
+ </property>
<property name="text">
<string>Repartition</string>
</property>
</widget>
+ <widget class="QGroupBox" name="partitionsGroup">
+ <property name="geometry">
+ <rect>
+ <x>410</x>
+ <y>20</y>
+ <width>331</width>
+ <height>251</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string>Partitions (Files)</string>
+ </property>
+ <widget class="QPushButton" name="addPartitionButton">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>220</y>
+ <width>81</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Add</string>
+ </property>
+ </widget>
+ <widget class="QListWidget" name="partitionsListWidget">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>311</width>
+ <height>191</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="removePartitionButton">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>240</x>
+ <y>220</y>
+ <width>81</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Remove</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="addPartitionTipLabel">
+ <property name="geometry">
+ <rect>
+ <x>100</x>
+ <y>220</y>
+ <width>21</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="toolTip">
+ <string notr="true">Use the &quot;Add&quot; button to add additional files to be flashed.</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth">
+ <number>2</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="text">
+ <string>?</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </widget>
</widget>
</widget>
<widget class="QWidget" name="createPackageTab">
@@ -747,7 +886,7 @@
<x>0</x>
<y>230</y>
<width>491</width>
- <height>221</height>
+ <height>231</height>
</rect>
</property>
<property name="title">
@@ -759,7 +898,7 @@
<x>10</x>
<y>30</y>
<width>471</width>
- <height>151</height>
+ <height>161</height>
</rect>
</property>
</widget>
@@ -770,7 +909,7 @@
<property name="geometry">
<rect>
<x>350</x>
- <y>190</y>
+ <y>200</y>
<width>131</width>
<height>23</height>
</rect>
@@ -785,7 +924,7 @@
<rect>
<x>240</x>
<y>10</y>
- <width>141</width>
+ <width>151</width>
<height>61</height>
</rect>
</property>
@@ -800,7 +939,7 @@
<rect>
<x>10</x>
<y>30</y>
- <width>121</width>
+ <width>131</width>
<height>21</height>
</rect>
</property>
@@ -812,9 +951,9 @@
<widget class="QGroupBox" name="createPlatformNameGroup">
<property name="geometry">
<rect>
- <x>450</x>
+ <x>430</x>
<y>10</y>
- <width>161</width>
+ <width>171</width>
<height>61</height>
</rect>
</property>
@@ -829,7 +968,7 @@
<rect>
<x>10</x>
<y>30</y>
- <width>141</width>
+ <width>151</width>
<height>21</height>
</rect>
</property>
@@ -1041,9 +1180,9 @@
<widget class="QGroupBox" name="createPlatformVersionGroup">
<property name="geometry">
<rect>
- <x>620</x>
+ <x>610</x>
<y>10</y>
- <width>141</width>
+ <width>151</width>
<height>61</height>
</rect>
</property>
@@ -1058,7 +1197,7 @@
<rect>
<x>10</x>
<y>30</y>
- <width>121</width>
+ <width>131</width>
<height>21</height>
</rect>
</property>
@@ -1071,7 +1210,7 @@
<property name="geometry">
<rect>
<x>500</x>
- <y>250</y>
+ <y>240</y>
<width>271</width>
<height>151</height>
</rect>
@@ -1200,6 +1339,377 @@
</property>
</widget>
</widget>
+ <widget class="QWidget" name="tab">
+ <attribute name="title">
+ <string>Utilities</string>
+ </attribute>
+ <widget class="QGroupBox" name="downloadPitGroup">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>80</y>
+ <width>471</width>
+ <height>141</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string>Download PIT</string>
+ </property>
+ <widget class="QGroupBox" name="pitDestinationGroup">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>30</y>
+ <width>451</width>
+ <height>71</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string>Destination File</string>
+ </property>
+ <widget class="QLineEdit" name="pitDestinationLineEdit">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>30</y>
+ <width>341</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="pitSaveAsButton">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>360</x>
+ <y>30</y>
+ <width>81</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Save As...</string>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QPushButton" name="downloadPitButton">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>340</x>
+ <y>110</y>
+ <width>91</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Download</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="downloadPitTipLabel">
+ <property name="geometry">
+ <rect>
+ <x>440</x>
+ <y>110</y>
+ <width>21</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="toolTip">
+ <string notr="true">Download a devices PIT file.</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth">
+ <number>2</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="text">
+ <string>?</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QGroupBox" name="outputGroup">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>230</y>
+ <width>751</width>
+ <height>241</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string>Output</string>
+ </property>
+ <widget class="QPlainTextEdit" name="utilityOutputPlainTextEdit">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>30</y>
+ <width>731</width>
+ <height>201</height>
+ </rect>
+ </property>
+ <property name="undoRedoEnabled">
+ <bool>false</bool>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ <property name="plainText">
+ <string notr="true"/>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QGroupBox" name="detectDeviceGroup">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>301</width>
+ <height>61</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string>Detect Device</string>
+ </property>
+ <widget class="QPushButton" name="detectDeviceButton">
+ <property name="geometry">
+ <rect>
+ <x>180</x>
+ <y>30</y>
+ <width>81</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="text">
+ <string>Detect</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" name="deviceDetectedRadioButton">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>30</y>
+ <width>161</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Device Detected</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLabel" name="detectDeviceTipLabel">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>270</x>
+ <y>30</y>
+ <width>21</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="toolTip">
+ <string notr="true">Detect for a device connected in download mode.</string>
+ </property>
+ <property name="statusTip">
+ <string notr="true"/>
+ </property>
+ <property name="whatsThis">
+ <string notr="true"/>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth">
+ <number>2</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="text">
+ <string>?</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QGroupBox" name="printPitGroup">
+ <property name="geometry">
+ <rect>
+ <x>490</x>
+ <y>10</y>
+ <width>161</width>
+ <height>61</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string>Print PIT</string>
+ </property>
+ <widget class="QPushButton" name="printPitButton">
+ <property name="geometry">
+ <rect>
+ <x>40</x>
+ <y>30</y>
+ <width>81</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Print</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="printPitTipLabel">
+ <property name="geometry">
+ <rect>
+ <x>130</x>
+ <y>30</y>
+ <width>21</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="toolTip">
+ <string notr="true">Print the contents of a device's PIT file.</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth">
+ <number>2</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="text">
+ <string>?</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QGroupBox" name="closePcScreenGroup">
+ <property name="geometry">
+ <rect>
+ <x>320</x>
+ <y>10</y>
+ <width>161</width>
+ <height>61</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string>Close PC Screen</string>
+ </property>
+ <widget class="QPushButton" name="closePcScreenButton">
+ <property name="geometry">
+ <rect>
+ <x>40</x>
+ <y>30</y>
+ <width>81</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Close</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="closePcScreenTipLabel">
+ <property name="geometry">
+ <rect>
+ <x>130</x>
+ <y>30</y>
+ <width>21</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="toolTip">
+ <string notr="true">Close the device &lt;--&gt; PC screen displayed on a device.</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth">
+ <number>2</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="text">
+ <string>?</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </widget>
+ </widget>
</widget>
</widget>
<widget class="QMenuBar" name="menuBar">
@@ -1208,7 +1718,7 @@
<x>0</x>
<y>0</y>
<width>788</width>
- <height>22</height>
+ <height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuHelp">
@@ -1283,9 +1793,6 @@
<tabstop>partitionIdLineEdit</tabstop>
<tabstop>partitionFileLineEdit</tabstop>
<tabstop>partitionFileBrowseButton</tabstop>
- <tabstop>partitionsListWidget</tabstop>
- <tabstop>addPartitionButton</tabstop>
- <tabstop>removePartitionButton</tabstop>
<tabstop>outputPlainTextEdit</tabstop>
<tabstop>startFlashButton</tabstop>
<tabstop>createFirmwareNameLineEdit</tabstop>
diff --git a/heimdall/heimdall.vcxproj b/heimdall/heimdall.vcxproj
index a0dcc9f..f440acb 100644
--- a/heimdall/heimdall.vcxproj
+++ b/heimdall/heimdall.vcxproj
@@ -5,10 +5,6 @@
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Release - Static MSVC|Win32">
- <Configuration>Release - Static MSVC</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@@ -31,12 +27,6 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
@@ -46,13 +36,10 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
- <IncludePath>$(SolutionDir)libpit\Source;$(SolutionDir)libusb-1.0\libusb;$(IncludePath)</IncludePath>
+ <IncludePath>$(SolutionDir)libpit\Source;$(SolutionDir)libusb-1.0\include;$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
@@ -62,12 +49,6 @@
<LibraryPath>$(LibraryPath)</LibraryPath>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">
- <LinkIncremental>false</LinkIncremental>
- <IncludePath>$(SolutionDir)libpit\Source;$(SolutionDir)libusb-1.0\libusb;$(IncludePath)</IncludePath>
- <LibraryPath>$(LibraryPath)</LibraryPath>
- <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
- </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
@@ -79,14 +60,17 @@
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
- <AdditionalIncludeDirectories>..\libusb-1.0\libusb;..\libpit\Source</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\libusb-1.0\include;..\libpit\Source</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>libusb-1.0.lib;libpit.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\lib\</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)libusb-1.0\lib\$(Platform)\$(Configuration)\;$(SolutionDir)$(Platform)\$(Configuration)\lib\</AdditionalLibraryDirectories>
</Link>
+ <PostBuildEvent>
+ <Command>xcopy /y $(SolutionDir)libusb-1.0\lib\$(Platform)\$(Configuration)\libusb-1.0.dll $(SolutionDir)$(Platform)\$(Configuration)\</Command>
+ </PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
@@ -101,31 +85,7 @@
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
- <AdditionalIncludeDirectories>..\libusb-1.0\libusb;..\libpit\Source</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>libusb-1.0.lib;libpit.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\lib\</AdditionalLibraryDirectories>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Static MSVC|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;OS_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeaderFile>
- </PrecompiledHeaderFile>
- <PrecompiledHeaderOutputFile>
- </PrecompiledHeaderOutputFile>
- <AdditionalIncludeDirectories>..\libusb-1.0\libusb;..\libpit\Source</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\libusb-1.0\include;..\libpit\Source</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@@ -133,8 +93,11 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>libusb-1.0.lib;libpit.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\lib\</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(SolutionDir)libusb-1.0\lib\$(Platform)\$(Configuration)\;$(SolutionDir)$(Platform)\$(Configuration)\lib\</AdditionalLibraryDirectories>
</Link>
+ <PostBuildEvent>
+ <Command>xcopy /y $(SolutionDir)libusb-1.0\lib\$(Platform)\$(Configuration)\libusb-1.0.dll $(SolutionDir)$(Platform)\$(Configuration)\</Command>
+ </PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="source\BeginDumpPacket.h" />
diff --git a/heimdall/source/BridgeManager.cpp b/heimdall/source/BridgeManager.cpp
index af968a9..f58c4e2 100644
--- a/heimdall/source/BridgeManager.cpp
+++ b/heimdall/source/BridgeManager.cpp
@@ -885,7 +885,8 @@ bool BridgeManager::SendFile(FILE *file, int destination, int fileIdentifier) co
if (!success)
{
- Interface::PrintError("\nERROR: Failed to begin file transfer sequence!\n");
+ Interface::PrintErrorSameLine("\n");
+ Interface::PrintError("Failed to begin file transfer sequence!\n");
return (false);
}
@@ -895,7 +896,8 @@ bool BridgeManager::SendFile(FILE *file, int destination, int fileIdentifier) co
if (!success)
{
- Interface::PrintError("\nERROR: Failed to confirm beginning of file transfer sequence!\n");
+ Interface::PrintErrorSameLine("\n");
+ Interface::PrintError("Failed to confirm beginning of file transfer sequence!\n");
return (false);
}
@@ -911,7 +913,8 @@ bool BridgeManager::SendFile(FILE *file, int destination, int fileIdentifier) co
if (!success)
{
- Interface::PrintError("\nERROR: Failed to send file part packet!\n");
+ Interface::PrintErrorSameLine("\n");
+ Interface::PrintError("Failed to send file part packet!\n");
return (false);
}
@@ -931,11 +934,13 @@ bool BridgeManager::SendFile(FILE *file, int destination, int fileIdentifier) co
if (!success)
{
- Interface::PrintError("\nERROR: Failed to receive file part response!\n");
+ Interface::PrintErrorSameLine("\n");
+ Interface::PrintError("Failed to receive file part response!\n");
for (int retry = 0; retry < 4; retry++)
{
- Interface::PrintError("\nERROR: Retrying...");
+ Interface::PrintErrorSameLine("\n");
+ Interface::PrintError("Retrying...");
// Send
sendFilePartPacket = new SendFilePartPacket(file);
@@ -944,7 +949,8 @@ bool BridgeManager::SendFile(FILE *file, int destination, int fileIdentifier) co
if (!success)
{
- Interface::PrintError("\nERROR: Failed to send file part packet!\n");
+ Interface::PrintErrorSameLine("\n");
+ Interface::PrintError("Failed to send file part packet!\n");
return (false);
}
@@ -964,8 +970,8 @@ bool BridgeManager::SendFile(FILE *file, int destination, int fileIdentifier) co
if (receivedPartIndex != filePartIndex)
{
- Interface::PrintError("\nERROR: Expected file part index: %d Received: %d\n",
- filePartIndex, receivedPartIndex);
+ Interface::PrintErrorSameLine("\n");
+ Interface::PrintError("Expected file part index: %d Received: %d\n", filePartIndex, receivedPartIndex);
return (false);
}
@@ -979,8 +985,8 @@ bool BridgeManager::SendFile(FILE *file, int destination, int fileIdentifier) co
if (receivedPartIndex != filePartIndex)
{
- Interface::PrintError("\nERROR: Expected file part index: %d Received: %d\n",
- filePartIndex, receivedPartIndex);
+ Interface::PrintErrorSameLine("\n");
+ Interface::PrintError("Expected file part index: %d Received: %d\n", filePartIndex, receivedPartIndex);
return (false);
}
@@ -1021,7 +1027,8 @@ bool BridgeManager::SendFile(FILE *file, int destination, int fileIdentifier) co
if (!success)
{
- Interface::PrintError("\nERROR: Failed to end phone file transfer sequence!\n");
+ Interface::PrintErrorSameLine("\n");
+ Interface::PrintError("Failed to end phone file transfer sequence!\n");
return (false);
}
}
@@ -1035,7 +1042,8 @@ bool BridgeManager::SendFile(FILE *file, int destination, int fileIdentifier) co
if (!success)
{
- Interface::PrintError("\nERROR: Failed to end modem file transfer sequence!\n");
+ Interface::PrintErrorSameLine("\n");
+ Interface::PrintError("Failed to end modem file transfer sequence!\n");
return (false);
}
}
@@ -1046,7 +1054,8 @@ bool BridgeManager::SendFile(FILE *file, int destination, int fileIdentifier) co
if (!success)
{
- Interface::PrintError("\nERROR: Failed to confirm end of file transfer sequence!\n");
+ Interface::PrintErrorSameLine("\n");
+ Interface::PrintError("Failed to confirm end of file transfer sequence!\n");
return (false);
}
}
diff --git a/heimdall/source/Interface.cpp b/heimdall/source/Interface.cpp
index 6c3c58e..bb0f30b 100644
--- a/heimdall/source/Interface.cpp
+++ b/heimdall/source/Interface.cpp
@@ -36,9 +36,11 @@ bool Interface::stdoutErrors = false;
const char *Interface::version = "v1.3 (beta)";
const char *Interface::usage = "Usage: heimdall <action> <action arguments> <common arguments>\n\
+\n\
Common Arguments:\n\
[--verbose] [--no-reboot] [--stdout-errors] [--delay <ms>]\n\
\n\
+\n\
Action: flash\n\
Arguments:\n\
--repartition --pit <filename> [--factoryfs <filename>]\n\
@@ -64,6 +66,11 @@ WARNING: If you're repartitioning it's strongly recommended you specify\n\
Action: close-pc-screen\n\
Description: Attempts to get rid off the \"connect phone to PC\" screen.\n\
\n\
+Action: download-pit\n\
+Arguments: --output <filename>\n\
+Description: Downloads the connected device's PIT file to the specified\n\
+ output file.\n\
+\n\
Action: detect\n\
Description: Indicates whether or not a download mode device can be detected.\n\
\n\
@@ -77,7 +84,7 @@ Action: print-pit\n\
Description: Dumps the PIT file from the connected device and prints it in\n\
a human readable format.\n\
\n\
-Action version\n\
+Action: version\n\
Description: Displays the version number of this binary.\n\
\n\
Action: help\n\
@@ -89,6 +96,12 @@ This software is provided free of charge. Copying and redistribution is\nencoura
If you appreciate this software and you would like to support future\ndevelopment please consider donating:\n\
http://www.glassechidna.com.au/donate/\n\n";
+const char *Interface::extraInfo = "Heimdall utilises libusb-1.0 for all USB communication:\n\
+ http://www.libusb.org/\n\
+\n\
+libusb-1.0 is licensed under the LGPL-2.1:\n\
+ http://www.gnu.org/licenses/licenses.html#LGPL\n\n";
+
// Flash arguments
string Interface::flashValueArguments[kFlashValueArgCount] = {
"-pit", "-factoryfs", "-cache", "-dbdata", "-primary-boot", "-secondary-boot", "-secondary-boot-backup", "-param", "-kernel", "-recovery", "-efs", "-modem",
@@ -108,6 +121,15 @@ string Interface::flashValuelessShortArguments[kFlashValuelessArgCount] = {
"r"
};
+// Download PIT arguments
+string Interface::downloadPitValueArguments[kDownloadPitValueArgCount] = {
+ "-output"
+};
+
+string Interface::downloadPitValueShortArguments[kDownloadPitValueArgCount] = {
+ "o"
+};
+
// Dump arguments
string Interface::dumpValueArguments[kDumpValueArgCount] = {
"-chip-type", "-chip-id", "-output"
@@ -161,7 +183,15 @@ Action Interface::actions[Interface::kActionCount] = {
// kActionDetect
Action("detect", nullptr, nullptr, kDetectValueArgCount,
- nullptr, nullptr, kDetectValuelessArgCount)
+ nullptr, nullptr, kDetectValuelessArgCount),
+
+ // kActionDownloadPit
+ Action("download-pit", downloadPitValueArguments, downloadPitValueShortArguments, kDownloadPitValueArgCount,
+ nullptr, nullptr, kDownloadPitValuelessArgCount),
+
+ // kActionInfo
+ Action("info", nullptr, nullptr, kInfoValueArgCount,
+ nullptr, nullptr, kInfoValuelessArgCount)
};
bool Interface::GetArguments(int argc, char **argv, map<string, string>& argumentMap, int *actionIndex)
@@ -383,6 +413,12 @@ void Interface::PrintReleaseInfo(void)
Print(releaseInfo, version);
}
+void Interface::PrintFullInfo(void)
+{
+ Print(releaseInfo, version);
+ Print(extraInfo);
+}
+
void Interface::PrintPit(const PitData *pitData)
{
Interface::Print("Entry Count: %d\n", pitData->GetEntryCount());
diff --git a/heimdall/source/Interface.h b/heimdall/source/Interface.h
index 81f17e5..338445b 100644
--- a/heimdall/source/Interface.h
+++ b/heimdall/source/Interface.h
@@ -76,6 +76,8 @@ namespace Heimdall
kActionVersion,
kActionHelp,
kActionDetect,
+ kActionDownloadPit,
+ kActionInfo,
kActionCount
};
@@ -182,6 +184,18 @@ namespace Heimdall
kHelpValuelessArgCount = 0
};
+ // Info value arguments
+ enum
+ {
+ kInfoValueArgCount = 0
+ };
+
+ // Info valueless arguments
+ enum
+ {
+ kInfoValuelessArgCount = 0
+ };
+
// Detect value arguments
enum
{
@@ -194,6 +208,19 @@ namespace Heimdall
kDetectValuelessArgCount = 0
};
+ // Download PIT value arguments
+ enum
+ {
+ kDownloadPitValueArgOutput = 0,
+ kDownloadPitValueArgCount
+ };
+
+ // Download PIT valueless arguments
+ enum
+ {
+ kDownloadPitValuelessArgCount = 0
+ };
+
// Common value arguments
enum
{
@@ -218,7 +245,8 @@ namespace Heimdall
static const char *version;
static const char *usage;
- static const char *releaseInfo;
+ static const char *releaseInfo;
+ static const char *extraInfo;
// Flash arguments
static string flashValueArguments[kFlashValueArgCount];
@@ -227,6 +255,10 @@ namespace Heimdall
static string flashValuelessArguments[kFlashValuelessArgCount];
static string flashValuelessShortArguments[kFlashValuelessArgCount];
+ // Download PIT arguments
+ static string downloadPitValueArguments[kDownloadPitValueArgCount];
+ static string downloadPitValueShortArguments[kDownloadPitValueArgCount];
+
// Dump arguments
static string dumpValueArguments[kDumpValueArgCount];
static string dumpValueShortArguments[kDumpValueArgCount];
@@ -251,6 +283,7 @@ namespace Heimdall
static void PrintVersion(void);
static void PrintUsage(void);
static void PrintReleaseInfo(void);
+ static void PrintFullInfo(void);
static void PrintPit(const PitData *pitData);
diff --git a/heimdall/source/main.cpp b/heimdall/source/main.cpp
index 7e46c19..63056bd 100644
--- a/heimdall/source/main.cpp
+++ b/heimdall/source/main.cpp
@@ -213,6 +213,14 @@ bool mapFilesToPartitions(const map<string, FILE *>& argumentFileMap, const PitD
if (pitEntry)
break;
}
+
+ if (!pitEntry && knownPartition == kKnownPartitionPit)
+ {
+ PartitionNameFilePair partitionNameFilePair(knownPartitionNames[kKnownPartitionPit][0], it->second);
+ partitionFileMap.insert(pair<unsigned int, PartitionNameFilePair>(static_cast<unsigned int>(-1), partitionNameFilePair));
+
+ return (true);
+ }
}
if (!pitEntry)
@@ -250,7 +258,7 @@ int downloadPitFile(BridgeManager *bridgeManager, unsigned char **pitBuffer)
}
Interface::Print("PIT file download sucessful\n\n");
- return devicePitFileSize;
+ return (devicePitFileSize);
}
bool flashFile(BridgeManager *bridgeManager, unsigned int partitionIndex, const char *partitionName, FILE *file)
@@ -537,7 +545,18 @@ int main(int argc, char **argv)
if (argumentMap.find(Interface::actions[Interface::kActionFlash].valuelessArguments[Interface::kFlashValuelessArgRepartition]) != argumentMap.end()
&& argumentMap.find(Interface::actions[Interface::kActionFlash].valueArguments[Interface::kFlashValueArgPit]) == argumentMap.end())
{
- Interface::Print("If you wish to repartition then a PIT file must be specified.\n");
+ Interface::Print("If you wish to repartition then a PIT file must be specified.\n\n");
+ Interface::PrintUsage();
+ return (0);
+ }
+
+ break;
+
+ case Interface::kActionDownloadPit:
+ if (argumentMap.find(Interface::actions[Interface::kActionDownloadPit].valueArguments[Interface::kDownloadPitValueArgOutput]) == argumentMap.end())
+ {
+ Interface::Print("Output file was not specified.\n\n");
+ Interface::PrintUsage();
return (0);
}
@@ -547,7 +566,7 @@ int main(int argc, char **argv)
{
if (argumentMap.find(Interface::actions[Interface::kActionDump].valueArguments[Interface::kDumpValueArgOutput]) == argumentMap.end())
{
- Interface::Print("Output file not specified.\n\n");
+ Interface::Print("Output file was not specified.\n\n");
Interface::PrintUsage();
return (0);
}
@@ -578,6 +597,7 @@ int main(int argc, char **argv)
if (chipId < 0)
{
Interface::Print("Chip ID must be a non-negative integer.\n");
+ Interface::PrintUsage();
return (0);
}
@@ -591,6 +611,10 @@ int main(int argc, char **argv)
case Interface::kActionHelp:
Interface::PrintUsage();
return (0);
+
+ case Interface::kActionInfo:
+ Interface::PrintFullInfo();
+ return (0);
}
bool verbose = argumentMap.find(Interface::commonValuelessArguments[Interface::kCommonValuelessArgVerbose]) != argumentMap.end();
@@ -599,6 +623,7 @@ int main(int argc, char **argv)
Interface::SetStdoutErrors(argumentMap.find(Interface::commonValuelessArguments[Interface::kCommonValuelessArgStdoutErrors]) != argumentMap.end());
int communicationDelay = BridgeManager::kCommunicationDelayDefault;
+
if (argumentMap.find(Interface::commonValueArguments[Interface::kCommonValueArgDelay]) != argumentMap.end())
communicationDelay = atoi(argumentMap.find(Interface::commonValueArguments[Interface::kCommonValueArgDelay])->second.c_str());
@@ -606,10 +631,10 @@ int main(int argc, char **argv)
if (actionIndex == Interface::kActionDetect)
{
- bridgeManager->DetectDevice();
-
+ bool detected = bridgeManager->DetectDevice();
delete bridgeManager;
- return (0);
+
+ return ((detected) ? 0 : 1);
}
Interface::PrintReleaseInfo();
@@ -618,7 +643,7 @@ int main(int argc, char **argv)
if (!bridgeManager->Initialise())
{
delete bridgeManager;
- return (-2);
+ return (0);
}
bool success;
@@ -674,6 +699,49 @@ int main(int argc, char **argv)
break;
}
+ case Interface::kActionDownloadPit:
+ {
+ map<string, string>::const_iterator it = argumentMap.find(Interface::actions[Interface::kActionDownloadPit].valueArguments[Interface::kDownloadPitValueArgOutput]);
+ FILE *outputPitFile = fopen(it->second.c_str(), "wb");
+
+ if (!outputPitFile)
+ {
+ delete bridgeManager;
+ return (0);
+ }
+
+ if (!bridgeManager->BeginSession())
+ {
+ delete bridgeManager;
+ fclose(outputPitFile);
+ return (-1);
+ }
+
+ unsigned char *pitBuffer;
+ int fileSize = downloadPitFile(bridgeManager, &pitBuffer);
+
+ if (fileSize > 0)
+ {
+ success = fwrite(pitBuffer, 1, fileSize, outputPitFile) == fileSize;
+ fclose(outputPitFile);
+
+ if (!success)
+ Interface::PrintError("Failed to write PIT data to output file.\n");
+
+ success = bridgeManager->EndSession(reboot) && success;
+ }
+ else
+ {
+ fclose(outputPitFile);
+ success = false;
+ bridgeManager->EndSession(reboot);
+ }
+
+ delete [] pitBuffer;
+
+ break;
+ }
+
case Interface::kActionDump:
{
const char *outputFilename = argumentMap.find(Interface::actions[Interface::kActionDump].valueArguments[Interface::kDumpValueArgOutput])->second.c_str();
@@ -740,7 +808,8 @@ int main(int argc, char **argv)
Interface::PrintError("Failed to unpack device's PIT file!\n");
success = false;
}
-
+
+ delete [] devicePit;
delete pitData;
success = bridgeManager->EndSession(reboot) && success;