summaryrefslogtreecommitdiffstats
path: root/adb_install.cpp
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 /adb_install.cpp
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--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);
}