summaryrefslogtreecommitdiffstats
path: root/adb/services.c
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2011-05-17 15:52:54 -0700
committerChristopher Tate <ctate@google.com>2011-05-17 15:52:54 -0700
commit702967afb1bebc97c0b8a23c075d4932820ef7a3 (patch)
tree9e61f9bfb550eaaa9e33ea2d53464d39a625d282 /adb/services.c
parent70080d97cfcb3fe273207b1c739df587f5f93767 (diff)
downloadsystem_core-702967afb1bebc97c0b8a23c075d4932820ef7a3.zip
system_core-702967afb1bebc97c0b8a23c075d4932820ef7a3.tar.gz
system_core-702967afb1bebc97c0b8a23c075d4932820ef7a3.tar.bz2
Add 'adb restore' to parallel 'adb backup'
It won't actually do anything until the 'bu' tool and framework are updated to respond properly, but this is the adb side of the necessary infrastructure: we copy the tarfile into the socket pointed at the device, using the existing mechanisms. Change-Id: Ic3b5779ade256bd1ad989a94b0685f7b1a7d59d2
Diffstat (limited to 'adb/services.c')
-rw-r--r--adb/services.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/adb/services.c b/adb/services.c
index ec0b0ba..6bbd6f8 100644
--- a/adb/services.c
+++ b/adb/services.c
@@ -482,7 +482,9 @@ int service_to_fd(const char *name)
} else if(!strncmp(name, "backup:", 7)) {
char* arg = strdup(name+7);
if (arg == NULL) return -1;
- ret = backup_service(arg);
+ ret = backup_service(BACKUP, arg);
+ } else if(!strncmp(name, "restore:", 8)) {
+ ret = backup_service(RESTORE, NULL);
} else if(!strncmp(name, "tcpip:", 6)) {
int port;
if (sscanf(name + 6, "%d", &port) == 0) {