summaryrefslogtreecommitdiffstats
path: root/heimdall/source/FlashAction.cpp
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-05-04 19:33:12 +0200
committerBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-05-06 13:39:07 +0200
commita5452e884a1f1119d87e12e42d6ca9745617d054 (patch)
tree747607f94cfc92456a5aa6e86d5cba42290118c5 /heimdall/source/FlashAction.cpp
parentautogen'd for 1.4.1 (diff)
downloadHeimdall-a5452e884a1f1119d87e12e42d6ca9745617d054.tar
Heimdall-a5452e884a1f1119d87e12e42d6ca9745617d054.tar.gz
Heimdall-a5452e884a1f1119d87e12e42d6ca9745617d054.tar.bz2
Heimdall-a5452e884a1f1119d87e12e42d6ca9745617d054.tar.lz
Heimdall-a5452e884a1f1119d87e12e42d6ca9745617d054.tar.xz
Heimdall-a5452e884a1f1119d87e12e42d6ca9745617d054.tar.zst
Heimdall-a5452e884a1f1119d87e12e42d6ca9745617d054.zip
Diffstat (limited to '')
-rw-r--r--heimdall/source/FlashAction.cpp28
1 files changed, 11 insertions, 17 deletions
diff --git a/heimdall/source/FlashAction.cpp b/heimdall/source/FlashAction.cpp
index e951d4e..b528597 100644
--- a/heimdall/source/FlashAction.cpp
+++ b/heimdall/source/FlashAction.cpp
@@ -39,17 +39,19 @@ using namespace Heimdall;
const char *FlashAction::usage = "Action: flash\n\
Arguments:\n\
- --repartition --pit <filename>\n\
- --<partition name>|--<partition identifier> <filename> [...]\n\
- [--verbose] [--no-reboot] [--stdout-errors] [--delay <ms>]\n\
- [--usb-log-level <none/error/warning/debug>]\n\
+ [--<partition name> <filename> ...]\n\
+ [--<partition identifier> <filename> ...]\n\
+ [--pit <filename>] [--verbose] [--no-reboot] [--resume] [--stdout-errors]\n\
+ [--usb-log-level <none/error/warning/debug>]\n\
or:\n\
- --<partition name>|--<partition identifier> <filename> [...]\n\
- [--pit <filename>]\n\
- [--verbose] [--no-reboot] [--stdout-errors] [--delay <ms>]\n\
- [--usb-log-level <none/error/warning/debug>]\n\
+ --repartition --pit <filename> [--<partition name> <filename> ...]\n\
+ [--<partition identifier> <filename> ...] [--verbose] [--no-reboot]\n\
+ [--resume] [--stdout-errors] [--usb-log-level <none/error/warning/debug>]\n\
Description: Flashes one or more firmware files to your phone. Partition names\n\
(or identifiers) can be obtained by executing the print-pit action.\n\
+Note: --no-reboot causes the device to remain in download mode after the action\n\
+ is completed. If you wish to perform another action whilst remaining in\n\
+ download mode, then the following action must specify the --resume flag.\n\
WARNING: If you're repartitioning it's strongly recommended you specify\n\
all files at your disposal.\n";
@@ -389,7 +391,6 @@ int FlashAction::Execute(int argc, char **argv)
argumentTypes["no-reboot"] = kArgumentTypeFlag;
argumentTypes["resume"] = kArgumentTypeFlag;
- argumentTypes["delay"] = kArgumentTypeUnsignedInteger;
argumentTypes["verbose"] = kArgumentTypeFlag;
argumentTypes["stdout-errors"] = kArgumentTypeFlag;
argumentTypes["usb-log-level"] = kArgumentTypeString;
@@ -417,8 +418,6 @@ int FlashAction::Execute(int argc, char **argv)
return (0);
}
- const UnsignedIntegerArgument *communicationDelayArgument = static_cast<const UnsignedIntegerArgument *>(arguments.GetArgument("delay"));
-
bool reboot = arguments.GetArgument("no-reboot") == nullptr;
bool resume = arguments.GetArgument("resume") != nullptr;
bool verbose = arguments.GetArgument("verbose") != nullptr;
@@ -497,12 +496,7 @@ int FlashAction::Execute(int argc, char **argv)
// Perform flash
- int communicationDelay = BridgeManager::kCommunicationDelayDefault;
-
- if (communicationDelayArgument)
- communicationDelay = communicationDelayArgument->GetValue();
-
- BridgeManager *bridgeManager = new BridgeManager(verbose, communicationDelay);
+ BridgeManager *bridgeManager = new BridgeManager(verbose);
bridgeManager->SetUsbLogLevel(usbLogLevel);
if (bridgeManager->Initialise(resume) != BridgeManager::kInitialiseSucceeded || !bridgeManager->BeginSession())