From 8cb7f6ee8f872938e257541c07d0e4b2ad0e3f35 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Sun, 17 Jul 2011 19:50:07 +1000 Subject: - Added Utilities tab to Heimdall Frontend. - Fixed Heimdall command line support for PIT files without a reference to themselves. - Added tool tips to Heimdall Frontend. - Added heimdall 'info' and 'download-pit' actions. - Made 'detect' action return 0 if a device is detected, 1 otherwise. --- heimdall/source/Interface.cpp | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) (limited to 'heimdall/source/Interface.cpp') 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 \n\ +\n\ Common Arguments:\n\ [--verbose] [--no-reboot] [--stdout-errors] [--delay ]\n\ \n\ +\n\ Action: flash\n\ Arguments:\n\ --repartition --pit [--factoryfs ]\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 \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& 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()); -- cgit v1.1