diff options
Diffstat (limited to 'updater')
-rw-r--r-- | updater/Android.mk | 2 | ||||
-rw-r--r-- | updater/blockimg.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/updater/Android.mk b/updater/Android.mk index 6e224fb..470eb5d 100644 --- a/updater/Android.mk +++ b/updater/Android.mk @@ -41,7 +41,7 @@ endif LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UPDATER_LIBS) $(TARGET_RECOVERY_UPDATER_EXTRA_LIBS) LOCAL_STATIC_LIBRARIES += libapplypatch libedify libmtdutils libminzip libz -LOCAL_STATIC_LIBRARIES += libmincrypt libbz +LOCAL_STATIC_LIBRARIES += libmincrypt libbz libxz LOCAL_STATIC_LIBRARIES += libcutils liblog libc LOCAL_STATIC_LIBRARIES += libselinux tune2fs_static_libraries := \ diff --git a/updater/blockimg.c b/updater/blockimg.c index a93bfcb..be56fbd 100644 --- a/updater/blockimg.c +++ b/updater/blockimg.c @@ -341,7 +341,12 @@ static bool receive_new_data(const unsigned char* data, int size, void* cookie) static void* unzip_new_data(void* cookie) { NewThreadInfo* nti = (NewThreadInfo*) cookie; - mzProcessZipEntryContents(nti->za, nti->entry, receive_new_data, nti); + if (strncmp(".xz", nti->entry->fileName + (nti->entry->fileNameLen - 3), 3) == 0) { + mzProcessZipEntryContentsXZ(nti->za, nti->entry, receive_new_data, nti); + } else { + mzProcessZipEntryContents(nti->za, nti->entry, receive_new_data, nti); + } + return NULL; } |