diff options
author | Benjamin Dobell <benjamin.dobell@glassechidna.com.au> | 2011-07-17 11:50:07 +0200 |
---|---|---|
committer | Benjamin Dobell <benjamin.dobell@glassechidna.com.au> | 2011-07-17 11:50:07 +0200 |
commit | 8cb7f6ee8f872938e257541c07d0e4b2ad0e3f35 (patch) | |
tree | 7b40d7e1a5c28b2e05b01cd9e348aabd60f2d19c /heimdall/source/Interface.cpp | |
parent | Altered the user interface slightly to prevent clipping on certain OS. (diff) | |
download | Heimdall-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 'heimdall/source/Interface.cpp')
-rw-r--r-- | heimdall/source/Interface.cpp | 40 |
1 files changed, 38 insertions, 2 deletions
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()); |