Merge "Update get-google-files for 20110613" into gingerbread
diff --git a/overlay/shadow/packages/apps/CMParts/res/values/config.xml b/overlay/shadow/packages/apps/CMParts/res/values/config.xml
new file mode 100644
index 0000000..b9582a8
--- /dev/null
+++ b/overlay/shadow/packages/apps/CMParts/res/values/config.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <!-- Whether or not to display the trackball settings -->
+    <bool name="has_trackball">false</bool>
+    <bool name="has_camera_button">true</bool>
+    <bool name="has_rgb_notification_led">true</bool>
+    <bool name="has_led_flash">true</bool>
+</resources>
diff --git a/prebuilt/common/bin/backuptool.sh b/prebuilt/common/bin/backuptool.sh
index 39666ce..85f800e 100755
--- a/prebuilt/common/bin/backuptool.sh
+++ b/prebuilt/common/bin/backuptool.sh
@@ -140,9 +140,15 @@
    fi
 }
 
+# don't (u)mount system if already done
+UMOUNT=0
+
 case "$1" in
    backup)
-      mount $S
+      if [ ! -f "$S/build.prop" ]; then
+         mount $S
+         UMOUNT=1
+      fi
       check_prereq;
       check_installscript;
       if [ $PROCEED -ne 0 ];
@@ -155,9 +161,15 @@
            done
          done
       fi
-      umount $S
+      if [ $UMOUNT -ne 0 ]; then
+         umount $S
+      fi
    ;;
    restore)
+      if [ ! -f "$S/build.prop" ]; then
+         mount $S
+         UMOUNT=1
+      fi
       check_prereq;
       check_installscript;
       if [ $PROCEED -ne 0 ];
@@ -171,6 +183,10 @@
          done
          rm -rf $C
       fi
+      if [ $UMOUNT -ne 0 ]; then
+         umount $S
+      fi
+      sync
    ;;
    *)
       echo "Usage: $0 {backup|restore}"
diff --git a/products/AndroidProducts.mk b/products/AndroidProducts.mk
index d183761..c209f80 100644
--- a/products/AndroidProducts.mk
+++ b/products/AndroidProducts.mk
@@ -27,6 +27,7 @@
     $(LOCAL_DIR)/cyanogen_p990.mk \
     $(LOCAL_DIR)/cyanogen_p999.mk \
     $(LOCAL_DIR)/cyanogen_passion.mk \
+    $(LOCAL_DIR)/cyanogen_shadow.mk \
     $(LOCAL_DIR)/cyanogen_sholes.mk \
     $(LOCAL_DIR)/cyanogen_smb_a1002.mk \
     $(LOCAL_DIR)/cyanogen_smb_a1004.mk \
diff --git a/products/cyanogen_morrison.mk b/products/cyanogen_morrison.mk
index 8829e1a..837a4a4 100644
--- a/products/cyanogen_morrison.mk
+++ b/products/cyanogen_morrison.mk
@@ -14,7 +14,7 @@
 PRODUCT_NAME := cyanogen_morrison
 PRODUCT_BRAND := motorola
 PRODUCT_DEVICE := morrison
-PRODUCT_MODEL := CLIQ
+PRODUCT_MODEL := MB200
 PRODUCT_MANUFACTURER := Motorola
 
 #
diff --git a/products/cyanogen_shadow.mk b/products/cyanogen_shadow.mk
new file mode 100644
index 0000000..23c9246
--- /dev/null
+++ b/products/cyanogen_shadow.mk
@@ -0,0 +1,40 @@
+# Inherit AOSP device configuration for passion.
+$(call inherit-product, device/motorola/shadow/shadow.mk)
+
+# Inherit some common cyanogenmod stuff.
+$(call inherit-product, vendor/cyanogen/products/common_full.mk)
+
+#
+# Setup device specific product configuration.
+#
+PRODUCT_NAME := cyanogen_shadow
+PRODUCT_BRAND := motorola
+PRODUCT_DEVICE := shadow
+PRODUCT_MODEL := DROIDX
+PRODUCT_MANUFACTURER := Motorola
+
+#
+# Set ro.modversion
+#
+ifdef CYANOGEN_NIGHTLY
+    PRODUCT_PROPERTY_OVERRIDES += \
+        ro.modversion=CyanogenMod-7-$(shell date +%m%d%Y)-NIGHTLY-DROIDX
+else
+    ifdef CYANOGEN_RELEASE
+        PRODUCT_PROPERTY_OVERRIDES += \
+            ro.modversion=CyanogenMod-7.1.0-RC0-DROIDX
+    else
+        PRODUCT_PROPERTY_OVERRIDES += \
+            ro.modversion=CyanogenMod-7.1.0-RC0-DROIDX-KANG
+    endif
+endif
+
+PRODUCT_BUILD_PROP_OVERRIDES := BUILD_ID=VZW BUILD_DISPLAY_ID=GRH78C PRODUCT_NAME=shadow_vzw TARGET_DEVICE=cdma_shadow BUILD_FINGERPRINT=verizon/shadow_vzw/cdma_shadow/shadow:2.2.1/VZW/23.340:user/ota-rel-keys,release-keys PRODUCT_BRAND=verizon PRIVATE_BUILD_DESC="cdma_shadow-user 2.2.1 VZW 2.3.340 ota-rel-keys,release-keys" BUILD_NUMBER=2.3.340 BUILD_UTC_DATE=1289194863 TARGET_BUILD_TYPE=user BUILD_VERSION_TAGS=release-keys USER=w30471
+
+PRODUCT_COPY_FILES +=  \
+    vendor/cyanogen/prebuilt/hdpi/media/bootanimation.zip:system/media/bootanimation.zip
+
+PRODUCT_PACKAGE_OVERLAYS += vendor/cyanogen/overlay/shadow
+
+# Add the Torch app
+PRODUCT_PACKAGES += Torch
diff --git a/products/cyanogen_zeppelin.mk b/products/cyanogen_zeppelin.mk
index 7229435..c30f24d 100644
--- a/products/cyanogen_zeppelin.mk
+++ b/products/cyanogen_zeppelin.mk
@@ -14,7 +14,7 @@
 PRODUCT_NAME := cyanogen_zeppelin
 PRODUCT_BRAND := motorola
 PRODUCT_DEVICE := zeppelin
-PRODUCT_MODEL := CLIQ XT
+PRODUCT_MODEL := MB501
 PRODUCT_MANUFACTURER := Motorola
 
 #
diff --git a/vendorsetup.sh b/vendorsetup.sh
index 84073b6..ba9e7fe 100644
--- a/vendorsetup.sh
+++ b/vendorsetup.sh
@@ -26,6 +26,7 @@
 add_lunch_combo cyanogen_p990-eng
 add_lunch_combo cyanogen_p999-eng
 add_lunch_combo cyanogen_passion-eng
+add_lunch_combo cyanogen_shadow-eng
 add_lunch_combo cyanogen_sholes-eng
 add_lunch_combo cyanogen_smb_a1002-eng
 add_lunch_combo cyanogen_smb_a1004-eng