Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix wipe issue when using GalaxyUpdater and switch to V6.6.2

  • Loading branch information...
commit 4fa6c9cdae2a70ac75e6fe69da5fbf0c692a6240 1 parent 41ca8d8
authored June 13, 2011

Showing 2 changed files with 14 additions and 1 deletion. Show diff stats Hide diff stats

  1. 2  Android.mk
  2. 13  recovery.c
2  Android.mk
@@ -23,7 +23,7 @@ LOCAL_MODULE := recovery
23 23
 
24 24
 LOCAL_FORCE_STATIC_EXECUTABLE := true
25 25
 
26  
-RECOVERY_VERSION := V6.6.1
  26
+RECOVERY_VERSION := V6.6.2
27 27
 RECOVERY_API_VERSION := 2
28 28
 LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION) -DRECOVERY_VERSION=$(RECOVERY_VERSION)
29 29
 
13  recovery.c
@@ -2226,6 +2226,19 @@ static int exec_wipe() {
2226 2226
 		    erase_root("DBDATA:");
2227 2227
 		    erase_root("INTERNAL:");
2228 2228
 
  2229
+ 		    pid_t pidf1 = fork();
  2230
+                    if (pidf1 == 0) {
  2231
+			char *args[] = { "mount", "/data", NULL };
  2232
+			execv("/sbin/busybox", args);
  2233
+                        fprintf(stderr, "Unable to mount /data. Already mounted ?\n(%s)\n", strerror(errno));
  2234
+                        _exit(-1);
  2235
+                    }
  2236
+                    int fsck_status1;
  2237
+                    while (waitpid(pidf1, &fsck_status1, WNOHANG) == 0) {
  2238
+                        ui_print(".");
  2239
+                        sleep(1);
  2240
+                    }
  2241
+
2229 2242
  		    pid_t pidf2 = fork();
2230 2243
                     if (pidf2 == 0) {
2231 2244
 			char *args2[] = {"/system/bin/rm", "-rf", "/data/*", NULL};

0 notes on commit 4fa6c9c

Please sign in to comment.
Something went wrong with that request. Please try again.