Minimal fix for adb backup.
In master this code has been completely rewritten. This is the minimal fix
against the mnc-sdk-release source.
Bug: http://b/23015233
Bug: https://code.google.com/p/android/issues/detail?id=183490
Change-Id: Iac30993bd2b1b354f8518d8ea2a9ae680ebe4177
diff --git a/adb/commandline.cpp b/adb/commandline.cpp
index fd9953c..374a2e5 100644
--- a/adb/commandline.cpp
+++ b/adb/commandline.cpp
@@ -741,8 +741,10 @@
static int mkdirs(const char *path)
{
+ std::string holder(path);
+
int ret;
- char *x = (char *)path + 1;
+ char *x = &holder[1];
for(;;) {
x = adb_dirstart(x);
@@ -759,7 +761,7 @@
}
static int backup(int argc, const char** argv) {
- const char* filename = "./backup.ab";
+ const char* filename = "backup.ab";
/* find, extract, and use any -f argument */
for (int i = 1; i < argc; i++) {