summaryrefslogtreecommitdiffstats
path: root/adb_install.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'adb_install.cpp')
-rw-r--r--adb_install.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/adb_install.cpp b/adb_install.cpp
index f5ba89c3f..3b64606d9 100644
--- a/adb_install.cpp
+++ b/adb_install.cpp
@@ -84,7 +84,7 @@ apply_from_adb(RecoveryUI* ui_, int* wipe_cache, const char* install_file) {
pid_t child;
if ((child = fork()) == 0) {
- execl("/sbin/recovery", "recovery", "--adbd", NULL);
+ execl("/sbin/recovery", "recovery", "--adbd", install_file, NULL);
_exit(-1);
}
DataManager_SetIntValue("tw_child_pid", child);
@@ -102,7 +102,7 @@ apply_from_adb(RecoveryUI* ui_, int* wipe_cache, const char* install_file) {
maybe_restart_adbd();
struct stat st;
- if (stat(ADB_SIDELOAD_FILENAME, &st) != 0) {
+ if (stat(install_file, &st) != 0) {
if (errno == ENOENT) {
ui->Print("No package received.\n");
} else {
@@ -110,17 +110,5 @@ apply_from_adb(RecoveryUI* ui_, int* wipe_cache, const char* install_file) {
}
return INSTALL_ERROR;
}
- char zip_file[255];
- if (strncmp(ADB_SIDELOAD_FILENAME, "/tmp", 4) == 0) {
- char command[255];
- sprintf(zip_file, "%s/%s", DataManager_GetCurrentStoragePath(), "sideload.zip");
- ui->Print("Copying zip to '%s'\n", zip_file);
- sprintf(command, "cp %s %s", ADB_SIDELOAD_FILENAME, zip_file);
- system(command);
- sprintf(command, "rm %s", ADB_SIDELOAD_FILENAME);
- system(command);
- } else {
- strcpy(zip_file, ADB_SIDELOAD_FILENAME);
- }
- return TWinstall_zip(zip_file, wipe_cache);
+ return TWinstall_zip(install_file, wipe_cache);
}