summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2012-09-19 21:09:45 +0200
committerDees_Troy <dees_troy@teamw.in>2012-09-19 21:11:03 +0200
commit9a4b569e9d51c404a8a7a038f0d8d37aa2e802e8 (patch)
treef48db2fe6cee6169c8f5d0165a3ce139496dc79a /gui
parentImprove adb sideload -- add cancel (diff)
downloadandroid_bootable_recovery-9a4b569e9d51c404a8a7a038f0d8d37aa2e802e8.tar
android_bootable_recovery-9a4b569e9d51c404a8a7a038f0d8d37aa2e802e8.tar.gz
android_bootable_recovery-9a4b569e9d51c404a8a7a038f0d8d37aa2e802e8.tar.bz2
android_bootable_recovery-9a4b569e9d51c404a8a7a038f0d8d37aa2e802e8.tar.lz
android_bootable_recovery-9a4b569e9d51c404a8a7a038f0d8d37aa2e802e8.tar.xz
android_bootable_recovery-9a4b569e9d51c404a8a7a038f0d8d37aa2e802e8.tar.zst
android_bootable_recovery-9a4b569e9d51c404a8a7a038f0d8d37aa2e802e8.zip
Diffstat (limited to '')
-rw-r--r--gui/action.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/gui/action.cpp b/gui/action.cpp
index 4114bf0aa..15180ca06 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -1057,22 +1057,19 @@ LOGE("TODO: Implement ORS support\n");
simulate_progress_bar();
} else {
int wipe_cache = 0;
- string Command;
+ string Command, Sideload_File;
if (!PartitionManager.Mount_Current_Storage(true)) {
operation_end(1, simulate);
return 0;
}
- if (TWFunc::Path_Exists(ADB_SIDELOAD_FILENAME)) {
- Command = "rm ";
- Command += ADB_SIDELOAD_FILENAME;
+ Sideload_File = DataManager::GetCurrentStoragePath() + "/sideload.zip";
+ if (TWFunc::Path_Exists(Sideload_File)) {
+ Command = "rm " + Sideload_File;
system(Command.c_str());
}
- Command = "touch ";
- Command += ADB_SIDELOAD_FILENAME;
- system(Command.c_str());
ui_print("Starting ADB sideload feature...\n");
- ret = apply_from_adb(ui, &wipe_cache, "/tmp/install_log");
+ ret = apply_from_adb(ui, &wipe_cache, Sideload_File.c_str());
if (ret != 0)
ret = 1; // failure
else if (wipe_cache)
@@ -1084,9 +1081,9 @@ LOGE("TODO: Implement ORS support\n");
if (function == "adbsideloadcancel")
{
int child_pid;
- string Command;
- Command = "rm ";
- Command += ADB_SIDELOAD_FILENAME;
+ string Command, Sideload_File;
+ Sideload_File = DataManager::GetCurrentStoragePath() + "/sideload.zip";
+ Command = "rm " + Sideload_File;
system(Command.c_str());
DataManager::GetValue("tw_child_pid", child_pid);
ui_print("Cancelling ADB sideload...\n");