diff --git a/Android.mk b/Android.mk
index b085568..816d143 100644
--- a/Android.mk
+++ b/Android.mk
@@ -4,6 +4,7 @@
 commands_recovery_local_path := $(LOCAL_PATH)
 
 ifneq ($(TARGET_SIMULATOR),true)
+ifeq ($(TARGET_ARCH),arm)
 
 LOCAL_SRC_FILES := \
 	recovery.c \
@@ -49,9 +50,11 @@
 
 include $(commands_recovery_local_path)/minui/Android.mk
 
+endif   # TARGET_ARCH == arm
 endif	# !TARGET_SIMULATOR
 
 include $(commands_recovery_local_path)/amend/Android.mk
 include $(commands_recovery_local_path)/minzip/Android.mk
 include $(commands_recovery_local_path)/mtdutils/Android.mk
+include $(commands_recovery_local_path)/tools/Android.mk
 commands_recovery_local_path :=
diff --git a/minui/graphics.c b/minui/graphics.c
index 4f3026a..05e8763 100644
--- a/minui/graphics.c
+++ b/minui/graphics.c
@@ -57,24 +57,27 @@
     void *bits;
     
     fd = open("/dev/graphics/fb0", O_RDWR);
-    if(fd < 0) {
+    if (fd < 0) {
         perror("cannot open fb0");
         return -1;
     }
 
-    if(ioctl(fd, FBIOGET_FSCREENINFO, &fi) < 0) {
+    if (ioctl(fd, FBIOGET_FSCREENINFO, &fi) < 0) {
         perror("failed to get fb0 info");
+        close(fd);
         return -1;
     }
 
-    if(ioctl(fd, FBIOGET_VSCREENINFO, &vi) < 0) {
+    if (ioctl(fd, FBIOGET_VSCREENINFO, &vi) < 0) {
         perror("failed to get fb0 info");
+        close(fd);
         return -1;
     }
 
     bits = mmap(0, fi.smem_len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-    if(bits == MAP_FAILED) {
+    if (bits == MAP_FAILED) {
         perror("failed to mmap framebuffer");
+        close(fd);
         return -1;
     }
 
@@ -99,24 +102,14 @@
 
 static void set_active_framebuffer(unsigned n)
 {
-    if(n > 1) return;
+    if (n > 1) return;
     vi.yres_virtual = vi.yres * 2;
     vi.yoffset = n * vi.yres;
-    if(ioctl(gr_fb_fd, FBIOPUT_VSCREENINFO, &vi) < 0) {
-        fprintf(stderr,"active fb swap failed!\n");
+    if (ioctl(gr_fb_fd, FBIOPUT_VSCREENINFO, &vi) < 0) {
+        perror("active fb swap failed");
     }
 }
 
-static void dumpinfo(struct fb_var_screeninfo *vi)
-{
-    fprintf(stderr,"vi.xres = %d\n", vi->xres);
-    fprintf(stderr,"vi.yres = %d\n", vi->yres);
-    fprintf(stderr,"vi.xresv = %d\n", vi->xres_virtual);
-    fprintf(stderr,"vi.yresv = %d\n", vi->yres_virtual);
-    fprintf(stderr,"vi.xoff = %d\n", vi->xoffset);
-    fprintf(stderr,"vi.yoff = %d\n", vi->yoffset);
-}
-
 void gr_flip(void)
 {
     GGLContext *gl = gr_context;
@@ -163,7 +156,7 @@
     
     while((off = *s++)) {
         off -= 32;
-        if(off < 96) {
+        if (off < 96) {
             gl->texCoord2i(gl, (off * font->cwidth) - x, 0 - y);
             gl->recti(gl, x, y, x + font->cwidth, y + font->cheight);
         }
@@ -240,31 +233,29 @@
 
 int gr_init(void)
 {
-    GGLContext *gl;
-    int fd;
-
     gglInit(&gr_context);
-    gl = gr_context;
+    GGLContext *gl = gr_context;
 
     gr_init_font();
-
-    fd = open("/dev/tty0", O_RDWR | O_SYNC);
-    if(fd < 0) return -1;
-
-    if(ioctl(fd, KDSETMODE, (void*) KD_GRAPHICS)) {
-        close(fd);
+    gr_vt_fd = open("/dev/tty0", O_RDWR | O_SYNC);
+    if (gr_vt_fd < 0) {
+        // This is non-fatal; post-Cupcake kernels don't have tty0.
+        perror("can't open /dev/tty0");
+    } else if (ioctl(gr_vt_fd, KDSETMODE, (void*) KD_GRAPHICS)) {
+        // However, if we do open tty0, we expect the ioctl to work.
+        perror("failed KDSETMODE to KD_GRAPHICS on tty0");
+        gr_exit();
         return -1;
     }
 
     gr_fb_fd = get_framebuffer(gr_framebuffer);
-    
-    if(gr_fb_fd < 0) {
-        ioctl(fd, KDSETMODE, (void*) KD_TEXT);
-        close(fd);
+    if (gr_fb_fd < 0) {
+        gr_exit();
         return -1;
     }
 
-    gr_vt_fd = fd;
+    fprintf(stderr, "framebuffer: fd %d (%d x %d)\n",
+            gr_fb_fd, gr_framebuffer[0].width, gr_framebuffer[0].height);
 
         /* start with 0 as front (displayed) and 1 as back (drawing) */
     gr_active_fb = 0;
diff --git a/mtdutils/Android.mk b/mtdutils/Android.mk
index c75eb01..1a75423 100644
--- a/mtdutils/Android.mk
+++ b/mtdutils/Android.mk
@@ -1,4 +1,5 @@
 ifneq ($(TARGET_SIMULATOR),true)
+ifeq ($(TARGET_ARCH),arm)
 
 LOCAL_PATH := $(call my-dir)
 include $(CLEAR_VARS)
@@ -18,4 +19,5 @@
 LOCAL_SHARED_LIBRARIES := libcutils libc
 include $(BUILD_EXECUTABLE)
 
+endif	# TARGET_ARCH == arm
 endif	# !TARGET_SIMULATOR
diff --git a/res/images/icon_firmware_install.bmp b/res/images/icon_firmware_install.bmp
index 7096bf9..b0f5f95 100644
--- a/res/images/icon_firmware_install.bmp
+++ b/res/images/icon_firmware_install.bmp
Binary files differ
diff --git a/res/images/icon_installing.bmp b/res/images/icon_installing.bmp
index 2287170..fff99fd 100644
--- a/res/images/icon_installing.bmp
+++ b/res/images/icon_installing.bmp
Binary files differ
diff --git a/tools/Android.mk b/tools/Android.mk
new file mode 100644
index 0000000..6571161
--- /dev/null
+++ b/tools/Android.mk
@@ -0,0 +1 @@
+include $(all-subdir-makefiles)
diff --git a/tools/ota/Android.mk b/tools/ota/Android.mk
index 43e2135..b7a57d6 100644
--- a/tools/ota/Android.mk
+++ b/tools/ota/Android.mk
@@ -18,3 +18,25 @@
 LOCAL_MODULE := make-update-script
 LOCAL_SRC_FILES := make-update-script.c
 include $(BUILD_HOST_EXECUTABLE)
+
+ifneq ($(TARGET_SIMULATOR),true)
+
+include $(CLEAR_VARS)
+LOCAL_FORCE_STATIC_EXECUTABLE := true
+LOCAL_MODULE := add-property-tag
+LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
+LOCAL_MODULE_TAGS := debug
+LOCAL_SRC_FILES := add-property-tag.c
+LOCAL_STATIC_LIBRARIES := libc
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
+LOCAL_FORCE_STATIC_EXECUTABLE := true
+LOCAL_MODULE := check-lost+found
+LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
+LOCAL_MODULE_TAGS := debug
+LOCAL_SRC_FILES := check-lost+found.c
+LOCAL_STATIC_LIBRARIES := libcutils libc
+include $(BUILD_EXECUTABLE)
+
+endif  # !TARGET_SIMULATOR
diff --git a/tools/ota/add-property-tag.c b/tools/ota/add-property-tag.c
new file mode 100644
index 0000000..5277edd
--- /dev/null
+++ b/tools/ota/add-property-tag.c
@@ -0,0 +1,141 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <ctype.h>
+#include <errno.h>
+#include <getopt.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/*
+ * Append a tag to a property value in a .prop file if it isn't already there.
+ * Normally used to modify build properties to record incremental updates.
+ */
+
+// Return nonzero if the tag should be added to this line.
+int should_tag(const char *line, const char *propname) {
+    const char *prop = strstr(line, propname);
+    if (prop == NULL) return 0;
+
+    // Make sure this is actually the property name (not an accidental hit)
+    const char *ptr;
+    for (ptr = line; ptr < prop && isspace(*ptr); ++ptr) ;
+    if (ptr != prop) return 0;  // Must be at the beginning of the line
+
+    for (ptr += strlen(propname); *ptr != '\0' && isspace(*ptr); ++ptr) ;
+    return (*ptr == '=');  // Must be followed by a '='
+}
+
+// Remove existing tags from the line, return the following number (if any)
+int remove_tag(char *line, const char *tag) {
+    char *pos = strstr(line, tag);
+    if (pos == NULL) return 0;
+
+    char *end;
+    int num = strtoul(pos + strlen(tag), &end, 10);
+    strcpy(pos, end);
+    return num;
+}
+
+// Write line to output with the tag added, adding a number (if >0)
+void write_tagged(FILE *out, const char *line, const char *tag, int number) {
+    const char *end = line + strlen(line);
+    while (end > line && isspace(end[-1])) --end;
+    if (number > 0) {
+        fprintf(out, "%.*s%s%d%s", end - line, line, tag, number, end);
+    } else {
+        fprintf(out, "%.*s%s%s", end - line, line, tag, end);
+    }
+}
+
+int main(int argc, char **argv) {
+    const char *filename = "/system/build.prop";
+    const char *propname = "ro.build.fingerprint";
+    const char *tag = NULL;
+    int do_remove = 0, do_number = 0;
+
+    int opt;
+    while ((opt = getopt(argc, argv, "f:p:rn")) != -1) {
+        switch (opt) {
+        case 'f': filename = optarg; break;
+        case 'p': propname = optarg; break;
+        case 'r': do_remove = 1; break;
+        case 'n': do_number = 1; break;
+        case '?': return 2;
+        }
+    }
+
+    if (argc != optind + 1) {
+        fprintf(stderr,
+            "usage: add-property-tag [flags] tag-to-add\n"
+            "flags: -f /dir/file.prop (default /system/build.prop)\n"
+            "       -p prop.name (default ro.build.fingerprint)\n"
+            "       -r (if set, remove the tag rather than adding it)\n"
+            "       -n (if set, add and increment a number after the tag)\n");
+        return 2;
+    }
+
+    tag = argv[optind];
+    FILE *input = fopen(filename, "r");
+    if (input == NULL) {
+        fprintf(stderr, "can't read %s: %s\n", filename, strerror(errno));
+        return 1;
+    }
+
+    char tmpname[PATH_MAX];
+    snprintf(tmpname, sizeof(tmpname), "%s.tmp", filename);
+    FILE *output = fopen(tmpname, "w");
+    if (output == NULL) {
+        fprintf(stderr, "can't write %s: %s\n", tmpname, strerror(errno));
+        return 1;
+    }
+
+    int found = 0;
+    char line[4096];
+    while (fgets(line, sizeof(line), input)) {
+        if (!should_tag(line, propname)) {
+            fputs(line, output);  // Pass through unmodified
+        } else {
+            found = 1;
+            int number = remove_tag(line, tag);
+            if (do_remove) {
+                fputs(line, output);  // Remove the tag but don't re-add it
+            } else {
+                write_tagged(output, line, tag, number + do_number);
+            }
+        }
+    }
+
+    fclose(input);
+    fclose(output);
+
+    if (!found) {
+        fprintf(stderr, "property %s not found in %s\n", propname, filename);
+        remove(tmpname);
+        return 1;
+    }
+
+    if (rename(tmpname, filename)) {
+        fprintf(stderr, "can't rename %s to %s: %s\n",
+            tmpname, filename, strerror(errno));
+        remove(tmpname);
+        return 1;
+    }
+
+    return 0;
+}
diff --git a/tools/ota/check-lost+found.c b/tools/ota/check-lost+found.c
new file mode 100644
index 0000000..f856275
--- /dev/null
+++ b/tools/ota/check-lost+found.c
@@ -0,0 +1,144 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/klog.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <time.h>
+
+#include "private/android_filesystem_config.h"
+
+// Sentinel file used to track whether we've forced a reboot
+static const char *kMarkerFile = "/data/misc/check-lost+found-rebooted-2";
+
+// Output file in tombstones directory (first 8K will be uploaded)
+static const char *kOutputDir = "/data/tombstones";
+static const char *kOutputFile = "/data/tombstones/check-lost+found-log";
+
+// Partitions to check
+static const char *kPartitions[] = { "/system", "/data", "/cache", NULL };
+
+/*
+ * 1. If /data/misc/forced-reboot is missing, touch it & force "unclean" boot.
+ * 2. Write a log entry with the number of files in lost+found directories.
+ */
+
+int main(int argc, char **argv) {
+    mkdir(kOutputDir, 0755);
+    chown(kOutputDir, AID_SYSTEM, AID_SYSTEM);
+    FILE *out = fopen(kOutputFile, "a");
+    if (out == NULL) {
+        fprintf(stderr, "Can't write %s: %s\n", kOutputFile, strerror(errno));
+        return 1;
+    }
+
+    // Note: only the first 8K of log will be uploaded, so be terse.
+    time_t start = time(NULL);
+    fprintf(out, "*** check-lost+found ***\nStarted: %s", ctime(&start));
+
+    struct stat st;
+    if (stat(kMarkerFile, &st)) {
+        // No reboot marker -- need to force an unclean reboot.
+        // But first, try to create the marker file.  If that fails,
+        // skip the reboot, so we don't get caught in an infinite loop.
+
+        int fd = open(kMarkerFile, O_WRONLY|O_CREAT, 0444);
+        if (fd >= 0 && close(fd) == 0) {
+            fprintf(out, "Wrote %s, rebooting\n", kMarkerFile);
+            fflush(out);
+            sync();  // Make sure the marker file is committed to disk
+
+            // If possible, dirty each of these partitions before rebooting,
+            // to make sure the filesystem has to do a scan on mount.
+            int i;
+            for (i = 0; kPartitions[i] != NULL; ++i) {
+                char fn[PATH_MAX];
+                snprintf(fn, sizeof(fn), "%s/%s", kPartitions[i], "dirty");
+                fd = open(fn, O_WRONLY|O_CREAT, 0444);
+                if (fd >= 0) {  // Don't sweat it if we can't write the file.
+                    write(fd, fn, sizeof(fn));  // write, you know, some data
+                    close(fd);
+                    unlink(fn);
+                }
+            }
+
+            reboot(RB_AUTOBOOT);  // reboot immediately, with dirty filesystems
+            fprintf(out, "Reboot failed?!\n");
+            exit(1);
+        } else {
+            fprintf(out, "Can't write %s: %s\n", kMarkerFile, strerror(errno));
+        }
+    } else {
+        fprintf(out, "Found %s\n", kMarkerFile);
+    }
+
+    int i;
+    for (i = 0; kPartitions[i] != NULL; ++i) {
+        char fn[PATH_MAX];
+        snprintf(fn, sizeof(fn), "%s/%s", kPartitions[i], "lost+found");
+        DIR *dir = opendir(fn);
+        if (dir == NULL) {
+            fprintf(out, "Can't open %s: %s\n", fn, strerror(errno));
+        } else {
+            int count = 0;
+            struct dirent *ent;
+            while ((ent = readdir(dir))) {
+                if (strcmp(ent->d_name, ".") && strcmp(ent->d_name, ".."))
+                    ++count;
+            }
+            closedir(dir);
+            if (count > 0) {
+                fprintf(out, "OMGZ FOUND %d FILES IN %s\n", count, fn);
+            } else {
+                fprintf(out, "%s is clean\n", fn);
+            }
+        }
+    }
+
+    char dmesg[131073];
+    int len = klogctl(KLOG_READ_ALL, dmesg, sizeof(dmesg) - 1);
+    if (len < 0) {
+        fprintf(out, "Can't read kernel log: %s\n", strerror(errno));
+    } else {  // To conserve space, only write lines with certain keywords
+        fprintf(out, "--- Kernel log ---\n");
+        dmesg[len] = '\0';
+        char *saveptr, *line;
+        int in_yaffs = 0;
+        for (line = strtok_r(dmesg, "\n", &saveptr); line != NULL;
+             line = strtok_r(NULL, "\n", &saveptr)) {
+            if (strstr(line, "yaffs: dev is")) in_yaffs = 1;
+
+            if (in_yaffs ||
+                    strstr(line, "yaffs") ||
+                    strstr(line, "mtd") ||
+                    strstr(line, "msm_nand")) {
+                fprintf(out, "%s\n", line);
+            }
+
+            if (strstr(line, "yaffs_read_super: isCheckpointed")) in_yaffs = 0;
+        }
+    }
+
+    return 0;
+}
diff --git a/tools/ota/make-update-script.c b/tools/ota/make-update-script.c
index 0fb7ed0..225dc52 100644
--- a/tools/ota/make-update-script.c
+++ b/tools/ota/make-update-script.c
@@ -171,7 +171,7 @@
     printf("assert compatible_with(\"0.2\") == \"true\"\n");
 
     // if known, make sure the device name is correct
-    const char *device = getenv("TARGET_PRODUCT");
+    const char *device = getenv("TARGET_DEVICE");
     if (device != NULL) {
         printf("assert getprop(\"ro.product.device\") == \"%s\" || "
                 "getprop(\"ro.build.product\") == \"%s\"\n", device, device);
diff --git a/verifier.c b/verifier.c
index 67a4f39..1180ae8 100644
--- a/verifier.c
+++ b/verifier.c
@@ -126,13 +126,15 @@
             strncpy(sfName, rsaName.str, rsaName.len - sizeof(rsa) + 1);
             strcpy(sfName + rsaName.len - sizeof(rsa) + 1, sf);
             const ZipEntry *sfEntry = mzFindZipEntry(pArchive, sfName);
-            free(sfName);
 
             if (sfEntry == NULL) {
                 LOGW("Missing signature file %s\n", sfName);
+                free(sfName);
                 continue;
             }
 
+            free(sfName);
+
             uint8_t sfDigest[SHA_DIGEST_SIZE];
             if (!digestEntry(pArchive, sfEntry, NULL, 0, sfDigest)) continue;
 
