Improve adb sideload -- add cancel
Also copy zip from /tmp to storage and remove from /tmp to
prevent running out of RAM.
diff --git a/recovery.cpp b/recovery.cpp
index b333db9..b8bb099 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -773,6 +773,10 @@
int
main(int argc, char **argv) {
+ // Recovery needs to install world-readable files, so clear umask
+ // set by init
+ umask(0);
+
time_t start = time(NULL);
// If these fail, there's not really anywhere to complain...
@@ -792,9 +796,6 @@
}
printf("Starting TWRP %s on %s", TW_VERSION_STR, ctime(&start));
- // Recovery needs to install world-readable files, so clear umask
- // set by init
- umask(0);
Device* device = make_device();
ui = device->GetUI();