Add command line capabilities
Allows sending openrecoveryscript commands to TWRP via shell.
This may be handy for visually impaired users, for various one
click utilities to drive TWRP commands from a computer, for using
TWRP when a catastrophic hardware failure like a shattered screen
prevents you from being able to use touch, or even on devices like
a TV stick where touch and USB mouse input is unavailable.
This patch also includes a few minor changes to openrecoveryscript
including proper support for rebooting via the script and for
decrypting the device via the command line.
Change-Id: I796ad168efdd2da9c25334ac93d1079daaa7b0bc
diff --git a/gui/pages.hpp b/gui/pages.hpp
index c384cf0..2afbe78 100644
--- a/gui/pages.hpp
+++ b/gui/pages.hpp
@@ -120,8 +120,9 @@
static Resource* FindResource(std::string name);
static Resource* FindResource(std::string package, std::string name);
- // Used for console-only mode - Can be reverted via ChangePage
+ // Used for console-only mode
static int SwitchToConsole(void);
+ static int EndConsole(void);
// Helper to identify if a particular page is the active page
static int IsCurrentPage(Page* page);