aboutsummaryrefslogtreecommitdiffstats
path: root/install.c
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2011-01-02 12:26:35 -0800
committerKoushik Dutta <koushd@gmail.com>2011-01-02 12:26:35 -0800
commit67c381a6faa5711ad85d65038f2349aeccddd283 (patch)
treeab558f7c97871b211639262a0391de53453f35e4 /install.c
parent949f3b34eedbc585bcab5ad7842228af37c46fd2 (diff)
downloadbootable_recovery-67c381a6faa5711ad85d65038f2349aeccddd283.zip
bootable_recovery-67c381a6faa5711ad85d65038f2349aeccddd283.tar.gz
bootable_recovery-67c381a6faa5711ad85d65038f2349aeccddd283.tar.bz2
3.0.0.4. Provide an error message if an Amend zip is provided.
Change-Id: Ia740686a138cff01de2c1475acc0abccb18d9c2d
Diffstat (limited to 'install.c')
-rw-r--r--install.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/install.c b/install.c
index 2d8a4cd..ad2c21d 100644
--- a/install.c
+++ b/install.c
@@ -39,6 +39,7 @@
#define ASSUMED_UPDATE_BINARY_NAME "META-INF/com/google/android/update-binary"
+#define ASSUMED_UPDATE_SCRIPT_NAME "META-INF/com/google/android/update-script"
#define PUBLIC_KEYS_FILE "/res/keys"
// The update binary ask us to install a firmware file on reboot. Set
@@ -102,6 +103,16 @@ try_update_binary(const char *path, ZipArchive *zip) {
const ZipEntry* binary_entry =
mzFindZipEntry(zip, ASSUMED_UPDATE_BINARY_NAME);
if (binary_entry == NULL) {
+ const ZipEntry* update_script_entry =
+ mzFindZipEntry(zip, ASSUMED_UPDATE_SCRIPT_NAME);
+ if (update_script_entry != NULL) {
+ ui_print("Amend scripting (update-script) is no longer supported.\n");
+ ui_print("Amend scripting was deprecated by Google in Android 1.5.\n");
+ ui_print("It was necessary to remove it when upgrading to the ClockworkMod 3.0 Gingerbread based recovery.\n");
+ ui_print("Please switch to Edify scripting (updater-script and update-binary) to create working update zip packages.\n");
+ return INSTALL_UPDATE_BINARY_MISSING;
+ }
+
mzCloseZipArchive(zip);
return INSTALL_UPDATE_BINARY_MISSING;
}