diff --git a/A-Team.mk b/A-Team.mk new file mode 100644 index 0000000..61aca69 --- /dev/null +++ b/A-Team.mk @@ -0,0 +1,132 @@ +# +# Copyright 2019-Present A-Team Digital Solutions +# + +############ +## A-Team ## +################################################################## + +LOCAL_PATH := $(call my-dir) + +A_TEAM_PATH := vendor/A-Team + +# BootAnimation Resolution +TARGET_BOOT_ANIMATION_RES := 1080 + +# Device Maintainer +DEVICE_MAINTAINER := PizzaG + +# A-Team KSU & Mods +PRODUCT_SOONG_NAMESPACES += \ + [A-Team_Mods] \ + [A-Team_KSU] + +# A-Team Custom APN +ifeq ($(CUSTOM_APN), Custom) +PRODUCT_SOONG_NAMESPACES += \ + [A-Team_APN] +endif + +# A-Team Rom Apps +ifneq ($(GSI), true) + PRODUCT_SOONG_NAMESPACES += \ + [A-Team_Apps] +endif + +# A-Team Magisk Patching +ifeq ($(MAGISK), true) +PRODUCT_SOONG_NAMESPACES += \ + [A-Team_Magisk] +endif + +TARGET_KERNEL_SOURCE := kernel/motorola/$(DEVICE_KERNEL) +PRODUCT_SOONG_NAMESPACES += \ + [$(DEVICE_NAME)_$(TARGET_KERNEL)_Kernel] +################################################################## + + +########################### +## A-Team Gapps Variants ## +################################################################## + +# A-Team Gapps +ifeq ($(GAPPS_VARIANT), Gapps) +PRODUCT_SOONG_NAMESPACES += \ + [A-Team_GAPPS] +#$(call inherit-product, vendor/gapps/products/gms.mk) +#$(call inherit-product, vendor/gms/products/gms.mk) +endif + +# A-Team Micro-G +ifeq ($(GAPPS_VARIANT), Micro-G) +PRODUCT_SOONG_NAMESPACES += \ + [A-Team_Micro-G] +#$(call inherit-product, vendor/microg/products/gms.mk) +endif +################################################################## + + +#################### +## A-Team Moto Product Add-Ons ## +################################################################## + +# Prebuilt App Build Fix +PRODUCT_BROKEN_VERIFY_USES_LIBRARIES := true + +# Moto TimeWeather +PRODUCT_PACKAGES += \ + TimeWeather + +# Custom Wallpaper +PRODUCT_COPY_FILES += $(call find-copy-subdir-files,*,$(A_TEAM_PATH)/wallpapers,product/media/wallpapers) + +PRODUCT_PRODUCT_PROPERTIES += \ + ro.config.wallpaper=product/media/wallpapers/default_moto_wallpaper.jpg + +# Copy A-Team Custom Script Files - /product/bin +PRODUCT_COPY_FILES += \ + $(A_TEAM_PATH)/scripts/A-Team-PostBoot.sh:$(TARGET_COPY_OUT_PRODUCT)/bin/A-Team-PostBoot.sh \ + $(A_TEAM_PATH)/scripts/A-Team-Setup.sh:$(TARGET_COPY_OUT_PRODUCT)/bin/A-Team-Setup.sh \ + $(A_TEAM_PATH)/scripts/A-Team-Magisk.sh:$(TARGET_COPY_OUT_PRODUCT)/bin/A-Team-Magisk.sh +################################################################## + + +#################### +## A-Team Moto System Add-Ons ## +################################################################## + +# Copy A-Team Custom rc Files - /system/etc/init +PRODUCT_COPY_FILES += \ + $(A_TEAM_PATH)/init/a-team.boot.rc:$(TARGET_COPY_OUT_SYSTEM)/etc/init/a-team.boot.rc + +# Copy Busybox - /system/bin +PRODUCT_COPY_FILES += \ + $(A_TEAM_PATH)/Busybox/arm64/busybox:$(TARGET_COPY_OUT_SYSTEM)/bin/busybox \ + $(A_TEAM_PATH)/Busybox/arm64/ssl_helper:$(TARGET_COPY_OUT_SYSTEM)/bin/ssl_helper + +# Clock +PRODUCT_COPY_FILES += \ + $(A_TEAM_PATH)/Prerequisites/Clock.prop:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/Clock.prop + +# Messages +PRODUCT_COPY_FILES += \ + $(A_TEAM_PATH)/Prerequisites/com.google.android.apps.messaging.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/com.google.android.apps.messaging.xml + +# System Prop Additions +PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ + persist.adb.notify=0 \ + persist.sys.disable_rescue=true \ + ro.a-team.rom_version=$(A_TEAM_ROM_VERSION) +################################################################## + + +############################# +## Disabled / Old / Unused ## +################################################################## + +# A-Team Custom APN +#ifeq ($(CUSTOM_APN), true) +#PRODUCT_COPY_FILES += \ +# $(A_TEAM_PATH)/Custom_APN/apns-conf.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/apns-conf.xml +#endif +################################################################## diff --git a/A-Team/Apps/Chrome.apk b/A-Team/Apps/Chrome.apk new file mode 100644 index 0000000..3f3b06f Binary files /dev/null and b/A-Team/Apps/Chrome.apk differ diff --git a/A-Team/Apps/Magisk.apk b/A-Team/Apps/Magisk.apk new file mode 100755 index 0000000..e1444b5 Binary files /dev/null and b/A-Team/Apps/Magisk.apk differ diff --git a/A-Team/Apps/NovaLauncher.apk b/A-Team/Apps/NovaLauncher.apk new file mode 100644 index 0000000..8a77082 Binary files /dev/null and b/A-Team/Apps/NovaLauncher.apk differ diff --git a/A-Team/Apps/OpenCamera.apk b/A-Team/Apps/OpenCamera.apk new file mode 100755 index 0000000..785a5bf Binary files /dev/null and b/A-Team/Apps/OpenCamera.apk differ diff --git a/A-Team/Apps/X-Plore.apk b/A-Team/Apps/X-Plore.apk new file mode 100644 index 0000000..f56e4a2 Binary files /dev/null and b/A-Team/Apps/X-Plore.apk differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-0.jpg b/A-Team/Wallpapers/default_moto_wallpaper-0.jpg new file mode 100755 index 0000000..34580cd Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-0.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-1.jpg b/A-Team/Wallpapers/default_moto_wallpaper-1.jpg new file mode 100755 index 0000000..0d7373f Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-1.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-10.jpg b/A-Team/Wallpapers/default_moto_wallpaper-10.jpg new file mode 100755 index 0000000..69ed0b6 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-10.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-11.jpg b/A-Team/Wallpapers/default_moto_wallpaper-11.jpg new file mode 100755 index 0000000..8d11bc3 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-11.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-12.jpg b/A-Team/Wallpapers/default_moto_wallpaper-12.jpg new file mode 100755 index 0000000..694f472 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-12.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-13.jpg b/A-Team/Wallpapers/default_moto_wallpaper-13.jpg new file mode 100755 index 0000000..02b9acd Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-13.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-14.jpg b/A-Team/Wallpapers/default_moto_wallpaper-14.jpg new file mode 100755 index 0000000..2cfcd97 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-14.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-15.jpg b/A-Team/Wallpapers/default_moto_wallpaper-15.jpg new file mode 100755 index 0000000..b567e2f Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-15.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-16.jpg b/A-Team/Wallpapers/default_moto_wallpaper-16.jpg new file mode 100755 index 0000000..43f9229 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-16.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-17.jpg b/A-Team/Wallpapers/default_moto_wallpaper-17.jpg new file mode 100755 index 0000000..9a04420 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-17.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-18.jpg b/A-Team/Wallpapers/default_moto_wallpaper-18.jpg new file mode 100755 index 0000000..0159a79 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-18.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-19.jpg b/A-Team/Wallpapers/default_moto_wallpaper-19.jpg new file mode 100755 index 0000000..a645ef5 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-19.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-2.jpg b/A-Team/Wallpapers/default_moto_wallpaper-2.jpg new file mode 100755 index 0000000..6aee7a8 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-2.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-20.jpg b/A-Team/Wallpapers/default_moto_wallpaper-20.jpg new file mode 100755 index 0000000..77af8ff Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-20.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-21.jpg b/A-Team/Wallpapers/default_moto_wallpaper-21.jpg new file mode 100755 index 0000000..3479249 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-21.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-22.jpg b/A-Team/Wallpapers/default_moto_wallpaper-22.jpg new file mode 100755 index 0000000..eacb4d6 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-22.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-23.jpg b/A-Team/Wallpapers/default_moto_wallpaper-23.jpg new file mode 100755 index 0000000..68c708a Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-23.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-24.jpg b/A-Team/Wallpapers/default_moto_wallpaper-24.jpg new file mode 100755 index 0000000..db559a4 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-24.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-25.jpg b/A-Team/Wallpapers/default_moto_wallpaper-25.jpg new file mode 100755 index 0000000..c7ed801 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-25.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-26.jpg b/A-Team/Wallpapers/default_moto_wallpaper-26.jpg new file mode 100755 index 0000000..7ad5015 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-26.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-27.jpg b/A-Team/Wallpapers/default_moto_wallpaper-27.jpg new file mode 100755 index 0000000..44dffd5 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-27.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-28.jpg b/A-Team/Wallpapers/default_moto_wallpaper-28.jpg new file mode 100755 index 0000000..fb858a6 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-28.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-29.jpg b/A-Team/Wallpapers/default_moto_wallpaper-29.jpg new file mode 100644 index 0000000..aa335fa Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-29.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-3.jpg b/A-Team/Wallpapers/default_moto_wallpaper-3.jpg new file mode 100755 index 0000000..d08c6a5 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-3.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-30.jpg b/A-Team/Wallpapers/default_moto_wallpaper-30.jpg new file mode 100755 index 0000000..5e06e52 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-30.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-4.jpg b/A-Team/Wallpapers/default_moto_wallpaper-4.jpg new file mode 100755 index 0000000..23ccb33 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-4.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-5.jpg b/A-Team/Wallpapers/default_moto_wallpaper-5.jpg new file mode 100755 index 0000000..755c900 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-5.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-6.jpg b/A-Team/Wallpapers/default_moto_wallpaper-6.jpg new file mode 100755 index 0000000..4a69e13 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-6.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-7.jpg b/A-Team/Wallpapers/default_moto_wallpaper-7.jpg new file mode 100755 index 0000000..5976cc9 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-7.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-8.jpg b/A-Team/Wallpapers/default_moto_wallpaper-8.jpg new file mode 100755 index 0000000..6ce38f3 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-8.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper-9.jpg b/A-Team/Wallpapers/default_moto_wallpaper-9.jpg new file mode 100755 index 0000000..875fe55 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper-9.jpg differ diff --git a/A-Team/Wallpapers/default_moto_wallpaper.jpg b/A-Team/Wallpapers/default_moto_wallpaper.jpg new file mode 100755 index 0000000..44a51e2 Binary files /dev/null and b/A-Team/Wallpapers/default_moto_wallpaper.jpg differ diff --git a/A-Team/config.xml b/A-Team/config.xml new file mode 100755 index 0000000..eb2c7ed --- /dev/null +++ b/A-Team/config.xml @@ -0,0 +1,25 @@ + + + + + + 1 + 130 + + + + + UTF-8 + + 2 + + + + + + + 0 + + 3 + 0 + diff --git a/A-Team/prefs.xml b/A-Team/prefs.xml new file mode 100755 index 0000000..80f971f --- /dev/null +++ b/A-Team/prefs.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Apps/Android.mk b/Apps/Android.mk new file mode 100644 index 0000000..11dc93d --- /dev/null +++ b/Apps/Android.mk @@ -0,0 +1,21 @@ +# +# Copyright 2019-Present A-Team Digital Solutions +# + +LOCAL_PATH := $(call my-dir) + +# Only include this module if TARGET_IS_GSI is NOT set +ifneq ($(TARGET_IS_GSI), true) + include $(CLEAR_VARS) + LOCAL_MODULE := TimeWeather + LOCAL_MODULE_CLASS := APPS + LOCAL_MODULE_TAGS := optional + LOCAL_CERTIFICATE := PRESIGNED + LOCAL_SRC_FILES := TimeWeather.apk + LOCAL_PRODUCT_MODULE := true + LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/app + include $(BUILD_PREBUILT) +endif + + + diff --git a/Apps/TimeWeather.apk b/Apps/TimeWeather.apk new file mode 100755 index 0000000..2ff1b62 Binary files /dev/null and b/Apps/TimeWeather.apk differ diff --git a/Busybox/arm/busybox b/Busybox/arm/busybox new file mode 100755 index 0000000..2862eaf Binary files /dev/null and b/Busybox/arm/busybox differ diff --git a/Busybox/arm/ssl_helper b/Busybox/arm/ssl_helper new file mode 100755 index 0000000..dbb8ccb Binary files /dev/null and b/Busybox/arm/ssl_helper differ diff --git a/Busybox/arm64/busybox b/Busybox/arm64/busybox new file mode 100755 index 0000000..ae75449 Binary files /dev/null and b/Busybox/arm64/busybox differ diff --git a/Busybox/arm64/ssl_helper b/Busybox/arm64/ssl_helper new file mode 100755 index 0000000..8ad3885 Binary files /dev/null and b/Busybox/arm64/ssl_helper differ diff --git a/Changelog/Changelog.txt.Fogo b/Changelog/Changelog.txt.Fogo new file mode 100644 index 0000000..e190165 --- /dev/null +++ b/Changelog/Changelog.txt.Fogo @@ -0,0 +1,7 @@ +##################### + +A-Team Custom ChangeLog + +##################### + +🍬 April-22-2025 - v0.01 🍬: Initial Android 15 Release... diff --git a/Changelog/Changelog.txt.Genevn b/Changelog/Changelog.txt.Genevn new file mode 100644 index 0000000..e190165 --- /dev/null +++ b/Changelog/Changelog.txt.Genevn @@ -0,0 +1,7 @@ +##################### + +A-Team Custom ChangeLog + +##################### + +🍬 April-22-2025 - v0.01 🍬: Initial Android 15 Release... diff --git a/Changelog/Changelog.txt.Milanf b/Changelog/Changelog.txt.Milanf new file mode 100644 index 0000000..7609290 --- /dev/null +++ b/Changelog/Changelog.txt.Milanf @@ -0,0 +1,7 @@ +##################### + +A-Team Custom ChangeLog + +##################### + +🍬 December-4-2025 - v0.01 🍬: Initial Android 16 Release... diff --git a/Changelog/Changelog.txt.Moto_GSI b/Changelog/Changelog.txt.Moto_GSI new file mode 100644 index 0000000..fcb9326 --- /dev/null +++ b/Changelog/Changelog.txt.Moto_GSI @@ -0,0 +1,7 @@ +##################### + +A-Team Custom ChangeLog + +##################### + +🍬 March-29-2025 - v0.01 🍬: Initial Android 15 Moto GSI Rom Release... diff --git a/Changelog/Changelog.txt.Rtwo b/Changelog/Changelog.txt.Rtwo new file mode 100644 index 0000000..7609290 --- /dev/null +++ b/Changelog/Changelog.txt.Rtwo @@ -0,0 +1,7 @@ +##################### + +A-Team Custom ChangeLog + +##################### + +🍬 December-4-2025 - v0.01 🍬: Initial Android 16 Release... diff --git a/Changelog/changelog b/Changelog/changelog new file mode 100755 index 0000000..6b37779 --- /dev/null +++ b/Changelog/changelog @@ -0,0 +1,44 @@ +#!/bin/sh + +# +# Copyright 2019-Present A-Team Digital Solutions +# + +#export PATH=/bin:$BIN:$PATH +#set -e + +#usage() { +# cat < +#EOM +# exit 1 +#} + +# Set Path To $OUT Directory, Typical $OUT Variable +#[ $# -ne 1 ] && usage +#OUT="$1" + +# Check For $OUT Directory +#if [ ! -d "$OUT" ];then +# echo "Specified OUT-Directory: $OUT Does Not Exist!" +# exit 1 +#fi + +# Store Changelog In $OUT & Copy Changelog To Target system/etc +#changelog="$OUT/Changelog.txt" +#system_changelog="$OUT/system/etc/Changelog.txt" + +# Print Something To Build Output +#echo ${bldppl}"Generating A-Team Custom Changelog..."${txtrst} + +# Copy Changelog To Target +#mkdir -p $(dirname "$system_changelog") +#cp -r Changelog.txt $OUT +#cp "$changelog" "$system_changelog" + +#exit 0 + +# Print something to build output +echo "" +echo "Generating A-Team Custom Changelog..." +echo "" diff --git a/Changelog/changelog.sh b/Changelog/changelog.sh new file mode 100755 index 0000000..e86c9b9 --- /dev/null +++ b/Changelog/changelog.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# +# Copyright 2019-Present A-Team Digital Solutions +# + +# Print something to build output +echo "" +echo "Generating A-Team Custom Changelog..." +echo "" + diff --git a/Custom_APN/Android.mk b/Custom_APN/Android.mk new file mode 100644 index 0000000..73cde6f --- /dev/null +++ b/Custom_APN/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright 2019-Present A-Team Digital Solutions +# +# A-Team Custom APN +# + +LOCAL_PATH := $(call my-dir) + +################################ +# Copies the APN list file into $(TARGET_COPY_OUT_PRODUCT)/etc for the product as apns-conf.xml. +# In the case where $(CUSTOM_APNS_FILE) is defined, the content of $(CUSTOM_APNS_FILE) +# is added or replaced to the $(DEFAULT_APNS_FILE). +include $(CLEAR_VARS) + +LOCAL_MODULE := apns-conf.xml +LOCAL_MODULE_CLASS := ETC + +# Custom APN Mechanism +ifeq ($(CUSTOM_APN), Custom) +DEFAULT_APNS_FILE := vendor/A-Team/Custom_APN/apns-conf.xml +else +DEFAULT_APNS_FILE := vendor/$(ROM_VENDOR_NAME)/prebuilt/common/etc/apns-conf.xml +endif + +FINAL_APNS_FILE := $(DEFAULT_APNS_FILE) + +LOCAL_PREBUILT_MODULE_FILE := $(FINAL_APNS_FILE) + +LOCAL_PRODUCT_MODULE := true + +include $(BUILD_PREBUILT) diff --git a/Custom_APN/apns-conf.xml b/Custom_APN/apns-conf.xml new file mode 100644 index 0000000..4c2732a --- /dev/null +++ b/Custom_APN/apns-conf.xml @@ -0,0 +1,47176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Final_Zip/A-Team/keycheck b/Final_Zip/A-Team/keycheck new file mode 100755 index 0000000..9e74a9e Binary files /dev/null and b/Final_Zip/A-Team/keycheck differ diff --git a/Final_Zip/A-Team/tee.exe b/Final_Zip/A-Team/tee.exe new file mode 100755 index 0000000..7b32b2a Binary files /dev/null and b/Final_Zip/A-Team/tee.exe differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/androidbootimg.magic b/Final_Zip/AIK/KSU/OFRP-R/bin/androidbootimg.magic new file mode 100755 index 0000000..4e7a106 --- /dev/null +++ b/Final_Zip/AIK/KSU/OFRP-R/bin/androidbootimg.magic @@ -0,0 +1,111 @@ +#------------------------------------------------------------------------------ +# Various Android OEM non-standard boot image related magic entries +# osm0sis @ xda-developers +#------------------------------------------------------------------------------ + +# ASUS Blob Signature +0 string -SIGNED-BY-SIGNBLOB- BLOB signing + +# Barnes & Noble Nook Signature +64 string Red\x20Loader NOOK signing (red loader) +64 string Green\x20Loader NOOK signing (green loader) +64 string Green\x20Recovery NOOK signing (green recovery) +64 string eMMC\x20boot.img+secondloader NOOK signing (emmc boot) +64 string eMMC\x20recovery.img+secondloader NOOK signing (emmc recovery) +48 string BauwksBoot NOOKTAB signing (bauwks) + +# Google ChromeOS Signature +0 string CHROMEOS CHROMEOS signing + +# Samsung/Spreadtrum DHTB Signature +0 string DHTB\x01\x00\x00 DHTB signing + +# Sony SIN Packaging/Signature +0 string \x01\x00\x00\x00 SINv1 signing +0 string \x02\x00\x00\x00 SINv2 signing +0 string \x03SIN SINv3 signing + +# Google Pixel/Nexus/AOSP Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search ANDROID! AOSP bootimg +>>36 string \x00\x00\x00\x02 \b, PXA variant (020) +>>36 string \x00\x00\x80\x02 \b, PXA variant (028) +>>36 string \x00\x00\x00\x03 \b, PXA variant (030) +>>96 search microloader +>>>1024 string ANDROID! \b, AMONET header +>>1024 string LOKI \b, LOKI header +>>>1028 string \x00 \b (boot) +>>>1028 string \x01 \b (recovery) +>>2048 search \x88\x16\x88\x58 \b, MTK headers +!:strength * 3 + +# Google Pixel/AOSP Vendor Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search VNDRBOOT AOSP_VNDR bootimg +!:strength * 3 + +# DENX U-Boot +0 string \x27\x05\x19\x56 U-Boot bootimg + +# Intel OSIP +1000 search \xFC\xFA\xBC\x00 OSIP bootimg (headerless) +!:strength / 15 +0 string $OS$\x00\x00\x01 OSIP bootimg +>52 string \x00\x00\x00\x00 \b, boot (signed) +>52 string \x01\x00\x00\x00 \b, boot (unsigned) +>52 string \x0C\x00\x00\x00 \b, recovery (signed) +>52 string \x0D\x00\x00\x00 \b, recovery (unsigned) + +# Rockchip KRNL +0 string KRNL KRNL bootimg + +# Sony ELF +0 string \x7FELF ELF +>5 string \x01\x01\x61 bootimg +>18 string \x28 (ARM +>18 string \x03 (x86_ +>18 string \x08 (MIPS +>4 string \x01 \b) +>4 string \x02 \b64) +>0 search \x88\x16\x88\x58 \b, MTK headers + +# MediaTek MTK +# [for detection after boot image has already been split] +0 search \x88\x16\x88\x58 MTK header +>0 search KERNEL \b, kernel type +>0 search ROOTFS \b, rootfs type +>0 search RECOVERY \b, recovery type +!:strength / 20 + +# Qualcomm Device Tree +# [for detection after boot image has already been split] +0 string QCDT QCDT header +!:strength / 20 + +# Google Android Verified Boot 1.0 Signature +# [for detection with the tail of the boot image] +0 search \x02\x01\x01\x30\x82 AVBv1 signing footer +>0 search /boot \b, boot type +>0 search /recovery \b, recovery type +!:strength / 20 + +# Google Android Verified Boot 2.0 Signature +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search AVBf AVBv2 signing footer +!:strength / 20 + +# LG Bump +# [for detection with the tail of the boot image] +0 search \x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79 Bump footer +!:strength / 20 + +# Samsung SEAndroid +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search SEANDROIDENFORCE SEAndroid footer +!:strength / 20 diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/avb/verity.pk8 b/Final_Zip/AIK/KSU/OFRP-R/bin/avb/verity.pk8 new file mode 100755 index 0000000..bebf216 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/avb/verity.pk8 differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/avb/verity.x509.pem b/Final_Zip/AIK/KSU/OFRP-R/bin/avb/verity.x509.pem new file mode 100755 index 0000000..86399c3 --- /dev/null +++ b/Final_Zip/AIK/KSU/OFRP-R/bin/avb/verity.x509.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIID/TCCAuWgAwIBAgIJAJcPmDkJqolJMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g +VmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UE +AwwHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe +Fw0xNDExMDYxOTA3NDBaFw00MjAzMjQxOTA3NDBaMIGUMQswCQYDVQQGEwJVUzET +MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEQMA4G +A1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UEAwwHQW5kcm9p +ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAOjreE0vTVSRenuzO9vnaWfk0eQzYab0gqpi +6xAzi6dmD+ugoEKJmbPiuE5Dwf21isZ9uhUUu0dQM46dK4ocKxMRrcnmGxydFn6o +fs3ODJMXOkv2gKXL/FdbEPdDbxzdu8z3yk+W67udM/fW7WbaQ3DO0knu+izKak/3 +T41c5uoXmQ81UNtAzRGzGchNVXMmWuTGOkg6U+0I2Td7K8yvUMWhAWPPpKLtVH9r +AL5TzjYNR92izdKcz3AjRsI3CTjtpiVABGeX0TcjRSuZB7K9EK56HV+OFNS6I1NP +jdD7FIShyGlqqZdUOkAUZYanbpgeT5N7QL6uuqcGpoTOkalu6kkCAwEAAaNQME4w +HQYDVR0OBBYEFH5DM/m7oArf4O3peeKO0ZIEkrQPMB8GA1UdIwQYMBaAFH5DM/m7 +oArf4O3peeKO0ZIEkrQPMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB +AHO3NSvDE5jFvMehGGtS8BnFYdFKRIglDMc4niWSzhzOVYRH4WajxdtBWc5fx0ix +NF/+hVKVhP6AIOQa+++sk+HIi7RvioPPbhjcsVlZe7cUEGrLSSveGouQyc+j0+m6 +JF84kszIl5GGNMTnx0XRPO+g8t6h5LWfnVydgZfpGRRg+WHewk1U2HlvTjIceb0N +dcoJ8WKJAFWdcuE7VIm4w+vF/DYX/A2Oyzr2+QRhmYSv1cusgAeC1tvH4ap+J1Lg +UnOu5Kh/FqPLLSwNVQp4Bu7b9QFfqK8Moj84bj88NqRGZgDyqzuTrFxn6FW7dmyA +yttuAJAEAymk1mipd9+zp38= +-----END CERTIFICATE----- diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/boot_signer.jar b/Final_Zip/AIK/KSU/OFRP-R/bin/boot_signer.jar new file mode 100755 index 0000000..dd96a3e Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/boot_signer.jar differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/chromeos/empty b/Final_Zip/AIK/KSU/OFRP-R/bin/chromeos/empty new file mode 100755 index 0000000..8b13789 --- /dev/null +++ b/Final_Zip/AIK/KSU/OFRP-R/bin/chromeos/empty @@ -0,0 +1 @@ + diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/chromeos/kernel.keyblock b/Final_Zip/AIK/KSU/OFRP-R/bin/chromeos/kernel.keyblock new file mode 100755 index 0000000..9740be4 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/chromeos/kernel.keyblock differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/chromeos/kernel_data_key.vbprivk b/Final_Zip/AIK/KSU/OFRP-R/bin/chromeos/kernel_data_key.vbprivk new file mode 100755 index 0000000..8d392fb Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/chromeos/kernel_data_key.vbprivk differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/blobpack b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/blobpack new file mode 100755 index 0000000..685c6c0 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/blobpack differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/blobunpack b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/blobunpack new file mode 100755 index 0000000..2d96696 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/blobunpack differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/dhtbsign b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/dhtbsign new file mode 100755 index 0000000..f117b88 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/dumpimage b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/dumpimage new file mode 100755 index 0000000..8ba15d3 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/dumpimage differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/elftool b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/elftool new file mode 100755 index 0000000..b25dd56 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/elftool differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/futility b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/futility new file mode 100755 index 0000000..c830e31 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/futility differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/loki_tool b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/loki_tool new file mode 100755 index 0000000..d305760 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/loki_tool differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/lz4 b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/lz4 new file mode 100755 index 0000000..801bad4 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/lz4 differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/mboot b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/mboot new file mode 100755 index 0000000..023eab0 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/mboot differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/mkbootimg b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/mkbootimg new file mode 100755 index 0000000..ed68c2d Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/mkimage b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/mkimage new file mode 100755 index 0000000..8e97c0c Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/mkimage differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/mkmtkhdr b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/mkmtkhdr new file mode 100755 index 0000000..d71db24 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/pxa-mkbootimg b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/pxa-mkbootimg new file mode 100755 index 0000000..0636873 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/pxa-unpackbootimg b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/pxa-unpackbootimg new file mode 100755 index 0000000..8dbdecf Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/rkcrc b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/rkcrc new file mode 100755 index 0000000..45027f3 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/rkcrc differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/sony_dump b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/sony_dump new file mode 100755 index 0000000..2563e25 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/sony_dump differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/unpackbootimg b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/unpackbootimg new file mode 100755 index 0000000..b70aed5 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/unpackelf b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/unpackelf new file mode 100755 index 0000000..12e9057 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/i686/unpackelf differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/blobpack b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/blobpack new file mode 100755 index 0000000..90256d4 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/blobpack differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/blobunpack b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/blobunpack new file mode 100755 index 0000000..53374ff Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/dhtbsign b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/dhtbsign new file mode 100755 index 0000000..ccb7a67 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/dumpimage b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/dumpimage new file mode 100755 index 0000000..861bd68 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/elftool b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/elftool new file mode 100755 index 0000000..07a520d Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/elftool differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/futility b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/futility new file mode 100755 index 0000000..4d56ec3 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/futility differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/loki_tool b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/loki_tool new file mode 100755 index 0000000..4a1b74a Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/lz4 b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/lz4 new file mode 100755 index 0000000..8a4136b Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/lz4 differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/mboot b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/mboot new file mode 100755 index 0000000..8bf92d4 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/mboot differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/mkbootimg b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/mkbootimg new file mode 100755 index 0000000..2b628c3 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/mkimage b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/mkimage new file mode 100755 index 0000000..6419ea3 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/mkimage differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/mkmtkhdr b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/mkmtkhdr new file mode 100755 index 0000000..1ab256f Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/pxa-mkbootimg b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..5885720 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..d7b1b7d Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/rkcrc b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/rkcrc new file mode 100755 index 0000000..f218228 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/sony_dump b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/sony_dump new file mode 100755 index 0000000..6fc3696 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/unpackbootimg b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/unpackbootimg new file mode 100755 index 0000000..8f4fccf Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/unpackelf b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/unpackelf new file mode 100755 index 0000000..477e25d Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/linux/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/blobpack b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/blobpack new file mode 100755 index 0000000..2336ec0 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/blobpack differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/blobunpack b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/blobunpack new file mode 100755 index 0000000..834cb50 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/blobunpack differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/cpio b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/cpio new file mode 100755 index 0000000..b7e41f1 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/cpio differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/dd b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/dd new file mode 100755 index 0000000..b684139 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/dd differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/dhtbsign b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/dhtbsign new file mode 100755 index 0000000..b3ba0ba Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/dumpimage b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/dumpimage new file mode 100755 index 0000000..917c8ed Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/dumpimage differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/elftool b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/elftool new file mode 100755 index 0000000..27f12be Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/elftool differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/file b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/file new file mode 100755 index 0000000..8024db5 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/file differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/futility b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/futility new file mode 100755 index 0000000..8658249 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/futility differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/libiconv.2.dylib b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/libiconv.2.dylib new file mode 100755 index 0000000..ec61db0 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/libintl.8.dylib b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/libintl.8.dylib new file mode 100755 index 0000000..c297f0a Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/libintl.8.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/liblzma.5.dylib b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/liblzma.5.dylib new file mode 100755 index 0000000..126d338 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/liblzo2.2.dylib b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/liblzo2.2.dylib new file mode 100755 index 0000000..8a24e23 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/libmagic.1.dylib b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/libmagic.1.dylib new file mode 100755 index 0000000..92e6c7f Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/loki_tool b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/loki_tool new file mode 100755 index 0000000..7eecf68 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/loki_tool differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/lz4 b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/lz4 new file mode 100755 index 0000000..43126f8 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/lz4 differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/lzop b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/lzop new file mode 100755 index 0000000..fc3103c Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/lzop differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/mboot b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/mboot new file mode 100755 index 0000000..dfa0d3e Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/mboot differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/mkbootimg b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/mkbootimg new file mode 100755 index 0000000..82f05a9 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/mkimage b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/mkimage new file mode 100755 index 0000000..e760d6e Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/mkimage differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/mkmtkhdr b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/mkmtkhdr new file mode 100755 index 0000000..907ba0f Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/pxa-mkbootimg b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/pxa-mkbootimg new file mode 100755 index 0000000..12f8337 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/pxa-unpackbootimg b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/pxa-unpackbootimg new file mode 100755 index 0000000..2f1fe6c Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/rkcrc b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/rkcrc new file mode 100755 index 0000000..c2b70ce Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/rkcrc differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/sony_dump b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/sony_dump new file mode 100755 index 0000000..2f187e6 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/sony_dump differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/tail b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/tail new file mode 100755 index 0000000..99ee578 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/tail differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/truncate b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/truncate new file mode 100755 index 0000000..26bf16b Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/truncate differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/unpackbootimg b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/unpackbootimg new file mode 100755 index 0000000..e92b74e Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/unpackelf b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/unpackelf new file mode 100755 index 0000000..4ea11d0 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/unpackelf differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/xz b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/xz new file mode 100755 index 0000000..b501c14 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/i386/xz differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/blobpack b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/blobpack new file mode 100755 index 0000000..816fcf2 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/blobpack differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/blobunpack b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/blobunpack new file mode 100755 index 0000000..9241057 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/cpio b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/cpio new file mode 100755 index 0000000..991c5a8 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/cpio differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/dd b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/dd new file mode 100755 index 0000000..e927886 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/dd differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/dhtbsign b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/dhtbsign new file mode 100755 index 0000000..162fa88 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/dumpimage b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/dumpimage new file mode 100755 index 0000000..473538b Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/elftool b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/elftool new file mode 100755 index 0000000..0185019 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/elftool differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/file b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/file new file mode 100755 index 0000000..0b9f24c Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/file differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/futility b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/futility new file mode 100755 index 0000000..a28db4d Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/futility differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/libiconv.2.dylib b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/libiconv.2.dylib new file mode 100755 index 0000000..8f56eed Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/libintl.8.dylib b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/libintl.8.dylib new file mode 100755 index 0000000..f270e89 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/libintl.8.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/liblzma.5.dylib b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/liblzma.5.dylib new file mode 100755 index 0000000..39c6b96 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/liblzo2.2.dylib b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/liblzo2.2.dylib new file mode 100755 index 0000000..a05b7eb Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/libmagic.1.dylib b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/libmagic.1.dylib new file mode 100755 index 0000000..29ad687 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/loki_tool b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/loki_tool new file mode 100755 index 0000000..1b9f062 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/lz4 b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/lz4 new file mode 100755 index 0000000..bcee28d Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/lz4 differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/lzop b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/lzop new file mode 100755 index 0000000..8be71f4 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/lzop differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/mboot b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/mboot new file mode 100755 index 0000000..ad67219 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/mboot differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/mkbootimg b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/mkbootimg new file mode 100755 index 0000000..137aef2 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/mkimage b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/mkimage new file mode 100755 index 0000000..61d5a9c Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/mkimage differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/mkmtkhdr b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/mkmtkhdr new file mode 100755 index 0000000..99949d5 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/pxa-mkbootimg b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..0ec79a3 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..03fc864 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/rkcrc b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/rkcrc new file mode 100755 index 0000000..9b0b94a Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/sony_dump b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/sony_dump new file mode 100755 index 0000000..e219101 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/tail b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/tail new file mode 100755 index 0000000..59692eb Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/tail differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/truncate b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/truncate new file mode 100755 index 0000000..f2ed631 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/truncate differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/unpackbootimg b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/unpackbootimg new file mode 100755 index 0000000..a717c48 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/unpackelf b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/unpackelf new file mode 100755 index 0000000..d6edefa Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/xz b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/xz new file mode 100755 index 0000000..6faedc7 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP-R/bin/macos/x86_64/xz differ diff --git a/Final_Zip/AIK/KSU/OFRP-R/bin/magic b/Final_Zip/AIK/KSU/OFRP-R/bin/magic new file mode 100755 index 0000000..4530761 --- /dev/null +++ b/Final_Zip/AIK/KSU/OFRP-R/bin/magic @@ -0,0 +1,1916 @@ +#------------------------------------------------------------------------------ +# Slimmed down magic file for archives only +#------------------------------------------------------------------------------ +# $File: archive,v 1.145 2021/01/03 20:58:47 christos Exp $ +# archive: file(1) magic for archive formats (see also "msdos" for self- +# extracting compressed archives) +# +# cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc. +# pre-POSIX "tar" archives are also handled in the C code ../../src/is_tar.c. + +# POSIX tar archives +# URL: https://en.wikipedia.org/wiki/Tar_(computing) +# Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current +# header mainly padded with nul bytes +500 quad 0 +!:strength /2 +# filename or extended attribute printable strings in range space null til umlaut ue +>0 ubeshort >0x1F00 +>>0 ubeshort <0xFCFD +# last 4 header bytes often null but tar\0 in gtarfail2.tar gtarfail.tar-bad +# at https://sourceforge.net/projects/s-tar/files/testscripts/ +>>>508 ubelong&0x8B9E8DFF 0 +# nul, space or ascii digit 0-7 at start of mode +>>>>100 ubyte&0xC8 =0 +>>>>>101 ubyte&0xC8 =0 +# nul, space at end of check sum +>>>>>>155 ubyte&0xDF =0 +# space or ascii digit 0 at start of check sum +>>>>>>>148 ubyte&0xEF =0x20 +# minimal check and then display tar archive information which can also be +# embedded inside others like Android Backup, Clam AntiVirus database +>257 string !ustar +# header padded with nuls +>>257 ulong =0 +# GNU tar version 1.29 with non pax format option without refusing +# creates misleading V7 header for Long path, Multi-volume, Volume type +>>>156 ubyte 0x4c GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x4d GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x56 GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 default x tar archive (V7) +!:mime application/x-tar +#!:ext tar +# other stuff in padding +# some implementations add new fields to the blank area at the end of the header record +# created for example by DOS TAR 3.20g 1994 Tim V.Shapore with -j option +>>257 ulong !0 tar archive (old) +!:mime application/x-tar +#!:ext tar +# magic in newer, GNU, posix variants +>257 string =ustar +# 2 last char of magic and UStar version because string expression does not work +# 2 space characters followed by a null for GNU variant +>>261 ubelong =0x72202000 POSIX tar archive (GNU) +!:mime application/x-gtar +#!:ext tar/gtar +# UStar version with ASCII "00" +>>261 ubelong 0x72003030 POSIX +# gLOBAL and ExTENSION type only found in POSIX.1-2001 format +>>>156 ubyte 0x67 \b.1-2001 +>>>156 ubyte 0x78 \b.1-2001 +>>>156 ubyte x tar archive +!:mime application/x-ustar +#!:ext tar/ustar +# version with 2 binary nuls embedded in Android Backup like com.android.settings.ab +>>261 ubelong 0x72000000 tar archive (ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# not seen ustar variant with garbish version +>>261 default x tar archive (unknown ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# type flag of 1st tar archive member +#>156 ubyte x \b, %c-type +>156 ubyte x +>>156 ubyte 0 \b, file +>>156 ubyte 0x30 \b, file +>>156 ubyte 0x31 \b, hard link +>>156 ubyte 0x32 \b, symlink +>>156 ubyte 0x33 \b, char device +>>156 ubyte 0x34 \b, block device +>>156 ubyte 0x35 \b, directory +>>156 ubyte 0x36 \b, fifo +>>156 ubyte 0x37 \b, reserved +>>156 ubyte 0x4c \b, long path +>>156 ubyte 0x4d \b, multi volume +>>156 ubyte 0x56 \b, volume +>>156 ubyte 0x67 \b, global +>>156 ubyte 0x78 \b, extension +>>156 default x \b, type +>>>156 ubyte x '%c' +# name[100] +>0 string >\0 %-.60s +# mode mainly stored as an octal number in ASCII null or space terminated +>100 string >\0 \b, mode %-.7s +# user id mainly as octal numbers in ASCII null or space terminated +>108 string >\0 \b, uid %-.7s +# group id mainly as octal numbers in ASCII null or space terminated +>116 string >\0 \b, gid %-.7s +# size mainly as octal number in ASCII +>124 ubyte <0x38 +>>124 string >\0 \b, size %-.12s +# coding indicated by setting the high-order bit of the leftmost byte +>124 ubyte >0xEF \b, size 0x +>>124 ubyte !0xff \b%2.2x +>>125 ubyte !0xff \b%2.2x +>>126 ubyte !0xff \b%2.2x +>>127 ubyte !0xff \b%2.2x +>>128 ubyte !0xff \b%2.2x +>>129 ubyte !0xff \b%2.2x +>>130 ubyte !0xff \b%2.2x +>>131 ubyte !0xff \b%2.2x +>>132 ubyte !0xff \b%2.2x +>>133 ubyte !0xff \b%2.2x +>>134 ubyte !0xff \b%2.2x +>>135 ubyte !0xff \b%2.2x +# seconds since 0:0:0 1 jan 1970 UTC as octal number mainly in ASCII null or space terminated +>136 string >\0 \b, seconds %-.11s +# header checksum stored as an octal number in ASCII null or space terminated +#>148 string x \b, cksum %.7s +# linkname[100] +>157 string >\0 \b, linkname %-.40s +# additional fields for ustar +>257 string =ustar +# owner user name null terminated +>>265 string >\0 \b, user %-.32s +# group name null terminated +>>297 string >\0 \b, group %-.32s +# device major minor if not zero +>>329 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>329 string x \b, devmaj %-.7s +>>337 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>337 string x \b, devmin %-.7s +# prefix[155] +>>345 string >\0 \b, prefix %-.155s +# old non ustar/POSIX tar +>257 string !ustar +>>508 string =tar\0 +# padding[255] in old star +>>>257 string >\0 \b, padding: %-.40s +>>508 default x +# padding[255] in old tar sometimes comment field +>>>257 string >\0 \b, comment: %-.40s + +# Incremental snapshot gnu-tar format from: +# https://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html +0 string GNU\ tar- GNU tar incremental snapshot data +>&0 regex [0-9]\.[0-9]+-[0-9]+ version %s + +# cpio archives +# +# Yes, the top two "cpio archive" formats *are* supposed to just be "short". +# The idea is to indicate archives produced on machines with the same +# byte order as the machine running "file" with "cpio archive", and +# to indicate archives produced on machines with the opposite byte order +# from the machine running "file" with "cpio byte-swapped archive". +# +# The SVR4 "cpio(4)" hints that there are additional formats, but they +# are defined as "short"s; I think all the new formats are +# character-header formats and thus are strings, not numbers. +0 short 070707 cpio archive +!:mime application/x-cpio +0 short 0143561 cpio byte-swapped archive +!:mime application/x-cpio # encoding: swapped +0 string 070707 cpio ASCII archive (pre-SVR4 or odc) +0 string 070701 cpio ASCII archive (SVR4 with no CRC) +0 string 070702 cpio ASCII archive (SVR4 with CRC) + +# +# Various archive formats used by various versions of the "ar" +# command. +# + +# +# Original UNIX archive formats. +# They were written with binary values in host byte order, and +# the magic number was a host "int", which might have been 16 bits +# or 32 bits. We don't say "PDP-11" or "VAX", as there might have +# been ports to little-endian 16-bit-int or 32-bit-int platforms +# (x86?) using some of those formats; if none existed, feel free +# to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian +# 32-bit. There might have been big-endian ports of that sort as +# well. +# +0 leshort 0177555 very old 16-bit-int little-endian archive +0 beshort 0177555 very old 16-bit-int big-endian archive +0 lelong 0177555 very old 32-bit-int little-endian archive +0 belong 0177555 very old 32-bit-int big-endian archive + +0 leshort 0177545 old 16-bit-int little-endian archive +>2 string __.SYMDEF random library +0 beshort 0177545 old 16-bit-int big-endian archive +>2 string __.SYMDEF random library +0 lelong 0177545 old 32-bit-int little-endian archive +>4 string __.SYMDEF random library +0 belong 0177545 old 32-bit-int big-endian archive +>4 string __.SYMDEF random library + +# +# From "pdp" (but why a 4-byte quantity?) +# +0 lelong 0x39bed PDP-11 old archive +0 lelong 0x39bee PDP-11 4.0 archive + +# +# XXX - what flavor of APL used this, and was it a variant of +# some ar archive format? It's similar to, but not the same +# as, the APL workspace magic numbers in pdp. +# +0 long 0100554 apl workspace + +# +# System V Release 1 portable(?) archive format. +# +0 string = System V Release 1 ar archive +!:mime application/x-archive + +# +# Debian package; it's in the portable archive format, and needs to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "debian". +# +# Update: Joerg Jenderek +# URL: https://en.wikipedia.org/wiki/Deb_(file_format) +0 string =!\ndebian +# https://manpages.debian.org/testing/dpkg/dpkg-split.1.en.html +>14 string -split part of multipart Debian package +!:mime application/vnd.debian.binary-package +# udeb is used for stripped down deb file +#!:ext deb/udeb +>14 string -binary Debian binary package +!:mime application/vnd.debian.binary-package +# For ipk packager see also https://en.wikipedia.org/wiki/Opkg +#!:ext deb/udeb/ipk +# This should not happen +>14 default x Unknown Debian package +# NL terminated version; for most Debian cases this is 2.0 or 2.1 for split +>68 string >\0 (format %s) +#>68 string !2.0\n +#>>68 string x (format %.3s) +>68 string =2.0\n +# 2nd archive name=control archive name like control.tar.gz or control.tar.xz +>>72 string >\0 \b, with %.14s +# look for 3rd archive name=data archive name like data.tar.{gz,xz,bz2,lzma} +>>0 search/0x93e4f data.tar. \b, data compression +# the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised +# for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb +>>>&0 string x %.2s +# skip space (0x20 BSD) and slash (0x2f System V) character marking end of name +>>>&2 ubyte !0x20 +>>>>&-1 ubyte !0x2f +# display 3rd character of file name extension like 2 of bz2 or m of lzma +>>>>>&-1 ubyte x \b%c +>>>>>>&0 ubyte !0x20 +>>>>>>>&-1 ubyte !0x2f +# display 4th character of file name extension like a of lzma +>>>>>>>>&-1 ubyte x \b%c +# split debian package case +>68 string =2.1\n +# dpkg-1.18.25/dpkg-split/info.c +# NL terminated ASCII package name like ckermit +>>&0 string x \b, %s +# NL terminated package version like 302-5.3 +>>>&1 string x %s +# NL terminated MD5 checksum +>>>>&1 string x \b, MD5 %s +# NL terminated original package length +>>>>>&1 string x \b, unsplitted size %s +# NL terminated part length +>>>>>>&1 string x \b, part length %s +# NL terminated package part like n/m +>>>>>>>&1 string x \b, part %s +# NL terminated package architecture like armhf since dpkg 1.16.1 or later +>>>>>>>>&1 string x \b, %s + +# +# MIPS archive; they're in the portable archive format, and need to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "__________E". +# +0 string =!\n__________E MIPS archive +!:mime application/x-archive +>20 string U with MIPS Ucode members +>21 string L with MIPSEL members +>21 string B with MIPSEB members +>19 string L and an EL hash table +>19 string B and an EB hash table +>22 string X -- out of date + +# +# BSD/SVR2-and-later portable archive formats. +# +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/AR +# Reference: https://www.unix.com/man-page/opensolaris/3HEAD/ar.h/ +# Note: Mach-O universal binary in ./cafebabe is dependent +# TODO: unify current ar archive, MIPS archive, Debian package +# distinguish BSD, SVR; 32, 64 bit; HP from other 32-bit SVR; +# *.ar packages from *.a libraries. handle empty archive +0 string =!\n current ar archive +# print first and possibly second ar_name[16] for debugging purpose +#>8 string x \b, 1st "%.16s" +#>68 string x \b, 2nd "%.16s" +!:mime application/x-archive +# a in most case for libraries; lib for Microsoft libraries; ar else cases +#!:ext a/lib/ar +>8 string __.SYMDEF random library +# first member with long marked name __.SYMDEF SORTED implies BSD library +>68 string __.SYMDEF\ SORTED random library +# Reference: https://parisc.wiki.kernel.org/images-parisc/b/b2/Rad_11_0_32.pdf +# "archive file" entry moved from ./hp +# LST header system_id 0210h~PA-RISC 1.1,... identifies the target architecture +# LST header a_magic 0619h~relocatable library +>68 belong 0x020b0619 - PA-RISC1.0 relocatable library +>68 belong 0x02100619 - PA-RISC1.1 relocatable library +>68 belong 0x02110619 - PA-RISC1.2 relocatable library +>68 belong 0x02140619 - PA-RISC2.0 relocatable library +#EOF for common ar archives + +# +# "Thin" archive, as can be produced by GNU ar. +# +0 string =!\n thin archive with +>68 belong 0 no symbol entries +>68 belong 1 %d symbol entry +>68 belong >1 %d symbol entries + +0 search/1 -h- Software Tools format archive text + +# ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com) +# +# The first byte is the magic (0x1a), byte 2 is the compression type for +# the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS +# filename of the first file (null terminated). Since some types collide +# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%), +# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo. +0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000031a ARC archive data, packed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched +!:mime application/x-arc +# [JW] stuff taken from idarc, obviously ARC successors: +0 lelong&0x8080ffff 0x00000a1a PAK archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000141a ARC+ archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000481a HYP archive data +!:mime application/x-arc + +# Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk) +# I can't create either SPARK or ArcFS archives so I have not tested this stuff +# [GRR: the original entries collide with ARC, above; replaced with combined +# version (not tested)] +#0 byte 0x1a RISC OS archive (spark format) +0 string \032archive RISC OS archive (ArcFS format) +0 string Archive\000 RISC OS archive (ArcFS format) + +# All these were taken from idarc, many could not be verified. Unfortunately, +# there were many low-quality sigs, i.e. easy to trigger false positives. +# Please notify me of any real-world fishy/ambiguous signatures and I'll try +# to get my hands on the actual archiver and see if I find something better. [JW] +# probably many can be enhanced by finding some 0-byte or control char near the start + +# idarc calls this Crush/Uncompressed... *shrug* +0 string CRUSH Crush archive data +# Squeeze It (.sqz) +0 string HLSQZ Squeeze It archive data +# SQWEZ +0 string SQWEZ SQWEZ archive data +# HPack (.hpk) +0 string HPAK HPack archive data +# HAP +0 string \x91\x33HF HAP archive data +# MD/MDCD +0 string MDmd MDCD archive data +# LIM +0 string LIM\x1a LIM archive data +# SAR +3 string LH5 SAR archive data +# BSArc/BS2 +0 string \212\3SB\020\0 BSArc/BS2 archive data +# Bethesda Softworks Archive (Oblivion) +0 string BSA\0 BSArc archive data +>4 lelong x version %d +# MAR +2 string =-ah MAR archive data +# ACB +#0 belong&0x00f800ff 0x00800000 ACB archive data +# CPZ +# TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data +# JRC +0 string JRchive JRC archive data +# Quantum +0 string DS\0 Quantum archive data +# ReSOF +0 string PK\3\6 ReSOF archive data +# QuArk +0 string 7\4 QuArk archive data +# YAC +14 string YC YAC archive data +# X1 +0 string X1 X1 archive data +0 string XhDr X1 archive data +# CDC Codec (.dqt) +0 belong&0xffffe000 0x76ff2000 CDC Codec archive data +# AMGC +0 string \xad6" AMGC archive data +# NuLIB +0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data +# PakLeo +0 string LEOLZW PAKLeo archive data +# ChArc +0 string SChF ChArc archive data +# PSA +0 string PSA PSA archive data +# CrossePAC +0 string DSIGDCC CrossePAC archive data +# Freeze +0 string \x1f\x9f\x4a\x10\x0a Freeze archive data +# KBoom +0 string \xc2\xa8MP\xc2\xa8 KBoom archive data +# NSQ, must go after CDC Codec +0 string \x76\xff NSQ archive data +# DPA +0 string Dirk\ Paehl DPA archive data +# BA +# TODO: idarc says "bytes 0-2 == bytes 3-5" +# TTComp +# URL: http://fileformats.archiveteam.org/wiki/TTComp_archive +# Update: Joerg Jenderek +# GRR: line below is too general as it matches also Panorama database "TCDB 2003-10 demo.pan", others +0 string \0\6 +# look for first keyword of Panorama database *.pan +>12 search/261 DESIGN +# skip keyword with low entropy +>12 default x TTComp archive, binary, 4K dictionary +# (version 5.25) labeled the above entry as "TTComp archive data" +# From: Joerg Jenderek +# URL: https://wiki.68kmla.org/DiskCopy_4.2_format_specification +# reference: http://nulib.com/library/FTN.e00005.htm +0x52 ubeshort 0x0100 +# test for disk image size equal or above 400k +>0x40 ubelong >409599 +# test also for disk image size equal or below 1440k to skip +# windows7en.mbr UNICODE.DAT +>>0x40 ubelong <1474561 +# To skip Flags$StringJoiner.class with size 00106A61h test also for only 4 disk image sizes +# 00064000 for 400k GCR disks +# 000c8000 for 800k GCR disks +# 000b4000 for 720k MFM disks +# 00168000 for 1440k MFM disks +>>>0x40 ubelong&0xffE03fFF 0 +# display information of Apple DiskCopy 4.2 floppy image +# image pascal name padded with NULs like Microsoft Mail +>00 pstring/B x Apple DiskCopy 4.2 image %s +#!:mime application/octet-stream +!:mime application/x-dc42-floppy-image +!:apple dCpydImg +#!:ext image/dc42 +# data size in bytes like 409600 +>0x40 ubelong x \b, %u bytes +# for debugging purpose size in hexadecimal +#>0x40 ubelong x (0x%8.8x) +# tag size in bytes +>0x44 ubelong >0 \b, 0x%x tag size +# data checksum +#>0x48 ubelong x \b, 0x%x checksum +# tag checksum +#>0x4c ubelong x \b, 0x%x tag checksum +# disk encoding +>0x50 ubyte 0 \b, GCR CLV ssdd (400k) +>0x50 ubyte 1 \b, GCR CLV dsdd (800k) +>0x50 ubyte 2 \b, MFM CAV dsdd (720k) +>0x50 ubyte 3 \b, MFM CAV dshd (1440k) +>0x50 ubyte >3 \b, 0x%x encoding +# format byte +>0x51 ubyte x \b, 0x%x format +#>0x54 ubequad x \b, data 0x%16.16llx +# ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation? +0 string ESP ESP archive data +# ZPack +0 string \1ZPK\1 ZPack archive data +# Sky +0 string \xbc\x40 Sky archive data +# UFA +0 string UFA UFA archive data +# Dry +0 string =-H2O DRY archive data +# FoxSQZ +0 string FOXSQZ FoxSQZ archive data +# AR7 +0 string ,AR7 AR7 archive data +# PPMZ +0 string PPMZ PPMZ archive data +# MS Compress +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/MS-DOS_installation_compression +# Reference: https://hwiegman.home.xs4all.nl/fileformats/compress/szdd_kwaj_format.html +# Note: use correct version of extracting tool like EXPAND, UNPACK, DECOMP or 7Z +4 string \x88\xf0\x27 +# KWAJ variant +>0 string KWAJ MS Compress archive data, KWAJ variant +!:mime application/x-ms-compress-kwaj +# extension not working in version 5.32 +# magic/Magdir/archive, 284: Warning: EXTENSION type ` ??_' has bad char '?' +# file: line 284: Bad magic entry ' ??_' +#!:ext ??_ +# compression method (0-4) +>>8 uleshort x \b, %u method +# offset of compressed data +>>10 uleshort x \b, 0x%x offset +#>>(10.s) uleshort x +#>>>&-6 string x \b, TEST extension %-.3s +# header flags to mark header extensions +>>12 uleshort >0 \b, 0x%x flags +# 4 bytes: decompressed length of file +>>12 uleshort &0x01 +>>>14 ulelong x \b, original size: %u bytes +# 2 bytes: unknown purpose +# 2 bytes: length of unknown data + mentioned bytes +# 1-9 bytes: null-terminated file name +# 1-4 bytes: null-terminated file extension +>>12 uleshort &0x08 +>>>12 uleshort ^0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>>&16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>&16 string x %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>12 uleshort &0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +# 2 bytes: length of data + mentioned bytes +# +# SZDD variant Haruhiko Okumura's LZSS or 7z type MsLZ +>0 string SZDD MS Compress archive data, SZDD variant +!:mime application/x-ms-compress-szdd +#!:ext ??_ +# The character missing from the end of the filename (0=unknown) +>>9 string >\0 \b, %-.1s is last character of original name +# https://www.betaarchive.com/forum/viewtopic.php?t=26161 +# Compression mode: "A" (0x41) found but sometimes "B" in Windows 3.1 builds 026 and 034e +>>8 string !A \b, %-.1s method +>>10 ulelong >0 \b, original size: %u bytes +# QBasic SZDD variant +3 string \x88\xf0\x27 +>0 string SZ\x20 MS Compress archive data, QBasic variant +!:mime application/x-ms-compress-sz +#!:ext ??$ +>>8 ulelong >0 \b, original size: %u bytes + +# MP3 (archiver, not lossy audio compression) +0 string MP3\x1a MP3-Archiver archive data +# ZET +0 string OZ\xc3\x9d ZET archive data +# TSComp +0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data +# ARQ +0 string gW\4\1 ARQ archive data +# Squash +3 string OctSqu Squash archive data +# Terse +0 string \5\1\1\0 Terse archive data +# PUCrunch +0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data +# UHarc +0 string UHA UHarc archive data +# ABComp +0 string \2AB ABComp archive data +0 string \3AB2 ABComp archive data +# CMP +0 string CO\0 CMP archive data +# Splint +0 string \x93\xb9\x06 Splint archive data +# InstallShield +0 string \x13\x5d\x65\x8c InstallShield Z archive Data +# Gather +1 string GTH Gather archive data +# BOA +0 string BOA BOA archive data +# RAX +0 string ULEB\xa RAX archive data +# Xtreme +0 string ULEB\0 Xtreme archive data +# Pack Magic +0 string @\xc3\xa2\1\0 Pack Magic archive data +# BTS +0 belong&0xfeffffff 0x1a034465 BTS archive data +# ELI 5750 +0 string Ora\ ELI 5750 archive data +# QFC +0 string \x1aFC\x1a QFC archive data +0 string \x1aQF\x1a QFC archive data +# PRO-PACK +0 string RNC PRO-PACK archive data +# 777 +0 string 777 777 archive data +# LZS221 +0 string sTaC LZS221 archive data +# HPA +0 string HPA HPA archive data +# Arhangel +0 string LG Arhangel archive data +# EXP1, uses bzip2 +0 string 0123456789012345BZh EXP1 archive data +# IMP +0 string IMP\xa IMP archive data +# NRV +0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data +# Squish +0 string \x73\xb2\x90\xf4 Squish archive data +# Par +0 string PHILIPP Par archive data +0 string PAR Par archive data +# HIT +0 string UB HIT archive data +# SBX +0 belong&0xfffff000 0x53423000 SBX archive data +# NaShrink +0 string NSK NaShrink archive data +# SAPCAR +0 string #\ CAR\ archive\ header SAPCAR archive data +0 string CAR\ 2.00RG SAPCAR archive data +# Disintegrator +0 string DST Disintegrator archive data +# ASD +0 string ASD ASD archive data +# InstallShield CAB +0 string ISc( InstallShield CAB +# TOP4 +0 string T4\x1a TOP4 archive data +# BatComp left out: sig looks like COM executable +# so TODO: get real 4dos batcomp file and find sig +# BlakHole +0 string BH\5\7 BlakHole archive data +# BIX +0 string BIX0 BIX archive data +# ChiefLZA +0 string ChfLZ ChiefLZA archive data +# Blink +0 string Blink Blink archive data +# Logitech Compress +0 string \xda\xfa Logitech Compress archive data +# ARS-Sfx (FIXME: really a SFX? then goto COM/EXE) +1 string (C)\ STEPANYUK ARS-Sfx archive data +# AKT/AKT32 +0 string AKT32 AKT32 archive data +0 string AKT AKT archive data +# NPack +0 string MSTSM NPack archive data +# PFT +0 string \0\x50\0\x14 PFT archive data +# SemOne +0 string SEM SemOne archive data +# PPMD +0 string \x8f\xaf\xac\x84 PPMD archive data +# FIZ +0 string FIZ FIZ archive data +# MSXiE +0 belong&0xfffff0f0 0x4d530000 MSXiE archive data +# DeepFreezer +0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data +# DC +0 string =2 string \x2\x4 Xpack DiskImage archive data +#!:ext xdi +# XPack Data +# *.xpa updated by Joerg Jenderek Sep 2015 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/ +0 string xpa XPA +#!:ext xpa +# XPA32 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/xpa32.zip +# created by XPA32.EXE version 1.0.2 for Windows +>0 string xpa\0\1 \b32 archive data +# created by XPACK.COM version 1.67m or 1.67r with short 0x1800 +>3 ubeshort !0x0001 \bck archive data +# XPack Single Data +# changed by Joerg Jenderek Sep 2015 back to like in version 5.12 +# letter 'I'+ acute accent is equivalent to \xcd +0 string \xcd\ jm Xpack single archive data +#!:mime application/x-xpa-compressed +#!:ext xpa + +# TODO: missing due to unknown magic/magic at end of file: +#DWC +#ARG +#ZAR +#PC/3270 +#InstallIt +#RKive +#RK +#XPack Diskimage + +# These were inspired by idarc, but actually verified +# Dzip archiver (.dz) +# Update: Joerg Jenderek +# URL: http://speeddemosarchive.com/dzip/ +# reference: http://speeddemosarchive.com/dzip/dz29src.zip/main.c +# GRR: line below is too general as it matches also ASCII texts like Doszip commander help dz.txt +0 string DZ +# latest version is 2.9 dated 7 may 2003 +>2 byte <4 Dzip archive data +!:mime application/x-dzip +#!:ext dz +>>2 byte x \b, version %i +>>3 byte x \b.%i +>>4 ulelong x \b, offset 0x%x +>>8 ulelong x \b, %u files +# ZZip archiver (.zz) +0 string ZZ\ \0\0 ZZip archive data +0 string ZZ0 ZZip archive data +# PAQ archiver (.paq) +0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data +0 string PAQ PAQ archive data +>3 byte&0xf0 0x30 +>>3 byte x (v%c) +# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP) +0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data +0 string JARCS JAR (ARJ Software, Inc.) archive data + +# ARJ archiver (jason@jarthur.Claremont.EDU) +0 leshort 0xea60 ARJ archive data +!:mime application/x-arj +>5 byte x \b, v%d, +>8 byte &0x04 multi-volume, +>8 byte &0x10 slash-switched, +>8 byte &0x20 backup, +>34 string x original name: %s, +>7 byte 0 os: MS-DOS +>7 byte 1 os: PRIMOS +>7 byte 2 os: Unix +>7 byte 3 os: Amiga +>7 byte 4 os: Macintosh +>7 byte 5 os: OS/2 +>7 byte 6 os: Apple ][ GS +>7 byte 7 os: Atari ST +>7 byte 8 os: NeXT +>7 byte 9 os: VAX/VMS +>3 byte >0 %d] +# [JW] idarc says this is also possible +2 leshort 0xea60 ARJ archive data + +# HA archiver (Greg Roelofs, newt@uchicago.edu) +# This is a really bad format. A file containing HAWAII will match this... +#0 string HA HA archive data, +#>2 leshort =1 1 file, +#>2 leshort >1 %hu files, +#>4 byte&0x0f =0 first is type CPY +#>4 byte&0x0f =1 first is type ASC +#>4 byte&0x0f =2 first is type HSC +#>4 byte&0x0f =0x0e first is type DIR +#>4 byte&0x0f =0x0f first is type SPECIAL +# suggestion: at least identify small archives (<1024 files) +0 belong&0xffff00fc 0x48410000 HA archive data +>2 leshort =1 1 file, +>2 leshort >1 %u files, +>4 byte&0x0f =0 first is type CPY +>4 byte&0x0f =1 first is type ASC +>4 byte&0x0f =2 first is type HSC +>4 byte&0x0f =0x0e first is type DIR +>4 byte&0x0f =0x0f first is type SPECIAL + +# HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz) +0 string HPAK HPACK archive data + +# JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net +0 string \351,\001JAM\ JAM archive, +>7 string >\0 version %.4s +>0x26 byte =0x27 - +>>0x2b string >\0 label %.11s, +>>0x27 lelong x serial %08x, +>>0x36 string >\0 fstype %.8s + +# Very old RAR archive +# https://jasonblanks.com/wp-includes/images/papers/KnowyourarchiveRAR.pdf +0 string RE\x7e\x5e RAR archive data (26 string \x8\0\0\0mimetypeapplication/ + +# KOffice / OpenOffice & StarOffice / OpenDocument formats +# From: Abel Cheung + +# KOffice (1.2 or above) formats +# (mimetype contains "application/vnd.kde.") +>>50 string vnd.kde. KOffice (>=1.2) +>>>58 string karbon Karbon document +>>>58 string kchart KChart document +>>>58 string kformula KFormula document +>>>58 string kivio Kivio document +>>>58 string kontour Kontour document +>>>58 string kpresenter KPresenter document +>>>58 string kspread KSpread document +>>>58 string kword KWord document + +# OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) +# (mimetype contains "application/vnd.sun.xml.") +# URL: https://en.wikipedia.org/wiki/OpenOffice.org_XML +# reference: http://fileformats.archiveteam.org/wiki/OpenOffice.org_XML +>>50 string vnd.sun.xml. OpenOffice.org 1.x +>>>62 string writer Writer +>>>>68 byte !0x2e document +!:mime application/vnd.sun.xml.writer +#!:ext sxw +>>>>68 string .template template +!:mime application/vnd.sun.xml.writer.template +#!:ext stw +>>>>68 string .web Web template +!:mime application/vnd.sun.xml.writer.web +#!:ext stw +>>>>68 string .global global document +!:mime application/vnd.sun.xml.writer.global +#!:ext sxg +>>>62 string calc Calc +>>>>66 byte !0x2e spreadsheet +!:mime application/vnd.sun.xml.calc +#!:ext sxc +>>>>66 string .template template +!:mime application/vnd.sun.xml.calc.template +#!:ext stc +>>>62 string draw Draw +>>>>66 byte !0x2e document +!:mime application/vnd.sun.xml.draw +#!:ext sxd +>>>>66 string .template template +!:mime application/vnd.sun.xml.draw.template +#!:ext std +>>>62 string impress Impress +>>>>69 byte !0x2e presentation +!:mime application/vnd.sun.xml.impress +#!:ext sxi +>>>>69 string .template template +!:mime application/vnd.sun.xml.impress.template +#!:ext sti +>>>62 string math Math document +!:mime application/vnd.sun.xml.math +#!:ext sxm +>>>62 string base Database file +!:mime application/vnd.sun.xml.base +#!:ext sdb + +# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) +# URL: http://fileformats.archiveteam.org/wiki/OpenDocument +# https://lists.oasis-open.org/archives/office/200505/msg00006.html +# (mimetype contains "application/vnd.oasis.opendocument.") +>>50 string vnd.oasis.opendocument. OpenDocument +>>>73 string text +>>>>77 byte !0x2d Text +!:mime application/vnd.oasis.opendocument.text +#!:ext odt +>>>>77 string -template Text Template +!:mime application/vnd.oasis.opendocument.text-template +#!:ext ott +>>>>77 string -web HTML Document Template +!:mime application/vnd.oasis.opendocument.text-web +#!:ext oth +>>>>77 string -master Master Document +!:mime application/vnd.oasis.opendocument.text-master +#!:ext odm +>>>73 string graphics +>>>>81 byte !0x2d Drawing +!:mime application/vnd.oasis.opendocument.graphics +#!:ext odg +>>>>81 string -template Drawing Template +!:mime application/vnd.oasis.opendocument.graphics-template +#!:ext otg +>>>73 string presentation +>>>>85 byte !0x2d Presentation +!:mime application/vnd.oasis.opendocument.presentation +#!:ext odp +>>>>85 string -template Presentation Template +!:mime application/vnd.oasis.opendocument.presentation-template +#!:ext otp +>>>73 string spreadsheet +>>>>84 byte !0x2d Spreadsheet +!:mime application/vnd.oasis.opendocument.spreadsheet +#!:ext ods +>>>>84 string -template Spreadsheet Template +!:mime application/vnd.oasis.opendocument.spreadsheet-template +#!:ext ots +>>>73 string chart +>>>>78 byte !0x2d Chart +!:mime application/vnd.oasis.opendocument.chart +#!:ext odc +>>>>78 string -template Chart Template +!:mime application/vnd.oasis.opendocument.chart-template +#!:ext otc +>>>73 string formula +>>>>80 byte !0x2d Formula +!:mime application/vnd.oasis.opendocument.formula +#!:ext odf +>>>>80 string -template Formula Template +!:mime application/vnd.oasis.opendocument.formula-template +#!:ext otf +# https://www.loc.gov/preservation/digital/formats/fdd/fdd000441.shtml +>>>73 string database Database +!:mime application/vnd.oasis.opendocument.database +#!:ext odb +# Valid for LibreOffice Base 6.0.1.1 at least +>>>73 string base Database +# https://bugs.documentfoundation.org/show_bug.cgi?id=45854 +!:mime application/vnd.oasis.opendocument.database +#!:mime application/vnd.oasis.opendocument.base +#!:ext odb +>>>73 string image +>>>>78 byte !0x2d Image +!:mime application/vnd.oasis.opendocument.image +#!:ext odi +>>>>78 string -template Image Template +!:mime application/vnd.oasis.opendocument.image-template +#!:ext oti + +# EPUB (OEBPS) books using OCF (OEBPS Container Format) +# https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. +# From: Ralf Brown +>>50 string epub+zip EPUB document +!:mime application/epub+zip + +# From: Joerg Jenderek +# URL: http://en.wikipedia.org/wiki/CorelDRAW +# NOTE: version; til 2 WL-based; from 3 til 13 by ./riff; from 14 zip based +>>50 string x-vnd.corel. Corel +>>>62 string draw.document+zip Draw drawing, version 14-16 +!:mime application/x-vnd.corel.draw.document+zip +#!:ext cdr +>>>62 string draw.template+zip Draw template, version 14-16 +!:mime application/x-vnd.corel.draw.template+zip +#!:ext cdrt +>>>62 string zcf.draw.document+zip Draw drawing, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.document+zip +#!:ext cdr +>>>62 string zcf.draw.template+zip Draw template, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.template+zip +#!:ext cdt/cdrt +# URL: http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html +>>>62 string zcf.pattern+zip Draw pattern, version 22 +!:mime application/x-vnd.corel.zcf.pattern+zip +#!:ext pat +# URL: https://en.wikipedia.org/wiki/Corel_Designer +# Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer +# Note: called by TrID "Corel DESIGN graphics" +>>>62 string designer.document+zip DESIGNER graphics, version 14-16 +!:mime application/x-vnd.corel.designer.document+zip +#!:ext des +>>>62 string zcf.designer.document+zip DESIGNER graphics, version 17-21 +!:mime application/x-vnd.corel.zcf.designer.document+zip +#!:ext des +# URL: http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/ +# CorelDRAW-Corel-Symbol-Library-CSL.html +>>>62 string symbol.library+zip Symbol Library, version 6-16.3 +!:mime application/x-vnd.corel.symbol.library+zip +#!:ext csl +>>>62 string zcf.symbol.library+zip Symbol Library, version 17-22 +!:mime application/x-vnd.corel.zcf.symbol.library+zip +#!:ext csl + +# Catch other ZIP-with-mimetype formats +# In a ZIP file, the bytes immediately after a member's contents are +# always "PK". The 2 regex rules here print the "mimetype" member's +# contents up to the first 'P'. Luckily, most MIME types don't contain +# any capital 'P's. This is a kludge. +# (mimetype contains "application/") +>>50 default x Zip data +>>>38 regex [!-OQ-~]+ (MIME type "%s"?) +!:mime application/zip +# (mimetype contents other than "application/*") +>26 string \x8\0\0\0mimetype +>>38 string !application/ +>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?) +!:mime application/zip + +# Java Jar files +>(26.s+30) leshort 0xcafe Java archive data (JAR) +!:mime application/java-archive + +# iOS App +>(26.s+30) leshort !0xcafe +>>26 string !\x8\0\0\0mimetype +>>>30 string Payload/ +>>>>38 search/64 .app/ iOS App +!:mime application/x-ios-app + +>30 search/100/b application/epub+zip EPUB document +!:mime application/epub+zip + +# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) +# Next line excludes specialized formats: +>(26.s+30) leshort !0xcafe +>>30 search/100/b !application/epub+zip +>>>26 string !\x8\0\0\0mimetype Zip archive data +!:mime application/zip +>>>>4 beshort x \b, at least +>>>>4 beshort x to extract +>>>>8 beshort x \b, compression method= +>>>>0x161 string WINZIP \b, WinZIP self-extracting + +# StarView Metafile +# From Pierre Ducroquet +0 string VCLMTF StarView MetaFile +>6 beshort x \b, version %d +>8 belong x \b, size %d + +# Zoo archiver +20 lelong 0xfdc4a7dc Zoo archive data +!:mime application/x-zoo +>4 byte >48 \b, v%c. +>>6 byte >47 \b%c +>>>7 byte >47 \b%c +>32 byte >0 \b, modify: v%d +>>33 byte x \b.%d+ +>42 lelong 0xfdc4a7dc \b, +>>70 byte >0 extract: v%d +>>>71 byte x \b.%d+ + +# Shell archives +10 string #\ This\ is\ a\ shell\ archive shell archive text +!:mime application/octet-stream + +# +# LBR. NB: May conflict with the questionable +# "binary Computer Graphics Metafile" format. +# +0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data +# +# From Rafael Laboissiere +# The Project Revision Control System (see +# http://prcs.sourceforge.net) generates a packaged project +# file which is recognized by the following entry: +0 leshort 0xeb81 PRCS packaged project + +# Microsoft cabinets +# by David Necas (Yeti) +#0 string MSCF\0\0\0\0 Microsoft cabinet file data, +#>25 byte x v%d +#>24 byte x \b.%d +# MPi: All CABs have version 1.3, so this is pointless. +# Better magic in debian-additions. + +# GTKtalog catalogs +# by David Necas (Yeti) +4 string gtktalog\ GTKtalog catalog data, +>13 string 3 version 3 +>>14 beshort 0x677a (gzipped) +>>14 beshort !0x677a (not gzipped) +>13 string >3 version %s + +############################################################################ +# Parity archive reconstruction file, the 'par' file format now used on Usenet. +0 string PAR\0 PARity archive data +>48 leshort =0 - Index file +>48 leshort >0 - file number %d + +# Felix von Leitner +0 string d8:announce BitTorrent file +!:mime application/x-bittorrent +# Durval Menezes, +0 string d13:announce-list BitTorrent file +!:mime application/x-bittorrent +0 string d7:comment BitTorrent file +!:mime application/x-bittorrent +0 string d4:info BitTorrent file +!:mime application/x-bittorrent + +# Atari MSA archive - Teemu Hukkanen +0 beshort 0x0e0f Atari MSA archive data +>2 beshort x \b, %d sectors per track +>4 beshort 0 \b, 1 sided +>4 beshort 1 \b, 2 sided +>6 beshort x \b, starting track: %d +>8 beshort x \b, ending track: %d + +# Alternate ZIP string (amc@arwen.cs.berkeley.edu) +0 string PK00PK\003\004 Zip archive data +!:mime application/zip +#!:ext zip/cbz + +# ACE archive (from http://www.wotsit.org/download.asp?f=ace) +# by Stefan `Sec` Zehl +7 string **ACE** ACE archive data +>15 byte >0 version %d +>16 byte =0x00 \b, from MS-DOS +>16 byte =0x01 \b, from OS/2 +>16 byte =0x02 \b, from Win/32 +>16 byte =0x03 \b, from Unix +>16 byte =0x04 \b, from MacOS +>16 byte =0x05 \b, from WinNT +>16 byte =0x06 \b, from Primos +>16 byte =0x07 \b, from AppleGS +>16 byte =0x08 \b, from Atari +>16 byte =0x09 \b, from Vax/VMS +>16 byte =0x0A \b, from Amiga +>16 byte =0x0B \b, from Next +>14 byte x \b, version %d to extract +>5 leshort &0x0080 \b, multiple volumes, +>>17 byte x \b (part %d), +>5 leshort &0x0002 \b, contains comment +>5 leshort &0x0200 \b, sfx +>5 leshort &0x0400 \b, small dictionary +>5 leshort &0x0800 \b, multi-volume +>5 leshort &0x1000 \b, contains AV-String +>>30 string \x16*UNREGISTERED\x20VERSION* (unregistered) +>5 leshort &0x2000 \b, with recovery record +>5 leshort &0x4000 \b, locked +>5 leshort &0x8000 \b, solid +# Date in MS-DOS format (whatever that is) +#>18 lelong x Created on + +# sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann +# +0x1A string sfArk sfArk compressed Soundfont +>0x15 string 2 +>>0x1 string >\0 Version %s +>>0x2A string >\0 : %s + +# DR-DOS 7.03 Packed File *.??_ +# Reference: http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm +# Note: unpacked by PNUNPACK.EXE +0 string Packed\ File\ +# by looking for Control-Z skip ASCII text starting with Packed File +>0x18 ubyte 0x1a Personal NetWare Packed File +!:mime application/x-novell-compress +#!:ext ??_ +>>12 string x \b, was "%.12s" +# 1 or 2 +#>>0x19 ubyte x \b, at 0x19 %u +>>0x1b ulelong x with %u bytes + +# EET archive +# From: Tilman Sauerbeck +0 belong 0x1ee7ff00 EET archive +!:mime application/x-eet + +# rzip archives +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +# From: Joerg Jenderek +# URL: https://help.foxitsoftware.com/kb/install-fzip-file.php +# reference: http://mark0.net/download/triddefs_xml.7z/ +# defs/f/fzip.trid.xml +# Note: unknown compression; No "PK" zip magic; normally in directory like +# "%APPDATA%\Foxit Software\Addon\Foxit Reader\Install" +0 ubequad 0x2506781901010000 Foxit add-on/update +!:mime application/x-fzip +#!:ext fzip + +# From: "Robert Dale" +0 belong 123 dar archive, +>4 belong x label "%.8x +>>8 belong x %.8x +>>>12 beshort x %.4x" +>14 byte 0x54 end slice +>14 beshort 0x4e4e multi-part +>14 beshort 0x4e53 multi-part, with -S + +# Symbian installation files +# https://www.thouky.co.uk/software/psifs/sis.html +# http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf +8 lelong 0x10000419 Symbian installation file +!:mime application/vnd.symbian.install +>4 lelong 0x1000006D (EPOC release 3/4/5) +>4 lelong 0x10003A12 (EPOC release 6) +0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x) +!:mime x-epoc/x-sisx-app + +# From "Nelson A. de Oliveira" +0 string MPQ\032 MoPaQ (MPQ) archive + +# From: "Nelson A. de Oliveira" +# .kgb +0 string KGB_arch KGB Archiver file +>10 string x with compression level %.1s + +# Type: Parity Archive +# From: Daniel van Eeden +0 string PAR2 Parity Archive Volume Set + +# Bacula volume format. (Volumes always start with a block header.) +# URL: https://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html +# From: Adam Buchbinder +12 string BB02 Bacula volume +>20 bedate x \b, started %s + +# ePub is XHTML + XML inside a ZIP archive. The first member of the +# archive must be an uncompressed file called 'mimetype' with contents +# 'application/epub+zip' + + +# From: "Michael Gorny" +# ZPAQ: http://mattmahoney.net/dc/zpaq.html +0 string zPQ ZPAQ stream +>3 byte x \b, level %d +# From: Barry Carter +# https://encode.ru/threads/456-zpaq-updates/page32 +0 string 7kSt ZPAQ file + +# BBeB ebook, unencrypted (LRF format) +# URL: https://www.sven.de/librie/Librie/LrfFormat +# From: Adam Buchbinder +0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted +>8 beshort x \b, version %d +>36 byte 1 \b, front-to-back +>36 byte 16 \b, back-to-front +>42 beshort x \b, (%dx, +>44 beshort x %d) + +# Symantec GHOST image by Joerg Jenderek at May 2014 +# https://us.norton.com/ghost/ +# https://www.garykessler.net/library/file_sigs.html +0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image +# *.GHO +>2 ubyte&0x08 0x00 \b, first file +# *.GHS or *.[0-9] with cns program option +>2 ubyte&0x08 0x08 \b, split file +# part of split index interesting for *.ghs +>>4 ubyte x id=0x%x +# compression tag minus one equals numeric compression command line switch z[1-9] +>3 ubyte 0 \b, no compression +>3 ubyte 2 \b, fast compression (Z1) +>3 ubyte 3 \b, medium compression (Z2) +>3 ubyte >3 +>>3 ubyte <11 \b, compression (Z%d-1) +>2 ubyte&0x08 0x00 +# ~ 30 byte password field only for *.gho +>>12 ubequad !0 \b, password protected +>>44 ubyte !1 +# 1~Image All, sector-by-sector only for *.gho +>>>10 ubyte 1 \b, sector copy +# 1~Image Boot track only for *.gho +>>>43 ubyte 1 \b, boot track +# 1~Image Disc only for *.gho implies Image Boot track and sector copy +>>44 ubyte 1 \b, disc sector copy +# optional image description only *.gho +>>0xff string >\0 "%-.254s" +# look for DOS sector end sequence +>0xE08 search/7776 \x55\xAA +>>&-512 indirect x \b; contains + +# Google Chrome extensions +# https://developer.chrome.com/extensions/crx +# https://developer.chrome.com/extensions/hosting +0 string Cr24 Google Chrome extension +!:mime application/x-chrome-extension +>4 ulong x \b, version %u + +# SeqBox - Sequenced container +# ext: sbx, seqbox +# Marco Pontello marcopon@gmail.com +# reference: https://github.com/MarcoPon/SeqBox +0 string SBx SeqBox, +>3 byte x version %d + +# LyNX archive +56 string USE\040LYNX\040TO\040DISSOLVE\040THIS\040FILE LyNX archive + +# From: Joerg Jenderek +# URL: https://www.acronis.com/ +# Reference: https://en.wikipedia.org/wiki/TIB_(file_format) +# Note: only tested with True Image 2013 Build 5962 and 2019 Build 14110 +0 ubequad 0xce24b9a220000000 Acronis True Image backup +!:mime application/x-acronis-tib +#!:ext tib +# 01000000 +#>20 ubelong x \b, at 20 0x%x +# 20000000 +#>28 ubelong x \b, at 28 0x%x +# strings like "Generic- SD/MMC 1.00" "Unknown Disk" "Msft Virtual Disk 1.0" +# ??? +# strings like "\Device\0000011e" "\Device\0000015a" +#>0 search/0x6852300/cs \\Device\\ +#>>&-1 pstring x \b, %s +# "\Device\HarddiskVolume30" "\Device\HarddiskVolume39" +#>>>&1 search/180/cs \\Device\\ +#>>>>&-1 pstring x \b, %s +#>>>>>&0 search/29/cs \0\0\xc8\0 +# disk label +#>>>>>>&10 lestring16 x \b, disk label %11.11s +#>>>>>>&9 plestring16 x \b, disk label "%11.11s" +#>>>>>>&10 ubequad x %16.16llx + + +# Gentoo XPAK binary package +# by Michal Gorny +# https://gitweb.gentoo.org/proj/portage.git/tree/man/xpak.5 +-4 string STOP +>-16 string XPAKSTOP Gentoo binary package (XPAK) + +# From: Joerg Jenderek +# URL: https://kodi.wiki/view/TexturePacker +# Reference: https://mirrors.kodi.tv/releases/source/17.3-Krypton.tar.gz +# /xbmc-Krypton/xbmc/guilib/XBTF.h +# /xbmc-Krypton/xbmc/guilib/XBTF.cpp +0 string XBTF +# skip ASCII text by looking for terminating \0 of path +>264 ubyte 0 XBMC texture package +!:mime application/x-xbmc-xbt +#!:ext xbt +# XBTF_VERSION 2 +>>4 string !2 \b, version %-.1s +# nofFiles /xbmc-Krypton/xbmc/guilib/XBTFReader.cpp +>>5 ulelong x \b, %u file +# plural s +>>5 ulelong >1 \bs +# path[CXBTFFile[MaximumPathLength=256] +>>9 string x \b, 1st %s + +# ALZIP archive +# by Hyungjun Park , Hajin Jang +# http://kippler.com/win/unalz/ +# https://salsa.debian.org/l10n-korean-team/unalz +0 string ALZ\001 ALZ archive data +#!:ext alz + +# https://cf-aldn.altools.co.kr/setup/EGG_Specification.zip +0 string EGGA EGG archive data, +#!:ext egg +>5 byte x version %u +>4 byte x \b.%u +>>0x0E ulelong =0x08E28222 +>>0x0E ulelong =0x24F5A262 \b, split +>>0x0E ulelong =0x24E5A060 \b, solid +>>0x0E default x \b, unknown + +# PAQ9A archive +# URL: http://mattmahoney.net/dc/#paq9a +# Note: Line 1186 of paq9a.cpp gives the magic bytes +0 string pQ9\001 PAQ9A archive + +#------------------------------------------------------------------------------ +# $File: compress,v 1.80 2021/03/15 17:49:24 christos Exp $ +# compress: file(1) magic for pure-compression formats (no archives) +# +# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. +# +# Formats for various forms of compressed data +# Formats for "compress" proper have been moved into "compress.c", +# because it tries to uncompress it to figure out what's inside. + +# standard unix compress +0 string \037\235 compress'd data +!:mime application/x-compress +!:apple LZIVZIVU +>2 byte&0x80 >0 block compressed +>2 byte&0x1f x %d bits + +# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver) +# URL: https://en.wikipedia.org/wiki/Gzip +# Reference: https://tools.ietf.org/html/rfc1952 +# Update: Joerg Jenderek, Apr 2019 +# Edited by Chris Chittleborough , March 2002 +# * Original filename is only at offset 10 if "extra field" absent +# * Produce shorter output - notably, only report compression methods +# other than 8 ("deflate", the only method defined in RFC 1952). +# Note: find defs -iname '*.trid.xml' -exec grep -q '1F8B08' {} \; -ls +# TODO: +# FBR Blueberry FlashBack screen Record https://www.flashbackrecorder.com/ +# KPR KOffice/Calligra KPresenter application/x-kpresenter +# KPT KOffice/Calligra KPresenter template? application/x-kpresenter +# SAV Diggles Saved Game File http://www.innonics.com +# SAV FarCry (demo) saved game http://www.farcry-thegame.com +# DAT ZOAGZIP game data format http://en.wikipedia.org/wiki/SD_Gundam_Capsule_Fighter +0 string \037\213 +# to display gzip compressed (strength=100=2*50) before other (strength=50)? +#!:strength * 2 +# no FNAME and FCOMMENT bit implies no file name/comment. That means only binary +>3 byte&0x18 =0 +# For binary gzipped no ASCII text should occur +# mcd-monu-cad.trid.xml +>>10 string MCD Monu-Cad Drawing, Component or Font +#>>36 string Created\ with\ MONU-CAD +#!:mime application/octet-stream +# http://fileformats.archiveteam.org/wiki/Monu-CAD +# http://www.monucad.com/downloads/FullDemo-2005.EXE +# /HANDS96.MCC Component +# /DEMO_DD01.MCD Drawing +# /MCALF020.FNT Font +#!:ext mcc/mcd/fnt +# http://www.generalcadd.com +>>10 string GXD General CADD, Drawing or Component +#!:mime application/octet-stream +# /gxc/BUILDINGEDGE.gxc Component +# /gxd/HOCKETT-STPAUL-WRHSE.gxd Drawing +# /gxd/POWERLAND-MILL-ADD-11.gxd Drawing v9.1.06 +#!:ext gxc/gxd +#>>>13 ubyte 0 \b, version 0 +>>>13 string 09 \b, version 9 +# other gzipped binary like gzipped tar, VirtualBox extension package,... +>>10 default x gzip compressed data +!:mime application/gzip +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# gzipped TAR or VirtualBox extension package +#!:mime application/x-compressed-tar +#!:mime application/x-virtualbox-vbox-extpack +# https://www.w3.org/TR/SVG/mimereg.html +#!:mime image/image/svg+xml-compressed +# zlib.3.gz +# microcode-20180312.tgz +# tpz same as tgz +# lua-md5_1.2-1_i386_i486.ipk https://en.wikipedia.org/wiki/Opkg +# Oracle_VM_VirtualBox_Extension_Pack-5.0.12-104815.vbox-extpack +#!:ext gz/tgz/tpz/ipk/vbox-extpack/svgz +# FNAME/FCOMMENT bit implies file name/comment as iso-8859-1 text +>3 byte&0x18 >0 gzip compressed data +!:mime application/gzip +# gzipped tar, gzipped Abiword document +#!:mime application/x-compressed-tar +#!:mime application/x-abiword-compressed +#!:mime image/image/svg+xml-compressed +# kleopatra_splashscreen.svgz gzipped .svg +#!:ext gz/tgz/tpz/zabw/svgz +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# display information of gzip compressed files +#>2 byte x THIS iS GZIP +>2 byte <8 \b, reserved method +>2 byte >8 \b, unknown method +>3 byte &0x01 \b, ASCII +>3 byte &0x02 \b, has CRC +>3 byte &0x04 \b, extra field +>3 byte&0xC =0x08 +>>10 string x \b, was "%s" +>3 byte &0x10 \b, has comment +>3 byte &0x20 \b, encrypted +>4 ledate >0 \b, last modified: %s +>8 byte 2 \b, max compression +>8 byte 4 \b, max speed +>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT) +>9 byte =0x01 \b, from Amiga +>9 byte =0x02 \b, from VMS +>9 byte =0x03 \b, from Unix +>9 byte =0x04 \b, from VM/CMS +>9 byte =0x05 \b, from Atari +>9 byte =0x06 \b, from HPFS filesystem (OS/2, NT) +>9 byte =0x07 \b, from MacOS +>9 byte =0x08 \b, from Z-System +>9 byte =0x09 \b, from CP/M +>9 byte =0x0A \b, from TOPS/20 +>9 byte =0x0B \b, from NTFS filesystem (NT) +>9 byte =0x0C \b, from QDOS +>9 byte =0x0D \b, from Acorn RISCOS +# size of the original (uncompressed) input data modulo 2^32 +#>-4 ulelong x \b, original size modulo 2^32 %u +#ERROR: line 114: non zero offset 1048572 at level 1 + +# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis +0 string \037\036 packed data +!:mime application/octet-stream +>2 belong >1 \b, %d characters originally +>2 belong =1 \b, %d character originally +# +# This magic number is byte-order-independent. +0 short 0x1f1f old packed data +!:mime application/octet-stream + +# XXX - why *two* entries for "compacted data", one of which is +# byte-order independent, and one of which is byte-order dependent? +# +0 short 0x1fff compacted data +!:mime application/octet-stream +# This string is valid for SunOS (BE) and a matching "short" is listed +# in the Ultrix (LE) magic file. +0 string \377\037 compacted data +!:mime application/octet-stream +0 short 0145405 huf output +!:mime application/octet-stream + +# bzip2 +0 string BZh bzip2 compressed data +!:mime application/x-bzip2 +>3 byte >47 \b, block size = %c00k + +# bzip a block-sorting file compressor +# by Julian Seward and others +0 string BZ0 bzip compressed data +!:mime application/x-bzip +>3 byte >47 \b, block size = %c00k + +# lzip +0 string LZIP lzip compressed data +!:mime application/x-lzip +>4 byte x \b, version: %d + +# squeeze and crunch +# Michael Haardt +0 beshort 0x76FF squeezed data, +>4 string x original name %s +0 beshort 0x76FE crunched data, +>2 string x original name %s +0 beshort 0x76FD LZH compressed data, +>2 string x original name %s + +# Freeze +0 string \037\237 frozen file 2.1 +0 string \037\236 frozen file 1.0 (or gzip 0.5) + +# SCO compress -H (LZH) +0 string \037\240 SCO compress -H (LZH) data + +# European GSM 06.10 is a provisional standard for full-rate speech +# transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse +# excitation/long term prediction) coding at 13 kbit/s. +# +# There's only a magic nibble (4 bits); that nibble repeats every 33 +# bytes. This isn't suited for use, but maybe we can use it someday. +# +# This will cause very short GSM files to be declared as data and +# mismatches to be declared as data too! +#0 byte&0xF0 0xd0 data +#>33 byte&0xF0 0xd0 +#>66 byte&0xF0 0xd0 +#>99 byte&0xF0 0xd0 +#>132 byte&0xF0 0xd0 GSM 06.10 compressed audio + +# lzop from +0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data +>9 beshort <0x0940 +>>9 byte&0xf0 =0x00 - version 0. +>>9 beshort&0x0fff x \b%03x, +>>13 byte 1 LZO1X-1, +>>13 byte 2 LZO1X-1(15), +>>13 byte 3 LZO1X-999, +## >>22 bedate >0 last modified: %s, +>>14 byte =0x00 os: MS-DOS +>>14 byte =0x01 os: Amiga +>>14 byte =0x02 os: VMS +>>14 byte =0x03 os: Unix +>>14 byte =0x05 os: Atari +>>14 byte =0x06 os: OS/2 +>>14 byte =0x07 os: MacOS +>>14 byte =0x0A os: Tops/20 +>>14 byte =0x0B os: WinNT +>>14 byte =0x0E os: Win32 +>9 beshort >0x0939 +>>9 byte&0xf0 =0x00 - version 0. +>>9 byte&0xf0 =0x10 - version 1. +>>9 byte&0xf0 =0x20 - version 2. +>>9 beshort&0x0fff x \b%03x, +>>15 byte 1 LZO1X-1, +>>15 byte 2 LZO1X-1(15), +>>15 byte 3 LZO1X-999, +## >>25 bedate >0 last modified: %s, +>>17 byte =0x00 os: MS-DOS +>>17 byte =0x01 os: Amiga +>>17 byte =0x02 os: VMS +>>17 byte =0x03 os: Unix +>>17 byte =0x05 os: Atari +>>17 byte =0x06 os: OS/2 +>>17 byte =0x07 os: MacOS +>>17 byte =0x0A os: Tops/20 +>>17 byte =0x0B os: WinNT +>>17 byte =0x0E os: Win32 + +# 4.3BSD-Quasijarus Strong Compression +# https://minnie.tuhs.org/Quasijarus/compress.html +0 string \037\241 Quasijarus strong compressed data + +# From: Cory Dikkers +0 string XPKF Amiga xpkf.library compressed data +0 string PP11 Power Packer 1.1 compressed data +0 string PP20 Power Packer 2.0 compressed data, +>4 belong 0x09090909 fast compression +>4 belong 0x090A0A0A mediocre compression +>4 belong 0x090A0B0B good compression +>4 belong 0x090A0C0C very good compression +>4 belong 0x090A0C0D best compression + +# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at) +# https://www.7-zip.org or DOC/7zFormat.txt +# +0 string 7z\274\257\047\034 7-zip archive data, +>6 byte x version %d +>7 byte x \b.%d +!:mime application/x-7z-compressed +#!:ext 7z/cb7 + +# Type: LZMA +0 lelong&0xffffff =0x5d +>12 leshort 0xff lzma compressed data, +!:mime application/x-lzma +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld +>12 leshort 0 lzma compressed data, +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld + +# http://tukaani.org/xz/xz-file-format.txt +0 ustring \xFD7zXZ\x00 xz compressed data, checksum +>7 byte&0xf 0x0 NONE +>7 byte&0xf 0x1 CRC32 +>7 byte&0xf 0x4 CRC64 +>7 byte&0xf 0xa SHA-256 + +!:strength * 2 +!:mime application/x-xz + +# https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt +0 string LRZI LRZIP compressed data +>4 byte x - version %d +>5 byte x \b.%d +!:mime application/x-lrzip + +# https://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html +0 lelong 0x184d2204 lz4 compressed data (v1.4+) +!:mime application/x-lz4 +# Added by osm0sis@xda-developers.com +0 lelong 0x184c2103 lz4 compressed data (v1.0-v1.3) +!:mime application/x-lz4 +0 lelong 0x184c2102 lz4-l compressed data (v0.1-v0.9) +!:mime application/x-lz4 + +# Zstandard/LZ4 skippable frames +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong&0xFFFFFFF0 0x184D2A50 +>(4.l+8) indirect x + +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong 0xEC30A437 Zstandard dictionary +!:mime application/x-std-dictionary +>4 lelong x (ID %u) + +# AFX compressed files (Wolfram Kleff) +2 string -afx- AFX compressed file data + +# Supplementary magic data for the file(1) command to support +# rzip(1). The format is described in magic(5). +# +# Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with +# this file. +# +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +0 string ArC\x01 FreeArc archive + +# Type: DACT compressed files +0 long 0x444354C3 DACT compressed data +>4 byte >-1 (version %i. +>5 byte >-1 %i. +>6 byte >-1 %i) +>7 long >0 , original size: %i bytes +>15 long >30 , block size: %i bytes + +# Valve Pack (VPK) files +0 lelong 0x55aa1234 Valve Pak file +>0x4 lelong x \b, version %u +>0x8 lelong x \b, %u entries + +# Snappy framing format +# https://code.google.com/p/snappy/source/browse/trunk/framing_format.txt +0 string \377\006\0\0sNaPpY snappy framed data +!:mime application/x-snappy-framed + +# qpress, https://www.quicklz.com/ +0 string qpress10 qpress compressed data +!:mime application/x-qpress + +# Zlib https://www.ietf.org/rfc/rfc6713.txt +0 string/b x +>0 beshort%31 =0 +>>0 byte&0xf =8 +>>>0 byte&0x80 =0 zlib compressed data +!:mime application/zlib + +# BWC compression +0 string BWC +>3 byte 0 BWC compressed data + +# UCL compression +0 bequad 0x00e955434cff011a UCL compressed data + +# Softlib archive +0 string SLIB Softlib archive +>4 leshort x \b, version %d +>6 leshort x (contains %d files) + +# URL: https://github.com/lzfse/lzfse/blob/master/src/lzfse_internal.h#L276 +# From: Eric Hall +0 string bvx- lzfse encoded, no compression +0 string bvx1 lzfse compressed, uncompressed tables +0 string bvx2 lzfse compressed, compressed tables +0 string bvxn lzfse encoded, lzvn compressed + +# pcxLib.exe compression program +# http://www.shikadi.net/moddingwiki/PCX_Library +0 string/b pcxLib + +#------------------------------------------------------------ +# $File: android,v 1.18 2021/02/23 00:51:10 christos Exp $ +# Various android related magic entries +#------------------------------------------------------------ + +# Dalvik .dex format. http://retrodev.com/android/dexformat.html +# From "Mike Fleming" +# Fixed to avoid regexec 17 errors on some dex files +# From "Tim Strazzere" +0 string dex\n +>0 regex dex\n[0-9]{2}\0 Dalvik dex file +>4 string >000 version %s +0 string dey\n +>0 regex dey\n[0-9]{2}\0 Dalvik dex file (optimized for host) +>4 string >000 version %s + +# Android bootimg format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/mkbootimg/bootimg.h +# https://github.com/djrbliss/loki/blob/master/loki.h#L43 +0 string ANDROID! Android bootimg +>1024 string LOKI \b, LOKI'd +>>1028 lelong 0 \b (boot) +>>1028 lelong 1 \b (recovery) +>8 lelong >0 \b, kernel +>>12 lelong >0 \b (0x%x) +>16 lelong >0 \b, ramdisk +>>20 lelong >0 \b (0x%x) +>24 lelong >0 \b, second stage +>>28 lelong >0 \b (0x%x) +>36 lelong >0 \b, page size: %d +>38 string >0 \b, name: %s +>64 string >0 \b, cmdline (%s) + +# Android sparse img format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/libsparse/sparse_format.h +0 lelong 0xed26ff3a Android sparse image +>4 leshort x \b, version: %d +>6 leshort x \b.%d +>16 lelong x \b, Total of %d +>12 lelong x \b %d-byte output blocks in +>20 lelong x \b %d input chunks. + +# Android binary XML magic +# In include/androidfw/ResourceTypes.h: +# RES_XML_TYPE = 0x0003 followed by the size of the header (ResXMLTree_header), +# which is 8 bytes (2 bytes type + 2 bytes header size + 4 bytes size). +0 lelong 0x00080003 Android binary XML + +# Android cryptfs footer +# From https://android.googlesource.com/\ +# platform/system/vold/+/refs/heads/master/cryptfs.h +0 lelong 0xd0b5b1c4 Android cryptfs footer +>4 leshort x \b, version: %d +>6 leshort x \b.%d + +# Android Vdex format +# From https://android.googlesource.com/\ +# platform/art/+/master/runtime/vdex_file.h +0 string vdex Android vdex file, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d + +# Android Vdex format, dexfile is currently being updated +# by android system +# From https://android.googlesource.com/\ +# platform/art/+/master/dex2oat/dex2oat.cc +0 string wdex Android vdex file, being processed by dex2oat, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d diff --git a/Final_Zip/AIK/KSU/OFRP-R/cleanup.sh b/Final_Zip/AIK/KSU/OFRP-R/cleanup.sh new file mode 100755 index 0000000..d8f1d61 --- /dev/null +++ b/Final_Zip/AIK/KSU/OFRP-R/cleanup.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# AIK-Linux/cleanup: reset working directory +# osm0sis @ xda-developers + +case $1 in + --help) echo "usage: cleanup.sh [--local] [--quiet]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + statarg="-f %Su"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) statarg="-c %U";; +esac; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; + +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + sudo=sudo; +fi; + +$sudo rm -rf ramdisk split_img *new.* || exit 1; + +case $1 in + --quiet) ;; + *) echo "Working directory cleaned.";; +esac; +exit 0; + diff --git a/Final_Zip/AIK/KSU/OFRP-R/repackimg.sh b/Final_Zip/AIK/KSU/OFRP-R/repackimg.sh new file mode 100755 index 0000000..5709f0f --- /dev/null +++ b/Final_Zip/AIK/KSU/OFRP-R/repackimg.sh @@ -0,0 +1,413 @@ +#!/bin/bash +# AIK-Linux/repackimg: repack ramdisk and build image +# osm0sis @ xda-developers + +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: repackimg.sh [--local] [--original] [--origsize] [--level <0-9>] [--avbkey ] [--forceelf]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + + javaver=$(java -version 2>&1 | head -n1 | cut -d\" -f2); + javamaj=$(echo $javaver | cut -d. -f1); + javamin=$(echo $javaver | cut -d. -f2); + if [ "$javamaj" -lt 9 ] && [ "$javamaj" -eq 1 -a "$javamin" -lt 8 ]; then + java() { "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" "$@"; } + fi; + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; +chmod -R 755 "$bin" "$aik/"*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -z "$(ls split_img/* 2>/dev/null)" -o ! -e ramdisk ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +while [ "$1" ]; do + case $1 in + --original) original=1;; + --origsize) origsize=1;; + --forceelf) repackelf=1;; + --level) + case $2 in + ''|*[!0-9]*) ;; + *) level="-$2"; lvltxt=" - Level: $2"; shift;; + esac; + ;; + --avbkey) + if [ "$2" ]; then + for keytest in "$2" "$cur/$2" "$aik/$2"; do + if [ ! -z "$(ls $keytest.pk8 2>/dev/null)" -a ! -z "$(ls $keytest.x509.* 2>/dev/null)" ]; then + avbkey="$keytest"; avbtxt=" - Key: $2"; shift; break; + fi; + done; + fi; + ;; + esac; + shift; +done; + +ramdiskcomp=`cat split_img/*-*ramdiskcomp 2>/dev/null`; +if [ -z "$(ls ramdisk/* 2>/dev/null)" ] && [ ! "$ramdiskcomp" = "empty" -a ! "$original" ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - RepackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +if [ ! -z "$(ls *-new.* 2>/dev/null)" ]; then + echo "Warning: Overwriting existing files!"; + echo " "; +fi; +rm -f "*-new.*"; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" ]; then + sudo=sudo; sumsg=" (as root)"; +else + cpioarg="-R 0:0"; +fi; + +if [ "$original" ]; then + echo "Repacking with original ramdisk..."; +elif [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: Using empty ramdisk for repack!"; + compext=.empty; + touch ramdisk-new.cpio$compext; +else + echo "Packing ramdisk$sumsg..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + if [ -z "$level" ]; then + case $ramdiskcomp in + xz) level=-1;; + lz4*) level=-9;; + esac; + fi; + echo "Using compression: $ramdiskcomp$lvltxt"; + repackcmd="$ramdiskcomp $level"; + compext=$ramdiskcomp; + case $ramdiskcomp in + gzip) compext=gz;; + lzop) compext=lzo;; + xz) repackcmd="xz $level -Ccrc32";; + lzma) repackcmd="xz $level -Flzma";; + bzip2) compext=bz2;; + lz4) repackcmd="$bin/$arch/lz4 $level";; + lz4-l) repackcmd="$bin/$arch/lz4 $level -l"; compext=lz4;; + cpio) repackcmd="cat"; compext="";; + *) abort; exit 1;; + esac; + if [ "$compext" ]; then + compext=.$compext; + fi; + cd ramdisk; + $sudo find . | $sudo $cpio $cpioarg -H newc -o 2>/dev/null | $repackcmd > ../ramdisk-new.cpio$compext; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Getting build information..."; +cd split_img; +imgtype=`cat *-imgtype`; +case $imgtype in + KRNL) ;; + AOSP_VNDR) vendor=vendor_;; + *) + if [ -f *-kernel ]; then + kernel=`ls *-kernel`; echo "kernel = $kernel"; + kernel="split_img/$kernel"; + fi; + ;; +esac; +if [ "$original" ]; then + ramdisk=`ls *-*ramdisk.cpio*`; echo "${vendor}ramdisk = $ramdisk"; + ramdisk="split_img/$ramdisk"; +else + ramdisk="ramdisk-new.cpio$compext"; +fi; +case $imgtype in + KRNL) rsz=$(wc -c < ../"$ramdisk"); echo "ramdisk_size = $rsz";; + OSIP) echo "cmdline = $(cat *-*cmdline)";; + U-Boot) + name=`cat *-name`; echo "name = $name"; + uarch=`cat *-arch`; + os=`cat *-os`; + type=`cat *-type`; + comp=`cat *-comp`; echo "type = $uarch $os $type ($comp)"; + [ "$comp" = "uncompressed" ] && comp=none; + addr=`cat *-addr`; echo "load_addr = $addr"; + ep=`cat *-ep`; echo "entry_point = $ep"; + ;; + *) + if [ -f *-second ]; then + second=`ls *-second`; echo "second = $second"; + second=(--second "split_img/$second"); + fi; + if [ -f *-dtb ]; then + dtb=`ls *-dtb`; echo "dtb = $dtb"; + dtb=(--dtb "split_img/$dtb"); + fi; + if [ -f *-recovery_dtbo ]; then + recoverydtbo=`ls *-recovery_dtbo`; echo "recovery_dtbo = $recoverydtbo"; + recoverydtbo=(--recovery_dtbo "split_img/$recoverydtbo"); + fi; + if [ -f *-*cmdline ]; then + cmdname=`ls *-*cmdline`; + cmdline=`cat *-*cmdline`; echo "${vendor}cmdline = $cmdline"; + cmd=("split_img/$cmdname"@cmdline); + fi; + if [ -f *-board ]; then + board=`cat *-board`; echo "board = $board"; + fi; + if [ -f *-base ]; then + base=`cat *-base`; echo "base = $base"; + fi; + if [ -f *-pagesize ]; then + pagesize=`cat *-pagesize`; echo "pagesize = $pagesize"; + fi; + if [ -f *-kernel_offset ]; then + kerneloff=`cat *-kernel_offset`; echo "kernel_offset = $kerneloff"; + fi; + if [ -f *-ramdisk_offset ]; then + ramdiskoff=`cat *-ramdisk_offset`; echo "ramdisk_offset = $ramdiskoff"; + fi; + if [ -f *-second_offset ]; then + secondoff=`cat *-second_offset`; echo "second_offset = $secondoff"; + fi; + if [ -f *-tags_offset ]; then + tagsoff=`cat *-tags_offset`; echo "tags_offset = $tagsoff"; + fi; + if [ -f *-dtb_offset ]; then + dtboff=`cat *-dtb_offset`; echo "dtb_offset = $dtboff"; + fi; + if [ -f *-os_version ]; then + osver=`cat *-os_version`; echo "os_version = $osver"; + fi; + if [ -f *-os_patch_level ]; then + oslvl=`cat *-os_patch_level`; echo "os_patch_level = $oslvl"; + fi; + if [ -f *-header_version ]; then + hdrver=`cat *-header_version`; echo "header_version = $hdrver"; + fi; + if [ -f *-hashtype ]; then + hashtype=`cat *-hashtype`; echo "hashtype = $hashtype"; + hashtype="--hashtype $hashtype"; + fi; + if [ -f *-dt ]; then + dttype=`cat *-dttype`; + dt=`ls *-dt`; echo "dt = $dt"; + rpm=("split_img/$dt",rpm); + dt=(--dt "split_img/$dt"); + fi; + if [ -f *-unknown ]; then + unknown=`cat *-unknown`; echo "unknown = $unknown"; + fi; + if [ -f *-header ]; then + header=`ls *-header`; + header="split_img/$header"; + fi; + ;; +esac; +cd ..; + +if [ -f split_img/*-mtktype ]; then + mtktype=`cat split_img/*-mtktype`; + echo " "; + echo "Generating MTK headers..."; + echo " "; + echo "Using ramdisk type: $mtktype"; + "$bin/$arch/mkmtkhdr" --kernel "$kernel" --$mtktype "$ramdisk" >/dev/null; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + mv -f "$(basename "$kernel")-mtk" kernel-new.mtk; + mv -f "$(basename "$ramdisk")-mtk" $mtktype-new.mtk; + kernel=kernel-new.mtk; + ramdisk=$mtktype-new.mtk; +fi; + +if [ -f split_img/*-sigtype ]; then + outname=unsigned-new.img; +else + outname=image-new.img; +fi; + +[ "$dttype" = "ELF" ] && repackelf=1; +if [ "$imgtype" = "ELF" ] && [ ! "$header" -o ! "$repackelf" ]; then + imgtype=AOSP; + echo " "; + echo "Warning: ELF format without RPM detected; will be repacked using AOSP format!"; +fi; + +echo " "; +echo "Building image..."; +echo " "; +echo "Using format: $imgtype"; +echo " "; +case $imgtype in + AOSP_VNDR) "$bin/$arch/mkbootimg" --vendor_ramdisk "$ramdisk" "${dtb[@]}" --vendor_cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --tags_offset $tagsoff --dtb_offset $dtboff --os_version "$osver" --os_patch_level "$oslvl" --header_version $hdrver --vendor_boot $outname;; + AOSP) "$bin/$arch/mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" "${dtb[@]}" "${recoverydtbo[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --dtb_offset "$dtboff" --os_version "$osver" --os_patch_level "$oslvl" --header_version "$hdrver" $hashtype "${dt[@]}" -o $outname;; + AOSP-PXA) "$bin/$arch/pxa-mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --unknown $unknown "${dt[@]}" -o $outname;; + ELF) "$bin/$arch/elftool" pack -o $outname header="$header" "$kernel" "$ramdisk",ramdisk "${rpm[@]}" "${cmd[@]}" >/dev/null;; + KRNL) "$bin/$arch/rkcrc" -k "$ramdisk" $outname;; + OSIP) + mkdir split_img/.temp 2>/dev/null; + for i in bootstub cmdline.txt hdr kernel parameter sig; do + cp -f split_img/*-*$(basename $i .txt | sed -e 's/hdr/header/') split_img/.temp/$i 2>/dev/null; + done; + cp -f "$ramdisk" split_img/.temp/ramdisk.cpio.gz; + "$bin/$arch/mboot" -d split_img/.temp -f $outname; + ;; + U-Boot) + part0="$kernel"; + case $type in + Multi) part1=(:"$ramdisk");; + RAMDisk) part0="$ramdisk";; + esac; + "$bin/$arch/mkimage" -A $uarch -O $os -T $type -C $comp -a $addr -e $ep -n "$name" -d "$part0""${part1[@]}" $outname >/dev/null; + ;; + *) echo " "; echo "Unsupported format."; abort; exit 1;; +esac; +if [ ! $? -eq "0" ]; then + abort; + exit 1; +fi; + +rm -rf split_img/.temp; + +if [ -f split_img/*-sigtype ]; then + sigtype=`cat split_img/*-sigtype`; + if [ -f split_img/*-avbtype ]; then + avbtype=`cat split_img/*-avbtype`; + fi; + if [ -f split_img/*-blobtype ]; then + blobtype=`cat split_img/*-blobtype`; + fi; + echo "Signing new image..."; + echo " "; + echo "Using signature: $sigtype $avbtype$avbtxt$blobtype"; + [ ! "$avbkey" ] && avbkey="$bin/avb/verity"; + echo " "; + case $sigtype in + AVBv1) java -jar "$bin/boot_signer.jar" /$avbtype unsigned-new.img "$avbkey.pk8" "$avbkey.x509."* image-new.img 2>/dev/null;; + BLOB) + awk 'BEGIN { printf "-SIGNED-BY-SIGNBLOB-\00\00\00\00\00\00\00\00" }' > image-new.img; + "$bin/$arch/blobpack" blob.tmp $blobtype unsigned-new.img >/dev/null; + cat blob.tmp >> image-new.img; + rm -f blob.tmp; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --pack image-new.img --keyblock "$bin/chromeos/kernel.keyblock" --signprivate "$bin/chromeos/kernel_data_key.vbprivk" --version 1 --vmlinuz unsigned-new.img --bootloader "$bin/chromeos/empty" --config "$bin/chromeos/empty" --arch arm --flags 0x1;; + DHTB) + "$bin/$arch/dhtbsign" -i unsigned-new.img -o image-new.img >/dev/null; + rm -f split_img/*-tailtype 2>/dev/null; + ;; + NOOK*) cat split_img/*-master_boot.key unsigned-new.img > image-new.img;; + esac; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; +fi; + +if [ -f split_img/*-lokitype ]; then + lokitype=`cat split_img/*-lokitype`; + echo "Loki patching new image..."; + echo " "; + echo "Using type: $lokitype"; + echo " "; + mv -f image-new.img unlokied-new.img; + if [ -f aboot.img ]; then + "$bin/$arch/loki_tool" patch $lokitype aboot.img unlokied-new.img image-new.img >/dev/null; + if [ ! $? -eq "0" ]; then + echo "Patching failed."; + abort; + exit 1; + fi; + else + echo "Device aboot.img required in script directory to find Loki patch offset."; + abort; + exit 1; + fi; +elif [ -f split_img/*-microloader.bin ]; then + echo "Amonet patching new image..."; + echo " "; + cp -f image-new.img unamonet-new.img; + cp -f split_img/*-microloader.bin microloader.tmp; + dd bs=1024 count=1 conv=notrunc if=unamonet-new.img of=head.tmp 2>/dev/null; + dd bs=1024 seek=1 conv=notrunc if=head.tmp of=image-new.img 2>/dev/null; + dd conv=notrunc if=microloader.tmp of=image-new.img 2>/dev/null; + rm -f head.tmp microloader.tmp; +fi; + +if [ -f split_img/*-tailtype ]; then + tailtype=`cat split_img/*-tailtype`; + echo "Appending footer..."; + echo " "; + echo "Using type: $tailtype"; + echo " "; + case $tailtype in + Bump) awk 'BEGIN { printf "\x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79" }' >> image-new.img;; + SEAndroid) printf 'SEANDROIDENFORCE' >> image-new.img;; + esac; +fi; + +if [ "$origsize" -a -f split_img/*-origsize ]; then + filesize=`cat split_img/*-origsize`; + echo "Padding to original size..."; + echo " "; + cp -f image-new.img unpadded-new.img; + truncate -s $filesize image-new.img; +fi; + +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/KSU/OFRP-R/unpackimg.sh b/Final_Zip/AIK/KSU/OFRP-R/unpackimg.sh new file mode 100755 index 0000000..6198f2a --- /dev/null +++ b/Final_Zip/AIK/KSU/OFRP-R/unpackimg.sh @@ -0,0 +1,370 @@ +#!/bin/bash +# AIK-Linux/unpackimg: split image and unpack ramdisk +# osm0sis @ xda-developers + +cleanup() { "$aik/cleanup.sh" $local --quiet; } +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: unpackimg.sh [--local] [--nosudo] "; exit 1;; + --local) local="--local"; shift;; +esac; +case $1 in + --nosudo) nosudo=1; shift;; + --sudo) shift;; +esac; +if [ ! "$nosudo" ]; then + sudo=sudo; sumsg=" (as root)"; +fi; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + file() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/file" "$@"; } + lzma() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + tail() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/tail" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +if [ ! "$local" ]; then + cd "$aik"; +fi; +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +img="$1"; +[ -f "$cur/$1" ] && img="$cur/$1"; +if [ ! "$img" ]; then + while IFS= read -r line; do + case $line in + aboot.img|image-new.img|unlokied-new.img|unsigned-new.img) continue;; + esac; + img="$line"; + break; + done < <(ls *.elf *.img *.sin 2>/dev/null); +fi; +img="$(readlink -f "$img")"; +if [ ! -f "$img" ]; then + echo "No image file supplied."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - UnpackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +file=$(basename "$img"); +echo "Supplied image: $file"; +echo " "; + +if [ -d split_img -o -d ramdisk ]; then + if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + rmsumsg=" (as root)"; + fi; + echo "Removing old work folders and files$rmsumsg..."; + echo " "; + cleanup; +fi; + +echo "Setting up work folders..."; +echo " "; +mkdir split_img ramdisk; + +cd split_img; +filesize=$(wc -c < "$img"); +echo "$filesize" > "$file-origsize"; +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "signing" ]; then + echo $imgtest | awk '{ print $1 }' > "$file-sigtype"; + sigtype=$(cat "$file-sigtype"); + echo "Signature with \"$sigtype\" type detected, removing..."; + echo " "; + case $sigtype in + BLOB) + cp -f "$img" "$file"; + "$bin/$arch/blobunpack" "$file" | tail -n+5 | cut -d" " -f2 | dd bs=1 count=3 > "$file-blobtype" 2>/dev/null; + mv -f "$file."* "$file"; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --get-vmlinuz "$img" --vmlinuz-out "$file";; + DHTB) dd bs=4096 skip=512 iflag=skip_bytes conv=notrunc if="$img" of="$file" 2>/dev/null;; + NOOK) + dd bs=1048576 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=1048576 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + NOOKTAB) + dd bs=262144 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=262144 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + SIN*) + "$bin/$arch/sony_dump" . "$img" >/dev/null; + mv -f "$file."* "$file"; + rm -f "$file-sigtype"; + ;; + esac; + img="$file"; +fi; + +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "bootimg" ]; then + [ "$(echo $imgtest | awk '{ print $3 }')" = "PXA" ] && typesuffix=-PXA; + echo "$(echo $imgtest | awk '{ print $1 }')$typesuffix" > "$file-imgtype"; + imgtype=$(cat "$file-imgtype"); +else + cd ..; + cleanup; + echo "Unrecognized format."; + abort; + exit 1; +fi; +echo "Image type: $imgtype"; +echo " "; + +case $imgtype in + AOSP*|ELF|KRNL|OSIP|U-Boot) ;; + *) + cd ..; + cleanup; + echo "Unsupported format."; + abort; + exit 1; + ;; +esac; + +case $(echo $imgtest | awk '{ print $3 }') in + LOKI) + echo $imgtest | awk '{ print $5 }' | cut -d\( -f2 | cut -d\) -f1 > "$file-lokitype"; + lokitype=$(cat "$file-lokitype"); + echo "Loki patch with \"$lokitype\" type detected, reverting..."; + echo " "; + echo "Warning: A dump of your device's aboot.img is required to re-Loki!"; + echo " "; + "$bin/$arch/loki_tool" unlok "$img" "$file" >/dev/null; + img="$file"; + ;; + AMONET) + echo "Amonet patch detected, reverting..."; + echo " "; + dd bs=2048 count=1 conv=notrunc if="$img" of="$file-microloader.bin" 2>/dev/null; + dd bs=1024 skip=1 conv=notrunc if="$file-microloader.bin" of="$file-head" 2>/dev/null; + truncate -s 1024 "$file-microloader.bin"; + truncate -s 2048 "$file-head"; + dd bs=2048 skip=1 conv=notrunc if="$img" of="$file-tail" 2>/dev/null; + cat "$file-head" "$file-tail" > "$file"; + rm -f "$file-head" "$file-tail"; + img="$file"; + ;; +esac; + +tailtest="$(dd if="$img" iflag=skip_bytes skip=$(($(wc -c < "$img") - 8192)) bs=8192 count=1 2>/dev/null | file -m $bin/androidbootimg.magic - 2>/dev/null | cut -d: -f2-)"; +case $tailtest in + *data) tailtest="$(tail -n50 "$img" | file -m "$bin/androidbootimg.magic" - 2>/dev/null | cut -d: -f2-)";; +esac; +tailtype="$(echo $tailtest | awk '{ print $1 }')"; +case $tailtype in + AVB*) + echo "Signature with \"$tailtype\" type detected."; + echo " "; + case $tailtype in + *v1) + echo $tailtype > "$file-sigtype"; + echo $tailtest | awk '{ print $4 }' > "$file-avbtype"; + ;; + esac; + ;; + Bump|SEAndroid) + echo "Footer with \"$tailtype\" type detected."; + echo " "; + echo $tailtype > "$file-tailtype"; + ;; +esac; + +if [ "$imgtype" = "U-Boot" ]; then + imgsize=$(($(printf '%d\n' 0x$(hexdump -n 4 -s 12 -e '16/1 "%02x""\n"' "$img")) + 64)); + if [ ! "$filesize" = "$imgsize" ]; then + echo "Trimming..."; + echo " "; + dd bs=$imgsize count=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + img="$file"; + fi; +fi; + +echo 'Splitting image to "split_img/"...'; +case $imgtype in + AOSP_VNDR) vendor=vendor_;; +esac; +case $imgtype in + AOSP|AOSP_VNDR) "$bin/$arch/unpackbootimg" -i "$img";; + AOSP-PXA) "$bin/$arch/pxa-unpackbootimg" -i "$img";; + ELF) + mkdir elftool_out; + "$bin/$arch/elftool" unpack -i "$img" -o elftool_out >/dev/null; + mv -f elftool_out/header "$file-header" 2>/dev/null; + rm -rf elftool_out; + "$bin/$arch/unpackelf" -i "$img"; + ;; + KRNL) dd bs=4096 skip=8 iflag=skip_bytes conv=notrunc if="$img" of="$file-ramdisk" 2>&1 | tail -n+3 | cut -d" " -f1-2;; + OSIP) + "$bin/$arch/mboot" -u -f "$img"; + [ ! $? -eq "0" ] && error=1; + for i in bootstub cmdline.txt hdr kernel parameter ramdisk.cpio.gz sig; do + mv -f $i "$file-$(basename $i .txt | sed -e 's/hdr/header/' -e 's/ramdisk.cpio.gz/ramdisk/')" 2>/dev/null || true; + done; + ;; + U-Boot) + "$bin/$arch/dumpimage" -l "$img"; + "$bin/$arch/dumpimage" -l "$img" > "$file-header"; + grep "Name:" "$file-header" | cut -c15- > "$file-name"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f1 > "$file-arch"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f2 > "$file-os"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f3 | cut -d- -f1 > "$file-type"; + grep "Type:" "$file-header" | cut -d\( -f2 | cut -d\) -f1 | cut -d" " -f1 | cut -d- -f1 > "$file-comp"; + grep "Address:" "$file-header" | cut -c15- > "$file-addr"; + grep "Point:" "$file-header" | cut -c15- > "$file-ep"; + rm -f "$file-header"; + "$bin/$arch/dumpimage" -p 0 -o "$file-kernel" "$img"; + [ ! $? -eq "0" ] && error=1; + case $(cat "$file-type") in + Multi) "$bin/$arch/dumpimage" -p 1 -o "$file-ramdisk" "$img";; + RAMDisk) mv -f "$file-kernel" "$file-ramdisk";; + *) touch "$file-ramdisk";; + esac; + ;; +esac; +if [ ! $? -eq "0" -o "$error" ]; then + cd ..; + cleanup; + abort; + exit 1; +fi; + +if [ -f *-kernel ] && [ "$(file -m "$bin/androidbootimg.magic" *-kernel 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')" = "MTK" ]; then + mtk=1; + echo " "; + echo "MTK header found in kernel, removing..."; + dd bs=512 skip=1 conv=notrunc if="$file-kernel" of=tempkern 2>/dev/null; + mv -f tempkern "$file-kernel"; +fi; +mtktest="$(file -m "$bin/androidbootimg.magic" *-*ramdisk 2>/dev/null | cut -d: -f2-)"; +mtktype=$(echo $mtktest | awk '{ print $3 }'); +if [ "$(echo $mtktest | awk '{ print $1 }')" = "MTK" ]; then + if [ ! "$mtk" ]; then + echo " "; + echo "Warning: No MTK header found in kernel!"; + mtk=1; + fi; + echo "MTK header found in \"$mtktype\" type ramdisk, removing..."; + dd bs=512 skip=1 conv=notrunc if="$(ls *-*ramdisk)" of=temprd 2>/dev/null; + mv -f temprd "$(ls *-*ramdisk)"; +else + if [ "$mtk" ]; then + if [ ! "$mtktype" ]; then + echo 'Warning: No MTK header found in ramdisk, assuming "rootfs" type!'; + mtktype="rootfs"; + fi; + fi; +fi; +[ "$mtk" ] && echo $mtktype > "$file-mtktype"; + +if [ -f *-dt ]; then + dttest="$(file -m "$bin/androidbootimg.magic" *-dt 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')"; + echo $dttest > "$file-dttype"; + if [ "$imgtype" = "ELF" ]; then + case $dttest in + QCDT|ELF) ;; + *) echo " "; + echo "Non-QC DTB found, packing kernel and appending..."; + gzip --no-name -9 "$file-kernel"; + mv -f "$file-kernel.gz" "$file-kernel"; + cat "$file-dt" >> "$file-kernel"; + rm -f "$file-dt"*;; + esac; + fi; +fi; + +file -m "$bin/magic" *-*ramdisk 2>/dev/null | cut -d: -f2 | awk '{ print $1 }' > "$file-${vendor}ramdiskcomp"; +ramdiskcomp=`cat *-*ramdiskcomp`; +unpackcmd="$ramdiskcomp -dc"; +compext=$ramdiskcomp; +case $ramdiskcomp in + gzip) unpackcmd="gzip -dcq"; compext=gz;; + lzop) compext=lzo;; + xz) ;; + lzma) ;; + bzip2) compext=bz2;; + lz4) unpackcmd="$bin/$arch/lz4 -dcq";; + lz4-l) unpackcmd="$bin/$arch/lz4 -dcq"; compext=lz4;; + cpio) unpackcmd="cat"; compext="";; + empty) compext=empty;; + *) compext="";; +esac; +if [ "$compext" ]; then + compext=.$compext; +fi; +mv -f "$(ls *-*ramdisk)" "$file-${vendor}ramdisk.cpio$compext" 2>/dev/null; +cd ..; +if [ "$ramdiskcomp" = "data" ]; then + echo "Unrecognized format."; + abort; + exit 1; +fi; + +echo " "; +if [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: No ramdisk found to be unpacked!"; +else + echo "Unpacking ramdisk$sumsg to \"ramdisk/\"..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + echo "Compression used: $ramdiskcomp"; + if [ ! "$compext" -a ! "$ramdiskcomp" = "cpio" ]; then + echo "Unsupported format."; + abort; + exit 1; + fi; + $sudo chown 0:0 ramdisk 2>/dev/null; + cd ramdisk; + $unpackcmd "../split_img/$file-${vendor}ramdisk.cpio$compext" | $sudo $cpio -i -d --no-absolute-filenames; + if [ ! $? -eq "0" ]; then + [ "$nosudo" ] && echo "Unpacking failed, try without --nosudo."; + cd ..; + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/KSU/OFRP/bin/androidbootimg.magic b/Final_Zip/AIK/KSU/OFRP/bin/androidbootimg.magic new file mode 100644 index 0000000..4e7a106 --- /dev/null +++ b/Final_Zip/AIK/KSU/OFRP/bin/androidbootimg.magic @@ -0,0 +1,111 @@ +#------------------------------------------------------------------------------ +# Various Android OEM non-standard boot image related magic entries +# osm0sis @ xda-developers +#------------------------------------------------------------------------------ + +# ASUS Blob Signature +0 string -SIGNED-BY-SIGNBLOB- BLOB signing + +# Barnes & Noble Nook Signature +64 string Red\x20Loader NOOK signing (red loader) +64 string Green\x20Loader NOOK signing (green loader) +64 string Green\x20Recovery NOOK signing (green recovery) +64 string eMMC\x20boot.img+secondloader NOOK signing (emmc boot) +64 string eMMC\x20recovery.img+secondloader NOOK signing (emmc recovery) +48 string BauwksBoot NOOKTAB signing (bauwks) + +# Google ChromeOS Signature +0 string CHROMEOS CHROMEOS signing + +# Samsung/Spreadtrum DHTB Signature +0 string DHTB\x01\x00\x00 DHTB signing + +# Sony SIN Packaging/Signature +0 string \x01\x00\x00\x00 SINv1 signing +0 string \x02\x00\x00\x00 SINv2 signing +0 string \x03SIN SINv3 signing + +# Google Pixel/Nexus/AOSP Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search ANDROID! AOSP bootimg +>>36 string \x00\x00\x00\x02 \b, PXA variant (020) +>>36 string \x00\x00\x80\x02 \b, PXA variant (028) +>>36 string \x00\x00\x00\x03 \b, PXA variant (030) +>>96 search microloader +>>>1024 string ANDROID! \b, AMONET header +>>1024 string LOKI \b, LOKI header +>>>1028 string \x00 \b (boot) +>>>1028 string \x01 \b (recovery) +>>2048 search \x88\x16\x88\x58 \b, MTK headers +!:strength * 3 + +# Google Pixel/AOSP Vendor Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search VNDRBOOT AOSP_VNDR bootimg +!:strength * 3 + +# DENX U-Boot +0 string \x27\x05\x19\x56 U-Boot bootimg + +# Intel OSIP +1000 search \xFC\xFA\xBC\x00 OSIP bootimg (headerless) +!:strength / 15 +0 string $OS$\x00\x00\x01 OSIP bootimg +>52 string \x00\x00\x00\x00 \b, boot (signed) +>52 string \x01\x00\x00\x00 \b, boot (unsigned) +>52 string \x0C\x00\x00\x00 \b, recovery (signed) +>52 string \x0D\x00\x00\x00 \b, recovery (unsigned) + +# Rockchip KRNL +0 string KRNL KRNL bootimg + +# Sony ELF +0 string \x7FELF ELF +>5 string \x01\x01\x61 bootimg +>18 string \x28 (ARM +>18 string \x03 (x86_ +>18 string \x08 (MIPS +>4 string \x01 \b) +>4 string \x02 \b64) +>0 search \x88\x16\x88\x58 \b, MTK headers + +# MediaTek MTK +# [for detection after boot image has already been split] +0 search \x88\x16\x88\x58 MTK header +>0 search KERNEL \b, kernel type +>0 search ROOTFS \b, rootfs type +>0 search RECOVERY \b, recovery type +!:strength / 20 + +# Qualcomm Device Tree +# [for detection after boot image has already been split] +0 string QCDT QCDT header +!:strength / 20 + +# Google Android Verified Boot 1.0 Signature +# [for detection with the tail of the boot image] +0 search \x02\x01\x01\x30\x82 AVBv1 signing footer +>0 search /boot \b, boot type +>0 search /recovery \b, recovery type +!:strength / 20 + +# Google Android Verified Boot 2.0 Signature +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search AVBf AVBv2 signing footer +!:strength / 20 + +# LG Bump +# [for detection with the tail of the boot image] +0 search \x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79 Bump footer +!:strength / 20 + +# Samsung SEAndroid +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search SEANDROIDENFORCE SEAndroid footer +!:strength / 20 diff --git a/Final_Zip/AIK/KSU/OFRP/bin/avb/verity.pk8 b/Final_Zip/AIK/KSU/OFRP/bin/avb/verity.pk8 new file mode 100644 index 0000000..bebf216 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/avb/verity.pk8 differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/avb/verity.x509.pem b/Final_Zip/AIK/KSU/OFRP/bin/avb/verity.x509.pem new file mode 100644 index 0000000..86399c3 --- /dev/null +++ b/Final_Zip/AIK/KSU/OFRP/bin/avb/verity.x509.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIID/TCCAuWgAwIBAgIJAJcPmDkJqolJMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g +VmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UE +AwwHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe +Fw0xNDExMDYxOTA3NDBaFw00MjAzMjQxOTA3NDBaMIGUMQswCQYDVQQGEwJVUzET +MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEQMA4G +A1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UEAwwHQW5kcm9p +ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAOjreE0vTVSRenuzO9vnaWfk0eQzYab0gqpi +6xAzi6dmD+ugoEKJmbPiuE5Dwf21isZ9uhUUu0dQM46dK4ocKxMRrcnmGxydFn6o +fs3ODJMXOkv2gKXL/FdbEPdDbxzdu8z3yk+W67udM/fW7WbaQ3DO0knu+izKak/3 +T41c5uoXmQ81UNtAzRGzGchNVXMmWuTGOkg6U+0I2Td7K8yvUMWhAWPPpKLtVH9r +AL5TzjYNR92izdKcz3AjRsI3CTjtpiVABGeX0TcjRSuZB7K9EK56HV+OFNS6I1NP +jdD7FIShyGlqqZdUOkAUZYanbpgeT5N7QL6uuqcGpoTOkalu6kkCAwEAAaNQME4w +HQYDVR0OBBYEFH5DM/m7oArf4O3peeKO0ZIEkrQPMB8GA1UdIwQYMBaAFH5DM/m7 +oArf4O3peeKO0ZIEkrQPMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB +AHO3NSvDE5jFvMehGGtS8BnFYdFKRIglDMc4niWSzhzOVYRH4WajxdtBWc5fx0ix +NF/+hVKVhP6AIOQa+++sk+HIi7RvioPPbhjcsVlZe7cUEGrLSSveGouQyc+j0+m6 +JF84kszIl5GGNMTnx0XRPO+g8t6h5LWfnVydgZfpGRRg+WHewk1U2HlvTjIceb0N +dcoJ8WKJAFWdcuE7VIm4w+vF/DYX/A2Oyzr2+QRhmYSv1cusgAeC1tvH4ap+J1Lg +UnOu5Kh/FqPLLSwNVQp4Bu7b9QFfqK8Moj84bj88NqRGZgDyqzuTrFxn6FW7dmyA +yttuAJAEAymk1mipd9+zp38= +-----END CERTIFICATE----- diff --git a/Final_Zip/AIK/KSU/OFRP/bin/boot_signer.jar b/Final_Zip/AIK/KSU/OFRP/bin/boot_signer.jar new file mode 100644 index 0000000..dd96a3e Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/boot_signer.jar differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/chromeos/empty b/Final_Zip/AIK/KSU/OFRP/bin/chromeos/empty new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Final_Zip/AIK/KSU/OFRP/bin/chromeos/empty @@ -0,0 +1 @@ + diff --git a/Final_Zip/AIK/KSU/OFRP/bin/chromeos/kernel.keyblock b/Final_Zip/AIK/KSU/OFRP/bin/chromeos/kernel.keyblock new file mode 100644 index 0000000..9740be4 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/chromeos/kernel.keyblock differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/chromeos/kernel_data_key.vbprivk b/Final_Zip/AIK/KSU/OFRP/bin/chromeos/kernel_data_key.vbprivk new file mode 100644 index 0000000..8d392fb Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/chromeos/kernel_data_key.vbprivk differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/blobpack b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/blobpack new file mode 100755 index 0000000..685c6c0 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/blobpack differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/blobunpack b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/blobunpack new file mode 100755 index 0000000..2d96696 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/blobunpack differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/dhtbsign b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/dhtbsign new file mode 100755 index 0000000..f117b88 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/dumpimage b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/dumpimage new file mode 100755 index 0000000..8ba15d3 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/dumpimage differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/elftool b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/elftool new file mode 100755 index 0000000..b25dd56 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/elftool differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/futility b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/futility new file mode 100755 index 0000000..c830e31 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/futility differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/loki_tool b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/loki_tool new file mode 100755 index 0000000..d305760 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/loki_tool differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/lz4 b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/lz4 new file mode 100755 index 0000000..801bad4 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/lz4 differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/mboot b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/mboot new file mode 100755 index 0000000..023eab0 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/mboot differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/mkbootimg b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/mkbootimg new file mode 100755 index 0000000..ed68c2d Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/mkimage b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/mkimage new file mode 100755 index 0000000..8e97c0c Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/mkimage differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/mkmtkhdr b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/mkmtkhdr new file mode 100755 index 0000000..d71db24 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/pxa-mkbootimg b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/pxa-mkbootimg new file mode 100755 index 0000000..0636873 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/pxa-unpackbootimg b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/pxa-unpackbootimg new file mode 100755 index 0000000..8dbdecf Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/rkcrc b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/rkcrc new file mode 100755 index 0000000..45027f3 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/rkcrc differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/sony_dump b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/sony_dump new file mode 100755 index 0000000..2563e25 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/sony_dump differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/unpackbootimg b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/unpackbootimg new file mode 100755 index 0000000..b70aed5 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/unpackelf b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/unpackelf new file mode 100755 index 0000000..12e9057 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/i686/unpackelf differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/blobpack b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/blobpack new file mode 100755 index 0000000..90256d4 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/blobpack differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/blobunpack b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/blobunpack new file mode 100755 index 0000000..53374ff Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/dhtbsign b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/dhtbsign new file mode 100755 index 0000000..ccb7a67 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/dumpimage b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/dumpimage new file mode 100755 index 0000000..861bd68 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/elftool b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/elftool new file mode 100755 index 0000000..07a520d Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/elftool differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/futility b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/futility new file mode 100755 index 0000000..4d56ec3 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/futility differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/loki_tool b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/loki_tool new file mode 100755 index 0000000..4a1b74a Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/lz4 b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/lz4 new file mode 100755 index 0000000..8a4136b Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/lz4 differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/mboot b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/mboot new file mode 100755 index 0000000..8bf92d4 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/mboot differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/mkbootimg b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/mkbootimg new file mode 100755 index 0000000..2b628c3 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/mkimage b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/mkimage new file mode 100755 index 0000000..6419ea3 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/mkimage differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/mkmtkhdr b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/mkmtkhdr new file mode 100755 index 0000000..1ab256f Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/pxa-mkbootimg b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..5885720 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..d7b1b7d Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/rkcrc b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/rkcrc new file mode 100755 index 0000000..f218228 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/sony_dump b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/sony_dump new file mode 100755 index 0000000..6fc3696 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/unpackbootimg b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/unpackbootimg new file mode 100755 index 0000000..8f4fccf Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/unpackelf b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/unpackelf new file mode 100755 index 0000000..477e25d Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/linux/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/blobpack b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/blobpack new file mode 100755 index 0000000..2336ec0 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/blobpack differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/blobunpack b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/blobunpack new file mode 100755 index 0000000..834cb50 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/blobunpack differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/cpio b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/cpio new file mode 100755 index 0000000..b7e41f1 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/cpio differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/dd b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/dd new file mode 100755 index 0000000..b684139 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/dd differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/dhtbsign b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/dhtbsign new file mode 100755 index 0000000..b3ba0ba Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/dumpimage b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/dumpimage new file mode 100755 index 0000000..917c8ed Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/dumpimage differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/elftool b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/elftool new file mode 100755 index 0000000..27f12be Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/elftool differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/file b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/file new file mode 100755 index 0000000..8024db5 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/file differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/futility b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/futility new file mode 100755 index 0000000..8658249 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/futility differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/libiconv.2.dylib b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/libiconv.2.dylib new file mode 100755 index 0000000..ec61db0 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/libintl.8.dylib b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/libintl.8.dylib new file mode 100755 index 0000000..c297f0a Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/libintl.8.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/liblzma.5.dylib b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/liblzma.5.dylib new file mode 100755 index 0000000..126d338 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/liblzo2.2.dylib b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/liblzo2.2.dylib new file mode 100755 index 0000000..8a24e23 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/libmagic.1.dylib b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/libmagic.1.dylib new file mode 100755 index 0000000..92e6c7f Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/loki_tool b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/loki_tool new file mode 100755 index 0000000..7eecf68 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/loki_tool differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/lz4 b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/lz4 new file mode 100755 index 0000000..43126f8 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/lz4 differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/lzop b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/lzop new file mode 100755 index 0000000..fc3103c Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/lzop differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/mboot b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/mboot new file mode 100755 index 0000000..dfa0d3e Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/mboot differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/mkbootimg b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/mkbootimg new file mode 100755 index 0000000..82f05a9 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/mkimage b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/mkimage new file mode 100755 index 0000000..e760d6e Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/mkimage differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/mkmtkhdr b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/mkmtkhdr new file mode 100755 index 0000000..907ba0f Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/pxa-mkbootimg b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/pxa-mkbootimg new file mode 100755 index 0000000..12f8337 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/pxa-unpackbootimg b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/pxa-unpackbootimg new file mode 100755 index 0000000..2f1fe6c Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/rkcrc b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/rkcrc new file mode 100755 index 0000000..c2b70ce Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/rkcrc differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/sony_dump b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/sony_dump new file mode 100755 index 0000000..2f187e6 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/sony_dump differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/tail b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/tail new file mode 100755 index 0000000..99ee578 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/tail differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/truncate b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/truncate new file mode 100755 index 0000000..26bf16b Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/truncate differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/unpackbootimg b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/unpackbootimg new file mode 100755 index 0000000..e92b74e Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/unpackelf b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/unpackelf new file mode 100755 index 0000000..4ea11d0 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/unpackelf differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/xz b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/xz new file mode 100755 index 0000000..b501c14 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/i386/xz differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/blobpack b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/blobpack new file mode 100755 index 0000000..816fcf2 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/blobpack differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/blobunpack b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/blobunpack new file mode 100755 index 0000000..9241057 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/cpio b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/cpio new file mode 100755 index 0000000..991c5a8 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/cpio differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/dd b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/dd new file mode 100755 index 0000000..e927886 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/dd differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/dhtbsign b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/dhtbsign new file mode 100755 index 0000000..162fa88 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/dumpimage b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/dumpimage new file mode 100755 index 0000000..473538b Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/elftool b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/elftool new file mode 100755 index 0000000..0185019 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/elftool differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/file b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/file new file mode 100755 index 0000000..0b9f24c Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/file differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/futility b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/futility new file mode 100755 index 0000000..a28db4d Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/futility differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/libiconv.2.dylib b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/libiconv.2.dylib new file mode 100755 index 0000000..8f56eed Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/libintl.8.dylib b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/libintl.8.dylib new file mode 100755 index 0000000..f270e89 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/libintl.8.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/liblzma.5.dylib b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/liblzma.5.dylib new file mode 100755 index 0000000..39c6b96 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/liblzo2.2.dylib b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/liblzo2.2.dylib new file mode 100755 index 0000000..a05b7eb Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/libmagic.1.dylib b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/libmagic.1.dylib new file mode 100755 index 0000000..29ad687 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/loki_tool b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/loki_tool new file mode 100755 index 0000000..1b9f062 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/lz4 b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/lz4 new file mode 100755 index 0000000..bcee28d Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/lz4 differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/lzop b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/lzop new file mode 100755 index 0000000..8be71f4 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/lzop differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/mboot b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/mboot new file mode 100755 index 0000000..ad67219 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/mboot differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/mkbootimg b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/mkbootimg new file mode 100755 index 0000000..137aef2 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/mkimage b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/mkimage new file mode 100755 index 0000000..61d5a9c Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/mkimage differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/mkmtkhdr b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/mkmtkhdr new file mode 100755 index 0000000..99949d5 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/pxa-mkbootimg b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..0ec79a3 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..03fc864 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/rkcrc b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/rkcrc new file mode 100755 index 0000000..9b0b94a Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/sony_dump b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/sony_dump new file mode 100755 index 0000000..e219101 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/tail b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/tail new file mode 100755 index 0000000..59692eb Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/tail differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/truncate b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/truncate new file mode 100755 index 0000000..f2ed631 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/truncate differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/unpackbootimg b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/unpackbootimg new file mode 100755 index 0000000..a717c48 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/unpackelf b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/unpackelf new file mode 100755 index 0000000..d6edefa Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/xz b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/xz new file mode 100755 index 0000000..6faedc7 Binary files /dev/null and b/Final_Zip/AIK/KSU/OFRP/bin/macos/x86_64/xz differ diff --git a/Final_Zip/AIK/KSU/OFRP/bin/magic b/Final_Zip/AIK/KSU/OFRP/bin/magic new file mode 100644 index 0000000..4530761 --- /dev/null +++ b/Final_Zip/AIK/KSU/OFRP/bin/magic @@ -0,0 +1,1916 @@ +#------------------------------------------------------------------------------ +# Slimmed down magic file for archives only +#------------------------------------------------------------------------------ +# $File: archive,v 1.145 2021/01/03 20:58:47 christos Exp $ +# archive: file(1) magic for archive formats (see also "msdos" for self- +# extracting compressed archives) +# +# cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc. +# pre-POSIX "tar" archives are also handled in the C code ../../src/is_tar.c. + +# POSIX tar archives +# URL: https://en.wikipedia.org/wiki/Tar_(computing) +# Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current +# header mainly padded with nul bytes +500 quad 0 +!:strength /2 +# filename or extended attribute printable strings in range space null til umlaut ue +>0 ubeshort >0x1F00 +>>0 ubeshort <0xFCFD +# last 4 header bytes often null but tar\0 in gtarfail2.tar gtarfail.tar-bad +# at https://sourceforge.net/projects/s-tar/files/testscripts/ +>>>508 ubelong&0x8B9E8DFF 0 +# nul, space or ascii digit 0-7 at start of mode +>>>>100 ubyte&0xC8 =0 +>>>>>101 ubyte&0xC8 =0 +# nul, space at end of check sum +>>>>>>155 ubyte&0xDF =0 +# space or ascii digit 0 at start of check sum +>>>>>>>148 ubyte&0xEF =0x20 +# minimal check and then display tar archive information which can also be +# embedded inside others like Android Backup, Clam AntiVirus database +>257 string !ustar +# header padded with nuls +>>257 ulong =0 +# GNU tar version 1.29 with non pax format option without refusing +# creates misleading V7 header for Long path, Multi-volume, Volume type +>>>156 ubyte 0x4c GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x4d GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x56 GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 default x tar archive (V7) +!:mime application/x-tar +#!:ext tar +# other stuff in padding +# some implementations add new fields to the blank area at the end of the header record +# created for example by DOS TAR 3.20g 1994 Tim V.Shapore with -j option +>>257 ulong !0 tar archive (old) +!:mime application/x-tar +#!:ext tar +# magic in newer, GNU, posix variants +>257 string =ustar +# 2 last char of magic and UStar version because string expression does not work +# 2 space characters followed by a null for GNU variant +>>261 ubelong =0x72202000 POSIX tar archive (GNU) +!:mime application/x-gtar +#!:ext tar/gtar +# UStar version with ASCII "00" +>>261 ubelong 0x72003030 POSIX +# gLOBAL and ExTENSION type only found in POSIX.1-2001 format +>>>156 ubyte 0x67 \b.1-2001 +>>>156 ubyte 0x78 \b.1-2001 +>>>156 ubyte x tar archive +!:mime application/x-ustar +#!:ext tar/ustar +# version with 2 binary nuls embedded in Android Backup like com.android.settings.ab +>>261 ubelong 0x72000000 tar archive (ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# not seen ustar variant with garbish version +>>261 default x tar archive (unknown ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# type flag of 1st tar archive member +#>156 ubyte x \b, %c-type +>156 ubyte x +>>156 ubyte 0 \b, file +>>156 ubyte 0x30 \b, file +>>156 ubyte 0x31 \b, hard link +>>156 ubyte 0x32 \b, symlink +>>156 ubyte 0x33 \b, char device +>>156 ubyte 0x34 \b, block device +>>156 ubyte 0x35 \b, directory +>>156 ubyte 0x36 \b, fifo +>>156 ubyte 0x37 \b, reserved +>>156 ubyte 0x4c \b, long path +>>156 ubyte 0x4d \b, multi volume +>>156 ubyte 0x56 \b, volume +>>156 ubyte 0x67 \b, global +>>156 ubyte 0x78 \b, extension +>>156 default x \b, type +>>>156 ubyte x '%c' +# name[100] +>0 string >\0 %-.60s +# mode mainly stored as an octal number in ASCII null or space terminated +>100 string >\0 \b, mode %-.7s +# user id mainly as octal numbers in ASCII null or space terminated +>108 string >\0 \b, uid %-.7s +# group id mainly as octal numbers in ASCII null or space terminated +>116 string >\0 \b, gid %-.7s +# size mainly as octal number in ASCII +>124 ubyte <0x38 +>>124 string >\0 \b, size %-.12s +# coding indicated by setting the high-order bit of the leftmost byte +>124 ubyte >0xEF \b, size 0x +>>124 ubyte !0xff \b%2.2x +>>125 ubyte !0xff \b%2.2x +>>126 ubyte !0xff \b%2.2x +>>127 ubyte !0xff \b%2.2x +>>128 ubyte !0xff \b%2.2x +>>129 ubyte !0xff \b%2.2x +>>130 ubyte !0xff \b%2.2x +>>131 ubyte !0xff \b%2.2x +>>132 ubyte !0xff \b%2.2x +>>133 ubyte !0xff \b%2.2x +>>134 ubyte !0xff \b%2.2x +>>135 ubyte !0xff \b%2.2x +# seconds since 0:0:0 1 jan 1970 UTC as octal number mainly in ASCII null or space terminated +>136 string >\0 \b, seconds %-.11s +# header checksum stored as an octal number in ASCII null or space terminated +#>148 string x \b, cksum %.7s +# linkname[100] +>157 string >\0 \b, linkname %-.40s +# additional fields for ustar +>257 string =ustar +# owner user name null terminated +>>265 string >\0 \b, user %-.32s +# group name null terminated +>>297 string >\0 \b, group %-.32s +# device major minor if not zero +>>329 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>329 string x \b, devmaj %-.7s +>>337 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>337 string x \b, devmin %-.7s +# prefix[155] +>>345 string >\0 \b, prefix %-.155s +# old non ustar/POSIX tar +>257 string !ustar +>>508 string =tar\0 +# padding[255] in old star +>>>257 string >\0 \b, padding: %-.40s +>>508 default x +# padding[255] in old tar sometimes comment field +>>>257 string >\0 \b, comment: %-.40s + +# Incremental snapshot gnu-tar format from: +# https://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html +0 string GNU\ tar- GNU tar incremental snapshot data +>&0 regex [0-9]\.[0-9]+-[0-9]+ version %s + +# cpio archives +# +# Yes, the top two "cpio archive" formats *are* supposed to just be "short". +# The idea is to indicate archives produced on machines with the same +# byte order as the machine running "file" with "cpio archive", and +# to indicate archives produced on machines with the opposite byte order +# from the machine running "file" with "cpio byte-swapped archive". +# +# The SVR4 "cpio(4)" hints that there are additional formats, but they +# are defined as "short"s; I think all the new formats are +# character-header formats and thus are strings, not numbers. +0 short 070707 cpio archive +!:mime application/x-cpio +0 short 0143561 cpio byte-swapped archive +!:mime application/x-cpio # encoding: swapped +0 string 070707 cpio ASCII archive (pre-SVR4 or odc) +0 string 070701 cpio ASCII archive (SVR4 with no CRC) +0 string 070702 cpio ASCII archive (SVR4 with CRC) + +# +# Various archive formats used by various versions of the "ar" +# command. +# + +# +# Original UNIX archive formats. +# They were written with binary values in host byte order, and +# the magic number was a host "int", which might have been 16 bits +# or 32 bits. We don't say "PDP-11" or "VAX", as there might have +# been ports to little-endian 16-bit-int or 32-bit-int platforms +# (x86?) using some of those formats; if none existed, feel free +# to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian +# 32-bit. There might have been big-endian ports of that sort as +# well. +# +0 leshort 0177555 very old 16-bit-int little-endian archive +0 beshort 0177555 very old 16-bit-int big-endian archive +0 lelong 0177555 very old 32-bit-int little-endian archive +0 belong 0177555 very old 32-bit-int big-endian archive + +0 leshort 0177545 old 16-bit-int little-endian archive +>2 string __.SYMDEF random library +0 beshort 0177545 old 16-bit-int big-endian archive +>2 string __.SYMDEF random library +0 lelong 0177545 old 32-bit-int little-endian archive +>4 string __.SYMDEF random library +0 belong 0177545 old 32-bit-int big-endian archive +>4 string __.SYMDEF random library + +# +# From "pdp" (but why a 4-byte quantity?) +# +0 lelong 0x39bed PDP-11 old archive +0 lelong 0x39bee PDP-11 4.0 archive + +# +# XXX - what flavor of APL used this, and was it a variant of +# some ar archive format? It's similar to, but not the same +# as, the APL workspace magic numbers in pdp. +# +0 long 0100554 apl workspace + +# +# System V Release 1 portable(?) archive format. +# +0 string = System V Release 1 ar archive +!:mime application/x-archive + +# +# Debian package; it's in the portable archive format, and needs to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "debian". +# +# Update: Joerg Jenderek +# URL: https://en.wikipedia.org/wiki/Deb_(file_format) +0 string =!\ndebian +# https://manpages.debian.org/testing/dpkg/dpkg-split.1.en.html +>14 string -split part of multipart Debian package +!:mime application/vnd.debian.binary-package +# udeb is used for stripped down deb file +#!:ext deb/udeb +>14 string -binary Debian binary package +!:mime application/vnd.debian.binary-package +# For ipk packager see also https://en.wikipedia.org/wiki/Opkg +#!:ext deb/udeb/ipk +# This should not happen +>14 default x Unknown Debian package +# NL terminated version; for most Debian cases this is 2.0 or 2.1 for split +>68 string >\0 (format %s) +#>68 string !2.0\n +#>>68 string x (format %.3s) +>68 string =2.0\n +# 2nd archive name=control archive name like control.tar.gz or control.tar.xz +>>72 string >\0 \b, with %.14s +# look for 3rd archive name=data archive name like data.tar.{gz,xz,bz2,lzma} +>>0 search/0x93e4f data.tar. \b, data compression +# the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised +# for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb +>>>&0 string x %.2s +# skip space (0x20 BSD) and slash (0x2f System V) character marking end of name +>>>&2 ubyte !0x20 +>>>>&-1 ubyte !0x2f +# display 3rd character of file name extension like 2 of bz2 or m of lzma +>>>>>&-1 ubyte x \b%c +>>>>>>&0 ubyte !0x20 +>>>>>>>&-1 ubyte !0x2f +# display 4th character of file name extension like a of lzma +>>>>>>>>&-1 ubyte x \b%c +# split debian package case +>68 string =2.1\n +# dpkg-1.18.25/dpkg-split/info.c +# NL terminated ASCII package name like ckermit +>>&0 string x \b, %s +# NL terminated package version like 302-5.3 +>>>&1 string x %s +# NL terminated MD5 checksum +>>>>&1 string x \b, MD5 %s +# NL terminated original package length +>>>>>&1 string x \b, unsplitted size %s +# NL terminated part length +>>>>>>&1 string x \b, part length %s +# NL terminated package part like n/m +>>>>>>>&1 string x \b, part %s +# NL terminated package architecture like armhf since dpkg 1.16.1 or later +>>>>>>>>&1 string x \b, %s + +# +# MIPS archive; they're in the portable archive format, and need to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "__________E". +# +0 string =!\n__________E MIPS archive +!:mime application/x-archive +>20 string U with MIPS Ucode members +>21 string L with MIPSEL members +>21 string B with MIPSEB members +>19 string L and an EL hash table +>19 string B and an EB hash table +>22 string X -- out of date + +# +# BSD/SVR2-and-later portable archive formats. +# +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/AR +# Reference: https://www.unix.com/man-page/opensolaris/3HEAD/ar.h/ +# Note: Mach-O universal binary in ./cafebabe is dependent +# TODO: unify current ar archive, MIPS archive, Debian package +# distinguish BSD, SVR; 32, 64 bit; HP from other 32-bit SVR; +# *.ar packages from *.a libraries. handle empty archive +0 string =!\n current ar archive +# print first and possibly second ar_name[16] for debugging purpose +#>8 string x \b, 1st "%.16s" +#>68 string x \b, 2nd "%.16s" +!:mime application/x-archive +# a in most case for libraries; lib for Microsoft libraries; ar else cases +#!:ext a/lib/ar +>8 string __.SYMDEF random library +# first member with long marked name __.SYMDEF SORTED implies BSD library +>68 string __.SYMDEF\ SORTED random library +# Reference: https://parisc.wiki.kernel.org/images-parisc/b/b2/Rad_11_0_32.pdf +# "archive file" entry moved from ./hp +# LST header system_id 0210h~PA-RISC 1.1,... identifies the target architecture +# LST header a_magic 0619h~relocatable library +>68 belong 0x020b0619 - PA-RISC1.0 relocatable library +>68 belong 0x02100619 - PA-RISC1.1 relocatable library +>68 belong 0x02110619 - PA-RISC1.2 relocatable library +>68 belong 0x02140619 - PA-RISC2.0 relocatable library +#EOF for common ar archives + +# +# "Thin" archive, as can be produced by GNU ar. +# +0 string =!\n thin archive with +>68 belong 0 no symbol entries +>68 belong 1 %d symbol entry +>68 belong >1 %d symbol entries + +0 search/1 -h- Software Tools format archive text + +# ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com) +# +# The first byte is the magic (0x1a), byte 2 is the compression type for +# the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS +# filename of the first file (null terminated). Since some types collide +# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%), +# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo. +0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000031a ARC archive data, packed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched +!:mime application/x-arc +# [JW] stuff taken from idarc, obviously ARC successors: +0 lelong&0x8080ffff 0x00000a1a PAK archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000141a ARC+ archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000481a HYP archive data +!:mime application/x-arc + +# Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk) +# I can't create either SPARK or ArcFS archives so I have not tested this stuff +# [GRR: the original entries collide with ARC, above; replaced with combined +# version (not tested)] +#0 byte 0x1a RISC OS archive (spark format) +0 string \032archive RISC OS archive (ArcFS format) +0 string Archive\000 RISC OS archive (ArcFS format) + +# All these were taken from idarc, many could not be verified. Unfortunately, +# there were many low-quality sigs, i.e. easy to trigger false positives. +# Please notify me of any real-world fishy/ambiguous signatures and I'll try +# to get my hands on the actual archiver and see if I find something better. [JW] +# probably many can be enhanced by finding some 0-byte or control char near the start + +# idarc calls this Crush/Uncompressed... *shrug* +0 string CRUSH Crush archive data +# Squeeze It (.sqz) +0 string HLSQZ Squeeze It archive data +# SQWEZ +0 string SQWEZ SQWEZ archive data +# HPack (.hpk) +0 string HPAK HPack archive data +# HAP +0 string \x91\x33HF HAP archive data +# MD/MDCD +0 string MDmd MDCD archive data +# LIM +0 string LIM\x1a LIM archive data +# SAR +3 string LH5 SAR archive data +# BSArc/BS2 +0 string \212\3SB\020\0 BSArc/BS2 archive data +# Bethesda Softworks Archive (Oblivion) +0 string BSA\0 BSArc archive data +>4 lelong x version %d +# MAR +2 string =-ah MAR archive data +# ACB +#0 belong&0x00f800ff 0x00800000 ACB archive data +# CPZ +# TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data +# JRC +0 string JRchive JRC archive data +# Quantum +0 string DS\0 Quantum archive data +# ReSOF +0 string PK\3\6 ReSOF archive data +# QuArk +0 string 7\4 QuArk archive data +# YAC +14 string YC YAC archive data +# X1 +0 string X1 X1 archive data +0 string XhDr X1 archive data +# CDC Codec (.dqt) +0 belong&0xffffe000 0x76ff2000 CDC Codec archive data +# AMGC +0 string \xad6" AMGC archive data +# NuLIB +0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data +# PakLeo +0 string LEOLZW PAKLeo archive data +# ChArc +0 string SChF ChArc archive data +# PSA +0 string PSA PSA archive data +# CrossePAC +0 string DSIGDCC CrossePAC archive data +# Freeze +0 string \x1f\x9f\x4a\x10\x0a Freeze archive data +# KBoom +0 string \xc2\xa8MP\xc2\xa8 KBoom archive data +# NSQ, must go after CDC Codec +0 string \x76\xff NSQ archive data +# DPA +0 string Dirk\ Paehl DPA archive data +# BA +# TODO: idarc says "bytes 0-2 == bytes 3-5" +# TTComp +# URL: http://fileformats.archiveteam.org/wiki/TTComp_archive +# Update: Joerg Jenderek +# GRR: line below is too general as it matches also Panorama database "TCDB 2003-10 demo.pan", others +0 string \0\6 +# look for first keyword of Panorama database *.pan +>12 search/261 DESIGN +# skip keyword with low entropy +>12 default x TTComp archive, binary, 4K dictionary +# (version 5.25) labeled the above entry as "TTComp archive data" +# From: Joerg Jenderek +# URL: https://wiki.68kmla.org/DiskCopy_4.2_format_specification +# reference: http://nulib.com/library/FTN.e00005.htm +0x52 ubeshort 0x0100 +# test for disk image size equal or above 400k +>0x40 ubelong >409599 +# test also for disk image size equal or below 1440k to skip +# windows7en.mbr UNICODE.DAT +>>0x40 ubelong <1474561 +# To skip Flags$StringJoiner.class with size 00106A61h test also for only 4 disk image sizes +# 00064000 for 400k GCR disks +# 000c8000 for 800k GCR disks +# 000b4000 for 720k MFM disks +# 00168000 for 1440k MFM disks +>>>0x40 ubelong&0xffE03fFF 0 +# display information of Apple DiskCopy 4.2 floppy image +# image pascal name padded with NULs like Microsoft Mail +>00 pstring/B x Apple DiskCopy 4.2 image %s +#!:mime application/octet-stream +!:mime application/x-dc42-floppy-image +!:apple dCpydImg +#!:ext image/dc42 +# data size in bytes like 409600 +>0x40 ubelong x \b, %u bytes +# for debugging purpose size in hexadecimal +#>0x40 ubelong x (0x%8.8x) +# tag size in bytes +>0x44 ubelong >0 \b, 0x%x tag size +# data checksum +#>0x48 ubelong x \b, 0x%x checksum +# tag checksum +#>0x4c ubelong x \b, 0x%x tag checksum +# disk encoding +>0x50 ubyte 0 \b, GCR CLV ssdd (400k) +>0x50 ubyte 1 \b, GCR CLV dsdd (800k) +>0x50 ubyte 2 \b, MFM CAV dsdd (720k) +>0x50 ubyte 3 \b, MFM CAV dshd (1440k) +>0x50 ubyte >3 \b, 0x%x encoding +# format byte +>0x51 ubyte x \b, 0x%x format +#>0x54 ubequad x \b, data 0x%16.16llx +# ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation? +0 string ESP ESP archive data +# ZPack +0 string \1ZPK\1 ZPack archive data +# Sky +0 string \xbc\x40 Sky archive data +# UFA +0 string UFA UFA archive data +# Dry +0 string =-H2O DRY archive data +# FoxSQZ +0 string FOXSQZ FoxSQZ archive data +# AR7 +0 string ,AR7 AR7 archive data +# PPMZ +0 string PPMZ PPMZ archive data +# MS Compress +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/MS-DOS_installation_compression +# Reference: https://hwiegman.home.xs4all.nl/fileformats/compress/szdd_kwaj_format.html +# Note: use correct version of extracting tool like EXPAND, UNPACK, DECOMP or 7Z +4 string \x88\xf0\x27 +# KWAJ variant +>0 string KWAJ MS Compress archive data, KWAJ variant +!:mime application/x-ms-compress-kwaj +# extension not working in version 5.32 +# magic/Magdir/archive, 284: Warning: EXTENSION type ` ??_' has bad char '?' +# file: line 284: Bad magic entry ' ??_' +#!:ext ??_ +# compression method (0-4) +>>8 uleshort x \b, %u method +# offset of compressed data +>>10 uleshort x \b, 0x%x offset +#>>(10.s) uleshort x +#>>>&-6 string x \b, TEST extension %-.3s +# header flags to mark header extensions +>>12 uleshort >0 \b, 0x%x flags +# 4 bytes: decompressed length of file +>>12 uleshort &0x01 +>>>14 ulelong x \b, original size: %u bytes +# 2 bytes: unknown purpose +# 2 bytes: length of unknown data + mentioned bytes +# 1-9 bytes: null-terminated file name +# 1-4 bytes: null-terminated file extension +>>12 uleshort &0x08 +>>>12 uleshort ^0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>>&16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>&16 string x %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>12 uleshort &0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +# 2 bytes: length of data + mentioned bytes +# +# SZDD variant Haruhiko Okumura's LZSS or 7z type MsLZ +>0 string SZDD MS Compress archive data, SZDD variant +!:mime application/x-ms-compress-szdd +#!:ext ??_ +# The character missing from the end of the filename (0=unknown) +>>9 string >\0 \b, %-.1s is last character of original name +# https://www.betaarchive.com/forum/viewtopic.php?t=26161 +# Compression mode: "A" (0x41) found but sometimes "B" in Windows 3.1 builds 026 and 034e +>>8 string !A \b, %-.1s method +>>10 ulelong >0 \b, original size: %u bytes +# QBasic SZDD variant +3 string \x88\xf0\x27 +>0 string SZ\x20 MS Compress archive data, QBasic variant +!:mime application/x-ms-compress-sz +#!:ext ??$ +>>8 ulelong >0 \b, original size: %u bytes + +# MP3 (archiver, not lossy audio compression) +0 string MP3\x1a MP3-Archiver archive data +# ZET +0 string OZ\xc3\x9d ZET archive data +# TSComp +0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data +# ARQ +0 string gW\4\1 ARQ archive data +# Squash +3 string OctSqu Squash archive data +# Terse +0 string \5\1\1\0 Terse archive data +# PUCrunch +0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data +# UHarc +0 string UHA UHarc archive data +# ABComp +0 string \2AB ABComp archive data +0 string \3AB2 ABComp archive data +# CMP +0 string CO\0 CMP archive data +# Splint +0 string \x93\xb9\x06 Splint archive data +# InstallShield +0 string \x13\x5d\x65\x8c InstallShield Z archive Data +# Gather +1 string GTH Gather archive data +# BOA +0 string BOA BOA archive data +# RAX +0 string ULEB\xa RAX archive data +# Xtreme +0 string ULEB\0 Xtreme archive data +# Pack Magic +0 string @\xc3\xa2\1\0 Pack Magic archive data +# BTS +0 belong&0xfeffffff 0x1a034465 BTS archive data +# ELI 5750 +0 string Ora\ ELI 5750 archive data +# QFC +0 string \x1aFC\x1a QFC archive data +0 string \x1aQF\x1a QFC archive data +# PRO-PACK +0 string RNC PRO-PACK archive data +# 777 +0 string 777 777 archive data +# LZS221 +0 string sTaC LZS221 archive data +# HPA +0 string HPA HPA archive data +# Arhangel +0 string LG Arhangel archive data +# EXP1, uses bzip2 +0 string 0123456789012345BZh EXP1 archive data +# IMP +0 string IMP\xa IMP archive data +# NRV +0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data +# Squish +0 string \x73\xb2\x90\xf4 Squish archive data +# Par +0 string PHILIPP Par archive data +0 string PAR Par archive data +# HIT +0 string UB HIT archive data +# SBX +0 belong&0xfffff000 0x53423000 SBX archive data +# NaShrink +0 string NSK NaShrink archive data +# SAPCAR +0 string #\ CAR\ archive\ header SAPCAR archive data +0 string CAR\ 2.00RG SAPCAR archive data +# Disintegrator +0 string DST Disintegrator archive data +# ASD +0 string ASD ASD archive data +# InstallShield CAB +0 string ISc( InstallShield CAB +# TOP4 +0 string T4\x1a TOP4 archive data +# BatComp left out: sig looks like COM executable +# so TODO: get real 4dos batcomp file and find sig +# BlakHole +0 string BH\5\7 BlakHole archive data +# BIX +0 string BIX0 BIX archive data +# ChiefLZA +0 string ChfLZ ChiefLZA archive data +# Blink +0 string Blink Blink archive data +# Logitech Compress +0 string \xda\xfa Logitech Compress archive data +# ARS-Sfx (FIXME: really a SFX? then goto COM/EXE) +1 string (C)\ STEPANYUK ARS-Sfx archive data +# AKT/AKT32 +0 string AKT32 AKT32 archive data +0 string AKT AKT archive data +# NPack +0 string MSTSM NPack archive data +# PFT +0 string \0\x50\0\x14 PFT archive data +# SemOne +0 string SEM SemOne archive data +# PPMD +0 string \x8f\xaf\xac\x84 PPMD archive data +# FIZ +0 string FIZ FIZ archive data +# MSXiE +0 belong&0xfffff0f0 0x4d530000 MSXiE archive data +# DeepFreezer +0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data +# DC +0 string =2 string \x2\x4 Xpack DiskImage archive data +#!:ext xdi +# XPack Data +# *.xpa updated by Joerg Jenderek Sep 2015 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/ +0 string xpa XPA +#!:ext xpa +# XPA32 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/xpa32.zip +# created by XPA32.EXE version 1.0.2 for Windows +>0 string xpa\0\1 \b32 archive data +# created by XPACK.COM version 1.67m or 1.67r with short 0x1800 +>3 ubeshort !0x0001 \bck archive data +# XPack Single Data +# changed by Joerg Jenderek Sep 2015 back to like in version 5.12 +# letter 'I'+ acute accent is equivalent to \xcd +0 string \xcd\ jm Xpack single archive data +#!:mime application/x-xpa-compressed +#!:ext xpa + +# TODO: missing due to unknown magic/magic at end of file: +#DWC +#ARG +#ZAR +#PC/3270 +#InstallIt +#RKive +#RK +#XPack Diskimage + +# These were inspired by idarc, but actually verified +# Dzip archiver (.dz) +# Update: Joerg Jenderek +# URL: http://speeddemosarchive.com/dzip/ +# reference: http://speeddemosarchive.com/dzip/dz29src.zip/main.c +# GRR: line below is too general as it matches also ASCII texts like Doszip commander help dz.txt +0 string DZ +# latest version is 2.9 dated 7 may 2003 +>2 byte <4 Dzip archive data +!:mime application/x-dzip +#!:ext dz +>>2 byte x \b, version %i +>>3 byte x \b.%i +>>4 ulelong x \b, offset 0x%x +>>8 ulelong x \b, %u files +# ZZip archiver (.zz) +0 string ZZ\ \0\0 ZZip archive data +0 string ZZ0 ZZip archive data +# PAQ archiver (.paq) +0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data +0 string PAQ PAQ archive data +>3 byte&0xf0 0x30 +>>3 byte x (v%c) +# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP) +0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data +0 string JARCS JAR (ARJ Software, Inc.) archive data + +# ARJ archiver (jason@jarthur.Claremont.EDU) +0 leshort 0xea60 ARJ archive data +!:mime application/x-arj +>5 byte x \b, v%d, +>8 byte &0x04 multi-volume, +>8 byte &0x10 slash-switched, +>8 byte &0x20 backup, +>34 string x original name: %s, +>7 byte 0 os: MS-DOS +>7 byte 1 os: PRIMOS +>7 byte 2 os: Unix +>7 byte 3 os: Amiga +>7 byte 4 os: Macintosh +>7 byte 5 os: OS/2 +>7 byte 6 os: Apple ][ GS +>7 byte 7 os: Atari ST +>7 byte 8 os: NeXT +>7 byte 9 os: VAX/VMS +>3 byte >0 %d] +# [JW] idarc says this is also possible +2 leshort 0xea60 ARJ archive data + +# HA archiver (Greg Roelofs, newt@uchicago.edu) +# This is a really bad format. A file containing HAWAII will match this... +#0 string HA HA archive data, +#>2 leshort =1 1 file, +#>2 leshort >1 %hu files, +#>4 byte&0x0f =0 first is type CPY +#>4 byte&0x0f =1 first is type ASC +#>4 byte&0x0f =2 first is type HSC +#>4 byte&0x0f =0x0e first is type DIR +#>4 byte&0x0f =0x0f first is type SPECIAL +# suggestion: at least identify small archives (<1024 files) +0 belong&0xffff00fc 0x48410000 HA archive data +>2 leshort =1 1 file, +>2 leshort >1 %u files, +>4 byte&0x0f =0 first is type CPY +>4 byte&0x0f =1 first is type ASC +>4 byte&0x0f =2 first is type HSC +>4 byte&0x0f =0x0e first is type DIR +>4 byte&0x0f =0x0f first is type SPECIAL + +# HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz) +0 string HPAK HPACK archive data + +# JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net +0 string \351,\001JAM\ JAM archive, +>7 string >\0 version %.4s +>0x26 byte =0x27 - +>>0x2b string >\0 label %.11s, +>>0x27 lelong x serial %08x, +>>0x36 string >\0 fstype %.8s + +# Very old RAR archive +# https://jasonblanks.com/wp-includes/images/papers/KnowyourarchiveRAR.pdf +0 string RE\x7e\x5e RAR archive data (26 string \x8\0\0\0mimetypeapplication/ + +# KOffice / OpenOffice & StarOffice / OpenDocument formats +# From: Abel Cheung + +# KOffice (1.2 or above) formats +# (mimetype contains "application/vnd.kde.") +>>50 string vnd.kde. KOffice (>=1.2) +>>>58 string karbon Karbon document +>>>58 string kchart KChart document +>>>58 string kformula KFormula document +>>>58 string kivio Kivio document +>>>58 string kontour Kontour document +>>>58 string kpresenter KPresenter document +>>>58 string kspread KSpread document +>>>58 string kword KWord document + +# OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) +# (mimetype contains "application/vnd.sun.xml.") +# URL: https://en.wikipedia.org/wiki/OpenOffice.org_XML +# reference: http://fileformats.archiveteam.org/wiki/OpenOffice.org_XML +>>50 string vnd.sun.xml. OpenOffice.org 1.x +>>>62 string writer Writer +>>>>68 byte !0x2e document +!:mime application/vnd.sun.xml.writer +#!:ext sxw +>>>>68 string .template template +!:mime application/vnd.sun.xml.writer.template +#!:ext stw +>>>>68 string .web Web template +!:mime application/vnd.sun.xml.writer.web +#!:ext stw +>>>>68 string .global global document +!:mime application/vnd.sun.xml.writer.global +#!:ext sxg +>>>62 string calc Calc +>>>>66 byte !0x2e spreadsheet +!:mime application/vnd.sun.xml.calc +#!:ext sxc +>>>>66 string .template template +!:mime application/vnd.sun.xml.calc.template +#!:ext stc +>>>62 string draw Draw +>>>>66 byte !0x2e document +!:mime application/vnd.sun.xml.draw +#!:ext sxd +>>>>66 string .template template +!:mime application/vnd.sun.xml.draw.template +#!:ext std +>>>62 string impress Impress +>>>>69 byte !0x2e presentation +!:mime application/vnd.sun.xml.impress +#!:ext sxi +>>>>69 string .template template +!:mime application/vnd.sun.xml.impress.template +#!:ext sti +>>>62 string math Math document +!:mime application/vnd.sun.xml.math +#!:ext sxm +>>>62 string base Database file +!:mime application/vnd.sun.xml.base +#!:ext sdb + +# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) +# URL: http://fileformats.archiveteam.org/wiki/OpenDocument +# https://lists.oasis-open.org/archives/office/200505/msg00006.html +# (mimetype contains "application/vnd.oasis.opendocument.") +>>50 string vnd.oasis.opendocument. OpenDocument +>>>73 string text +>>>>77 byte !0x2d Text +!:mime application/vnd.oasis.opendocument.text +#!:ext odt +>>>>77 string -template Text Template +!:mime application/vnd.oasis.opendocument.text-template +#!:ext ott +>>>>77 string -web HTML Document Template +!:mime application/vnd.oasis.opendocument.text-web +#!:ext oth +>>>>77 string -master Master Document +!:mime application/vnd.oasis.opendocument.text-master +#!:ext odm +>>>73 string graphics +>>>>81 byte !0x2d Drawing +!:mime application/vnd.oasis.opendocument.graphics +#!:ext odg +>>>>81 string -template Drawing Template +!:mime application/vnd.oasis.opendocument.graphics-template +#!:ext otg +>>>73 string presentation +>>>>85 byte !0x2d Presentation +!:mime application/vnd.oasis.opendocument.presentation +#!:ext odp +>>>>85 string -template Presentation Template +!:mime application/vnd.oasis.opendocument.presentation-template +#!:ext otp +>>>73 string spreadsheet +>>>>84 byte !0x2d Spreadsheet +!:mime application/vnd.oasis.opendocument.spreadsheet +#!:ext ods +>>>>84 string -template Spreadsheet Template +!:mime application/vnd.oasis.opendocument.spreadsheet-template +#!:ext ots +>>>73 string chart +>>>>78 byte !0x2d Chart +!:mime application/vnd.oasis.opendocument.chart +#!:ext odc +>>>>78 string -template Chart Template +!:mime application/vnd.oasis.opendocument.chart-template +#!:ext otc +>>>73 string formula +>>>>80 byte !0x2d Formula +!:mime application/vnd.oasis.opendocument.formula +#!:ext odf +>>>>80 string -template Formula Template +!:mime application/vnd.oasis.opendocument.formula-template +#!:ext otf +# https://www.loc.gov/preservation/digital/formats/fdd/fdd000441.shtml +>>>73 string database Database +!:mime application/vnd.oasis.opendocument.database +#!:ext odb +# Valid for LibreOffice Base 6.0.1.1 at least +>>>73 string base Database +# https://bugs.documentfoundation.org/show_bug.cgi?id=45854 +!:mime application/vnd.oasis.opendocument.database +#!:mime application/vnd.oasis.opendocument.base +#!:ext odb +>>>73 string image +>>>>78 byte !0x2d Image +!:mime application/vnd.oasis.opendocument.image +#!:ext odi +>>>>78 string -template Image Template +!:mime application/vnd.oasis.opendocument.image-template +#!:ext oti + +# EPUB (OEBPS) books using OCF (OEBPS Container Format) +# https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. +# From: Ralf Brown +>>50 string epub+zip EPUB document +!:mime application/epub+zip + +# From: Joerg Jenderek +# URL: http://en.wikipedia.org/wiki/CorelDRAW +# NOTE: version; til 2 WL-based; from 3 til 13 by ./riff; from 14 zip based +>>50 string x-vnd.corel. Corel +>>>62 string draw.document+zip Draw drawing, version 14-16 +!:mime application/x-vnd.corel.draw.document+zip +#!:ext cdr +>>>62 string draw.template+zip Draw template, version 14-16 +!:mime application/x-vnd.corel.draw.template+zip +#!:ext cdrt +>>>62 string zcf.draw.document+zip Draw drawing, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.document+zip +#!:ext cdr +>>>62 string zcf.draw.template+zip Draw template, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.template+zip +#!:ext cdt/cdrt +# URL: http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html +>>>62 string zcf.pattern+zip Draw pattern, version 22 +!:mime application/x-vnd.corel.zcf.pattern+zip +#!:ext pat +# URL: https://en.wikipedia.org/wiki/Corel_Designer +# Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer +# Note: called by TrID "Corel DESIGN graphics" +>>>62 string designer.document+zip DESIGNER graphics, version 14-16 +!:mime application/x-vnd.corel.designer.document+zip +#!:ext des +>>>62 string zcf.designer.document+zip DESIGNER graphics, version 17-21 +!:mime application/x-vnd.corel.zcf.designer.document+zip +#!:ext des +# URL: http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/ +# CorelDRAW-Corel-Symbol-Library-CSL.html +>>>62 string symbol.library+zip Symbol Library, version 6-16.3 +!:mime application/x-vnd.corel.symbol.library+zip +#!:ext csl +>>>62 string zcf.symbol.library+zip Symbol Library, version 17-22 +!:mime application/x-vnd.corel.zcf.symbol.library+zip +#!:ext csl + +# Catch other ZIP-with-mimetype formats +# In a ZIP file, the bytes immediately after a member's contents are +# always "PK". The 2 regex rules here print the "mimetype" member's +# contents up to the first 'P'. Luckily, most MIME types don't contain +# any capital 'P's. This is a kludge. +# (mimetype contains "application/") +>>50 default x Zip data +>>>38 regex [!-OQ-~]+ (MIME type "%s"?) +!:mime application/zip +# (mimetype contents other than "application/*") +>26 string \x8\0\0\0mimetype +>>38 string !application/ +>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?) +!:mime application/zip + +# Java Jar files +>(26.s+30) leshort 0xcafe Java archive data (JAR) +!:mime application/java-archive + +# iOS App +>(26.s+30) leshort !0xcafe +>>26 string !\x8\0\0\0mimetype +>>>30 string Payload/ +>>>>38 search/64 .app/ iOS App +!:mime application/x-ios-app + +>30 search/100/b application/epub+zip EPUB document +!:mime application/epub+zip + +# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) +# Next line excludes specialized formats: +>(26.s+30) leshort !0xcafe +>>30 search/100/b !application/epub+zip +>>>26 string !\x8\0\0\0mimetype Zip archive data +!:mime application/zip +>>>>4 beshort x \b, at least +>>>>4 beshort x to extract +>>>>8 beshort x \b, compression method= +>>>>0x161 string WINZIP \b, WinZIP self-extracting + +# StarView Metafile +# From Pierre Ducroquet +0 string VCLMTF StarView MetaFile +>6 beshort x \b, version %d +>8 belong x \b, size %d + +# Zoo archiver +20 lelong 0xfdc4a7dc Zoo archive data +!:mime application/x-zoo +>4 byte >48 \b, v%c. +>>6 byte >47 \b%c +>>>7 byte >47 \b%c +>32 byte >0 \b, modify: v%d +>>33 byte x \b.%d+ +>42 lelong 0xfdc4a7dc \b, +>>70 byte >0 extract: v%d +>>>71 byte x \b.%d+ + +# Shell archives +10 string #\ This\ is\ a\ shell\ archive shell archive text +!:mime application/octet-stream + +# +# LBR. NB: May conflict with the questionable +# "binary Computer Graphics Metafile" format. +# +0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data +# +# From Rafael Laboissiere +# The Project Revision Control System (see +# http://prcs.sourceforge.net) generates a packaged project +# file which is recognized by the following entry: +0 leshort 0xeb81 PRCS packaged project + +# Microsoft cabinets +# by David Necas (Yeti) +#0 string MSCF\0\0\0\0 Microsoft cabinet file data, +#>25 byte x v%d +#>24 byte x \b.%d +# MPi: All CABs have version 1.3, so this is pointless. +# Better magic in debian-additions. + +# GTKtalog catalogs +# by David Necas (Yeti) +4 string gtktalog\ GTKtalog catalog data, +>13 string 3 version 3 +>>14 beshort 0x677a (gzipped) +>>14 beshort !0x677a (not gzipped) +>13 string >3 version %s + +############################################################################ +# Parity archive reconstruction file, the 'par' file format now used on Usenet. +0 string PAR\0 PARity archive data +>48 leshort =0 - Index file +>48 leshort >0 - file number %d + +# Felix von Leitner +0 string d8:announce BitTorrent file +!:mime application/x-bittorrent +# Durval Menezes, +0 string d13:announce-list BitTorrent file +!:mime application/x-bittorrent +0 string d7:comment BitTorrent file +!:mime application/x-bittorrent +0 string d4:info BitTorrent file +!:mime application/x-bittorrent + +# Atari MSA archive - Teemu Hukkanen +0 beshort 0x0e0f Atari MSA archive data +>2 beshort x \b, %d sectors per track +>4 beshort 0 \b, 1 sided +>4 beshort 1 \b, 2 sided +>6 beshort x \b, starting track: %d +>8 beshort x \b, ending track: %d + +# Alternate ZIP string (amc@arwen.cs.berkeley.edu) +0 string PK00PK\003\004 Zip archive data +!:mime application/zip +#!:ext zip/cbz + +# ACE archive (from http://www.wotsit.org/download.asp?f=ace) +# by Stefan `Sec` Zehl +7 string **ACE** ACE archive data +>15 byte >0 version %d +>16 byte =0x00 \b, from MS-DOS +>16 byte =0x01 \b, from OS/2 +>16 byte =0x02 \b, from Win/32 +>16 byte =0x03 \b, from Unix +>16 byte =0x04 \b, from MacOS +>16 byte =0x05 \b, from WinNT +>16 byte =0x06 \b, from Primos +>16 byte =0x07 \b, from AppleGS +>16 byte =0x08 \b, from Atari +>16 byte =0x09 \b, from Vax/VMS +>16 byte =0x0A \b, from Amiga +>16 byte =0x0B \b, from Next +>14 byte x \b, version %d to extract +>5 leshort &0x0080 \b, multiple volumes, +>>17 byte x \b (part %d), +>5 leshort &0x0002 \b, contains comment +>5 leshort &0x0200 \b, sfx +>5 leshort &0x0400 \b, small dictionary +>5 leshort &0x0800 \b, multi-volume +>5 leshort &0x1000 \b, contains AV-String +>>30 string \x16*UNREGISTERED\x20VERSION* (unregistered) +>5 leshort &0x2000 \b, with recovery record +>5 leshort &0x4000 \b, locked +>5 leshort &0x8000 \b, solid +# Date in MS-DOS format (whatever that is) +#>18 lelong x Created on + +# sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann +# +0x1A string sfArk sfArk compressed Soundfont +>0x15 string 2 +>>0x1 string >\0 Version %s +>>0x2A string >\0 : %s + +# DR-DOS 7.03 Packed File *.??_ +# Reference: http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm +# Note: unpacked by PNUNPACK.EXE +0 string Packed\ File\ +# by looking for Control-Z skip ASCII text starting with Packed File +>0x18 ubyte 0x1a Personal NetWare Packed File +!:mime application/x-novell-compress +#!:ext ??_ +>>12 string x \b, was "%.12s" +# 1 or 2 +#>>0x19 ubyte x \b, at 0x19 %u +>>0x1b ulelong x with %u bytes + +# EET archive +# From: Tilman Sauerbeck +0 belong 0x1ee7ff00 EET archive +!:mime application/x-eet + +# rzip archives +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +# From: Joerg Jenderek +# URL: https://help.foxitsoftware.com/kb/install-fzip-file.php +# reference: http://mark0.net/download/triddefs_xml.7z/ +# defs/f/fzip.trid.xml +# Note: unknown compression; No "PK" zip magic; normally in directory like +# "%APPDATA%\Foxit Software\Addon\Foxit Reader\Install" +0 ubequad 0x2506781901010000 Foxit add-on/update +!:mime application/x-fzip +#!:ext fzip + +# From: "Robert Dale" +0 belong 123 dar archive, +>4 belong x label "%.8x +>>8 belong x %.8x +>>>12 beshort x %.4x" +>14 byte 0x54 end slice +>14 beshort 0x4e4e multi-part +>14 beshort 0x4e53 multi-part, with -S + +# Symbian installation files +# https://www.thouky.co.uk/software/psifs/sis.html +# http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf +8 lelong 0x10000419 Symbian installation file +!:mime application/vnd.symbian.install +>4 lelong 0x1000006D (EPOC release 3/4/5) +>4 lelong 0x10003A12 (EPOC release 6) +0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x) +!:mime x-epoc/x-sisx-app + +# From "Nelson A. de Oliveira" +0 string MPQ\032 MoPaQ (MPQ) archive + +# From: "Nelson A. de Oliveira" +# .kgb +0 string KGB_arch KGB Archiver file +>10 string x with compression level %.1s + +# Type: Parity Archive +# From: Daniel van Eeden +0 string PAR2 Parity Archive Volume Set + +# Bacula volume format. (Volumes always start with a block header.) +# URL: https://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html +# From: Adam Buchbinder +12 string BB02 Bacula volume +>20 bedate x \b, started %s + +# ePub is XHTML + XML inside a ZIP archive. The first member of the +# archive must be an uncompressed file called 'mimetype' with contents +# 'application/epub+zip' + + +# From: "Michael Gorny" +# ZPAQ: http://mattmahoney.net/dc/zpaq.html +0 string zPQ ZPAQ stream +>3 byte x \b, level %d +# From: Barry Carter +# https://encode.ru/threads/456-zpaq-updates/page32 +0 string 7kSt ZPAQ file + +# BBeB ebook, unencrypted (LRF format) +# URL: https://www.sven.de/librie/Librie/LrfFormat +# From: Adam Buchbinder +0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted +>8 beshort x \b, version %d +>36 byte 1 \b, front-to-back +>36 byte 16 \b, back-to-front +>42 beshort x \b, (%dx, +>44 beshort x %d) + +# Symantec GHOST image by Joerg Jenderek at May 2014 +# https://us.norton.com/ghost/ +# https://www.garykessler.net/library/file_sigs.html +0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image +# *.GHO +>2 ubyte&0x08 0x00 \b, first file +# *.GHS or *.[0-9] with cns program option +>2 ubyte&0x08 0x08 \b, split file +# part of split index interesting for *.ghs +>>4 ubyte x id=0x%x +# compression tag minus one equals numeric compression command line switch z[1-9] +>3 ubyte 0 \b, no compression +>3 ubyte 2 \b, fast compression (Z1) +>3 ubyte 3 \b, medium compression (Z2) +>3 ubyte >3 +>>3 ubyte <11 \b, compression (Z%d-1) +>2 ubyte&0x08 0x00 +# ~ 30 byte password field only for *.gho +>>12 ubequad !0 \b, password protected +>>44 ubyte !1 +# 1~Image All, sector-by-sector only for *.gho +>>>10 ubyte 1 \b, sector copy +# 1~Image Boot track only for *.gho +>>>43 ubyte 1 \b, boot track +# 1~Image Disc only for *.gho implies Image Boot track and sector copy +>>44 ubyte 1 \b, disc sector copy +# optional image description only *.gho +>>0xff string >\0 "%-.254s" +# look for DOS sector end sequence +>0xE08 search/7776 \x55\xAA +>>&-512 indirect x \b; contains + +# Google Chrome extensions +# https://developer.chrome.com/extensions/crx +# https://developer.chrome.com/extensions/hosting +0 string Cr24 Google Chrome extension +!:mime application/x-chrome-extension +>4 ulong x \b, version %u + +# SeqBox - Sequenced container +# ext: sbx, seqbox +# Marco Pontello marcopon@gmail.com +# reference: https://github.com/MarcoPon/SeqBox +0 string SBx SeqBox, +>3 byte x version %d + +# LyNX archive +56 string USE\040LYNX\040TO\040DISSOLVE\040THIS\040FILE LyNX archive + +# From: Joerg Jenderek +# URL: https://www.acronis.com/ +# Reference: https://en.wikipedia.org/wiki/TIB_(file_format) +# Note: only tested with True Image 2013 Build 5962 and 2019 Build 14110 +0 ubequad 0xce24b9a220000000 Acronis True Image backup +!:mime application/x-acronis-tib +#!:ext tib +# 01000000 +#>20 ubelong x \b, at 20 0x%x +# 20000000 +#>28 ubelong x \b, at 28 0x%x +# strings like "Generic- SD/MMC 1.00" "Unknown Disk" "Msft Virtual Disk 1.0" +# ??? +# strings like "\Device\0000011e" "\Device\0000015a" +#>0 search/0x6852300/cs \\Device\\ +#>>&-1 pstring x \b, %s +# "\Device\HarddiskVolume30" "\Device\HarddiskVolume39" +#>>>&1 search/180/cs \\Device\\ +#>>>>&-1 pstring x \b, %s +#>>>>>&0 search/29/cs \0\0\xc8\0 +# disk label +#>>>>>>&10 lestring16 x \b, disk label %11.11s +#>>>>>>&9 plestring16 x \b, disk label "%11.11s" +#>>>>>>&10 ubequad x %16.16llx + + +# Gentoo XPAK binary package +# by Michal Gorny +# https://gitweb.gentoo.org/proj/portage.git/tree/man/xpak.5 +-4 string STOP +>-16 string XPAKSTOP Gentoo binary package (XPAK) + +# From: Joerg Jenderek +# URL: https://kodi.wiki/view/TexturePacker +# Reference: https://mirrors.kodi.tv/releases/source/17.3-Krypton.tar.gz +# /xbmc-Krypton/xbmc/guilib/XBTF.h +# /xbmc-Krypton/xbmc/guilib/XBTF.cpp +0 string XBTF +# skip ASCII text by looking for terminating \0 of path +>264 ubyte 0 XBMC texture package +!:mime application/x-xbmc-xbt +#!:ext xbt +# XBTF_VERSION 2 +>>4 string !2 \b, version %-.1s +# nofFiles /xbmc-Krypton/xbmc/guilib/XBTFReader.cpp +>>5 ulelong x \b, %u file +# plural s +>>5 ulelong >1 \bs +# path[CXBTFFile[MaximumPathLength=256] +>>9 string x \b, 1st %s + +# ALZIP archive +# by Hyungjun Park , Hajin Jang +# http://kippler.com/win/unalz/ +# https://salsa.debian.org/l10n-korean-team/unalz +0 string ALZ\001 ALZ archive data +#!:ext alz + +# https://cf-aldn.altools.co.kr/setup/EGG_Specification.zip +0 string EGGA EGG archive data, +#!:ext egg +>5 byte x version %u +>4 byte x \b.%u +>>0x0E ulelong =0x08E28222 +>>0x0E ulelong =0x24F5A262 \b, split +>>0x0E ulelong =0x24E5A060 \b, solid +>>0x0E default x \b, unknown + +# PAQ9A archive +# URL: http://mattmahoney.net/dc/#paq9a +# Note: Line 1186 of paq9a.cpp gives the magic bytes +0 string pQ9\001 PAQ9A archive + +#------------------------------------------------------------------------------ +# $File: compress,v 1.80 2021/03/15 17:49:24 christos Exp $ +# compress: file(1) magic for pure-compression formats (no archives) +# +# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. +# +# Formats for various forms of compressed data +# Formats for "compress" proper have been moved into "compress.c", +# because it tries to uncompress it to figure out what's inside. + +# standard unix compress +0 string \037\235 compress'd data +!:mime application/x-compress +!:apple LZIVZIVU +>2 byte&0x80 >0 block compressed +>2 byte&0x1f x %d bits + +# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver) +# URL: https://en.wikipedia.org/wiki/Gzip +# Reference: https://tools.ietf.org/html/rfc1952 +# Update: Joerg Jenderek, Apr 2019 +# Edited by Chris Chittleborough , March 2002 +# * Original filename is only at offset 10 if "extra field" absent +# * Produce shorter output - notably, only report compression methods +# other than 8 ("deflate", the only method defined in RFC 1952). +# Note: find defs -iname '*.trid.xml' -exec grep -q '1F8B08' {} \; -ls +# TODO: +# FBR Blueberry FlashBack screen Record https://www.flashbackrecorder.com/ +# KPR KOffice/Calligra KPresenter application/x-kpresenter +# KPT KOffice/Calligra KPresenter template? application/x-kpresenter +# SAV Diggles Saved Game File http://www.innonics.com +# SAV FarCry (demo) saved game http://www.farcry-thegame.com +# DAT ZOAGZIP game data format http://en.wikipedia.org/wiki/SD_Gundam_Capsule_Fighter +0 string \037\213 +# to display gzip compressed (strength=100=2*50) before other (strength=50)? +#!:strength * 2 +# no FNAME and FCOMMENT bit implies no file name/comment. That means only binary +>3 byte&0x18 =0 +# For binary gzipped no ASCII text should occur +# mcd-monu-cad.trid.xml +>>10 string MCD Monu-Cad Drawing, Component or Font +#>>36 string Created\ with\ MONU-CAD +#!:mime application/octet-stream +# http://fileformats.archiveteam.org/wiki/Monu-CAD +# http://www.monucad.com/downloads/FullDemo-2005.EXE +# /HANDS96.MCC Component +# /DEMO_DD01.MCD Drawing +# /MCALF020.FNT Font +#!:ext mcc/mcd/fnt +# http://www.generalcadd.com +>>10 string GXD General CADD, Drawing or Component +#!:mime application/octet-stream +# /gxc/BUILDINGEDGE.gxc Component +# /gxd/HOCKETT-STPAUL-WRHSE.gxd Drawing +# /gxd/POWERLAND-MILL-ADD-11.gxd Drawing v9.1.06 +#!:ext gxc/gxd +#>>>13 ubyte 0 \b, version 0 +>>>13 string 09 \b, version 9 +# other gzipped binary like gzipped tar, VirtualBox extension package,... +>>10 default x gzip compressed data +!:mime application/gzip +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# gzipped TAR or VirtualBox extension package +#!:mime application/x-compressed-tar +#!:mime application/x-virtualbox-vbox-extpack +# https://www.w3.org/TR/SVG/mimereg.html +#!:mime image/image/svg+xml-compressed +# zlib.3.gz +# microcode-20180312.tgz +# tpz same as tgz +# lua-md5_1.2-1_i386_i486.ipk https://en.wikipedia.org/wiki/Opkg +# Oracle_VM_VirtualBox_Extension_Pack-5.0.12-104815.vbox-extpack +#!:ext gz/tgz/tpz/ipk/vbox-extpack/svgz +# FNAME/FCOMMENT bit implies file name/comment as iso-8859-1 text +>3 byte&0x18 >0 gzip compressed data +!:mime application/gzip +# gzipped tar, gzipped Abiword document +#!:mime application/x-compressed-tar +#!:mime application/x-abiword-compressed +#!:mime image/image/svg+xml-compressed +# kleopatra_splashscreen.svgz gzipped .svg +#!:ext gz/tgz/tpz/zabw/svgz +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# display information of gzip compressed files +#>2 byte x THIS iS GZIP +>2 byte <8 \b, reserved method +>2 byte >8 \b, unknown method +>3 byte &0x01 \b, ASCII +>3 byte &0x02 \b, has CRC +>3 byte &0x04 \b, extra field +>3 byte&0xC =0x08 +>>10 string x \b, was "%s" +>3 byte &0x10 \b, has comment +>3 byte &0x20 \b, encrypted +>4 ledate >0 \b, last modified: %s +>8 byte 2 \b, max compression +>8 byte 4 \b, max speed +>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT) +>9 byte =0x01 \b, from Amiga +>9 byte =0x02 \b, from VMS +>9 byte =0x03 \b, from Unix +>9 byte =0x04 \b, from VM/CMS +>9 byte =0x05 \b, from Atari +>9 byte =0x06 \b, from HPFS filesystem (OS/2, NT) +>9 byte =0x07 \b, from MacOS +>9 byte =0x08 \b, from Z-System +>9 byte =0x09 \b, from CP/M +>9 byte =0x0A \b, from TOPS/20 +>9 byte =0x0B \b, from NTFS filesystem (NT) +>9 byte =0x0C \b, from QDOS +>9 byte =0x0D \b, from Acorn RISCOS +# size of the original (uncompressed) input data modulo 2^32 +#>-4 ulelong x \b, original size modulo 2^32 %u +#ERROR: line 114: non zero offset 1048572 at level 1 + +# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis +0 string \037\036 packed data +!:mime application/octet-stream +>2 belong >1 \b, %d characters originally +>2 belong =1 \b, %d character originally +# +# This magic number is byte-order-independent. +0 short 0x1f1f old packed data +!:mime application/octet-stream + +# XXX - why *two* entries for "compacted data", one of which is +# byte-order independent, and one of which is byte-order dependent? +# +0 short 0x1fff compacted data +!:mime application/octet-stream +# This string is valid for SunOS (BE) and a matching "short" is listed +# in the Ultrix (LE) magic file. +0 string \377\037 compacted data +!:mime application/octet-stream +0 short 0145405 huf output +!:mime application/octet-stream + +# bzip2 +0 string BZh bzip2 compressed data +!:mime application/x-bzip2 +>3 byte >47 \b, block size = %c00k + +# bzip a block-sorting file compressor +# by Julian Seward and others +0 string BZ0 bzip compressed data +!:mime application/x-bzip +>3 byte >47 \b, block size = %c00k + +# lzip +0 string LZIP lzip compressed data +!:mime application/x-lzip +>4 byte x \b, version: %d + +# squeeze and crunch +# Michael Haardt +0 beshort 0x76FF squeezed data, +>4 string x original name %s +0 beshort 0x76FE crunched data, +>2 string x original name %s +0 beshort 0x76FD LZH compressed data, +>2 string x original name %s + +# Freeze +0 string \037\237 frozen file 2.1 +0 string \037\236 frozen file 1.0 (or gzip 0.5) + +# SCO compress -H (LZH) +0 string \037\240 SCO compress -H (LZH) data + +# European GSM 06.10 is a provisional standard for full-rate speech +# transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse +# excitation/long term prediction) coding at 13 kbit/s. +# +# There's only a magic nibble (4 bits); that nibble repeats every 33 +# bytes. This isn't suited for use, but maybe we can use it someday. +# +# This will cause very short GSM files to be declared as data and +# mismatches to be declared as data too! +#0 byte&0xF0 0xd0 data +#>33 byte&0xF0 0xd0 +#>66 byte&0xF0 0xd0 +#>99 byte&0xF0 0xd0 +#>132 byte&0xF0 0xd0 GSM 06.10 compressed audio + +# lzop from +0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data +>9 beshort <0x0940 +>>9 byte&0xf0 =0x00 - version 0. +>>9 beshort&0x0fff x \b%03x, +>>13 byte 1 LZO1X-1, +>>13 byte 2 LZO1X-1(15), +>>13 byte 3 LZO1X-999, +## >>22 bedate >0 last modified: %s, +>>14 byte =0x00 os: MS-DOS +>>14 byte =0x01 os: Amiga +>>14 byte =0x02 os: VMS +>>14 byte =0x03 os: Unix +>>14 byte =0x05 os: Atari +>>14 byte =0x06 os: OS/2 +>>14 byte =0x07 os: MacOS +>>14 byte =0x0A os: Tops/20 +>>14 byte =0x0B os: WinNT +>>14 byte =0x0E os: Win32 +>9 beshort >0x0939 +>>9 byte&0xf0 =0x00 - version 0. +>>9 byte&0xf0 =0x10 - version 1. +>>9 byte&0xf0 =0x20 - version 2. +>>9 beshort&0x0fff x \b%03x, +>>15 byte 1 LZO1X-1, +>>15 byte 2 LZO1X-1(15), +>>15 byte 3 LZO1X-999, +## >>25 bedate >0 last modified: %s, +>>17 byte =0x00 os: MS-DOS +>>17 byte =0x01 os: Amiga +>>17 byte =0x02 os: VMS +>>17 byte =0x03 os: Unix +>>17 byte =0x05 os: Atari +>>17 byte =0x06 os: OS/2 +>>17 byte =0x07 os: MacOS +>>17 byte =0x0A os: Tops/20 +>>17 byte =0x0B os: WinNT +>>17 byte =0x0E os: Win32 + +# 4.3BSD-Quasijarus Strong Compression +# https://minnie.tuhs.org/Quasijarus/compress.html +0 string \037\241 Quasijarus strong compressed data + +# From: Cory Dikkers +0 string XPKF Amiga xpkf.library compressed data +0 string PP11 Power Packer 1.1 compressed data +0 string PP20 Power Packer 2.0 compressed data, +>4 belong 0x09090909 fast compression +>4 belong 0x090A0A0A mediocre compression +>4 belong 0x090A0B0B good compression +>4 belong 0x090A0C0C very good compression +>4 belong 0x090A0C0D best compression + +# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at) +# https://www.7-zip.org or DOC/7zFormat.txt +# +0 string 7z\274\257\047\034 7-zip archive data, +>6 byte x version %d +>7 byte x \b.%d +!:mime application/x-7z-compressed +#!:ext 7z/cb7 + +# Type: LZMA +0 lelong&0xffffff =0x5d +>12 leshort 0xff lzma compressed data, +!:mime application/x-lzma +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld +>12 leshort 0 lzma compressed data, +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld + +# http://tukaani.org/xz/xz-file-format.txt +0 ustring \xFD7zXZ\x00 xz compressed data, checksum +>7 byte&0xf 0x0 NONE +>7 byte&0xf 0x1 CRC32 +>7 byte&0xf 0x4 CRC64 +>7 byte&0xf 0xa SHA-256 + +!:strength * 2 +!:mime application/x-xz + +# https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt +0 string LRZI LRZIP compressed data +>4 byte x - version %d +>5 byte x \b.%d +!:mime application/x-lrzip + +# https://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html +0 lelong 0x184d2204 lz4 compressed data (v1.4+) +!:mime application/x-lz4 +# Added by osm0sis@xda-developers.com +0 lelong 0x184c2103 lz4 compressed data (v1.0-v1.3) +!:mime application/x-lz4 +0 lelong 0x184c2102 lz4-l compressed data (v0.1-v0.9) +!:mime application/x-lz4 + +# Zstandard/LZ4 skippable frames +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong&0xFFFFFFF0 0x184D2A50 +>(4.l+8) indirect x + +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong 0xEC30A437 Zstandard dictionary +!:mime application/x-std-dictionary +>4 lelong x (ID %u) + +# AFX compressed files (Wolfram Kleff) +2 string -afx- AFX compressed file data + +# Supplementary magic data for the file(1) command to support +# rzip(1). The format is described in magic(5). +# +# Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with +# this file. +# +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +0 string ArC\x01 FreeArc archive + +# Type: DACT compressed files +0 long 0x444354C3 DACT compressed data +>4 byte >-1 (version %i. +>5 byte >-1 %i. +>6 byte >-1 %i) +>7 long >0 , original size: %i bytes +>15 long >30 , block size: %i bytes + +# Valve Pack (VPK) files +0 lelong 0x55aa1234 Valve Pak file +>0x4 lelong x \b, version %u +>0x8 lelong x \b, %u entries + +# Snappy framing format +# https://code.google.com/p/snappy/source/browse/trunk/framing_format.txt +0 string \377\006\0\0sNaPpY snappy framed data +!:mime application/x-snappy-framed + +# qpress, https://www.quicklz.com/ +0 string qpress10 qpress compressed data +!:mime application/x-qpress + +# Zlib https://www.ietf.org/rfc/rfc6713.txt +0 string/b x +>0 beshort%31 =0 +>>0 byte&0xf =8 +>>>0 byte&0x80 =0 zlib compressed data +!:mime application/zlib + +# BWC compression +0 string BWC +>3 byte 0 BWC compressed data + +# UCL compression +0 bequad 0x00e955434cff011a UCL compressed data + +# Softlib archive +0 string SLIB Softlib archive +>4 leshort x \b, version %d +>6 leshort x (contains %d files) + +# URL: https://github.com/lzfse/lzfse/blob/master/src/lzfse_internal.h#L276 +# From: Eric Hall +0 string bvx- lzfse encoded, no compression +0 string bvx1 lzfse compressed, uncompressed tables +0 string bvx2 lzfse compressed, compressed tables +0 string bvxn lzfse encoded, lzvn compressed + +# pcxLib.exe compression program +# http://www.shikadi.net/moddingwiki/PCX_Library +0 string/b pcxLib + +#------------------------------------------------------------ +# $File: android,v 1.18 2021/02/23 00:51:10 christos Exp $ +# Various android related magic entries +#------------------------------------------------------------ + +# Dalvik .dex format. http://retrodev.com/android/dexformat.html +# From "Mike Fleming" +# Fixed to avoid regexec 17 errors on some dex files +# From "Tim Strazzere" +0 string dex\n +>0 regex dex\n[0-9]{2}\0 Dalvik dex file +>4 string >000 version %s +0 string dey\n +>0 regex dey\n[0-9]{2}\0 Dalvik dex file (optimized for host) +>4 string >000 version %s + +# Android bootimg format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/mkbootimg/bootimg.h +# https://github.com/djrbliss/loki/blob/master/loki.h#L43 +0 string ANDROID! Android bootimg +>1024 string LOKI \b, LOKI'd +>>1028 lelong 0 \b (boot) +>>1028 lelong 1 \b (recovery) +>8 lelong >0 \b, kernel +>>12 lelong >0 \b (0x%x) +>16 lelong >0 \b, ramdisk +>>20 lelong >0 \b (0x%x) +>24 lelong >0 \b, second stage +>>28 lelong >0 \b (0x%x) +>36 lelong >0 \b, page size: %d +>38 string >0 \b, name: %s +>64 string >0 \b, cmdline (%s) + +# Android sparse img format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/libsparse/sparse_format.h +0 lelong 0xed26ff3a Android sparse image +>4 leshort x \b, version: %d +>6 leshort x \b.%d +>16 lelong x \b, Total of %d +>12 lelong x \b %d-byte output blocks in +>20 lelong x \b %d input chunks. + +# Android binary XML magic +# In include/androidfw/ResourceTypes.h: +# RES_XML_TYPE = 0x0003 followed by the size of the header (ResXMLTree_header), +# which is 8 bytes (2 bytes type + 2 bytes header size + 4 bytes size). +0 lelong 0x00080003 Android binary XML + +# Android cryptfs footer +# From https://android.googlesource.com/\ +# platform/system/vold/+/refs/heads/master/cryptfs.h +0 lelong 0xd0b5b1c4 Android cryptfs footer +>4 leshort x \b, version: %d +>6 leshort x \b.%d + +# Android Vdex format +# From https://android.googlesource.com/\ +# platform/art/+/master/runtime/vdex_file.h +0 string vdex Android vdex file, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d + +# Android Vdex format, dexfile is currently being updated +# by android system +# From https://android.googlesource.com/\ +# platform/art/+/master/dex2oat/dex2oat.cc +0 string wdex Android vdex file, being processed by dex2oat, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d diff --git a/Final_Zip/AIK/KSU/OFRP/cleanup.sh b/Final_Zip/AIK/KSU/OFRP/cleanup.sh new file mode 100755 index 0000000..d8f1d61 --- /dev/null +++ b/Final_Zip/AIK/KSU/OFRP/cleanup.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# AIK-Linux/cleanup: reset working directory +# osm0sis @ xda-developers + +case $1 in + --help) echo "usage: cleanup.sh [--local] [--quiet]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + statarg="-f %Su"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) statarg="-c %U";; +esac; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; + +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + sudo=sudo; +fi; + +$sudo rm -rf ramdisk split_img *new.* || exit 1; + +case $1 in + --quiet) ;; + *) echo "Working directory cleaned.";; +esac; +exit 0; + diff --git a/Final_Zip/AIK/KSU/OFRP/repackimg.sh b/Final_Zip/AIK/KSU/OFRP/repackimg.sh new file mode 100755 index 0000000..5709f0f --- /dev/null +++ b/Final_Zip/AIK/KSU/OFRP/repackimg.sh @@ -0,0 +1,413 @@ +#!/bin/bash +# AIK-Linux/repackimg: repack ramdisk and build image +# osm0sis @ xda-developers + +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: repackimg.sh [--local] [--original] [--origsize] [--level <0-9>] [--avbkey ] [--forceelf]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + + javaver=$(java -version 2>&1 | head -n1 | cut -d\" -f2); + javamaj=$(echo $javaver | cut -d. -f1); + javamin=$(echo $javaver | cut -d. -f2); + if [ "$javamaj" -lt 9 ] && [ "$javamaj" -eq 1 -a "$javamin" -lt 8 ]; then + java() { "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" "$@"; } + fi; + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; +chmod -R 755 "$bin" "$aik/"*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -z "$(ls split_img/* 2>/dev/null)" -o ! -e ramdisk ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +while [ "$1" ]; do + case $1 in + --original) original=1;; + --origsize) origsize=1;; + --forceelf) repackelf=1;; + --level) + case $2 in + ''|*[!0-9]*) ;; + *) level="-$2"; lvltxt=" - Level: $2"; shift;; + esac; + ;; + --avbkey) + if [ "$2" ]; then + for keytest in "$2" "$cur/$2" "$aik/$2"; do + if [ ! -z "$(ls $keytest.pk8 2>/dev/null)" -a ! -z "$(ls $keytest.x509.* 2>/dev/null)" ]; then + avbkey="$keytest"; avbtxt=" - Key: $2"; shift; break; + fi; + done; + fi; + ;; + esac; + shift; +done; + +ramdiskcomp=`cat split_img/*-*ramdiskcomp 2>/dev/null`; +if [ -z "$(ls ramdisk/* 2>/dev/null)" ] && [ ! "$ramdiskcomp" = "empty" -a ! "$original" ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - RepackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +if [ ! -z "$(ls *-new.* 2>/dev/null)" ]; then + echo "Warning: Overwriting existing files!"; + echo " "; +fi; +rm -f "*-new.*"; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" ]; then + sudo=sudo; sumsg=" (as root)"; +else + cpioarg="-R 0:0"; +fi; + +if [ "$original" ]; then + echo "Repacking with original ramdisk..."; +elif [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: Using empty ramdisk for repack!"; + compext=.empty; + touch ramdisk-new.cpio$compext; +else + echo "Packing ramdisk$sumsg..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + if [ -z "$level" ]; then + case $ramdiskcomp in + xz) level=-1;; + lz4*) level=-9;; + esac; + fi; + echo "Using compression: $ramdiskcomp$lvltxt"; + repackcmd="$ramdiskcomp $level"; + compext=$ramdiskcomp; + case $ramdiskcomp in + gzip) compext=gz;; + lzop) compext=lzo;; + xz) repackcmd="xz $level -Ccrc32";; + lzma) repackcmd="xz $level -Flzma";; + bzip2) compext=bz2;; + lz4) repackcmd="$bin/$arch/lz4 $level";; + lz4-l) repackcmd="$bin/$arch/lz4 $level -l"; compext=lz4;; + cpio) repackcmd="cat"; compext="";; + *) abort; exit 1;; + esac; + if [ "$compext" ]; then + compext=.$compext; + fi; + cd ramdisk; + $sudo find . | $sudo $cpio $cpioarg -H newc -o 2>/dev/null | $repackcmd > ../ramdisk-new.cpio$compext; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Getting build information..."; +cd split_img; +imgtype=`cat *-imgtype`; +case $imgtype in + KRNL) ;; + AOSP_VNDR) vendor=vendor_;; + *) + if [ -f *-kernel ]; then + kernel=`ls *-kernel`; echo "kernel = $kernel"; + kernel="split_img/$kernel"; + fi; + ;; +esac; +if [ "$original" ]; then + ramdisk=`ls *-*ramdisk.cpio*`; echo "${vendor}ramdisk = $ramdisk"; + ramdisk="split_img/$ramdisk"; +else + ramdisk="ramdisk-new.cpio$compext"; +fi; +case $imgtype in + KRNL) rsz=$(wc -c < ../"$ramdisk"); echo "ramdisk_size = $rsz";; + OSIP) echo "cmdline = $(cat *-*cmdline)";; + U-Boot) + name=`cat *-name`; echo "name = $name"; + uarch=`cat *-arch`; + os=`cat *-os`; + type=`cat *-type`; + comp=`cat *-comp`; echo "type = $uarch $os $type ($comp)"; + [ "$comp" = "uncompressed" ] && comp=none; + addr=`cat *-addr`; echo "load_addr = $addr"; + ep=`cat *-ep`; echo "entry_point = $ep"; + ;; + *) + if [ -f *-second ]; then + second=`ls *-second`; echo "second = $second"; + second=(--second "split_img/$second"); + fi; + if [ -f *-dtb ]; then + dtb=`ls *-dtb`; echo "dtb = $dtb"; + dtb=(--dtb "split_img/$dtb"); + fi; + if [ -f *-recovery_dtbo ]; then + recoverydtbo=`ls *-recovery_dtbo`; echo "recovery_dtbo = $recoverydtbo"; + recoverydtbo=(--recovery_dtbo "split_img/$recoverydtbo"); + fi; + if [ -f *-*cmdline ]; then + cmdname=`ls *-*cmdline`; + cmdline=`cat *-*cmdline`; echo "${vendor}cmdline = $cmdline"; + cmd=("split_img/$cmdname"@cmdline); + fi; + if [ -f *-board ]; then + board=`cat *-board`; echo "board = $board"; + fi; + if [ -f *-base ]; then + base=`cat *-base`; echo "base = $base"; + fi; + if [ -f *-pagesize ]; then + pagesize=`cat *-pagesize`; echo "pagesize = $pagesize"; + fi; + if [ -f *-kernel_offset ]; then + kerneloff=`cat *-kernel_offset`; echo "kernel_offset = $kerneloff"; + fi; + if [ -f *-ramdisk_offset ]; then + ramdiskoff=`cat *-ramdisk_offset`; echo "ramdisk_offset = $ramdiskoff"; + fi; + if [ -f *-second_offset ]; then + secondoff=`cat *-second_offset`; echo "second_offset = $secondoff"; + fi; + if [ -f *-tags_offset ]; then + tagsoff=`cat *-tags_offset`; echo "tags_offset = $tagsoff"; + fi; + if [ -f *-dtb_offset ]; then + dtboff=`cat *-dtb_offset`; echo "dtb_offset = $dtboff"; + fi; + if [ -f *-os_version ]; then + osver=`cat *-os_version`; echo "os_version = $osver"; + fi; + if [ -f *-os_patch_level ]; then + oslvl=`cat *-os_patch_level`; echo "os_patch_level = $oslvl"; + fi; + if [ -f *-header_version ]; then + hdrver=`cat *-header_version`; echo "header_version = $hdrver"; + fi; + if [ -f *-hashtype ]; then + hashtype=`cat *-hashtype`; echo "hashtype = $hashtype"; + hashtype="--hashtype $hashtype"; + fi; + if [ -f *-dt ]; then + dttype=`cat *-dttype`; + dt=`ls *-dt`; echo "dt = $dt"; + rpm=("split_img/$dt",rpm); + dt=(--dt "split_img/$dt"); + fi; + if [ -f *-unknown ]; then + unknown=`cat *-unknown`; echo "unknown = $unknown"; + fi; + if [ -f *-header ]; then + header=`ls *-header`; + header="split_img/$header"; + fi; + ;; +esac; +cd ..; + +if [ -f split_img/*-mtktype ]; then + mtktype=`cat split_img/*-mtktype`; + echo " "; + echo "Generating MTK headers..."; + echo " "; + echo "Using ramdisk type: $mtktype"; + "$bin/$arch/mkmtkhdr" --kernel "$kernel" --$mtktype "$ramdisk" >/dev/null; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + mv -f "$(basename "$kernel")-mtk" kernel-new.mtk; + mv -f "$(basename "$ramdisk")-mtk" $mtktype-new.mtk; + kernel=kernel-new.mtk; + ramdisk=$mtktype-new.mtk; +fi; + +if [ -f split_img/*-sigtype ]; then + outname=unsigned-new.img; +else + outname=image-new.img; +fi; + +[ "$dttype" = "ELF" ] && repackelf=1; +if [ "$imgtype" = "ELF" ] && [ ! "$header" -o ! "$repackelf" ]; then + imgtype=AOSP; + echo " "; + echo "Warning: ELF format without RPM detected; will be repacked using AOSP format!"; +fi; + +echo " "; +echo "Building image..."; +echo " "; +echo "Using format: $imgtype"; +echo " "; +case $imgtype in + AOSP_VNDR) "$bin/$arch/mkbootimg" --vendor_ramdisk "$ramdisk" "${dtb[@]}" --vendor_cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --tags_offset $tagsoff --dtb_offset $dtboff --os_version "$osver" --os_patch_level "$oslvl" --header_version $hdrver --vendor_boot $outname;; + AOSP) "$bin/$arch/mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" "${dtb[@]}" "${recoverydtbo[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --dtb_offset "$dtboff" --os_version "$osver" --os_patch_level "$oslvl" --header_version "$hdrver" $hashtype "${dt[@]}" -o $outname;; + AOSP-PXA) "$bin/$arch/pxa-mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --unknown $unknown "${dt[@]}" -o $outname;; + ELF) "$bin/$arch/elftool" pack -o $outname header="$header" "$kernel" "$ramdisk",ramdisk "${rpm[@]}" "${cmd[@]}" >/dev/null;; + KRNL) "$bin/$arch/rkcrc" -k "$ramdisk" $outname;; + OSIP) + mkdir split_img/.temp 2>/dev/null; + for i in bootstub cmdline.txt hdr kernel parameter sig; do + cp -f split_img/*-*$(basename $i .txt | sed -e 's/hdr/header/') split_img/.temp/$i 2>/dev/null; + done; + cp -f "$ramdisk" split_img/.temp/ramdisk.cpio.gz; + "$bin/$arch/mboot" -d split_img/.temp -f $outname; + ;; + U-Boot) + part0="$kernel"; + case $type in + Multi) part1=(:"$ramdisk");; + RAMDisk) part0="$ramdisk";; + esac; + "$bin/$arch/mkimage" -A $uarch -O $os -T $type -C $comp -a $addr -e $ep -n "$name" -d "$part0""${part1[@]}" $outname >/dev/null; + ;; + *) echo " "; echo "Unsupported format."; abort; exit 1;; +esac; +if [ ! $? -eq "0" ]; then + abort; + exit 1; +fi; + +rm -rf split_img/.temp; + +if [ -f split_img/*-sigtype ]; then + sigtype=`cat split_img/*-sigtype`; + if [ -f split_img/*-avbtype ]; then + avbtype=`cat split_img/*-avbtype`; + fi; + if [ -f split_img/*-blobtype ]; then + blobtype=`cat split_img/*-blobtype`; + fi; + echo "Signing new image..."; + echo " "; + echo "Using signature: $sigtype $avbtype$avbtxt$blobtype"; + [ ! "$avbkey" ] && avbkey="$bin/avb/verity"; + echo " "; + case $sigtype in + AVBv1) java -jar "$bin/boot_signer.jar" /$avbtype unsigned-new.img "$avbkey.pk8" "$avbkey.x509."* image-new.img 2>/dev/null;; + BLOB) + awk 'BEGIN { printf "-SIGNED-BY-SIGNBLOB-\00\00\00\00\00\00\00\00" }' > image-new.img; + "$bin/$arch/blobpack" blob.tmp $blobtype unsigned-new.img >/dev/null; + cat blob.tmp >> image-new.img; + rm -f blob.tmp; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --pack image-new.img --keyblock "$bin/chromeos/kernel.keyblock" --signprivate "$bin/chromeos/kernel_data_key.vbprivk" --version 1 --vmlinuz unsigned-new.img --bootloader "$bin/chromeos/empty" --config "$bin/chromeos/empty" --arch arm --flags 0x1;; + DHTB) + "$bin/$arch/dhtbsign" -i unsigned-new.img -o image-new.img >/dev/null; + rm -f split_img/*-tailtype 2>/dev/null; + ;; + NOOK*) cat split_img/*-master_boot.key unsigned-new.img > image-new.img;; + esac; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; +fi; + +if [ -f split_img/*-lokitype ]; then + lokitype=`cat split_img/*-lokitype`; + echo "Loki patching new image..."; + echo " "; + echo "Using type: $lokitype"; + echo " "; + mv -f image-new.img unlokied-new.img; + if [ -f aboot.img ]; then + "$bin/$arch/loki_tool" patch $lokitype aboot.img unlokied-new.img image-new.img >/dev/null; + if [ ! $? -eq "0" ]; then + echo "Patching failed."; + abort; + exit 1; + fi; + else + echo "Device aboot.img required in script directory to find Loki patch offset."; + abort; + exit 1; + fi; +elif [ -f split_img/*-microloader.bin ]; then + echo "Amonet patching new image..."; + echo " "; + cp -f image-new.img unamonet-new.img; + cp -f split_img/*-microloader.bin microloader.tmp; + dd bs=1024 count=1 conv=notrunc if=unamonet-new.img of=head.tmp 2>/dev/null; + dd bs=1024 seek=1 conv=notrunc if=head.tmp of=image-new.img 2>/dev/null; + dd conv=notrunc if=microloader.tmp of=image-new.img 2>/dev/null; + rm -f head.tmp microloader.tmp; +fi; + +if [ -f split_img/*-tailtype ]; then + tailtype=`cat split_img/*-tailtype`; + echo "Appending footer..."; + echo " "; + echo "Using type: $tailtype"; + echo " "; + case $tailtype in + Bump) awk 'BEGIN { printf "\x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79" }' >> image-new.img;; + SEAndroid) printf 'SEANDROIDENFORCE' >> image-new.img;; + esac; +fi; + +if [ "$origsize" -a -f split_img/*-origsize ]; then + filesize=`cat split_img/*-origsize`; + echo "Padding to original size..."; + echo " "; + cp -f image-new.img unpadded-new.img; + truncate -s $filesize image-new.img; +fi; + +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/KSU/OFRP/unpackimg.sh b/Final_Zip/AIK/KSU/OFRP/unpackimg.sh new file mode 100755 index 0000000..6198f2a --- /dev/null +++ b/Final_Zip/AIK/KSU/OFRP/unpackimg.sh @@ -0,0 +1,370 @@ +#!/bin/bash +# AIK-Linux/unpackimg: split image and unpack ramdisk +# osm0sis @ xda-developers + +cleanup() { "$aik/cleanup.sh" $local --quiet; } +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: unpackimg.sh [--local] [--nosudo] "; exit 1;; + --local) local="--local"; shift;; +esac; +case $1 in + --nosudo) nosudo=1; shift;; + --sudo) shift;; +esac; +if [ ! "$nosudo" ]; then + sudo=sudo; sumsg=" (as root)"; +fi; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + file() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/file" "$@"; } + lzma() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + tail() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/tail" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +if [ ! "$local" ]; then + cd "$aik"; +fi; +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +img="$1"; +[ -f "$cur/$1" ] && img="$cur/$1"; +if [ ! "$img" ]; then + while IFS= read -r line; do + case $line in + aboot.img|image-new.img|unlokied-new.img|unsigned-new.img) continue;; + esac; + img="$line"; + break; + done < <(ls *.elf *.img *.sin 2>/dev/null); +fi; +img="$(readlink -f "$img")"; +if [ ! -f "$img" ]; then + echo "No image file supplied."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - UnpackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +file=$(basename "$img"); +echo "Supplied image: $file"; +echo " "; + +if [ -d split_img -o -d ramdisk ]; then + if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + rmsumsg=" (as root)"; + fi; + echo "Removing old work folders and files$rmsumsg..."; + echo " "; + cleanup; +fi; + +echo "Setting up work folders..."; +echo " "; +mkdir split_img ramdisk; + +cd split_img; +filesize=$(wc -c < "$img"); +echo "$filesize" > "$file-origsize"; +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "signing" ]; then + echo $imgtest | awk '{ print $1 }' > "$file-sigtype"; + sigtype=$(cat "$file-sigtype"); + echo "Signature with \"$sigtype\" type detected, removing..."; + echo " "; + case $sigtype in + BLOB) + cp -f "$img" "$file"; + "$bin/$arch/blobunpack" "$file" | tail -n+5 | cut -d" " -f2 | dd bs=1 count=3 > "$file-blobtype" 2>/dev/null; + mv -f "$file."* "$file"; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --get-vmlinuz "$img" --vmlinuz-out "$file";; + DHTB) dd bs=4096 skip=512 iflag=skip_bytes conv=notrunc if="$img" of="$file" 2>/dev/null;; + NOOK) + dd bs=1048576 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=1048576 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + NOOKTAB) + dd bs=262144 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=262144 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + SIN*) + "$bin/$arch/sony_dump" . "$img" >/dev/null; + mv -f "$file."* "$file"; + rm -f "$file-sigtype"; + ;; + esac; + img="$file"; +fi; + +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "bootimg" ]; then + [ "$(echo $imgtest | awk '{ print $3 }')" = "PXA" ] && typesuffix=-PXA; + echo "$(echo $imgtest | awk '{ print $1 }')$typesuffix" > "$file-imgtype"; + imgtype=$(cat "$file-imgtype"); +else + cd ..; + cleanup; + echo "Unrecognized format."; + abort; + exit 1; +fi; +echo "Image type: $imgtype"; +echo " "; + +case $imgtype in + AOSP*|ELF|KRNL|OSIP|U-Boot) ;; + *) + cd ..; + cleanup; + echo "Unsupported format."; + abort; + exit 1; + ;; +esac; + +case $(echo $imgtest | awk '{ print $3 }') in + LOKI) + echo $imgtest | awk '{ print $5 }' | cut -d\( -f2 | cut -d\) -f1 > "$file-lokitype"; + lokitype=$(cat "$file-lokitype"); + echo "Loki patch with \"$lokitype\" type detected, reverting..."; + echo " "; + echo "Warning: A dump of your device's aboot.img is required to re-Loki!"; + echo " "; + "$bin/$arch/loki_tool" unlok "$img" "$file" >/dev/null; + img="$file"; + ;; + AMONET) + echo "Amonet patch detected, reverting..."; + echo " "; + dd bs=2048 count=1 conv=notrunc if="$img" of="$file-microloader.bin" 2>/dev/null; + dd bs=1024 skip=1 conv=notrunc if="$file-microloader.bin" of="$file-head" 2>/dev/null; + truncate -s 1024 "$file-microloader.bin"; + truncate -s 2048 "$file-head"; + dd bs=2048 skip=1 conv=notrunc if="$img" of="$file-tail" 2>/dev/null; + cat "$file-head" "$file-tail" > "$file"; + rm -f "$file-head" "$file-tail"; + img="$file"; + ;; +esac; + +tailtest="$(dd if="$img" iflag=skip_bytes skip=$(($(wc -c < "$img") - 8192)) bs=8192 count=1 2>/dev/null | file -m $bin/androidbootimg.magic - 2>/dev/null | cut -d: -f2-)"; +case $tailtest in + *data) tailtest="$(tail -n50 "$img" | file -m "$bin/androidbootimg.magic" - 2>/dev/null | cut -d: -f2-)";; +esac; +tailtype="$(echo $tailtest | awk '{ print $1 }')"; +case $tailtype in + AVB*) + echo "Signature with \"$tailtype\" type detected."; + echo " "; + case $tailtype in + *v1) + echo $tailtype > "$file-sigtype"; + echo $tailtest | awk '{ print $4 }' > "$file-avbtype"; + ;; + esac; + ;; + Bump|SEAndroid) + echo "Footer with \"$tailtype\" type detected."; + echo " "; + echo $tailtype > "$file-tailtype"; + ;; +esac; + +if [ "$imgtype" = "U-Boot" ]; then + imgsize=$(($(printf '%d\n' 0x$(hexdump -n 4 -s 12 -e '16/1 "%02x""\n"' "$img")) + 64)); + if [ ! "$filesize" = "$imgsize" ]; then + echo "Trimming..."; + echo " "; + dd bs=$imgsize count=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + img="$file"; + fi; +fi; + +echo 'Splitting image to "split_img/"...'; +case $imgtype in + AOSP_VNDR) vendor=vendor_;; +esac; +case $imgtype in + AOSP|AOSP_VNDR) "$bin/$arch/unpackbootimg" -i "$img";; + AOSP-PXA) "$bin/$arch/pxa-unpackbootimg" -i "$img";; + ELF) + mkdir elftool_out; + "$bin/$arch/elftool" unpack -i "$img" -o elftool_out >/dev/null; + mv -f elftool_out/header "$file-header" 2>/dev/null; + rm -rf elftool_out; + "$bin/$arch/unpackelf" -i "$img"; + ;; + KRNL) dd bs=4096 skip=8 iflag=skip_bytes conv=notrunc if="$img" of="$file-ramdisk" 2>&1 | tail -n+3 | cut -d" " -f1-2;; + OSIP) + "$bin/$arch/mboot" -u -f "$img"; + [ ! $? -eq "0" ] && error=1; + for i in bootstub cmdline.txt hdr kernel parameter ramdisk.cpio.gz sig; do + mv -f $i "$file-$(basename $i .txt | sed -e 's/hdr/header/' -e 's/ramdisk.cpio.gz/ramdisk/')" 2>/dev/null || true; + done; + ;; + U-Boot) + "$bin/$arch/dumpimage" -l "$img"; + "$bin/$arch/dumpimage" -l "$img" > "$file-header"; + grep "Name:" "$file-header" | cut -c15- > "$file-name"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f1 > "$file-arch"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f2 > "$file-os"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f3 | cut -d- -f1 > "$file-type"; + grep "Type:" "$file-header" | cut -d\( -f2 | cut -d\) -f1 | cut -d" " -f1 | cut -d- -f1 > "$file-comp"; + grep "Address:" "$file-header" | cut -c15- > "$file-addr"; + grep "Point:" "$file-header" | cut -c15- > "$file-ep"; + rm -f "$file-header"; + "$bin/$arch/dumpimage" -p 0 -o "$file-kernel" "$img"; + [ ! $? -eq "0" ] && error=1; + case $(cat "$file-type") in + Multi) "$bin/$arch/dumpimage" -p 1 -o "$file-ramdisk" "$img";; + RAMDisk) mv -f "$file-kernel" "$file-ramdisk";; + *) touch "$file-ramdisk";; + esac; + ;; +esac; +if [ ! $? -eq "0" -o "$error" ]; then + cd ..; + cleanup; + abort; + exit 1; +fi; + +if [ -f *-kernel ] && [ "$(file -m "$bin/androidbootimg.magic" *-kernel 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')" = "MTK" ]; then + mtk=1; + echo " "; + echo "MTK header found in kernel, removing..."; + dd bs=512 skip=1 conv=notrunc if="$file-kernel" of=tempkern 2>/dev/null; + mv -f tempkern "$file-kernel"; +fi; +mtktest="$(file -m "$bin/androidbootimg.magic" *-*ramdisk 2>/dev/null | cut -d: -f2-)"; +mtktype=$(echo $mtktest | awk '{ print $3 }'); +if [ "$(echo $mtktest | awk '{ print $1 }')" = "MTK" ]; then + if [ ! "$mtk" ]; then + echo " "; + echo "Warning: No MTK header found in kernel!"; + mtk=1; + fi; + echo "MTK header found in \"$mtktype\" type ramdisk, removing..."; + dd bs=512 skip=1 conv=notrunc if="$(ls *-*ramdisk)" of=temprd 2>/dev/null; + mv -f temprd "$(ls *-*ramdisk)"; +else + if [ "$mtk" ]; then + if [ ! "$mtktype" ]; then + echo 'Warning: No MTK header found in ramdisk, assuming "rootfs" type!'; + mtktype="rootfs"; + fi; + fi; +fi; +[ "$mtk" ] && echo $mtktype > "$file-mtktype"; + +if [ -f *-dt ]; then + dttest="$(file -m "$bin/androidbootimg.magic" *-dt 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')"; + echo $dttest > "$file-dttype"; + if [ "$imgtype" = "ELF" ]; then + case $dttest in + QCDT|ELF) ;; + *) echo " "; + echo "Non-QC DTB found, packing kernel and appending..."; + gzip --no-name -9 "$file-kernel"; + mv -f "$file-kernel.gz" "$file-kernel"; + cat "$file-dt" >> "$file-kernel"; + rm -f "$file-dt"*;; + esac; + fi; +fi; + +file -m "$bin/magic" *-*ramdisk 2>/dev/null | cut -d: -f2 | awk '{ print $1 }' > "$file-${vendor}ramdiskcomp"; +ramdiskcomp=`cat *-*ramdiskcomp`; +unpackcmd="$ramdiskcomp -dc"; +compext=$ramdiskcomp; +case $ramdiskcomp in + gzip) unpackcmd="gzip -dcq"; compext=gz;; + lzop) compext=lzo;; + xz) ;; + lzma) ;; + bzip2) compext=bz2;; + lz4) unpackcmd="$bin/$arch/lz4 -dcq";; + lz4-l) unpackcmd="$bin/$arch/lz4 -dcq"; compext=lz4;; + cpio) unpackcmd="cat"; compext="";; + empty) compext=empty;; + *) compext="";; +esac; +if [ "$compext" ]; then + compext=.$compext; +fi; +mv -f "$(ls *-*ramdisk)" "$file-${vendor}ramdisk.cpio$compext" 2>/dev/null; +cd ..; +if [ "$ramdiskcomp" = "data" ]; then + echo "Unrecognized format."; + abort; + exit 1; +fi; + +echo " "; +if [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: No ramdisk found to be unpacked!"; +else + echo "Unpacking ramdisk$sumsg to \"ramdisk/\"..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + echo "Compression used: $ramdiskcomp"; + if [ ! "$compext" -a ! "$ramdiskcomp" = "cpio" ]; then + echo "Unsupported format."; + abort; + exit 1; + fi; + $sudo chown 0:0 ramdisk 2>/dev/null; + cd ramdisk; + $unpackcmd "../split_img/$file-${vendor}ramdisk.cpio$compext" | $sudo $cpio -i -d --no-absolute-filenames; + if [ ! $? -eq "0" ]; then + [ "$nosudo" ] && echo "Unpacking failed, try without --nosudo."; + cd ..; + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/androidbootimg.magic b/Final_Zip/AIK/KSU/PBRP-R/bin/androidbootimg.magic new file mode 100755 index 0000000..4e7a106 --- /dev/null +++ b/Final_Zip/AIK/KSU/PBRP-R/bin/androidbootimg.magic @@ -0,0 +1,111 @@ +#------------------------------------------------------------------------------ +# Various Android OEM non-standard boot image related magic entries +# osm0sis @ xda-developers +#------------------------------------------------------------------------------ + +# ASUS Blob Signature +0 string -SIGNED-BY-SIGNBLOB- BLOB signing + +# Barnes & Noble Nook Signature +64 string Red\x20Loader NOOK signing (red loader) +64 string Green\x20Loader NOOK signing (green loader) +64 string Green\x20Recovery NOOK signing (green recovery) +64 string eMMC\x20boot.img+secondloader NOOK signing (emmc boot) +64 string eMMC\x20recovery.img+secondloader NOOK signing (emmc recovery) +48 string BauwksBoot NOOKTAB signing (bauwks) + +# Google ChromeOS Signature +0 string CHROMEOS CHROMEOS signing + +# Samsung/Spreadtrum DHTB Signature +0 string DHTB\x01\x00\x00 DHTB signing + +# Sony SIN Packaging/Signature +0 string \x01\x00\x00\x00 SINv1 signing +0 string \x02\x00\x00\x00 SINv2 signing +0 string \x03SIN SINv3 signing + +# Google Pixel/Nexus/AOSP Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search ANDROID! AOSP bootimg +>>36 string \x00\x00\x00\x02 \b, PXA variant (020) +>>36 string \x00\x00\x80\x02 \b, PXA variant (028) +>>36 string \x00\x00\x00\x03 \b, PXA variant (030) +>>96 search microloader +>>>1024 string ANDROID! \b, AMONET header +>>1024 string LOKI \b, LOKI header +>>>1028 string \x00 \b (boot) +>>>1028 string \x01 \b (recovery) +>>2048 search \x88\x16\x88\x58 \b, MTK headers +!:strength * 3 + +# Google Pixel/AOSP Vendor Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search VNDRBOOT AOSP_VNDR bootimg +!:strength * 3 + +# DENX U-Boot +0 string \x27\x05\x19\x56 U-Boot bootimg + +# Intel OSIP +1000 search \xFC\xFA\xBC\x00 OSIP bootimg (headerless) +!:strength / 15 +0 string $OS$\x00\x00\x01 OSIP bootimg +>52 string \x00\x00\x00\x00 \b, boot (signed) +>52 string \x01\x00\x00\x00 \b, boot (unsigned) +>52 string \x0C\x00\x00\x00 \b, recovery (signed) +>52 string \x0D\x00\x00\x00 \b, recovery (unsigned) + +# Rockchip KRNL +0 string KRNL KRNL bootimg + +# Sony ELF +0 string \x7FELF ELF +>5 string \x01\x01\x61 bootimg +>18 string \x28 (ARM +>18 string \x03 (x86_ +>18 string \x08 (MIPS +>4 string \x01 \b) +>4 string \x02 \b64) +>0 search \x88\x16\x88\x58 \b, MTK headers + +# MediaTek MTK +# [for detection after boot image has already been split] +0 search \x88\x16\x88\x58 MTK header +>0 search KERNEL \b, kernel type +>0 search ROOTFS \b, rootfs type +>0 search RECOVERY \b, recovery type +!:strength / 20 + +# Qualcomm Device Tree +# [for detection after boot image has already been split] +0 string QCDT QCDT header +!:strength / 20 + +# Google Android Verified Boot 1.0 Signature +# [for detection with the tail of the boot image] +0 search \x02\x01\x01\x30\x82 AVBv1 signing footer +>0 search /boot \b, boot type +>0 search /recovery \b, recovery type +!:strength / 20 + +# Google Android Verified Boot 2.0 Signature +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search AVBf AVBv2 signing footer +!:strength / 20 + +# LG Bump +# [for detection with the tail of the boot image] +0 search \x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79 Bump footer +!:strength / 20 + +# Samsung SEAndroid +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search SEANDROIDENFORCE SEAndroid footer +!:strength / 20 diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/avb/verity.pk8 b/Final_Zip/AIK/KSU/PBRP-R/bin/avb/verity.pk8 new file mode 100755 index 0000000..bebf216 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/avb/verity.pk8 differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/avb/verity.x509.pem b/Final_Zip/AIK/KSU/PBRP-R/bin/avb/verity.x509.pem new file mode 100755 index 0000000..86399c3 --- /dev/null +++ b/Final_Zip/AIK/KSU/PBRP-R/bin/avb/verity.x509.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIID/TCCAuWgAwIBAgIJAJcPmDkJqolJMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g +VmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UE +AwwHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe +Fw0xNDExMDYxOTA3NDBaFw00MjAzMjQxOTA3NDBaMIGUMQswCQYDVQQGEwJVUzET +MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEQMA4G +A1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UEAwwHQW5kcm9p +ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAOjreE0vTVSRenuzO9vnaWfk0eQzYab0gqpi +6xAzi6dmD+ugoEKJmbPiuE5Dwf21isZ9uhUUu0dQM46dK4ocKxMRrcnmGxydFn6o +fs3ODJMXOkv2gKXL/FdbEPdDbxzdu8z3yk+W67udM/fW7WbaQ3DO0knu+izKak/3 +T41c5uoXmQ81UNtAzRGzGchNVXMmWuTGOkg6U+0I2Td7K8yvUMWhAWPPpKLtVH9r +AL5TzjYNR92izdKcz3AjRsI3CTjtpiVABGeX0TcjRSuZB7K9EK56HV+OFNS6I1NP +jdD7FIShyGlqqZdUOkAUZYanbpgeT5N7QL6uuqcGpoTOkalu6kkCAwEAAaNQME4w +HQYDVR0OBBYEFH5DM/m7oArf4O3peeKO0ZIEkrQPMB8GA1UdIwQYMBaAFH5DM/m7 +oArf4O3peeKO0ZIEkrQPMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB +AHO3NSvDE5jFvMehGGtS8BnFYdFKRIglDMc4niWSzhzOVYRH4WajxdtBWc5fx0ix +NF/+hVKVhP6AIOQa+++sk+HIi7RvioPPbhjcsVlZe7cUEGrLSSveGouQyc+j0+m6 +JF84kszIl5GGNMTnx0XRPO+g8t6h5LWfnVydgZfpGRRg+WHewk1U2HlvTjIceb0N +dcoJ8WKJAFWdcuE7VIm4w+vF/DYX/A2Oyzr2+QRhmYSv1cusgAeC1tvH4ap+J1Lg +UnOu5Kh/FqPLLSwNVQp4Bu7b9QFfqK8Moj84bj88NqRGZgDyqzuTrFxn6FW7dmyA +yttuAJAEAymk1mipd9+zp38= +-----END CERTIFICATE----- diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/boot_signer.jar b/Final_Zip/AIK/KSU/PBRP-R/bin/boot_signer.jar new file mode 100755 index 0000000..dd96a3e Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/boot_signer.jar differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/chromeos/empty b/Final_Zip/AIK/KSU/PBRP-R/bin/chromeos/empty new file mode 100755 index 0000000..8b13789 --- /dev/null +++ b/Final_Zip/AIK/KSU/PBRP-R/bin/chromeos/empty @@ -0,0 +1 @@ + diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/chromeos/kernel.keyblock b/Final_Zip/AIK/KSU/PBRP-R/bin/chromeos/kernel.keyblock new file mode 100755 index 0000000..9740be4 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/chromeos/kernel.keyblock differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/chromeos/kernel_data_key.vbprivk b/Final_Zip/AIK/KSU/PBRP-R/bin/chromeos/kernel_data_key.vbprivk new file mode 100755 index 0000000..8d392fb Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/chromeos/kernel_data_key.vbprivk differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/blobpack b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/blobpack new file mode 100755 index 0000000..685c6c0 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/blobpack differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/blobunpack b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/blobunpack new file mode 100755 index 0000000..2d96696 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/blobunpack differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/dhtbsign b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/dhtbsign new file mode 100755 index 0000000..f117b88 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/dumpimage b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/dumpimage new file mode 100755 index 0000000..8ba15d3 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/dumpimage differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/elftool b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/elftool new file mode 100755 index 0000000..b25dd56 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/elftool differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/futility b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/futility new file mode 100755 index 0000000..c830e31 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/futility differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/loki_tool b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/loki_tool new file mode 100755 index 0000000..d305760 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/loki_tool differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/lz4 b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/lz4 new file mode 100755 index 0000000..801bad4 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/lz4 differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/mboot b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/mboot new file mode 100755 index 0000000..023eab0 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/mboot differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/mkbootimg b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/mkbootimg new file mode 100755 index 0000000..ed68c2d Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/mkimage b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/mkimage new file mode 100755 index 0000000..8e97c0c Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/mkimage differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/mkmtkhdr b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/mkmtkhdr new file mode 100755 index 0000000..d71db24 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/pxa-mkbootimg b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/pxa-mkbootimg new file mode 100755 index 0000000..0636873 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/pxa-unpackbootimg b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/pxa-unpackbootimg new file mode 100755 index 0000000..8dbdecf Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/rkcrc b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/rkcrc new file mode 100755 index 0000000..45027f3 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/rkcrc differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/sony_dump b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/sony_dump new file mode 100755 index 0000000..2563e25 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/sony_dump differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/unpackbootimg b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/unpackbootimg new file mode 100755 index 0000000..b70aed5 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/unpackelf b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/unpackelf new file mode 100755 index 0000000..12e9057 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/i686/unpackelf differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/blobpack b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/blobpack new file mode 100755 index 0000000..90256d4 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/blobpack differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/blobunpack b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/blobunpack new file mode 100755 index 0000000..53374ff Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/dhtbsign b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/dhtbsign new file mode 100755 index 0000000..ccb7a67 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/dumpimage b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/dumpimage new file mode 100755 index 0000000..861bd68 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/elftool b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/elftool new file mode 100755 index 0000000..07a520d Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/elftool differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/futility b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/futility new file mode 100755 index 0000000..4d56ec3 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/futility differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/loki_tool b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/loki_tool new file mode 100755 index 0000000..4a1b74a Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/lz4 b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/lz4 new file mode 100755 index 0000000..8a4136b Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/lz4 differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/mboot b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/mboot new file mode 100755 index 0000000..8bf92d4 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/mboot differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/mkbootimg b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/mkbootimg new file mode 100755 index 0000000..2b628c3 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/mkimage b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/mkimage new file mode 100755 index 0000000..6419ea3 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/mkimage differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/mkmtkhdr b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/mkmtkhdr new file mode 100755 index 0000000..1ab256f Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/pxa-mkbootimg b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..5885720 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..d7b1b7d Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/rkcrc b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/rkcrc new file mode 100755 index 0000000..f218228 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/sony_dump b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/sony_dump new file mode 100755 index 0000000..6fc3696 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/unpackbootimg b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/unpackbootimg new file mode 100755 index 0000000..8f4fccf Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/unpackelf b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/unpackelf new file mode 100755 index 0000000..477e25d Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/linux/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/blobpack b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/blobpack new file mode 100755 index 0000000..2336ec0 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/blobpack differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/blobunpack b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/blobunpack new file mode 100755 index 0000000..834cb50 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/blobunpack differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/cpio b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/cpio new file mode 100755 index 0000000..b7e41f1 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/cpio differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/dd b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/dd new file mode 100755 index 0000000..b684139 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/dd differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/dhtbsign b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/dhtbsign new file mode 100755 index 0000000..b3ba0ba Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/dumpimage b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/dumpimage new file mode 100755 index 0000000..917c8ed Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/dumpimage differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/elftool b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/elftool new file mode 100755 index 0000000..27f12be Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/elftool differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/file b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/file new file mode 100755 index 0000000..8024db5 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/file differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/futility b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/futility new file mode 100755 index 0000000..8658249 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/futility differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/libiconv.2.dylib b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/libiconv.2.dylib new file mode 100755 index 0000000..ec61db0 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/libintl.8.dylib b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/libintl.8.dylib new file mode 100755 index 0000000..c297f0a Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/libintl.8.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/liblzma.5.dylib b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/liblzma.5.dylib new file mode 100755 index 0000000..126d338 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/liblzo2.2.dylib b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/liblzo2.2.dylib new file mode 100755 index 0000000..8a24e23 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/libmagic.1.dylib b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/libmagic.1.dylib new file mode 100755 index 0000000..92e6c7f Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/loki_tool b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/loki_tool new file mode 100755 index 0000000..7eecf68 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/loki_tool differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/lz4 b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/lz4 new file mode 100755 index 0000000..43126f8 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/lz4 differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/lzop b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/lzop new file mode 100755 index 0000000..fc3103c Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/lzop differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/mboot b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/mboot new file mode 100755 index 0000000..dfa0d3e Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/mboot differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/mkbootimg b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/mkbootimg new file mode 100755 index 0000000..82f05a9 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/mkimage b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/mkimage new file mode 100755 index 0000000..e760d6e Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/mkimage differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/mkmtkhdr b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/mkmtkhdr new file mode 100755 index 0000000..907ba0f Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/pxa-mkbootimg b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/pxa-mkbootimg new file mode 100755 index 0000000..12f8337 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/pxa-unpackbootimg b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/pxa-unpackbootimg new file mode 100755 index 0000000..2f1fe6c Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/rkcrc b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/rkcrc new file mode 100755 index 0000000..c2b70ce Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/rkcrc differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/sony_dump b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/sony_dump new file mode 100755 index 0000000..2f187e6 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/sony_dump differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/tail b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/tail new file mode 100755 index 0000000..99ee578 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/tail differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/truncate b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/truncate new file mode 100755 index 0000000..26bf16b Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/truncate differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/unpackbootimg b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/unpackbootimg new file mode 100755 index 0000000..e92b74e Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/unpackelf b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/unpackelf new file mode 100755 index 0000000..4ea11d0 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/unpackelf differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/xz b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/xz new file mode 100755 index 0000000..b501c14 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/i386/xz differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/blobpack b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/blobpack new file mode 100755 index 0000000..816fcf2 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/blobpack differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/blobunpack b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/blobunpack new file mode 100755 index 0000000..9241057 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/cpio b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/cpio new file mode 100755 index 0000000..991c5a8 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/cpio differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/dd b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/dd new file mode 100755 index 0000000..e927886 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/dd differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/dhtbsign b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/dhtbsign new file mode 100755 index 0000000..162fa88 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/dumpimage b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/dumpimage new file mode 100755 index 0000000..473538b Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/elftool b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/elftool new file mode 100755 index 0000000..0185019 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/elftool differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/file b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/file new file mode 100755 index 0000000..0b9f24c Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/file differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/futility b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/futility new file mode 100755 index 0000000..a28db4d Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/futility differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/libiconv.2.dylib b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/libiconv.2.dylib new file mode 100755 index 0000000..8f56eed Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/libintl.8.dylib b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/libintl.8.dylib new file mode 100755 index 0000000..f270e89 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/libintl.8.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/liblzma.5.dylib b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/liblzma.5.dylib new file mode 100755 index 0000000..39c6b96 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/liblzo2.2.dylib b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/liblzo2.2.dylib new file mode 100755 index 0000000..a05b7eb Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/libmagic.1.dylib b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/libmagic.1.dylib new file mode 100755 index 0000000..29ad687 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/loki_tool b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/loki_tool new file mode 100755 index 0000000..1b9f062 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/lz4 b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/lz4 new file mode 100755 index 0000000..bcee28d Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/lz4 differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/lzop b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/lzop new file mode 100755 index 0000000..8be71f4 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/lzop differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/mboot b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/mboot new file mode 100755 index 0000000..ad67219 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/mboot differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/mkbootimg b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/mkbootimg new file mode 100755 index 0000000..137aef2 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/mkimage b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/mkimage new file mode 100755 index 0000000..61d5a9c Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/mkimage differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/mkmtkhdr b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/mkmtkhdr new file mode 100755 index 0000000..99949d5 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/pxa-mkbootimg b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..0ec79a3 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..03fc864 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/rkcrc b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/rkcrc new file mode 100755 index 0000000..9b0b94a Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/sony_dump b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/sony_dump new file mode 100755 index 0000000..e219101 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/tail b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/tail new file mode 100755 index 0000000..59692eb Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/tail differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/truncate b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/truncate new file mode 100755 index 0000000..f2ed631 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/truncate differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/unpackbootimg b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/unpackbootimg new file mode 100755 index 0000000..a717c48 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/unpackelf b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/unpackelf new file mode 100755 index 0000000..d6edefa Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/xz b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/xz new file mode 100755 index 0000000..6faedc7 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP-R/bin/macos/x86_64/xz differ diff --git a/Final_Zip/AIK/KSU/PBRP-R/bin/magic b/Final_Zip/AIK/KSU/PBRP-R/bin/magic new file mode 100755 index 0000000..4530761 --- /dev/null +++ b/Final_Zip/AIK/KSU/PBRP-R/bin/magic @@ -0,0 +1,1916 @@ +#------------------------------------------------------------------------------ +# Slimmed down magic file for archives only +#------------------------------------------------------------------------------ +# $File: archive,v 1.145 2021/01/03 20:58:47 christos Exp $ +# archive: file(1) magic for archive formats (see also "msdos" for self- +# extracting compressed archives) +# +# cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc. +# pre-POSIX "tar" archives are also handled in the C code ../../src/is_tar.c. + +# POSIX tar archives +# URL: https://en.wikipedia.org/wiki/Tar_(computing) +# Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current +# header mainly padded with nul bytes +500 quad 0 +!:strength /2 +# filename or extended attribute printable strings in range space null til umlaut ue +>0 ubeshort >0x1F00 +>>0 ubeshort <0xFCFD +# last 4 header bytes often null but tar\0 in gtarfail2.tar gtarfail.tar-bad +# at https://sourceforge.net/projects/s-tar/files/testscripts/ +>>>508 ubelong&0x8B9E8DFF 0 +# nul, space or ascii digit 0-7 at start of mode +>>>>100 ubyte&0xC8 =0 +>>>>>101 ubyte&0xC8 =0 +# nul, space at end of check sum +>>>>>>155 ubyte&0xDF =0 +# space or ascii digit 0 at start of check sum +>>>>>>>148 ubyte&0xEF =0x20 +# minimal check and then display tar archive information which can also be +# embedded inside others like Android Backup, Clam AntiVirus database +>257 string !ustar +# header padded with nuls +>>257 ulong =0 +# GNU tar version 1.29 with non pax format option without refusing +# creates misleading V7 header for Long path, Multi-volume, Volume type +>>>156 ubyte 0x4c GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x4d GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x56 GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 default x tar archive (V7) +!:mime application/x-tar +#!:ext tar +# other stuff in padding +# some implementations add new fields to the blank area at the end of the header record +# created for example by DOS TAR 3.20g 1994 Tim V.Shapore with -j option +>>257 ulong !0 tar archive (old) +!:mime application/x-tar +#!:ext tar +# magic in newer, GNU, posix variants +>257 string =ustar +# 2 last char of magic and UStar version because string expression does not work +# 2 space characters followed by a null for GNU variant +>>261 ubelong =0x72202000 POSIX tar archive (GNU) +!:mime application/x-gtar +#!:ext tar/gtar +# UStar version with ASCII "00" +>>261 ubelong 0x72003030 POSIX +# gLOBAL and ExTENSION type only found in POSIX.1-2001 format +>>>156 ubyte 0x67 \b.1-2001 +>>>156 ubyte 0x78 \b.1-2001 +>>>156 ubyte x tar archive +!:mime application/x-ustar +#!:ext tar/ustar +# version with 2 binary nuls embedded in Android Backup like com.android.settings.ab +>>261 ubelong 0x72000000 tar archive (ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# not seen ustar variant with garbish version +>>261 default x tar archive (unknown ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# type flag of 1st tar archive member +#>156 ubyte x \b, %c-type +>156 ubyte x +>>156 ubyte 0 \b, file +>>156 ubyte 0x30 \b, file +>>156 ubyte 0x31 \b, hard link +>>156 ubyte 0x32 \b, symlink +>>156 ubyte 0x33 \b, char device +>>156 ubyte 0x34 \b, block device +>>156 ubyte 0x35 \b, directory +>>156 ubyte 0x36 \b, fifo +>>156 ubyte 0x37 \b, reserved +>>156 ubyte 0x4c \b, long path +>>156 ubyte 0x4d \b, multi volume +>>156 ubyte 0x56 \b, volume +>>156 ubyte 0x67 \b, global +>>156 ubyte 0x78 \b, extension +>>156 default x \b, type +>>>156 ubyte x '%c' +# name[100] +>0 string >\0 %-.60s +# mode mainly stored as an octal number in ASCII null or space terminated +>100 string >\0 \b, mode %-.7s +# user id mainly as octal numbers in ASCII null or space terminated +>108 string >\0 \b, uid %-.7s +# group id mainly as octal numbers in ASCII null or space terminated +>116 string >\0 \b, gid %-.7s +# size mainly as octal number in ASCII +>124 ubyte <0x38 +>>124 string >\0 \b, size %-.12s +# coding indicated by setting the high-order bit of the leftmost byte +>124 ubyte >0xEF \b, size 0x +>>124 ubyte !0xff \b%2.2x +>>125 ubyte !0xff \b%2.2x +>>126 ubyte !0xff \b%2.2x +>>127 ubyte !0xff \b%2.2x +>>128 ubyte !0xff \b%2.2x +>>129 ubyte !0xff \b%2.2x +>>130 ubyte !0xff \b%2.2x +>>131 ubyte !0xff \b%2.2x +>>132 ubyte !0xff \b%2.2x +>>133 ubyte !0xff \b%2.2x +>>134 ubyte !0xff \b%2.2x +>>135 ubyte !0xff \b%2.2x +# seconds since 0:0:0 1 jan 1970 UTC as octal number mainly in ASCII null or space terminated +>136 string >\0 \b, seconds %-.11s +# header checksum stored as an octal number in ASCII null or space terminated +#>148 string x \b, cksum %.7s +# linkname[100] +>157 string >\0 \b, linkname %-.40s +# additional fields for ustar +>257 string =ustar +# owner user name null terminated +>>265 string >\0 \b, user %-.32s +# group name null terminated +>>297 string >\0 \b, group %-.32s +# device major minor if not zero +>>329 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>329 string x \b, devmaj %-.7s +>>337 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>337 string x \b, devmin %-.7s +# prefix[155] +>>345 string >\0 \b, prefix %-.155s +# old non ustar/POSIX tar +>257 string !ustar +>>508 string =tar\0 +# padding[255] in old star +>>>257 string >\0 \b, padding: %-.40s +>>508 default x +# padding[255] in old tar sometimes comment field +>>>257 string >\0 \b, comment: %-.40s + +# Incremental snapshot gnu-tar format from: +# https://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html +0 string GNU\ tar- GNU tar incremental snapshot data +>&0 regex [0-9]\.[0-9]+-[0-9]+ version %s + +# cpio archives +# +# Yes, the top two "cpio archive" formats *are* supposed to just be "short". +# The idea is to indicate archives produced on machines with the same +# byte order as the machine running "file" with "cpio archive", and +# to indicate archives produced on machines with the opposite byte order +# from the machine running "file" with "cpio byte-swapped archive". +# +# The SVR4 "cpio(4)" hints that there are additional formats, but they +# are defined as "short"s; I think all the new formats are +# character-header formats and thus are strings, not numbers. +0 short 070707 cpio archive +!:mime application/x-cpio +0 short 0143561 cpio byte-swapped archive +!:mime application/x-cpio # encoding: swapped +0 string 070707 cpio ASCII archive (pre-SVR4 or odc) +0 string 070701 cpio ASCII archive (SVR4 with no CRC) +0 string 070702 cpio ASCII archive (SVR4 with CRC) + +# +# Various archive formats used by various versions of the "ar" +# command. +# + +# +# Original UNIX archive formats. +# They were written with binary values in host byte order, and +# the magic number was a host "int", which might have been 16 bits +# or 32 bits. We don't say "PDP-11" or "VAX", as there might have +# been ports to little-endian 16-bit-int or 32-bit-int platforms +# (x86?) using some of those formats; if none existed, feel free +# to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian +# 32-bit. There might have been big-endian ports of that sort as +# well. +# +0 leshort 0177555 very old 16-bit-int little-endian archive +0 beshort 0177555 very old 16-bit-int big-endian archive +0 lelong 0177555 very old 32-bit-int little-endian archive +0 belong 0177555 very old 32-bit-int big-endian archive + +0 leshort 0177545 old 16-bit-int little-endian archive +>2 string __.SYMDEF random library +0 beshort 0177545 old 16-bit-int big-endian archive +>2 string __.SYMDEF random library +0 lelong 0177545 old 32-bit-int little-endian archive +>4 string __.SYMDEF random library +0 belong 0177545 old 32-bit-int big-endian archive +>4 string __.SYMDEF random library + +# +# From "pdp" (but why a 4-byte quantity?) +# +0 lelong 0x39bed PDP-11 old archive +0 lelong 0x39bee PDP-11 4.0 archive + +# +# XXX - what flavor of APL used this, and was it a variant of +# some ar archive format? It's similar to, but not the same +# as, the APL workspace magic numbers in pdp. +# +0 long 0100554 apl workspace + +# +# System V Release 1 portable(?) archive format. +# +0 string = System V Release 1 ar archive +!:mime application/x-archive + +# +# Debian package; it's in the portable archive format, and needs to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "debian". +# +# Update: Joerg Jenderek +# URL: https://en.wikipedia.org/wiki/Deb_(file_format) +0 string =!\ndebian +# https://manpages.debian.org/testing/dpkg/dpkg-split.1.en.html +>14 string -split part of multipart Debian package +!:mime application/vnd.debian.binary-package +# udeb is used for stripped down deb file +#!:ext deb/udeb +>14 string -binary Debian binary package +!:mime application/vnd.debian.binary-package +# For ipk packager see also https://en.wikipedia.org/wiki/Opkg +#!:ext deb/udeb/ipk +# This should not happen +>14 default x Unknown Debian package +# NL terminated version; for most Debian cases this is 2.0 or 2.1 for split +>68 string >\0 (format %s) +#>68 string !2.0\n +#>>68 string x (format %.3s) +>68 string =2.0\n +# 2nd archive name=control archive name like control.tar.gz or control.tar.xz +>>72 string >\0 \b, with %.14s +# look for 3rd archive name=data archive name like data.tar.{gz,xz,bz2,lzma} +>>0 search/0x93e4f data.tar. \b, data compression +# the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised +# for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb +>>>&0 string x %.2s +# skip space (0x20 BSD) and slash (0x2f System V) character marking end of name +>>>&2 ubyte !0x20 +>>>>&-1 ubyte !0x2f +# display 3rd character of file name extension like 2 of bz2 or m of lzma +>>>>>&-1 ubyte x \b%c +>>>>>>&0 ubyte !0x20 +>>>>>>>&-1 ubyte !0x2f +# display 4th character of file name extension like a of lzma +>>>>>>>>&-1 ubyte x \b%c +# split debian package case +>68 string =2.1\n +# dpkg-1.18.25/dpkg-split/info.c +# NL terminated ASCII package name like ckermit +>>&0 string x \b, %s +# NL terminated package version like 302-5.3 +>>>&1 string x %s +# NL terminated MD5 checksum +>>>>&1 string x \b, MD5 %s +# NL terminated original package length +>>>>>&1 string x \b, unsplitted size %s +# NL terminated part length +>>>>>>&1 string x \b, part length %s +# NL terminated package part like n/m +>>>>>>>&1 string x \b, part %s +# NL terminated package architecture like armhf since dpkg 1.16.1 or later +>>>>>>>>&1 string x \b, %s + +# +# MIPS archive; they're in the portable archive format, and need to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "__________E". +# +0 string =!\n__________E MIPS archive +!:mime application/x-archive +>20 string U with MIPS Ucode members +>21 string L with MIPSEL members +>21 string B with MIPSEB members +>19 string L and an EL hash table +>19 string B and an EB hash table +>22 string X -- out of date + +# +# BSD/SVR2-and-later portable archive formats. +# +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/AR +# Reference: https://www.unix.com/man-page/opensolaris/3HEAD/ar.h/ +# Note: Mach-O universal binary in ./cafebabe is dependent +# TODO: unify current ar archive, MIPS archive, Debian package +# distinguish BSD, SVR; 32, 64 bit; HP from other 32-bit SVR; +# *.ar packages from *.a libraries. handle empty archive +0 string =!\n current ar archive +# print first and possibly second ar_name[16] for debugging purpose +#>8 string x \b, 1st "%.16s" +#>68 string x \b, 2nd "%.16s" +!:mime application/x-archive +# a in most case for libraries; lib for Microsoft libraries; ar else cases +#!:ext a/lib/ar +>8 string __.SYMDEF random library +# first member with long marked name __.SYMDEF SORTED implies BSD library +>68 string __.SYMDEF\ SORTED random library +# Reference: https://parisc.wiki.kernel.org/images-parisc/b/b2/Rad_11_0_32.pdf +# "archive file" entry moved from ./hp +# LST header system_id 0210h~PA-RISC 1.1,... identifies the target architecture +# LST header a_magic 0619h~relocatable library +>68 belong 0x020b0619 - PA-RISC1.0 relocatable library +>68 belong 0x02100619 - PA-RISC1.1 relocatable library +>68 belong 0x02110619 - PA-RISC1.2 relocatable library +>68 belong 0x02140619 - PA-RISC2.0 relocatable library +#EOF for common ar archives + +# +# "Thin" archive, as can be produced by GNU ar. +# +0 string =!\n thin archive with +>68 belong 0 no symbol entries +>68 belong 1 %d symbol entry +>68 belong >1 %d symbol entries + +0 search/1 -h- Software Tools format archive text + +# ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com) +# +# The first byte is the magic (0x1a), byte 2 is the compression type for +# the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS +# filename of the first file (null terminated). Since some types collide +# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%), +# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo. +0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000031a ARC archive data, packed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched +!:mime application/x-arc +# [JW] stuff taken from idarc, obviously ARC successors: +0 lelong&0x8080ffff 0x00000a1a PAK archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000141a ARC+ archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000481a HYP archive data +!:mime application/x-arc + +# Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk) +# I can't create either SPARK or ArcFS archives so I have not tested this stuff +# [GRR: the original entries collide with ARC, above; replaced with combined +# version (not tested)] +#0 byte 0x1a RISC OS archive (spark format) +0 string \032archive RISC OS archive (ArcFS format) +0 string Archive\000 RISC OS archive (ArcFS format) + +# All these were taken from idarc, many could not be verified. Unfortunately, +# there were many low-quality sigs, i.e. easy to trigger false positives. +# Please notify me of any real-world fishy/ambiguous signatures and I'll try +# to get my hands on the actual archiver and see if I find something better. [JW] +# probably many can be enhanced by finding some 0-byte or control char near the start + +# idarc calls this Crush/Uncompressed... *shrug* +0 string CRUSH Crush archive data +# Squeeze It (.sqz) +0 string HLSQZ Squeeze It archive data +# SQWEZ +0 string SQWEZ SQWEZ archive data +# HPack (.hpk) +0 string HPAK HPack archive data +# HAP +0 string \x91\x33HF HAP archive data +# MD/MDCD +0 string MDmd MDCD archive data +# LIM +0 string LIM\x1a LIM archive data +# SAR +3 string LH5 SAR archive data +# BSArc/BS2 +0 string \212\3SB\020\0 BSArc/BS2 archive data +# Bethesda Softworks Archive (Oblivion) +0 string BSA\0 BSArc archive data +>4 lelong x version %d +# MAR +2 string =-ah MAR archive data +# ACB +#0 belong&0x00f800ff 0x00800000 ACB archive data +# CPZ +# TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data +# JRC +0 string JRchive JRC archive data +# Quantum +0 string DS\0 Quantum archive data +# ReSOF +0 string PK\3\6 ReSOF archive data +# QuArk +0 string 7\4 QuArk archive data +# YAC +14 string YC YAC archive data +# X1 +0 string X1 X1 archive data +0 string XhDr X1 archive data +# CDC Codec (.dqt) +0 belong&0xffffe000 0x76ff2000 CDC Codec archive data +# AMGC +0 string \xad6" AMGC archive data +# NuLIB +0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data +# PakLeo +0 string LEOLZW PAKLeo archive data +# ChArc +0 string SChF ChArc archive data +# PSA +0 string PSA PSA archive data +# CrossePAC +0 string DSIGDCC CrossePAC archive data +# Freeze +0 string \x1f\x9f\x4a\x10\x0a Freeze archive data +# KBoom +0 string \xc2\xa8MP\xc2\xa8 KBoom archive data +# NSQ, must go after CDC Codec +0 string \x76\xff NSQ archive data +# DPA +0 string Dirk\ Paehl DPA archive data +# BA +# TODO: idarc says "bytes 0-2 == bytes 3-5" +# TTComp +# URL: http://fileformats.archiveteam.org/wiki/TTComp_archive +# Update: Joerg Jenderek +# GRR: line below is too general as it matches also Panorama database "TCDB 2003-10 demo.pan", others +0 string \0\6 +# look for first keyword of Panorama database *.pan +>12 search/261 DESIGN +# skip keyword with low entropy +>12 default x TTComp archive, binary, 4K dictionary +# (version 5.25) labeled the above entry as "TTComp archive data" +# From: Joerg Jenderek +# URL: https://wiki.68kmla.org/DiskCopy_4.2_format_specification +# reference: http://nulib.com/library/FTN.e00005.htm +0x52 ubeshort 0x0100 +# test for disk image size equal or above 400k +>0x40 ubelong >409599 +# test also for disk image size equal or below 1440k to skip +# windows7en.mbr UNICODE.DAT +>>0x40 ubelong <1474561 +# To skip Flags$StringJoiner.class with size 00106A61h test also for only 4 disk image sizes +# 00064000 for 400k GCR disks +# 000c8000 for 800k GCR disks +# 000b4000 for 720k MFM disks +# 00168000 for 1440k MFM disks +>>>0x40 ubelong&0xffE03fFF 0 +# display information of Apple DiskCopy 4.2 floppy image +# image pascal name padded with NULs like Microsoft Mail +>00 pstring/B x Apple DiskCopy 4.2 image %s +#!:mime application/octet-stream +!:mime application/x-dc42-floppy-image +!:apple dCpydImg +#!:ext image/dc42 +# data size in bytes like 409600 +>0x40 ubelong x \b, %u bytes +# for debugging purpose size in hexadecimal +#>0x40 ubelong x (0x%8.8x) +# tag size in bytes +>0x44 ubelong >0 \b, 0x%x tag size +# data checksum +#>0x48 ubelong x \b, 0x%x checksum +# tag checksum +#>0x4c ubelong x \b, 0x%x tag checksum +# disk encoding +>0x50 ubyte 0 \b, GCR CLV ssdd (400k) +>0x50 ubyte 1 \b, GCR CLV dsdd (800k) +>0x50 ubyte 2 \b, MFM CAV dsdd (720k) +>0x50 ubyte 3 \b, MFM CAV dshd (1440k) +>0x50 ubyte >3 \b, 0x%x encoding +# format byte +>0x51 ubyte x \b, 0x%x format +#>0x54 ubequad x \b, data 0x%16.16llx +# ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation? +0 string ESP ESP archive data +# ZPack +0 string \1ZPK\1 ZPack archive data +# Sky +0 string \xbc\x40 Sky archive data +# UFA +0 string UFA UFA archive data +# Dry +0 string =-H2O DRY archive data +# FoxSQZ +0 string FOXSQZ FoxSQZ archive data +# AR7 +0 string ,AR7 AR7 archive data +# PPMZ +0 string PPMZ PPMZ archive data +# MS Compress +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/MS-DOS_installation_compression +# Reference: https://hwiegman.home.xs4all.nl/fileformats/compress/szdd_kwaj_format.html +# Note: use correct version of extracting tool like EXPAND, UNPACK, DECOMP or 7Z +4 string \x88\xf0\x27 +# KWAJ variant +>0 string KWAJ MS Compress archive data, KWAJ variant +!:mime application/x-ms-compress-kwaj +# extension not working in version 5.32 +# magic/Magdir/archive, 284: Warning: EXTENSION type ` ??_' has bad char '?' +# file: line 284: Bad magic entry ' ??_' +#!:ext ??_ +# compression method (0-4) +>>8 uleshort x \b, %u method +# offset of compressed data +>>10 uleshort x \b, 0x%x offset +#>>(10.s) uleshort x +#>>>&-6 string x \b, TEST extension %-.3s +# header flags to mark header extensions +>>12 uleshort >0 \b, 0x%x flags +# 4 bytes: decompressed length of file +>>12 uleshort &0x01 +>>>14 ulelong x \b, original size: %u bytes +# 2 bytes: unknown purpose +# 2 bytes: length of unknown data + mentioned bytes +# 1-9 bytes: null-terminated file name +# 1-4 bytes: null-terminated file extension +>>12 uleshort &0x08 +>>>12 uleshort ^0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>>&16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>&16 string x %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>12 uleshort &0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +# 2 bytes: length of data + mentioned bytes +# +# SZDD variant Haruhiko Okumura's LZSS or 7z type MsLZ +>0 string SZDD MS Compress archive data, SZDD variant +!:mime application/x-ms-compress-szdd +#!:ext ??_ +# The character missing from the end of the filename (0=unknown) +>>9 string >\0 \b, %-.1s is last character of original name +# https://www.betaarchive.com/forum/viewtopic.php?t=26161 +# Compression mode: "A" (0x41) found but sometimes "B" in Windows 3.1 builds 026 and 034e +>>8 string !A \b, %-.1s method +>>10 ulelong >0 \b, original size: %u bytes +# QBasic SZDD variant +3 string \x88\xf0\x27 +>0 string SZ\x20 MS Compress archive data, QBasic variant +!:mime application/x-ms-compress-sz +#!:ext ??$ +>>8 ulelong >0 \b, original size: %u bytes + +# MP3 (archiver, not lossy audio compression) +0 string MP3\x1a MP3-Archiver archive data +# ZET +0 string OZ\xc3\x9d ZET archive data +# TSComp +0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data +# ARQ +0 string gW\4\1 ARQ archive data +# Squash +3 string OctSqu Squash archive data +# Terse +0 string \5\1\1\0 Terse archive data +# PUCrunch +0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data +# UHarc +0 string UHA UHarc archive data +# ABComp +0 string \2AB ABComp archive data +0 string \3AB2 ABComp archive data +# CMP +0 string CO\0 CMP archive data +# Splint +0 string \x93\xb9\x06 Splint archive data +# InstallShield +0 string \x13\x5d\x65\x8c InstallShield Z archive Data +# Gather +1 string GTH Gather archive data +# BOA +0 string BOA BOA archive data +# RAX +0 string ULEB\xa RAX archive data +# Xtreme +0 string ULEB\0 Xtreme archive data +# Pack Magic +0 string @\xc3\xa2\1\0 Pack Magic archive data +# BTS +0 belong&0xfeffffff 0x1a034465 BTS archive data +# ELI 5750 +0 string Ora\ ELI 5750 archive data +# QFC +0 string \x1aFC\x1a QFC archive data +0 string \x1aQF\x1a QFC archive data +# PRO-PACK +0 string RNC PRO-PACK archive data +# 777 +0 string 777 777 archive data +# LZS221 +0 string sTaC LZS221 archive data +# HPA +0 string HPA HPA archive data +# Arhangel +0 string LG Arhangel archive data +# EXP1, uses bzip2 +0 string 0123456789012345BZh EXP1 archive data +# IMP +0 string IMP\xa IMP archive data +# NRV +0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data +# Squish +0 string \x73\xb2\x90\xf4 Squish archive data +# Par +0 string PHILIPP Par archive data +0 string PAR Par archive data +# HIT +0 string UB HIT archive data +# SBX +0 belong&0xfffff000 0x53423000 SBX archive data +# NaShrink +0 string NSK NaShrink archive data +# SAPCAR +0 string #\ CAR\ archive\ header SAPCAR archive data +0 string CAR\ 2.00RG SAPCAR archive data +# Disintegrator +0 string DST Disintegrator archive data +# ASD +0 string ASD ASD archive data +# InstallShield CAB +0 string ISc( InstallShield CAB +# TOP4 +0 string T4\x1a TOP4 archive data +# BatComp left out: sig looks like COM executable +# so TODO: get real 4dos batcomp file and find sig +# BlakHole +0 string BH\5\7 BlakHole archive data +# BIX +0 string BIX0 BIX archive data +# ChiefLZA +0 string ChfLZ ChiefLZA archive data +# Blink +0 string Blink Blink archive data +# Logitech Compress +0 string \xda\xfa Logitech Compress archive data +# ARS-Sfx (FIXME: really a SFX? then goto COM/EXE) +1 string (C)\ STEPANYUK ARS-Sfx archive data +# AKT/AKT32 +0 string AKT32 AKT32 archive data +0 string AKT AKT archive data +# NPack +0 string MSTSM NPack archive data +# PFT +0 string \0\x50\0\x14 PFT archive data +# SemOne +0 string SEM SemOne archive data +# PPMD +0 string \x8f\xaf\xac\x84 PPMD archive data +# FIZ +0 string FIZ FIZ archive data +# MSXiE +0 belong&0xfffff0f0 0x4d530000 MSXiE archive data +# DeepFreezer +0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data +# DC +0 string =2 string \x2\x4 Xpack DiskImage archive data +#!:ext xdi +# XPack Data +# *.xpa updated by Joerg Jenderek Sep 2015 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/ +0 string xpa XPA +#!:ext xpa +# XPA32 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/xpa32.zip +# created by XPA32.EXE version 1.0.2 for Windows +>0 string xpa\0\1 \b32 archive data +# created by XPACK.COM version 1.67m or 1.67r with short 0x1800 +>3 ubeshort !0x0001 \bck archive data +# XPack Single Data +# changed by Joerg Jenderek Sep 2015 back to like in version 5.12 +# letter 'I'+ acute accent is equivalent to \xcd +0 string \xcd\ jm Xpack single archive data +#!:mime application/x-xpa-compressed +#!:ext xpa + +# TODO: missing due to unknown magic/magic at end of file: +#DWC +#ARG +#ZAR +#PC/3270 +#InstallIt +#RKive +#RK +#XPack Diskimage + +# These were inspired by idarc, but actually verified +# Dzip archiver (.dz) +# Update: Joerg Jenderek +# URL: http://speeddemosarchive.com/dzip/ +# reference: http://speeddemosarchive.com/dzip/dz29src.zip/main.c +# GRR: line below is too general as it matches also ASCII texts like Doszip commander help dz.txt +0 string DZ +# latest version is 2.9 dated 7 may 2003 +>2 byte <4 Dzip archive data +!:mime application/x-dzip +#!:ext dz +>>2 byte x \b, version %i +>>3 byte x \b.%i +>>4 ulelong x \b, offset 0x%x +>>8 ulelong x \b, %u files +# ZZip archiver (.zz) +0 string ZZ\ \0\0 ZZip archive data +0 string ZZ0 ZZip archive data +# PAQ archiver (.paq) +0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data +0 string PAQ PAQ archive data +>3 byte&0xf0 0x30 +>>3 byte x (v%c) +# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP) +0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data +0 string JARCS JAR (ARJ Software, Inc.) archive data + +# ARJ archiver (jason@jarthur.Claremont.EDU) +0 leshort 0xea60 ARJ archive data +!:mime application/x-arj +>5 byte x \b, v%d, +>8 byte &0x04 multi-volume, +>8 byte &0x10 slash-switched, +>8 byte &0x20 backup, +>34 string x original name: %s, +>7 byte 0 os: MS-DOS +>7 byte 1 os: PRIMOS +>7 byte 2 os: Unix +>7 byte 3 os: Amiga +>7 byte 4 os: Macintosh +>7 byte 5 os: OS/2 +>7 byte 6 os: Apple ][ GS +>7 byte 7 os: Atari ST +>7 byte 8 os: NeXT +>7 byte 9 os: VAX/VMS +>3 byte >0 %d] +# [JW] idarc says this is also possible +2 leshort 0xea60 ARJ archive data + +# HA archiver (Greg Roelofs, newt@uchicago.edu) +# This is a really bad format. A file containing HAWAII will match this... +#0 string HA HA archive data, +#>2 leshort =1 1 file, +#>2 leshort >1 %hu files, +#>4 byte&0x0f =0 first is type CPY +#>4 byte&0x0f =1 first is type ASC +#>4 byte&0x0f =2 first is type HSC +#>4 byte&0x0f =0x0e first is type DIR +#>4 byte&0x0f =0x0f first is type SPECIAL +# suggestion: at least identify small archives (<1024 files) +0 belong&0xffff00fc 0x48410000 HA archive data +>2 leshort =1 1 file, +>2 leshort >1 %u files, +>4 byte&0x0f =0 first is type CPY +>4 byte&0x0f =1 first is type ASC +>4 byte&0x0f =2 first is type HSC +>4 byte&0x0f =0x0e first is type DIR +>4 byte&0x0f =0x0f first is type SPECIAL + +# HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz) +0 string HPAK HPACK archive data + +# JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net +0 string \351,\001JAM\ JAM archive, +>7 string >\0 version %.4s +>0x26 byte =0x27 - +>>0x2b string >\0 label %.11s, +>>0x27 lelong x serial %08x, +>>0x36 string >\0 fstype %.8s + +# Very old RAR archive +# https://jasonblanks.com/wp-includes/images/papers/KnowyourarchiveRAR.pdf +0 string RE\x7e\x5e RAR archive data (26 string \x8\0\0\0mimetypeapplication/ + +# KOffice / OpenOffice & StarOffice / OpenDocument formats +# From: Abel Cheung + +# KOffice (1.2 or above) formats +# (mimetype contains "application/vnd.kde.") +>>50 string vnd.kde. KOffice (>=1.2) +>>>58 string karbon Karbon document +>>>58 string kchart KChart document +>>>58 string kformula KFormula document +>>>58 string kivio Kivio document +>>>58 string kontour Kontour document +>>>58 string kpresenter KPresenter document +>>>58 string kspread KSpread document +>>>58 string kword KWord document + +# OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) +# (mimetype contains "application/vnd.sun.xml.") +# URL: https://en.wikipedia.org/wiki/OpenOffice.org_XML +# reference: http://fileformats.archiveteam.org/wiki/OpenOffice.org_XML +>>50 string vnd.sun.xml. OpenOffice.org 1.x +>>>62 string writer Writer +>>>>68 byte !0x2e document +!:mime application/vnd.sun.xml.writer +#!:ext sxw +>>>>68 string .template template +!:mime application/vnd.sun.xml.writer.template +#!:ext stw +>>>>68 string .web Web template +!:mime application/vnd.sun.xml.writer.web +#!:ext stw +>>>>68 string .global global document +!:mime application/vnd.sun.xml.writer.global +#!:ext sxg +>>>62 string calc Calc +>>>>66 byte !0x2e spreadsheet +!:mime application/vnd.sun.xml.calc +#!:ext sxc +>>>>66 string .template template +!:mime application/vnd.sun.xml.calc.template +#!:ext stc +>>>62 string draw Draw +>>>>66 byte !0x2e document +!:mime application/vnd.sun.xml.draw +#!:ext sxd +>>>>66 string .template template +!:mime application/vnd.sun.xml.draw.template +#!:ext std +>>>62 string impress Impress +>>>>69 byte !0x2e presentation +!:mime application/vnd.sun.xml.impress +#!:ext sxi +>>>>69 string .template template +!:mime application/vnd.sun.xml.impress.template +#!:ext sti +>>>62 string math Math document +!:mime application/vnd.sun.xml.math +#!:ext sxm +>>>62 string base Database file +!:mime application/vnd.sun.xml.base +#!:ext sdb + +# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) +# URL: http://fileformats.archiveteam.org/wiki/OpenDocument +# https://lists.oasis-open.org/archives/office/200505/msg00006.html +# (mimetype contains "application/vnd.oasis.opendocument.") +>>50 string vnd.oasis.opendocument. OpenDocument +>>>73 string text +>>>>77 byte !0x2d Text +!:mime application/vnd.oasis.opendocument.text +#!:ext odt +>>>>77 string -template Text Template +!:mime application/vnd.oasis.opendocument.text-template +#!:ext ott +>>>>77 string -web HTML Document Template +!:mime application/vnd.oasis.opendocument.text-web +#!:ext oth +>>>>77 string -master Master Document +!:mime application/vnd.oasis.opendocument.text-master +#!:ext odm +>>>73 string graphics +>>>>81 byte !0x2d Drawing +!:mime application/vnd.oasis.opendocument.graphics +#!:ext odg +>>>>81 string -template Drawing Template +!:mime application/vnd.oasis.opendocument.graphics-template +#!:ext otg +>>>73 string presentation +>>>>85 byte !0x2d Presentation +!:mime application/vnd.oasis.opendocument.presentation +#!:ext odp +>>>>85 string -template Presentation Template +!:mime application/vnd.oasis.opendocument.presentation-template +#!:ext otp +>>>73 string spreadsheet +>>>>84 byte !0x2d Spreadsheet +!:mime application/vnd.oasis.opendocument.spreadsheet +#!:ext ods +>>>>84 string -template Spreadsheet Template +!:mime application/vnd.oasis.opendocument.spreadsheet-template +#!:ext ots +>>>73 string chart +>>>>78 byte !0x2d Chart +!:mime application/vnd.oasis.opendocument.chart +#!:ext odc +>>>>78 string -template Chart Template +!:mime application/vnd.oasis.opendocument.chart-template +#!:ext otc +>>>73 string formula +>>>>80 byte !0x2d Formula +!:mime application/vnd.oasis.opendocument.formula +#!:ext odf +>>>>80 string -template Formula Template +!:mime application/vnd.oasis.opendocument.formula-template +#!:ext otf +# https://www.loc.gov/preservation/digital/formats/fdd/fdd000441.shtml +>>>73 string database Database +!:mime application/vnd.oasis.opendocument.database +#!:ext odb +# Valid for LibreOffice Base 6.0.1.1 at least +>>>73 string base Database +# https://bugs.documentfoundation.org/show_bug.cgi?id=45854 +!:mime application/vnd.oasis.opendocument.database +#!:mime application/vnd.oasis.opendocument.base +#!:ext odb +>>>73 string image +>>>>78 byte !0x2d Image +!:mime application/vnd.oasis.opendocument.image +#!:ext odi +>>>>78 string -template Image Template +!:mime application/vnd.oasis.opendocument.image-template +#!:ext oti + +# EPUB (OEBPS) books using OCF (OEBPS Container Format) +# https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. +# From: Ralf Brown +>>50 string epub+zip EPUB document +!:mime application/epub+zip + +# From: Joerg Jenderek +# URL: http://en.wikipedia.org/wiki/CorelDRAW +# NOTE: version; til 2 WL-based; from 3 til 13 by ./riff; from 14 zip based +>>50 string x-vnd.corel. Corel +>>>62 string draw.document+zip Draw drawing, version 14-16 +!:mime application/x-vnd.corel.draw.document+zip +#!:ext cdr +>>>62 string draw.template+zip Draw template, version 14-16 +!:mime application/x-vnd.corel.draw.template+zip +#!:ext cdrt +>>>62 string zcf.draw.document+zip Draw drawing, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.document+zip +#!:ext cdr +>>>62 string zcf.draw.template+zip Draw template, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.template+zip +#!:ext cdt/cdrt +# URL: http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html +>>>62 string zcf.pattern+zip Draw pattern, version 22 +!:mime application/x-vnd.corel.zcf.pattern+zip +#!:ext pat +# URL: https://en.wikipedia.org/wiki/Corel_Designer +# Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer +# Note: called by TrID "Corel DESIGN graphics" +>>>62 string designer.document+zip DESIGNER graphics, version 14-16 +!:mime application/x-vnd.corel.designer.document+zip +#!:ext des +>>>62 string zcf.designer.document+zip DESIGNER graphics, version 17-21 +!:mime application/x-vnd.corel.zcf.designer.document+zip +#!:ext des +# URL: http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/ +# CorelDRAW-Corel-Symbol-Library-CSL.html +>>>62 string symbol.library+zip Symbol Library, version 6-16.3 +!:mime application/x-vnd.corel.symbol.library+zip +#!:ext csl +>>>62 string zcf.symbol.library+zip Symbol Library, version 17-22 +!:mime application/x-vnd.corel.zcf.symbol.library+zip +#!:ext csl + +# Catch other ZIP-with-mimetype formats +# In a ZIP file, the bytes immediately after a member's contents are +# always "PK". The 2 regex rules here print the "mimetype" member's +# contents up to the first 'P'. Luckily, most MIME types don't contain +# any capital 'P's. This is a kludge. +# (mimetype contains "application/") +>>50 default x Zip data +>>>38 regex [!-OQ-~]+ (MIME type "%s"?) +!:mime application/zip +# (mimetype contents other than "application/*") +>26 string \x8\0\0\0mimetype +>>38 string !application/ +>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?) +!:mime application/zip + +# Java Jar files +>(26.s+30) leshort 0xcafe Java archive data (JAR) +!:mime application/java-archive + +# iOS App +>(26.s+30) leshort !0xcafe +>>26 string !\x8\0\0\0mimetype +>>>30 string Payload/ +>>>>38 search/64 .app/ iOS App +!:mime application/x-ios-app + +>30 search/100/b application/epub+zip EPUB document +!:mime application/epub+zip + +# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) +# Next line excludes specialized formats: +>(26.s+30) leshort !0xcafe +>>30 search/100/b !application/epub+zip +>>>26 string !\x8\0\0\0mimetype Zip archive data +!:mime application/zip +>>>>4 beshort x \b, at least +>>>>4 beshort x to extract +>>>>8 beshort x \b, compression method= +>>>>0x161 string WINZIP \b, WinZIP self-extracting + +# StarView Metafile +# From Pierre Ducroquet +0 string VCLMTF StarView MetaFile +>6 beshort x \b, version %d +>8 belong x \b, size %d + +# Zoo archiver +20 lelong 0xfdc4a7dc Zoo archive data +!:mime application/x-zoo +>4 byte >48 \b, v%c. +>>6 byte >47 \b%c +>>>7 byte >47 \b%c +>32 byte >0 \b, modify: v%d +>>33 byte x \b.%d+ +>42 lelong 0xfdc4a7dc \b, +>>70 byte >0 extract: v%d +>>>71 byte x \b.%d+ + +# Shell archives +10 string #\ This\ is\ a\ shell\ archive shell archive text +!:mime application/octet-stream + +# +# LBR. NB: May conflict with the questionable +# "binary Computer Graphics Metafile" format. +# +0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data +# +# From Rafael Laboissiere +# The Project Revision Control System (see +# http://prcs.sourceforge.net) generates a packaged project +# file which is recognized by the following entry: +0 leshort 0xeb81 PRCS packaged project + +# Microsoft cabinets +# by David Necas (Yeti) +#0 string MSCF\0\0\0\0 Microsoft cabinet file data, +#>25 byte x v%d +#>24 byte x \b.%d +# MPi: All CABs have version 1.3, so this is pointless. +# Better magic in debian-additions. + +# GTKtalog catalogs +# by David Necas (Yeti) +4 string gtktalog\ GTKtalog catalog data, +>13 string 3 version 3 +>>14 beshort 0x677a (gzipped) +>>14 beshort !0x677a (not gzipped) +>13 string >3 version %s + +############################################################################ +# Parity archive reconstruction file, the 'par' file format now used on Usenet. +0 string PAR\0 PARity archive data +>48 leshort =0 - Index file +>48 leshort >0 - file number %d + +# Felix von Leitner +0 string d8:announce BitTorrent file +!:mime application/x-bittorrent +# Durval Menezes, +0 string d13:announce-list BitTorrent file +!:mime application/x-bittorrent +0 string d7:comment BitTorrent file +!:mime application/x-bittorrent +0 string d4:info BitTorrent file +!:mime application/x-bittorrent + +# Atari MSA archive - Teemu Hukkanen +0 beshort 0x0e0f Atari MSA archive data +>2 beshort x \b, %d sectors per track +>4 beshort 0 \b, 1 sided +>4 beshort 1 \b, 2 sided +>6 beshort x \b, starting track: %d +>8 beshort x \b, ending track: %d + +# Alternate ZIP string (amc@arwen.cs.berkeley.edu) +0 string PK00PK\003\004 Zip archive data +!:mime application/zip +#!:ext zip/cbz + +# ACE archive (from http://www.wotsit.org/download.asp?f=ace) +# by Stefan `Sec` Zehl +7 string **ACE** ACE archive data +>15 byte >0 version %d +>16 byte =0x00 \b, from MS-DOS +>16 byte =0x01 \b, from OS/2 +>16 byte =0x02 \b, from Win/32 +>16 byte =0x03 \b, from Unix +>16 byte =0x04 \b, from MacOS +>16 byte =0x05 \b, from WinNT +>16 byte =0x06 \b, from Primos +>16 byte =0x07 \b, from AppleGS +>16 byte =0x08 \b, from Atari +>16 byte =0x09 \b, from Vax/VMS +>16 byte =0x0A \b, from Amiga +>16 byte =0x0B \b, from Next +>14 byte x \b, version %d to extract +>5 leshort &0x0080 \b, multiple volumes, +>>17 byte x \b (part %d), +>5 leshort &0x0002 \b, contains comment +>5 leshort &0x0200 \b, sfx +>5 leshort &0x0400 \b, small dictionary +>5 leshort &0x0800 \b, multi-volume +>5 leshort &0x1000 \b, contains AV-String +>>30 string \x16*UNREGISTERED\x20VERSION* (unregistered) +>5 leshort &0x2000 \b, with recovery record +>5 leshort &0x4000 \b, locked +>5 leshort &0x8000 \b, solid +# Date in MS-DOS format (whatever that is) +#>18 lelong x Created on + +# sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann +# +0x1A string sfArk sfArk compressed Soundfont +>0x15 string 2 +>>0x1 string >\0 Version %s +>>0x2A string >\0 : %s + +# DR-DOS 7.03 Packed File *.??_ +# Reference: http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm +# Note: unpacked by PNUNPACK.EXE +0 string Packed\ File\ +# by looking for Control-Z skip ASCII text starting with Packed File +>0x18 ubyte 0x1a Personal NetWare Packed File +!:mime application/x-novell-compress +#!:ext ??_ +>>12 string x \b, was "%.12s" +# 1 or 2 +#>>0x19 ubyte x \b, at 0x19 %u +>>0x1b ulelong x with %u bytes + +# EET archive +# From: Tilman Sauerbeck +0 belong 0x1ee7ff00 EET archive +!:mime application/x-eet + +# rzip archives +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +# From: Joerg Jenderek +# URL: https://help.foxitsoftware.com/kb/install-fzip-file.php +# reference: http://mark0.net/download/triddefs_xml.7z/ +# defs/f/fzip.trid.xml +# Note: unknown compression; No "PK" zip magic; normally in directory like +# "%APPDATA%\Foxit Software\Addon\Foxit Reader\Install" +0 ubequad 0x2506781901010000 Foxit add-on/update +!:mime application/x-fzip +#!:ext fzip + +# From: "Robert Dale" +0 belong 123 dar archive, +>4 belong x label "%.8x +>>8 belong x %.8x +>>>12 beshort x %.4x" +>14 byte 0x54 end slice +>14 beshort 0x4e4e multi-part +>14 beshort 0x4e53 multi-part, with -S + +# Symbian installation files +# https://www.thouky.co.uk/software/psifs/sis.html +# http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf +8 lelong 0x10000419 Symbian installation file +!:mime application/vnd.symbian.install +>4 lelong 0x1000006D (EPOC release 3/4/5) +>4 lelong 0x10003A12 (EPOC release 6) +0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x) +!:mime x-epoc/x-sisx-app + +# From "Nelson A. de Oliveira" +0 string MPQ\032 MoPaQ (MPQ) archive + +# From: "Nelson A. de Oliveira" +# .kgb +0 string KGB_arch KGB Archiver file +>10 string x with compression level %.1s + +# Type: Parity Archive +# From: Daniel van Eeden +0 string PAR2 Parity Archive Volume Set + +# Bacula volume format. (Volumes always start with a block header.) +# URL: https://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html +# From: Adam Buchbinder +12 string BB02 Bacula volume +>20 bedate x \b, started %s + +# ePub is XHTML + XML inside a ZIP archive. The first member of the +# archive must be an uncompressed file called 'mimetype' with contents +# 'application/epub+zip' + + +# From: "Michael Gorny" +# ZPAQ: http://mattmahoney.net/dc/zpaq.html +0 string zPQ ZPAQ stream +>3 byte x \b, level %d +# From: Barry Carter +# https://encode.ru/threads/456-zpaq-updates/page32 +0 string 7kSt ZPAQ file + +# BBeB ebook, unencrypted (LRF format) +# URL: https://www.sven.de/librie/Librie/LrfFormat +# From: Adam Buchbinder +0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted +>8 beshort x \b, version %d +>36 byte 1 \b, front-to-back +>36 byte 16 \b, back-to-front +>42 beshort x \b, (%dx, +>44 beshort x %d) + +# Symantec GHOST image by Joerg Jenderek at May 2014 +# https://us.norton.com/ghost/ +# https://www.garykessler.net/library/file_sigs.html +0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image +# *.GHO +>2 ubyte&0x08 0x00 \b, first file +# *.GHS or *.[0-9] with cns program option +>2 ubyte&0x08 0x08 \b, split file +# part of split index interesting for *.ghs +>>4 ubyte x id=0x%x +# compression tag minus one equals numeric compression command line switch z[1-9] +>3 ubyte 0 \b, no compression +>3 ubyte 2 \b, fast compression (Z1) +>3 ubyte 3 \b, medium compression (Z2) +>3 ubyte >3 +>>3 ubyte <11 \b, compression (Z%d-1) +>2 ubyte&0x08 0x00 +# ~ 30 byte password field only for *.gho +>>12 ubequad !0 \b, password protected +>>44 ubyte !1 +# 1~Image All, sector-by-sector only for *.gho +>>>10 ubyte 1 \b, sector copy +# 1~Image Boot track only for *.gho +>>>43 ubyte 1 \b, boot track +# 1~Image Disc only for *.gho implies Image Boot track and sector copy +>>44 ubyte 1 \b, disc sector copy +# optional image description only *.gho +>>0xff string >\0 "%-.254s" +# look for DOS sector end sequence +>0xE08 search/7776 \x55\xAA +>>&-512 indirect x \b; contains + +# Google Chrome extensions +# https://developer.chrome.com/extensions/crx +# https://developer.chrome.com/extensions/hosting +0 string Cr24 Google Chrome extension +!:mime application/x-chrome-extension +>4 ulong x \b, version %u + +# SeqBox - Sequenced container +# ext: sbx, seqbox +# Marco Pontello marcopon@gmail.com +# reference: https://github.com/MarcoPon/SeqBox +0 string SBx SeqBox, +>3 byte x version %d + +# LyNX archive +56 string USE\040LYNX\040TO\040DISSOLVE\040THIS\040FILE LyNX archive + +# From: Joerg Jenderek +# URL: https://www.acronis.com/ +# Reference: https://en.wikipedia.org/wiki/TIB_(file_format) +# Note: only tested with True Image 2013 Build 5962 and 2019 Build 14110 +0 ubequad 0xce24b9a220000000 Acronis True Image backup +!:mime application/x-acronis-tib +#!:ext tib +# 01000000 +#>20 ubelong x \b, at 20 0x%x +# 20000000 +#>28 ubelong x \b, at 28 0x%x +# strings like "Generic- SD/MMC 1.00" "Unknown Disk" "Msft Virtual Disk 1.0" +# ??? +# strings like "\Device\0000011e" "\Device\0000015a" +#>0 search/0x6852300/cs \\Device\\ +#>>&-1 pstring x \b, %s +# "\Device\HarddiskVolume30" "\Device\HarddiskVolume39" +#>>>&1 search/180/cs \\Device\\ +#>>>>&-1 pstring x \b, %s +#>>>>>&0 search/29/cs \0\0\xc8\0 +# disk label +#>>>>>>&10 lestring16 x \b, disk label %11.11s +#>>>>>>&9 plestring16 x \b, disk label "%11.11s" +#>>>>>>&10 ubequad x %16.16llx + + +# Gentoo XPAK binary package +# by Michal Gorny +# https://gitweb.gentoo.org/proj/portage.git/tree/man/xpak.5 +-4 string STOP +>-16 string XPAKSTOP Gentoo binary package (XPAK) + +# From: Joerg Jenderek +# URL: https://kodi.wiki/view/TexturePacker +# Reference: https://mirrors.kodi.tv/releases/source/17.3-Krypton.tar.gz +# /xbmc-Krypton/xbmc/guilib/XBTF.h +# /xbmc-Krypton/xbmc/guilib/XBTF.cpp +0 string XBTF +# skip ASCII text by looking for terminating \0 of path +>264 ubyte 0 XBMC texture package +!:mime application/x-xbmc-xbt +#!:ext xbt +# XBTF_VERSION 2 +>>4 string !2 \b, version %-.1s +# nofFiles /xbmc-Krypton/xbmc/guilib/XBTFReader.cpp +>>5 ulelong x \b, %u file +# plural s +>>5 ulelong >1 \bs +# path[CXBTFFile[MaximumPathLength=256] +>>9 string x \b, 1st %s + +# ALZIP archive +# by Hyungjun Park , Hajin Jang +# http://kippler.com/win/unalz/ +# https://salsa.debian.org/l10n-korean-team/unalz +0 string ALZ\001 ALZ archive data +#!:ext alz + +# https://cf-aldn.altools.co.kr/setup/EGG_Specification.zip +0 string EGGA EGG archive data, +#!:ext egg +>5 byte x version %u +>4 byte x \b.%u +>>0x0E ulelong =0x08E28222 +>>0x0E ulelong =0x24F5A262 \b, split +>>0x0E ulelong =0x24E5A060 \b, solid +>>0x0E default x \b, unknown + +# PAQ9A archive +# URL: http://mattmahoney.net/dc/#paq9a +# Note: Line 1186 of paq9a.cpp gives the magic bytes +0 string pQ9\001 PAQ9A archive + +#------------------------------------------------------------------------------ +# $File: compress,v 1.80 2021/03/15 17:49:24 christos Exp $ +# compress: file(1) magic for pure-compression formats (no archives) +# +# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. +# +# Formats for various forms of compressed data +# Formats for "compress" proper have been moved into "compress.c", +# because it tries to uncompress it to figure out what's inside. + +# standard unix compress +0 string \037\235 compress'd data +!:mime application/x-compress +!:apple LZIVZIVU +>2 byte&0x80 >0 block compressed +>2 byte&0x1f x %d bits + +# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver) +# URL: https://en.wikipedia.org/wiki/Gzip +# Reference: https://tools.ietf.org/html/rfc1952 +# Update: Joerg Jenderek, Apr 2019 +# Edited by Chris Chittleborough , March 2002 +# * Original filename is only at offset 10 if "extra field" absent +# * Produce shorter output - notably, only report compression methods +# other than 8 ("deflate", the only method defined in RFC 1952). +# Note: find defs -iname '*.trid.xml' -exec grep -q '1F8B08' {} \; -ls +# TODO: +# FBR Blueberry FlashBack screen Record https://www.flashbackrecorder.com/ +# KPR KOffice/Calligra KPresenter application/x-kpresenter +# KPT KOffice/Calligra KPresenter template? application/x-kpresenter +# SAV Diggles Saved Game File http://www.innonics.com +# SAV FarCry (demo) saved game http://www.farcry-thegame.com +# DAT ZOAGZIP game data format http://en.wikipedia.org/wiki/SD_Gundam_Capsule_Fighter +0 string \037\213 +# to display gzip compressed (strength=100=2*50) before other (strength=50)? +#!:strength * 2 +# no FNAME and FCOMMENT bit implies no file name/comment. That means only binary +>3 byte&0x18 =0 +# For binary gzipped no ASCII text should occur +# mcd-monu-cad.trid.xml +>>10 string MCD Monu-Cad Drawing, Component or Font +#>>36 string Created\ with\ MONU-CAD +#!:mime application/octet-stream +# http://fileformats.archiveteam.org/wiki/Monu-CAD +# http://www.monucad.com/downloads/FullDemo-2005.EXE +# /HANDS96.MCC Component +# /DEMO_DD01.MCD Drawing +# /MCALF020.FNT Font +#!:ext mcc/mcd/fnt +# http://www.generalcadd.com +>>10 string GXD General CADD, Drawing or Component +#!:mime application/octet-stream +# /gxc/BUILDINGEDGE.gxc Component +# /gxd/HOCKETT-STPAUL-WRHSE.gxd Drawing +# /gxd/POWERLAND-MILL-ADD-11.gxd Drawing v9.1.06 +#!:ext gxc/gxd +#>>>13 ubyte 0 \b, version 0 +>>>13 string 09 \b, version 9 +# other gzipped binary like gzipped tar, VirtualBox extension package,... +>>10 default x gzip compressed data +!:mime application/gzip +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# gzipped TAR or VirtualBox extension package +#!:mime application/x-compressed-tar +#!:mime application/x-virtualbox-vbox-extpack +# https://www.w3.org/TR/SVG/mimereg.html +#!:mime image/image/svg+xml-compressed +# zlib.3.gz +# microcode-20180312.tgz +# tpz same as tgz +# lua-md5_1.2-1_i386_i486.ipk https://en.wikipedia.org/wiki/Opkg +# Oracle_VM_VirtualBox_Extension_Pack-5.0.12-104815.vbox-extpack +#!:ext gz/tgz/tpz/ipk/vbox-extpack/svgz +# FNAME/FCOMMENT bit implies file name/comment as iso-8859-1 text +>3 byte&0x18 >0 gzip compressed data +!:mime application/gzip +# gzipped tar, gzipped Abiword document +#!:mime application/x-compressed-tar +#!:mime application/x-abiword-compressed +#!:mime image/image/svg+xml-compressed +# kleopatra_splashscreen.svgz gzipped .svg +#!:ext gz/tgz/tpz/zabw/svgz +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# display information of gzip compressed files +#>2 byte x THIS iS GZIP +>2 byte <8 \b, reserved method +>2 byte >8 \b, unknown method +>3 byte &0x01 \b, ASCII +>3 byte &0x02 \b, has CRC +>3 byte &0x04 \b, extra field +>3 byte&0xC =0x08 +>>10 string x \b, was "%s" +>3 byte &0x10 \b, has comment +>3 byte &0x20 \b, encrypted +>4 ledate >0 \b, last modified: %s +>8 byte 2 \b, max compression +>8 byte 4 \b, max speed +>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT) +>9 byte =0x01 \b, from Amiga +>9 byte =0x02 \b, from VMS +>9 byte =0x03 \b, from Unix +>9 byte =0x04 \b, from VM/CMS +>9 byte =0x05 \b, from Atari +>9 byte =0x06 \b, from HPFS filesystem (OS/2, NT) +>9 byte =0x07 \b, from MacOS +>9 byte =0x08 \b, from Z-System +>9 byte =0x09 \b, from CP/M +>9 byte =0x0A \b, from TOPS/20 +>9 byte =0x0B \b, from NTFS filesystem (NT) +>9 byte =0x0C \b, from QDOS +>9 byte =0x0D \b, from Acorn RISCOS +# size of the original (uncompressed) input data modulo 2^32 +#>-4 ulelong x \b, original size modulo 2^32 %u +#ERROR: line 114: non zero offset 1048572 at level 1 + +# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis +0 string \037\036 packed data +!:mime application/octet-stream +>2 belong >1 \b, %d characters originally +>2 belong =1 \b, %d character originally +# +# This magic number is byte-order-independent. +0 short 0x1f1f old packed data +!:mime application/octet-stream + +# XXX - why *two* entries for "compacted data", one of which is +# byte-order independent, and one of which is byte-order dependent? +# +0 short 0x1fff compacted data +!:mime application/octet-stream +# This string is valid for SunOS (BE) and a matching "short" is listed +# in the Ultrix (LE) magic file. +0 string \377\037 compacted data +!:mime application/octet-stream +0 short 0145405 huf output +!:mime application/octet-stream + +# bzip2 +0 string BZh bzip2 compressed data +!:mime application/x-bzip2 +>3 byte >47 \b, block size = %c00k + +# bzip a block-sorting file compressor +# by Julian Seward and others +0 string BZ0 bzip compressed data +!:mime application/x-bzip +>3 byte >47 \b, block size = %c00k + +# lzip +0 string LZIP lzip compressed data +!:mime application/x-lzip +>4 byte x \b, version: %d + +# squeeze and crunch +# Michael Haardt +0 beshort 0x76FF squeezed data, +>4 string x original name %s +0 beshort 0x76FE crunched data, +>2 string x original name %s +0 beshort 0x76FD LZH compressed data, +>2 string x original name %s + +# Freeze +0 string \037\237 frozen file 2.1 +0 string \037\236 frozen file 1.0 (or gzip 0.5) + +# SCO compress -H (LZH) +0 string \037\240 SCO compress -H (LZH) data + +# European GSM 06.10 is a provisional standard for full-rate speech +# transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse +# excitation/long term prediction) coding at 13 kbit/s. +# +# There's only a magic nibble (4 bits); that nibble repeats every 33 +# bytes. This isn't suited for use, but maybe we can use it someday. +# +# This will cause very short GSM files to be declared as data and +# mismatches to be declared as data too! +#0 byte&0xF0 0xd0 data +#>33 byte&0xF0 0xd0 +#>66 byte&0xF0 0xd0 +#>99 byte&0xF0 0xd0 +#>132 byte&0xF0 0xd0 GSM 06.10 compressed audio + +# lzop from +0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data +>9 beshort <0x0940 +>>9 byte&0xf0 =0x00 - version 0. +>>9 beshort&0x0fff x \b%03x, +>>13 byte 1 LZO1X-1, +>>13 byte 2 LZO1X-1(15), +>>13 byte 3 LZO1X-999, +## >>22 bedate >0 last modified: %s, +>>14 byte =0x00 os: MS-DOS +>>14 byte =0x01 os: Amiga +>>14 byte =0x02 os: VMS +>>14 byte =0x03 os: Unix +>>14 byte =0x05 os: Atari +>>14 byte =0x06 os: OS/2 +>>14 byte =0x07 os: MacOS +>>14 byte =0x0A os: Tops/20 +>>14 byte =0x0B os: WinNT +>>14 byte =0x0E os: Win32 +>9 beshort >0x0939 +>>9 byte&0xf0 =0x00 - version 0. +>>9 byte&0xf0 =0x10 - version 1. +>>9 byte&0xf0 =0x20 - version 2. +>>9 beshort&0x0fff x \b%03x, +>>15 byte 1 LZO1X-1, +>>15 byte 2 LZO1X-1(15), +>>15 byte 3 LZO1X-999, +## >>25 bedate >0 last modified: %s, +>>17 byte =0x00 os: MS-DOS +>>17 byte =0x01 os: Amiga +>>17 byte =0x02 os: VMS +>>17 byte =0x03 os: Unix +>>17 byte =0x05 os: Atari +>>17 byte =0x06 os: OS/2 +>>17 byte =0x07 os: MacOS +>>17 byte =0x0A os: Tops/20 +>>17 byte =0x0B os: WinNT +>>17 byte =0x0E os: Win32 + +# 4.3BSD-Quasijarus Strong Compression +# https://minnie.tuhs.org/Quasijarus/compress.html +0 string \037\241 Quasijarus strong compressed data + +# From: Cory Dikkers +0 string XPKF Amiga xpkf.library compressed data +0 string PP11 Power Packer 1.1 compressed data +0 string PP20 Power Packer 2.0 compressed data, +>4 belong 0x09090909 fast compression +>4 belong 0x090A0A0A mediocre compression +>4 belong 0x090A0B0B good compression +>4 belong 0x090A0C0C very good compression +>4 belong 0x090A0C0D best compression + +# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at) +# https://www.7-zip.org or DOC/7zFormat.txt +# +0 string 7z\274\257\047\034 7-zip archive data, +>6 byte x version %d +>7 byte x \b.%d +!:mime application/x-7z-compressed +#!:ext 7z/cb7 + +# Type: LZMA +0 lelong&0xffffff =0x5d +>12 leshort 0xff lzma compressed data, +!:mime application/x-lzma +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld +>12 leshort 0 lzma compressed data, +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld + +# http://tukaani.org/xz/xz-file-format.txt +0 ustring \xFD7zXZ\x00 xz compressed data, checksum +>7 byte&0xf 0x0 NONE +>7 byte&0xf 0x1 CRC32 +>7 byte&0xf 0x4 CRC64 +>7 byte&0xf 0xa SHA-256 + +!:strength * 2 +!:mime application/x-xz + +# https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt +0 string LRZI LRZIP compressed data +>4 byte x - version %d +>5 byte x \b.%d +!:mime application/x-lrzip + +# https://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html +0 lelong 0x184d2204 lz4 compressed data (v1.4+) +!:mime application/x-lz4 +# Added by osm0sis@xda-developers.com +0 lelong 0x184c2103 lz4 compressed data (v1.0-v1.3) +!:mime application/x-lz4 +0 lelong 0x184c2102 lz4-l compressed data (v0.1-v0.9) +!:mime application/x-lz4 + +# Zstandard/LZ4 skippable frames +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong&0xFFFFFFF0 0x184D2A50 +>(4.l+8) indirect x + +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong 0xEC30A437 Zstandard dictionary +!:mime application/x-std-dictionary +>4 lelong x (ID %u) + +# AFX compressed files (Wolfram Kleff) +2 string -afx- AFX compressed file data + +# Supplementary magic data for the file(1) command to support +# rzip(1). The format is described in magic(5). +# +# Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with +# this file. +# +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +0 string ArC\x01 FreeArc archive + +# Type: DACT compressed files +0 long 0x444354C3 DACT compressed data +>4 byte >-1 (version %i. +>5 byte >-1 %i. +>6 byte >-1 %i) +>7 long >0 , original size: %i bytes +>15 long >30 , block size: %i bytes + +# Valve Pack (VPK) files +0 lelong 0x55aa1234 Valve Pak file +>0x4 lelong x \b, version %u +>0x8 lelong x \b, %u entries + +# Snappy framing format +# https://code.google.com/p/snappy/source/browse/trunk/framing_format.txt +0 string \377\006\0\0sNaPpY snappy framed data +!:mime application/x-snappy-framed + +# qpress, https://www.quicklz.com/ +0 string qpress10 qpress compressed data +!:mime application/x-qpress + +# Zlib https://www.ietf.org/rfc/rfc6713.txt +0 string/b x +>0 beshort%31 =0 +>>0 byte&0xf =8 +>>>0 byte&0x80 =0 zlib compressed data +!:mime application/zlib + +# BWC compression +0 string BWC +>3 byte 0 BWC compressed data + +# UCL compression +0 bequad 0x00e955434cff011a UCL compressed data + +# Softlib archive +0 string SLIB Softlib archive +>4 leshort x \b, version %d +>6 leshort x (contains %d files) + +# URL: https://github.com/lzfse/lzfse/blob/master/src/lzfse_internal.h#L276 +# From: Eric Hall +0 string bvx- lzfse encoded, no compression +0 string bvx1 lzfse compressed, uncompressed tables +0 string bvx2 lzfse compressed, compressed tables +0 string bvxn lzfse encoded, lzvn compressed + +# pcxLib.exe compression program +# http://www.shikadi.net/moddingwiki/PCX_Library +0 string/b pcxLib + +#------------------------------------------------------------ +# $File: android,v 1.18 2021/02/23 00:51:10 christos Exp $ +# Various android related magic entries +#------------------------------------------------------------ + +# Dalvik .dex format. http://retrodev.com/android/dexformat.html +# From "Mike Fleming" +# Fixed to avoid regexec 17 errors on some dex files +# From "Tim Strazzere" +0 string dex\n +>0 regex dex\n[0-9]{2}\0 Dalvik dex file +>4 string >000 version %s +0 string dey\n +>0 regex dey\n[0-9]{2}\0 Dalvik dex file (optimized for host) +>4 string >000 version %s + +# Android bootimg format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/mkbootimg/bootimg.h +# https://github.com/djrbliss/loki/blob/master/loki.h#L43 +0 string ANDROID! Android bootimg +>1024 string LOKI \b, LOKI'd +>>1028 lelong 0 \b (boot) +>>1028 lelong 1 \b (recovery) +>8 lelong >0 \b, kernel +>>12 lelong >0 \b (0x%x) +>16 lelong >0 \b, ramdisk +>>20 lelong >0 \b (0x%x) +>24 lelong >0 \b, second stage +>>28 lelong >0 \b (0x%x) +>36 lelong >0 \b, page size: %d +>38 string >0 \b, name: %s +>64 string >0 \b, cmdline (%s) + +# Android sparse img format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/libsparse/sparse_format.h +0 lelong 0xed26ff3a Android sparse image +>4 leshort x \b, version: %d +>6 leshort x \b.%d +>16 lelong x \b, Total of %d +>12 lelong x \b %d-byte output blocks in +>20 lelong x \b %d input chunks. + +# Android binary XML magic +# In include/androidfw/ResourceTypes.h: +# RES_XML_TYPE = 0x0003 followed by the size of the header (ResXMLTree_header), +# which is 8 bytes (2 bytes type + 2 bytes header size + 4 bytes size). +0 lelong 0x00080003 Android binary XML + +# Android cryptfs footer +# From https://android.googlesource.com/\ +# platform/system/vold/+/refs/heads/master/cryptfs.h +0 lelong 0xd0b5b1c4 Android cryptfs footer +>4 leshort x \b, version: %d +>6 leshort x \b.%d + +# Android Vdex format +# From https://android.googlesource.com/\ +# platform/art/+/master/runtime/vdex_file.h +0 string vdex Android vdex file, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d + +# Android Vdex format, dexfile is currently being updated +# by android system +# From https://android.googlesource.com/\ +# platform/art/+/master/dex2oat/dex2oat.cc +0 string wdex Android vdex file, being processed by dex2oat, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d diff --git a/Final_Zip/AIK/KSU/PBRP-R/cleanup.sh b/Final_Zip/AIK/KSU/PBRP-R/cleanup.sh new file mode 100755 index 0000000..d8f1d61 --- /dev/null +++ b/Final_Zip/AIK/KSU/PBRP-R/cleanup.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# AIK-Linux/cleanup: reset working directory +# osm0sis @ xda-developers + +case $1 in + --help) echo "usage: cleanup.sh [--local] [--quiet]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + statarg="-f %Su"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) statarg="-c %U";; +esac; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; + +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + sudo=sudo; +fi; + +$sudo rm -rf ramdisk split_img *new.* || exit 1; + +case $1 in + --quiet) ;; + *) echo "Working directory cleaned.";; +esac; +exit 0; + diff --git a/Final_Zip/AIK/KSU/PBRP-R/repackimg.sh b/Final_Zip/AIK/KSU/PBRP-R/repackimg.sh new file mode 100755 index 0000000..5709f0f --- /dev/null +++ b/Final_Zip/AIK/KSU/PBRP-R/repackimg.sh @@ -0,0 +1,413 @@ +#!/bin/bash +# AIK-Linux/repackimg: repack ramdisk and build image +# osm0sis @ xda-developers + +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: repackimg.sh [--local] [--original] [--origsize] [--level <0-9>] [--avbkey ] [--forceelf]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + + javaver=$(java -version 2>&1 | head -n1 | cut -d\" -f2); + javamaj=$(echo $javaver | cut -d. -f1); + javamin=$(echo $javaver | cut -d. -f2); + if [ "$javamaj" -lt 9 ] && [ "$javamaj" -eq 1 -a "$javamin" -lt 8 ]; then + java() { "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" "$@"; } + fi; + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; +chmod -R 755 "$bin" "$aik/"*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -z "$(ls split_img/* 2>/dev/null)" -o ! -e ramdisk ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +while [ "$1" ]; do + case $1 in + --original) original=1;; + --origsize) origsize=1;; + --forceelf) repackelf=1;; + --level) + case $2 in + ''|*[!0-9]*) ;; + *) level="-$2"; lvltxt=" - Level: $2"; shift;; + esac; + ;; + --avbkey) + if [ "$2" ]; then + for keytest in "$2" "$cur/$2" "$aik/$2"; do + if [ ! -z "$(ls $keytest.pk8 2>/dev/null)" -a ! -z "$(ls $keytest.x509.* 2>/dev/null)" ]; then + avbkey="$keytest"; avbtxt=" - Key: $2"; shift; break; + fi; + done; + fi; + ;; + esac; + shift; +done; + +ramdiskcomp=`cat split_img/*-*ramdiskcomp 2>/dev/null`; +if [ -z "$(ls ramdisk/* 2>/dev/null)" ] && [ ! "$ramdiskcomp" = "empty" -a ! "$original" ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - RepackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +if [ ! -z "$(ls *-new.* 2>/dev/null)" ]; then + echo "Warning: Overwriting existing files!"; + echo " "; +fi; +rm -f "*-new.*"; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" ]; then + sudo=sudo; sumsg=" (as root)"; +else + cpioarg="-R 0:0"; +fi; + +if [ "$original" ]; then + echo "Repacking with original ramdisk..."; +elif [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: Using empty ramdisk for repack!"; + compext=.empty; + touch ramdisk-new.cpio$compext; +else + echo "Packing ramdisk$sumsg..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + if [ -z "$level" ]; then + case $ramdiskcomp in + xz) level=-1;; + lz4*) level=-9;; + esac; + fi; + echo "Using compression: $ramdiskcomp$lvltxt"; + repackcmd="$ramdiskcomp $level"; + compext=$ramdiskcomp; + case $ramdiskcomp in + gzip) compext=gz;; + lzop) compext=lzo;; + xz) repackcmd="xz $level -Ccrc32";; + lzma) repackcmd="xz $level -Flzma";; + bzip2) compext=bz2;; + lz4) repackcmd="$bin/$arch/lz4 $level";; + lz4-l) repackcmd="$bin/$arch/lz4 $level -l"; compext=lz4;; + cpio) repackcmd="cat"; compext="";; + *) abort; exit 1;; + esac; + if [ "$compext" ]; then + compext=.$compext; + fi; + cd ramdisk; + $sudo find . | $sudo $cpio $cpioarg -H newc -o 2>/dev/null | $repackcmd > ../ramdisk-new.cpio$compext; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Getting build information..."; +cd split_img; +imgtype=`cat *-imgtype`; +case $imgtype in + KRNL) ;; + AOSP_VNDR) vendor=vendor_;; + *) + if [ -f *-kernel ]; then + kernel=`ls *-kernel`; echo "kernel = $kernel"; + kernel="split_img/$kernel"; + fi; + ;; +esac; +if [ "$original" ]; then + ramdisk=`ls *-*ramdisk.cpio*`; echo "${vendor}ramdisk = $ramdisk"; + ramdisk="split_img/$ramdisk"; +else + ramdisk="ramdisk-new.cpio$compext"; +fi; +case $imgtype in + KRNL) rsz=$(wc -c < ../"$ramdisk"); echo "ramdisk_size = $rsz";; + OSIP) echo "cmdline = $(cat *-*cmdline)";; + U-Boot) + name=`cat *-name`; echo "name = $name"; + uarch=`cat *-arch`; + os=`cat *-os`; + type=`cat *-type`; + comp=`cat *-comp`; echo "type = $uarch $os $type ($comp)"; + [ "$comp" = "uncompressed" ] && comp=none; + addr=`cat *-addr`; echo "load_addr = $addr"; + ep=`cat *-ep`; echo "entry_point = $ep"; + ;; + *) + if [ -f *-second ]; then + second=`ls *-second`; echo "second = $second"; + second=(--second "split_img/$second"); + fi; + if [ -f *-dtb ]; then + dtb=`ls *-dtb`; echo "dtb = $dtb"; + dtb=(--dtb "split_img/$dtb"); + fi; + if [ -f *-recovery_dtbo ]; then + recoverydtbo=`ls *-recovery_dtbo`; echo "recovery_dtbo = $recoverydtbo"; + recoverydtbo=(--recovery_dtbo "split_img/$recoverydtbo"); + fi; + if [ -f *-*cmdline ]; then + cmdname=`ls *-*cmdline`; + cmdline=`cat *-*cmdline`; echo "${vendor}cmdline = $cmdline"; + cmd=("split_img/$cmdname"@cmdline); + fi; + if [ -f *-board ]; then + board=`cat *-board`; echo "board = $board"; + fi; + if [ -f *-base ]; then + base=`cat *-base`; echo "base = $base"; + fi; + if [ -f *-pagesize ]; then + pagesize=`cat *-pagesize`; echo "pagesize = $pagesize"; + fi; + if [ -f *-kernel_offset ]; then + kerneloff=`cat *-kernel_offset`; echo "kernel_offset = $kerneloff"; + fi; + if [ -f *-ramdisk_offset ]; then + ramdiskoff=`cat *-ramdisk_offset`; echo "ramdisk_offset = $ramdiskoff"; + fi; + if [ -f *-second_offset ]; then + secondoff=`cat *-second_offset`; echo "second_offset = $secondoff"; + fi; + if [ -f *-tags_offset ]; then + tagsoff=`cat *-tags_offset`; echo "tags_offset = $tagsoff"; + fi; + if [ -f *-dtb_offset ]; then + dtboff=`cat *-dtb_offset`; echo "dtb_offset = $dtboff"; + fi; + if [ -f *-os_version ]; then + osver=`cat *-os_version`; echo "os_version = $osver"; + fi; + if [ -f *-os_patch_level ]; then + oslvl=`cat *-os_patch_level`; echo "os_patch_level = $oslvl"; + fi; + if [ -f *-header_version ]; then + hdrver=`cat *-header_version`; echo "header_version = $hdrver"; + fi; + if [ -f *-hashtype ]; then + hashtype=`cat *-hashtype`; echo "hashtype = $hashtype"; + hashtype="--hashtype $hashtype"; + fi; + if [ -f *-dt ]; then + dttype=`cat *-dttype`; + dt=`ls *-dt`; echo "dt = $dt"; + rpm=("split_img/$dt",rpm); + dt=(--dt "split_img/$dt"); + fi; + if [ -f *-unknown ]; then + unknown=`cat *-unknown`; echo "unknown = $unknown"; + fi; + if [ -f *-header ]; then + header=`ls *-header`; + header="split_img/$header"; + fi; + ;; +esac; +cd ..; + +if [ -f split_img/*-mtktype ]; then + mtktype=`cat split_img/*-mtktype`; + echo " "; + echo "Generating MTK headers..."; + echo " "; + echo "Using ramdisk type: $mtktype"; + "$bin/$arch/mkmtkhdr" --kernel "$kernel" --$mtktype "$ramdisk" >/dev/null; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + mv -f "$(basename "$kernel")-mtk" kernel-new.mtk; + mv -f "$(basename "$ramdisk")-mtk" $mtktype-new.mtk; + kernel=kernel-new.mtk; + ramdisk=$mtktype-new.mtk; +fi; + +if [ -f split_img/*-sigtype ]; then + outname=unsigned-new.img; +else + outname=image-new.img; +fi; + +[ "$dttype" = "ELF" ] && repackelf=1; +if [ "$imgtype" = "ELF" ] && [ ! "$header" -o ! "$repackelf" ]; then + imgtype=AOSP; + echo " "; + echo "Warning: ELF format without RPM detected; will be repacked using AOSP format!"; +fi; + +echo " "; +echo "Building image..."; +echo " "; +echo "Using format: $imgtype"; +echo " "; +case $imgtype in + AOSP_VNDR) "$bin/$arch/mkbootimg" --vendor_ramdisk "$ramdisk" "${dtb[@]}" --vendor_cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --tags_offset $tagsoff --dtb_offset $dtboff --os_version "$osver" --os_patch_level "$oslvl" --header_version $hdrver --vendor_boot $outname;; + AOSP) "$bin/$arch/mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" "${dtb[@]}" "${recoverydtbo[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --dtb_offset "$dtboff" --os_version "$osver" --os_patch_level "$oslvl" --header_version "$hdrver" $hashtype "${dt[@]}" -o $outname;; + AOSP-PXA) "$bin/$arch/pxa-mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --unknown $unknown "${dt[@]}" -o $outname;; + ELF) "$bin/$arch/elftool" pack -o $outname header="$header" "$kernel" "$ramdisk",ramdisk "${rpm[@]}" "${cmd[@]}" >/dev/null;; + KRNL) "$bin/$arch/rkcrc" -k "$ramdisk" $outname;; + OSIP) + mkdir split_img/.temp 2>/dev/null; + for i in bootstub cmdline.txt hdr kernel parameter sig; do + cp -f split_img/*-*$(basename $i .txt | sed -e 's/hdr/header/') split_img/.temp/$i 2>/dev/null; + done; + cp -f "$ramdisk" split_img/.temp/ramdisk.cpio.gz; + "$bin/$arch/mboot" -d split_img/.temp -f $outname; + ;; + U-Boot) + part0="$kernel"; + case $type in + Multi) part1=(:"$ramdisk");; + RAMDisk) part0="$ramdisk";; + esac; + "$bin/$arch/mkimage" -A $uarch -O $os -T $type -C $comp -a $addr -e $ep -n "$name" -d "$part0""${part1[@]}" $outname >/dev/null; + ;; + *) echo " "; echo "Unsupported format."; abort; exit 1;; +esac; +if [ ! $? -eq "0" ]; then + abort; + exit 1; +fi; + +rm -rf split_img/.temp; + +if [ -f split_img/*-sigtype ]; then + sigtype=`cat split_img/*-sigtype`; + if [ -f split_img/*-avbtype ]; then + avbtype=`cat split_img/*-avbtype`; + fi; + if [ -f split_img/*-blobtype ]; then + blobtype=`cat split_img/*-blobtype`; + fi; + echo "Signing new image..."; + echo " "; + echo "Using signature: $sigtype $avbtype$avbtxt$blobtype"; + [ ! "$avbkey" ] && avbkey="$bin/avb/verity"; + echo " "; + case $sigtype in + AVBv1) java -jar "$bin/boot_signer.jar" /$avbtype unsigned-new.img "$avbkey.pk8" "$avbkey.x509."* image-new.img 2>/dev/null;; + BLOB) + awk 'BEGIN { printf "-SIGNED-BY-SIGNBLOB-\00\00\00\00\00\00\00\00" }' > image-new.img; + "$bin/$arch/blobpack" blob.tmp $blobtype unsigned-new.img >/dev/null; + cat blob.tmp >> image-new.img; + rm -f blob.tmp; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --pack image-new.img --keyblock "$bin/chromeos/kernel.keyblock" --signprivate "$bin/chromeos/kernel_data_key.vbprivk" --version 1 --vmlinuz unsigned-new.img --bootloader "$bin/chromeos/empty" --config "$bin/chromeos/empty" --arch arm --flags 0x1;; + DHTB) + "$bin/$arch/dhtbsign" -i unsigned-new.img -o image-new.img >/dev/null; + rm -f split_img/*-tailtype 2>/dev/null; + ;; + NOOK*) cat split_img/*-master_boot.key unsigned-new.img > image-new.img;; + esac; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; +fi; + +if [ -f split_img/*-lokitype ]; then + lokitype=`cat split_img/*-lokitype`; + echo "Loki patching new image..."; + echo " "; + echo "Using type: $lokitype"; + echo " "; + mv -f image-new.img unlokied-new.img; + if [ -f aboot.img ]; then + "$bin/$arch/loki_tool" patch $lokitype aboot.img unlokied-new.img image-new.img >/dev/null; + if [ ! $? -eq "0" ]; then + echo "Patching failed."; + abort; + exit 1; + fi; + else + echo "Device aboot.img required in script directory to find Loki patch offset."; + abort; + exit 1; + fi; +elif [ -f split_img/*-microloader.bin ]; then + echo "Amonet patching new image..."; + echo " "; + cp -f image-new.img unamonet-new.img; + cp -f split_img/*-microloader.bin microloader.tmp; + dd bs=1024 count=1 conv=notrunc if=unamonet-new.img of=head.tmp 2>/dev/null; + dd bs=1024 seek=1 conv=notrunc if=head.tmp of=image-new.img 2>/dev/null; + dd conv=notrunc if=microloader.tmp of=image-new.img 2>/dev/null; + rm -f head.tmp microloader.tmp; +fi; + +if [ -f split_img/*-tailtype ]; then + tailtype=`cat split_img/*-tailtype`; + echo "Appending footer..."; + echo " "; + echo "Using type: $tailtype"; + echo " "; + case $tailtype in + Bump) awk 'BEGIN { printf "\x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79" }' >> image-new.img;; + SEAndroid) printf 'SEANDROIDENFORCE' >> image-new.img;; + esac; +fi; + +if [ "$origsize" -a -f split_img/*-origsize ]; then + filesize=`cat split_img/*-origsize`; + echo "Padding to original size..."; + echo " "; + cp -f image-new.img unpadded-new.img; + truncate -s $filesize image-new.img; +fi; + +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/KSU/PBRP-R/unpackimg.sh b/Final_Zip/AIK/KSU/PBRP-R/unpackimg.sh new file mode 100755 index 0000000..6198f2a --- /dev/null +++ b/Final_Zip/AIK/KSU/PBRP-R/unpackimg.sh @@ -0,0 +1,370 @@ +#!/bin/bash +# AIK-Linux/unpackimg: split image and unpack ramdisk +# osm0sis @ xda-developers + +cleanup() { "$aik/cleanup.sh" $local --quiet; } +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: unpackimg.sh [--local] [--nosudo] "; exit 1;; + --local) local="--local"; shift;; +esac; +case $1 in + --nosudo) nosudo=1; shift;; + --sudo) shift;; +esac; +if [ ! "$nosudo" ]; then + sudo=sudo; sumsg=" (as root)"; +fi; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + file() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/file" "$@"; } + lzma() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + tail() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/tail" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +if [ ! "$local" ]; then + cd "$aik"; +fi; +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +img="$1"; +[ -f "$cur/$1" ] && img="$cur/$1"; +if [ ! "$img" ]; then + while IFS= read -r line; do + case $line in + aboot.img|image-new.img|unlokied-new.img|unsigned-new.img) continue;; + esac; + img="$line"; + break; + done < <(ls *.elf *.img *.sin 2>/dev/null); +fi; +img="$(readlink -f "$img")"; +if [ ! -f "$img" ]; then + echo "No image file supplied."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - UnpackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +file=$(basename "$img"); +echo "Supplied image: $file"; +echo " "; + +if [ -d split_img -o -d ramdisk ]; then + if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + rmsumsg=" (as root)"; + fi; + echo "Removing old work folders and files$rmsumsg..."; + echo " "; + cleanup; +fi; + +echo "Setting up work folders..."; +echo " "; +mkdir split_img ramdisk; + +cd split_img; +filesize=$(wc -c < "$img"); +echo "$filesize" > "$file-origsize"; +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "signing" ]; then + echo $imgtest | awk '{ print $1 }' > "$file-sigtype"; + sigtype=$(cat "$file-sigtype"); + echo "Signature with \"$sigtype\" type detected, removing..."; + echo " "; + case $sigtype in + BLOB) + cp -f "$img" "$file"; + "$bin/$arch/blobunpack" "$file" | tail -n+5 | cut -d" " -f2 | dd bs=1 count=3 > "$file-blobtype" 2>/dev/null; + mv -f "$file."* "$file"; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --get-vmlinuz "$img" --vmlinuz-out "$file";; + DHTB) dd bs=4096 skip=512 iflag=skip_bytes conv=notrunc if="$img" of="$file" 2>/dev/null;; + NOOK) + dd bs=1048576 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=1048576 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + NOOKTAB) + dd bs=262144 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=262144 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + SIN*) + "$bin/$arch/sony_dump" . "$img" >/dev/null; + mv -f "$file."* "$file"; + rm -f "$file-sigtype"; + ;; + esac; + img="$file"; +fi; + +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "bootimg" ]; then + [ "$(echo $imgtest | awk '{ print $3 }')" = "PXA" ] && typesuffix=-PXA; + echo "$(echo $imgtest | awk '{ print $1 }')$typesuffix" > "$file-imgtype"; + imgtype=$(cat "$file-imgtype"); +else + cd ..; + cleanup; + echo "Unrecognized format."; + abort; + exit 1; +fi; +echo "Image type: $imgtype"; +echo " "; + +case $imgtype in + AOSP*|ELF|KRNL|OSIP|U-Boot) ;; + *) + cd ..; + cleanup; + echo "Unsupported format."; + abort; + exit 1; + ;; +esac; + +case $(echo $imgtest | awk '{ print $3 }') in + LOKI) + echo $imgtest | awk '{ print $5 }' | cut -d\( -f2 | cut -d\) -f1 > "$file-lokitype"; + lokitype=$(cat "$file-lokitype"); + echo "Loki patch with \"$lokitype\" type detected, reverting..."; + echo " "; + echo "Warning: A dump of your device's aboot.img is required to re-Loki!"; + echo " "; + "$bin/$arch/loki_tool" unlok "$img" "$file" >/dev/null; + img="$file"; + ;; + AMONET) + echo "Amonet patch detected, reverting..."; + echo " "; + dd bs=2048 count=1 conv=notrunc if="$img" of="$file-microloader.bin" 2>/dev/null; + dd bs=1024 skip=1 conv=notrunc if="$file-microloader.bin" of="$file-head" 2>/dev/null; + truncate -s 1024 "$file-microloader.bin"; + truncate -s 2048 "$file-head"; + dd bs=2048 skip=1 conv=notrunc if="$img" of="$file-tail" 2>/dev/null; + cat "$file-head" "$file-tail" > "$file"; + rm -f "$file-head" "$file-tail"; + img="$file"; + ;; +esac; + +tailtest="$(dd if="$img" iflag=skip_bytes skip=$(($(wc -c < "$img") - 8192)) bs=8192 count=1 2>/dev/null | file -m $bin/androidbootimg.magic - 2>/dev/null | cut -d: -f2-)"; +case $tailtest in + *data) tailtest="$(tail -n50 "$img" | file -m "$bin/androidbootimg.magic" - 2>/dev/null | cut -d: -f2-)";; +esac; +tailtype="$(echo $tailtest | awk '{ print $1 }')"; +case $tailtype in + AVB*) + echo "Signature with \"$tailtype\" type detected."; + echo " "; + case $tailtype in + *v1) + echo $tailtype > "$file-sigtype"; + echo $tailtest | awk '{ print $4 }' > "$file-avbtype"; + ;; + esac; + ;; + Bump|SEAndroid) + echo "Footer with \"$tailtype\" type detected."; + echo " "; + echo $tailtype > "$file-tailtype"; + ;; +esac; + +if [ "$imgtype" = "U-Boot" ]; then + imgsize=$(($(printf '%d\n' 0x$(hexdump -n 4 -s 12 -e '16/1 "%02x""\n"' "$img")) + 64)); + if [ ! "$filesize" = "$imgsize" ]; then + echo "Trimming..."; + echo " "; + dd bs=$imgsize count=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + img="$file"; + fi; +fi; + +echo 'Splitting image to "split_img/"...'; +case $imgtype in + AOSP_VNDR) vendor=vendor_;; +esac; +case $imgtype in + AOSP|AOSP_VNDR) "$bin/$arch/unpackbootimg" -i "$img";; + AOSP-PXA) "$bin/$arch/pxa-unpackbootimg" -i "$img";; + ELF) + mkdir elftool_out; + "$bin/$arch/elftool" unpack -i "$img" -o elftool_out >/dev/null; + mv -f elftool_out/header "$file-header" 2>/dev/null; + rm -rf elftool_out; + "$bin/$arch/unpackelf" -i "$img"; + ;; + KRNL) dd bs=4096 skip=8 iflag=skip_bytes conv=notrunc if="$img" of="$file-ramdisk" 2>&1 | tail -n+3 | cut -d" " -f1-2;; + OSIP) + "$bin/$arch/mboot" -u -f "$img"; + [ ! $? -eq "0" ] && error=1; + for i in bootstub cmdline.txt hdr kernel parameter ramdisk.cpio.gz sig; do + mv -f $i "$file-$(basename $i .txt | sed -e 's/hdr/header/' -e 's/ramdisk.cpio.gz/ramdisk/')" 2>/dev/null || true; + done; + ;; + U-Boot) + "$bin/$arch/dumpimage" -l "$img"; + "$bin/$arch/dumpimage" -l "$img" > "$file-header"; + grep "Name:" "$file-header" | cut -c15- > "$file-name"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f1 > "$file-arch"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f2 > "$file-os"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f3 | cut -d- -f1 > "$file-type"; + grep "Type:" "$file-header" | cut -d\( -f2 | cut -d\) -f1 | cut -d" " -f1 | cut -d- -f1 > "$file-comp"; + grep "Address:" "$file-header" | cut -c15- > "$file-addr"; + grep "Point:" "$file-header" | cut -c15- > "$file-ep"; + rm -f "$file-header"; + "$bin/$arch/dumpimage" -p 0 -o "$file-kernel" "$img"; + [ ! $? -eq "0" ] && error=1; + case $(cat "$file-type") in + Multi) "$bin/$arch/dumpimage" -p 1 -o "$file-ramdisk" "$img";; + RAMDisk) mv -f "$file-kernel" "$file-ramdisk";; + *) touch "$file-ramdisk";; + esac; + ;; +esac; +if [ ! $? -eq "0" -o "$error" ]; then + cd ..; + cleanup; + abort; + exit 1; +fi; + +if [ -f *-kernel ] && [ "$(file -m "$bin/androidbootimg.magic" *-kernel 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')" = "MTK" ]; then + mtk=1; + echo " "; + echo "MTK header found in kernel, removing..."; + dd bs=512 skip=1 conv=notrunc if="$file-kernel" of=tempkern 2>/dev/null; + mv -f tempkern "$file-kernel"; +fi; +mtktest="$(file -m "$bin/androidbootimg.magic" *-*ramdisk 2>/dev/null | cut -d: -f2-)"; +mtktype=$(echo $mtktest | awk '{ print $3 }'); +if [ "$(echo $mtktest | awk '{ print $1 }')" = "MTK" ]; then + if [ ! "$mtk" ]; then + echo " "; + echo "Warning: No MTK header found in kernel!"; + mtk=1; + fi; + echo "MTK header found in \"$mtktype\" type ramdisk, removing..."; + dd bs=512 skip=1 conv=notrunc if="$(ls *-*ramdisk)" of=temprd 2>/dev/null; + mv -f temprd "$(ls *-*ramdisk)"; +else + if [ "$mtk" ]; then + if [ ! "$mtktype" ]; then + echo 'Warning: No MTK header found in ramdisk, assuming "rootfs" type!'; + mtktype="rootfs"; + fi; + fi; +fi; +[ "$mtk" ] && echo $mtktype > "$file-mtktype"; + +if [ -f *-dt ]; then + dttest="$(file -m "$bin/androidbootimg.magic" *-dt 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')"; + echo $dttest > "$file-dttype"; + if [ "$imgtype" = "ELF" ]; then + case $dttest in + QCDT|ELF) ;; + *) echo " "; + echo "Non-QC DTB found, packing kernel and appending..."; + gzip --no-name -9 "$file-kernel"; + mv -f "$file-kernel.gz" "$file-kernel"; + cat "$file-dt" >> "$file-kernel"; + rm -f "$file-dt"*;; + esac; + fi; +fi; + +file -m "$bin/magic" *-*ramdisk 2>/dev/null | cut -d: -f2 | awk '{ print $1 }' > "$file-${vendor}ramdiskcomp"; +ramdiskcomp=`cat *-*ramdiskcomp`; +unpackcmd="$ramdiskcomp -dc"; +compext=$ramdiskcomp; +case $ramdiskcomp in + gzip) unpackcmd="gzip -dcq"; compext=gz;; + lzop) compext=lzo;; + xz) ;; + lzma) ;; + bzip2) compext=bz2;; + lz4) unpackcmd="$bin/$arch/lz4 -dcq";; + lz4-l) unpackcmd="$bin/$arch/lz4 -dcq"; compext=lz4;; + cpio) unpackcmd="cat"; compext="";; + empty) compext=empty;; + *) compext="";; +esac; +if [ "$compext" ]; then + compext=.$compext; +fi; +mv -f "$(ls *-*ramdisk)" "$file-${vendor}ramdisk.cpio$compext" 2>/dev/null; +cd ..; +if [ "$ramdiskcomp" = "data" ]; then + echo "Unrecognized format."; + abort; + exit 1; +fi; + +echo " "; +if [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: No ramdisk found to be unpacked!"; +else + echo "Unpacking ramdisk$sumsg to \"ramdisk/\"..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + echo "Compression used: $ramdiskcomp"; + if [ ! "$compext" -a ! "$ramdiskcomp" = "cpio" ]; then + echo "Unsupported format."; + abort; + exit 1; + fi; + $sudo chown 0:0 ramdisk 2>/dev/null; + cd ramdisk; + $unpackcmd "../split_img/$file-${vendor}ramdisk.cpio$compext" | $sudo $cpio -i -d --no-absolute-filenames; + if [ ! $? -eq "0" ]; then + [ "$nosudo" ] && echo "Unpacking failed, try without --nosudo."; + cd ..; + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/KSU/PBRP/bin/androidbootimg.magic b/Final_Zip/AIK/KSU/PBRP/bin/androidbootimg.magic new file mode 100755 index 0000000..4e7a106 --- /dev/null +++ b/Final_Zip/AIK/KSU/PBRP/bin/androidbootimg.magic @@ -0,0 +1,111 @@ +#------------------------------------------------------------------------------ +# Various Android OEM non-standard boot image related magic entries +# osm0sis @ xda-developers +#------------------------------------------------------------------------------ + +# ASUS Blob Signature +0 string -SIGNED-BY-SIGNBLOB- BLOB signing + +# Barnes & Noble Nook Signature +64 string Red\x20Loader NOOK signing (red loader) +64 string Green\x20Loader NOOK signing (green loader) +64 string Green\x20Recovery NOOK signing (green recovery) +64 string eMMC\x20boot.img+secondloader NOOK signing (emmc boot) +64 string eMMC\x20recovery.img+secondloader NOOK signing (emmc recovery) +48 string BauwksBoot NOOKTAB signing (bauwks) + +# Google ChromeOS Signature +0 string CHROMEOS CHROMEOS signing + +# Samsung/Spreadtrum DHTB Signature +0 string DHTB\x01\x00\x00 DHTB signing + +# Sony SIN Packaging/Signature +0 string \x01\x00\x00\x00 SINv1 signing +0 string \x02\x00\x00\x00 SINv2 signing +0 string \x03SIN SINv3 signing + +# Google Pixel/Nexus/AOSP Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search ANDROID! AOSP bootimg +>>36 string \x00\x00\x00\x02 \b, PXA variant (020) +>>36 string \x00\x00\x80\x02 \b, PXA variant (028) +>>36 string \x00\x00\x00\x03 \b, PXA variant (030) +>>96 search microloader +>>>1024 string ANDROID! \b, AMONET header +>>1024 string LOKI \b, LOKI header +>>>1028 string \x00 \b (boot) +>>>1028 string \x01 \b (recovery) +>>2048 search \x88\x16\x88\x58 \b, MTK headers +!:strength * 3 + +# Google Pixel/AOSP Vendor Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search VNDRBOOT AOSP_VNDR bootimg +!:strength * 3 + +# DENX U-Boot +0 string \x27\x05\x19\x56 U-Boot bootimg + +# Intel OSIP +1000 search \xFC\xFA\xBC\x00 OSIP bootimg (headerless) +!:strength / 15 +0 string $OS$\x00\x00\x01 OSIP bootimg +>52 string \x00\x00\x00\x00 \b, boot (signed) +>52 string \x01\x00\x00\x00 \b, boot (unsigned) +>52 string \x0C\x00\x00\x00 \b, recovery (signed) +>52 string \x0D\x00\x00\x00 \b, recovery (unsigned) + +# Rockchip KRNL +0 string KRNL KRNL bootimg + +# Sony ELF +0 string \x7FELF ELF +>5 string \x01\x01\x61 bootimg +>18 string \x28 (ARM +>18 string \x03 (x86_ +>18 string \x08 (MIPS +>4 string \x01 \b) +>4 string \x02 \b64) +>0 search \x88\x16\x88\x58 \b, MTK headers + +# MediaTek MTK +# [for detection after boot image has already been split] +0 search \x88\x16\x88\x58 MTK header +>0 search KERNEL \b, kernel type +>0 search ROOTFS \b, rootfs type +>0 search RECOVERY \b, recovery type +!:strength / 20 + +# Qualcomm Device Tree +# [for detection after boot image has already been split] +0 string QCDT QCDT header +!:strength / 20 + +# Google Android Verified Boot 1.0 Signature +# [for detection with the tail of the boot image] +0 search \x02\x01\x01\x30\x82 AVBv1 signing footer +>0 search /boot \b, boot type +>0 search /recovery \b, recovery type +!:strength / 20 + +# Google Android Verified Boot 2.0 Signature +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search AVBf AVBv2 signing footer +!:strength / 20 + +# LG Bump +# [for detection with the tail of the boot image] +0 search \x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79 Bump footer +!:strength / 20 + +# Samsung SEAndroid +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search SEANDROIDENFORCE SEAndroid footer +!:strength / 20 diff --git a/Final_Zip/AIK/KSU/PBRP/bin/avb/verity.pk8 b/Final_Zip/AIK/KSU/PBRP/bin/avb/verity.pk8 new file mode 100755 index 0000000..bebf216 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/avb/verity.pk8 differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/avb/verity.x509.pem b/Final_Zip/AIK/KSU/PBRP/bin/avb/verity.x509.pem new file mode 100755 index 0000000..86399c3 --- /dev/null +++ b/Final_Zip/AIK/KSU/PBRP/bin/avb/verity.x509.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIID/TCCAuWgAwIBAgIJAJcPmDkJqolJMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g +VmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UE +AwwHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe +Fw0xNDExMDYxOTA3NDBaFw00MjAzMjQxOTA3NDBaMIGUMQswCQYDVQQGEwJVUzET +MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEQMA4G +A1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UEAwwHQW5kcm9p +ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAOjreE0vTVSRenuzO9vnaWfk0eQzYab0gqpi +6xAzi6dmD+ugoEKJmbPiuE5Dwf21isZ9uhUUu0dQM46dK4ocKxMRrcnmGxydFn6o +fs3ODJMXOkv2gKXL/FdbEPdDbxzdu8z3yk+W67udM/fW7WbaQ3DO0knu+izKak/3 +T41c5uoXmQ81UNtAzRGzGchNVXMmWuTGOkg6U+0I2Td7K8yvUMWhAWPPpKLtVH9r +AL5TzjYNR92izdKcz3AjRsI3CTjtpiVABGeX0TcjRSuZB7K9EK56HV+OFNS6I1NP +jdD7FIShyGlqqZdUOkAUZYanbpgeT5N7QL6uuqcGpoTOkalu6kkCAwEAAaNQME4w +HQYDVR0OBBYEFH5DM/m7oArf4O3peeKO0ZIEkrQPMB8GA1UdIwQYMBaAFH5DM/m7 +oArf4O3peeKO0ZIEkrQPMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB +AHO3NSvDE5jFvMehGGtS8BnFYdFKRIglDMc4niWSzhzOVYRH4WajxdtBWc5fx0ix +NF/+hVKVhP6AIOQa+++sk+HIi7RvioPPbhjcsVlZe7cUEGrLSSveGouQyc+j0+m6 +JF84kszIl5GGNMTnx0XRPO+g8t6h5LWfnVydgZfpGRRg+WHewk1U2HlvTjIceb0N +dcoJ8WKJAFWdcuE7VIm4w+vF/DYX/A2Oyzr2+QRhmYSv1cusgAeC1tvH4ap+J1Lg +UnOu5Kh/FqPLLSwNVQp4Bu7b9QFfqK8Moj84bj88NqRGZgDyqzuTrFxn6FW7dmyA +yttuAJAEAymk1mipd9+zp38= +-----END CERTIFICATE----- diff --git a/Final_Zip/AIK/KSU/PBRP/bin/boot_signer.jar b/Final_Zip/AIK/KSU/PBRP/bin/boot_signer.jar new file mode 100755 index 0000000..dd96a3e Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/boot_signer.jar differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/chromeos/empty b/Final_Zip/AIK/KSU/PBRP/bin/chromeos/empty new file mode 100755 index 0000000..8b13789 --- /dev/null +++ b/Final_Zip/AIK/KSU/PBRP/bin/chromeos/empty @@ -0,0 +1 @@ + diff --git a/Final_Zip/AIK/KSU/PBRP/bin/chromeos/kernel.keyblock b/Final_Zip/AIK/KSU/PBRP/bin/chromeos/kernel.keyblock new file mode 100755 index 0000000..9740be4 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/chromeos/kernel.keyblock differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/chromeos/kernel_data_key.vbprivk b/Final_Zip/AIK/KSU/PBRP/bin/chromeos/kernel_data_key.vbprivk new file mode 100755 index 0000000..8d392fb Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/chromeos/kernel_data_key.vbprivk differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/blobpack b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/blobpack new file mode 100755 index 0000000..685c6c0 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/blobpack differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/blobunpack b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/blobunpack new file mode 100755 index 0000000..2d96696 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/blobunpack differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/dhtbsign b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/dhtbsign new file mode 100755 index 0000000..f117b88 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/dumpimage b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/dumpimage new file mode 100755 index 0000000..8ba15d3 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/dumpimage differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/elftool b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/elftool new file mode 100755 index 0000000..b25dd56 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/elftool differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/futility b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/futility new file mode 100755 index 0000000..c830e31 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/futility differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/loki_tool b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/loki_tool new file mode 100755 index 0000000..d305760 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/loki_tool differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/lz4 b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/lz4 new file mode 100755 index 0000000..801bad4 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/lz4 differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/mboot b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/mboot new file mode 100755 index 0000000..023eab0 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/mboot differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/mkbootimg b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/mkbootimg new file mode 100755 index 0000000..ed68c2d Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/mkimage b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/mkimage new file mode 100755 index 0000000..8e97c0c Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/mkimage differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/mkmtkhdr b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/mkmtkhdr new file mode 100755 index 0000000..d71db24 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/pxa-mkbootimg b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/pxa-mkbootimg new file mode 100755 index 0000000..0636873 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/pxa-unpackbootimg b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/pxa-unpackbootimg new file mode 100755 index 0000000..8dbdecf Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/rkcrc b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/rkcrc new file mode 100755 index 0000000..45027f3 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/rkcrc differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/sony_dump b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/sony_dump new file mode 100755 index 0000000..2563e25 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/sony_dump differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/unpackbootimg b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/unpackbootimg new file mode 100755 index 0000000..b70aed5 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/unpackelf b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/unpackelf new file mode 100755 index 0000000..12e9057 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/i686/unpackelf differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/blobpack b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/blobpack new file mode 100755 index 0000000..90256d4 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/blobpack differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/blobunpack b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/blobunpack new file mode 100755 index 0000000..53374ff Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/dhtbsign b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/dhtbsign new file mode 100755 index 0000000..ccb7a67 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/dumpimage b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/dumpimage new file mode 100755 index 0000000..861bd68 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/elftool b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/elftool new file mode 100755 index 0000000..07a520d Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/elftool differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/futility b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/futility new file mode 100755 index 0000000..4d56ec3 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/futility differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/loki_tool b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/loki_tool new file mode 100755 index 0000000..4a1b74a Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/lz4 b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/lz4 new file mode 100755 index 0000000..8a4136b Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/lz4 differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/mboot b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/mboot new file mode 100755 index 0000000..8bf92d4 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/mboot differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/mkbootimg b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/mkbootimg new file mode 100755 index 0000000..2b628c3 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/mkimage b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/mkimage new file mode 100755 index 0000000..6419ea3 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/mkimage differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/mkmtkhdr b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/mkmtkhdr new file mode 100755 index 0000000..1ab256f Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/pxa-mkbootimg b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..5885720 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..d7b1b7d Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/rkcrc b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/rkcrc new file mode 100755 index 0000000..f218228 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/sony_dump b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/sony_dump new file mode 100755 index 0000000..6fc3696 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/unpackbootimg b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/unpackbootimg new file mode 100755 index 0000000..8f4fccf Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/unpackelf b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/unpackelf new file mode 100755 index 0000000..477e25d Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/linux/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/blobpack b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/blobpack new file mode 100755 index 0000000..2336ec0 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/blobpack differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/blobunpack b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/blobunpack new file mode 100755 index 0000000..834cb50 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/blobunpack differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/cpio b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/cpio new file mode 100755 index 0000000..b7e41f1 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/cpio differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/dd b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/dd new file mode 100755 index 0000000..b684139 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/dd differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/dhtbsign b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/dhtbsign new file mode 100755 index 0000000..b3ba0ba Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/dumpimage b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/dumpimage new file mode 100755 index 0000000..917c8ed Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/dumpimage differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/elftool b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/elftool new file mode 100755 index 0000000..27f12be Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/elftool differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/file b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/file new file mode 100755 index 0000000..8024db5 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/file differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/futility b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/futility new file mode 100755 index 0000000..8658249 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/futility differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/libiconv.2.dylib b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/libiconv.2.dylib new file mode 100755 index 0000000..ec61db0 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/libintl.8.dylib b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/libintl.8.dylib new file mode 100755 index 0000000..c297f0a Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/libintl.8.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/liblzma.5.dylib b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/liblzma.5.dylib new file mode 100755 index 0000000..126d338 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/liblzo2.2.dylib b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/liblzo2.2.dylib new file mode 100755 index 0000000..8a24e23 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/libmagic.1.dylib b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/libmagic.1.dylib new file mode 100755 index 0000000..92e6c7f Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/loki_tool b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/loki_tool new file mode 100755 index 0000000..7eecf68 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/loki_tool differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/lz4 b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/lz4 new file mode 100755 index 0000000..43126f8 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/lz4 differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/lzop b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/lzop new file mode 100755 index 0000000..fc3103c Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/lzop differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/mboot b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/mboot new file mode 100755 index 0000000..dfa0d3e Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/mboot differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/mkbootimg b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/mkbootimg new file mode 100755 index 0000000..82f05a9 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/mkimage b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/mkimage new file mode 100755 index 0000000..e760d6e Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/mkimage differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/mkmtkhdr b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/mkmtkhdr new file mode 100755 index 0000000..907ba0f Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/pxa-mkbootimg b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/pxa-mkbootimg new file mode 100755 index 0000000..12f8337 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/pxa-unpackbootimg b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/pxa-unpackbootimg new file mode 100755 index 0000000..2f1fe6c Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/rkcrc b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/rkcrc new file mode 100755 index 0000000..c2b70ce Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/rkcrc differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/sony_dump b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/sony_dump new file mode 100755 index 0000000..2f187e6 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/sony_dump differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/tail b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/tail new file mode 100755 index 0000000..99ee578 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/tail differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/truncate b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/truncate new file mode 100755 index 0000000..26bf16b Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/truncate differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/unpackbootimg b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/unpackbootimg new file mode 100755 index 0000000..e92b74e Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/unpackelf b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/unpackelf new file mode 100755 index 0000000..4ea11d0 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/unpackelf differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/xz b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/xz new file mode 100755 index 0000000..b501c14 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/i386/xz differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/blobpack b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/blobpack new file mode 100755 index 0000000..816fcf2 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/blobpack differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/blobunpack b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/blobunpack new file mode 100755 index 0000000..9241057 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/cpio b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/cpio new file mode 100755 index 0000000..991c5a8 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/cpio differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/dd b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/dd new file mode 100755 index 0000000..e927886 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/dd differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/dhtbsign b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/dhtbsign new file mode 100755 index 0000000..162fa88 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/dumpimage b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/dumpimage new file mode 100755 index 0000000..473538b Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/elftool b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/elftool new file mode 100755 index 0000000..0185019 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/elftool differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/file b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/file new file mode 100755 index 0000000..0b9f24c Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/file differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/futility b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/futility new file mode 100755 index 0000000..a28db4d Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/futility differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/libiconv.2.dylib b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/libiconv.2.dylib new file mode 100755 index 0000000..8f56eed Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/libintl.8.dylib b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/libintl.8.dylib new file mode 100755 index 0000000..f270e89 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/libintl.8.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/liblzma.5.dylib b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/liblzma.5.dylib new file mode 100755 index 0000000..39c6b96 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/liblzo2.2.dylib b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/liblzo2.2.dylib new file mode 100755 index 0000000..a05b7eb Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/libmagic.1.dylib b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/libmagic.1.dylib new file mode 100755 index 0000000..29ad687 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/loki_tool b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/loki_tool new file mode 100755 index 0000000..1b9f062 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/lz4 b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/lz4 new file mode 100755 index 0000000..bcee28d Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/lz4 differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/lzop b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/lzop new file mode 100755 index 0000000..8be71f4 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/lzop differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/mboot b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/mboot new file mode 100755 index 0000000..ad67219 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/mboot differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/mkbootimg b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/mkbootimg new file mode 100755 index 0000000..137aef2 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/mkimage b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/mkimage new file mode 100755 index 0000000..61d5a9c Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/mkimage differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/mkmtkhdr b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/mkmtkhdr new file mode 100755 index 0000000..99949d5 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/pxa-mkbootimg b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..0ec79a3 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..03fc864 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/rkcrc b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/rkcrc new file mode 100755 index 0000000..9b0b94a Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/sony_dump b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/sony_dump new file mode 100755 index 0000000..e219101 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/tail b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/tail new file mode 100755 index 0000000..59692eb Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/tail differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/truncate b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/truncate new file mode 100755 index 0000000..f2ed631 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/truncate differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/unpackbootimg b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/unpackbootimg new file mode 100755 index 0000000..a717c48 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/unpackelf b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/unpackelf new file mode 100755 index 0000000..d6edefa Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/xz b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/xz new file mode 100755 index 0000000..6faedc7 Binary files /dev/null and b/Final_Zip/AIK/KSU/PBRP/bin/macos/x86_64/xz differ diff --git a/Final_Zip/AIK/KSU/PBRP/bin/magic b/Final_Zip/AIK/KSU/PBRP/bin/magic new file mode 100755 index 0000000..4530761 --- /dev/null +++ b/Final_Zip/AIK/KSU/PBRP/bin/magic @@ -0,0 +1,1916 @@ +#------------------------------------------------------------------------------ +# Slimmed down magic file for archives only +#------------------------------------------------------------------------------ +# $File: archive,v 1.145 2021/01/03 20:58:47 christos Exp $ +# archive: file(1) magic for archive formats (see also "msdos" for self- +# extracting compressed archives) +# +# cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc. +# pre-POSIX "tar" archives are also handled in the C code ../../src/is_tar.c. + +# POSIX tar archives +# URL: https://en.wikipedia.org/wiki/Tar_(computing) +# Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current +# header mainly padded with nul bytes +500 quad 0 +!:strength /2 +# filename or extended attribute printable strings in range space null til umlaut ue +>0 ubeshort >0x1F00 +>>0 ubeshort <0xFCFD +# last 4 header bytes often null but tar\0 in gtarfail2.tar gtarfail.tar-bad +# at https://sourceforge.net/projects/s-tar/files/testscripts/ +>>>508 ubelong&0x8B9E8DFF 0 +# nul, space or ascii digit 0-7 at start of mode +>>>>100 ubyte&0xC8 =0 +>>>>>101 ubyte&0xC8 =0 +# nul, space at end of check sum +>>>>>>155 ubyte&0xDF =0 +# space or ascii digit 0 at start of check sum +>>>>>>>148 ubyte&0xEF =0x20 +# minimal check and then display tar archive information which can also be +# embedded inside others like Android Backup, Clam AntiVirus database +>257 string !ustar +# header padded with nuls +>>257 ulong =0 +# GNU tar version 1.29 with non pax format option without refusing +# creates misleading V7 header for Long path, Multi-volume, Volume type +>>>156 ubyte 0x4c GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x4d GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x56 GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 default x tar archive (V7) +!:mime application/x-tar +#!:ext tar +# other stuff in padding +# some implementations add new fields to the blank area at the end of the header record +# created for example by DOS TAR 3.20g 1994 Tim V.Shapore with -j option +>>257 ulong !0 tar archive (old) +!:mime application/x-tar +#!:ext tar +# magic in newer, GNU, posix variants +>257 string =ustar +# 2 last char of magic and UStar version because string expression does not work +# 2 space characters followed by a null for GNU variant +>>261 ubelong =0x72202000 POSIX tar archive (GNU) +!:mime application/x-gtar +#!:ext tar/gtar +# UStar version with ASCII "00" +>>261 ubelong 0x72003030 POSIX +# gLOBAL and ExTENSION type only found in POSIX.1-2001 format +>>>156 ubyte 0x67 \b.1-2001 +>>>156 ubyte 0x78 \b.1-2001 +>>>156 ubyte x tar archive +!:mime application/x-ustar +#!:ext tar/ustar +# version with 2 binary nuls embedded in Android Backup like com.android.settings.ab +>>261 ubelong 0x72000000 tar archive (ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# not seen ustar variant with garbish version +>>261 default x tar archive (unknown ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# type flag of 1st tar archive member +#>156 ubyte x \b, %c-type +>156 ubyte x +>>156 ubyte 0 \b, file +>>156 ubyte 0x30 \b, file +>>156 ubyte 0x31 \b, hard link +>>156 ubyte 0x32 \b, symlink +>>156 ubyte 0x33 \b, char device +>>156 ubyte 0x34 \b, block device +>>156 ubyte 0x35 \b, directory +>>156 ubyte 0x36 \b, fifo +>>156 ubyte 0x37 \b, reserved +>>156 ubyte 0x4c \b, long path +>>156 ubyte 0x4d \b, multi volume +>>156 ubyte 0x56 \b, volume +>>156 ubyte 0x67 \b, global +>>156 ubyte 0x78 \b, extension +>>156 default x \b, type +>>>156 ubyte x '%c' +# name[100] +>0 string >\0 %-.60s +# mode mainly stored as an octal number in ASCII null or space terminated +>100 string >\0 \b, mode %-.7s +# user id mainly as octal numbers in ASCII null or space terminated +>108 string >\0 \b, uid %-.7s +# group id mainly as octal numbers in ASCII null or space terminated +>116 string >\0 \b, gid %-.7s +# size mainly as octal number in ASCII +>124 ubyte <0x38 +>>124 string >\0 \b, size %-.12s +# coding indicated by setting the high-order bit of the leftmost byte +>124 ubyte >0xEF \b, size 0x +>>124 ubyte !0xff \b%2.2x +>>125 ubyte !0xff \b%2.2x +>>126 ubyte !0xff \b%2.2x +>>127 ubyte !0xff \b%2.2x +>>128 ubyte !0xff \b%2.2x +>>129 ubyte !0xff \b%2.2x +>>130 ubyte !0xff \b%2.2x +>>131 ubyte !0xff \b%2.2x +>>132 ubyte !0xff \b%2.2x +>>133 ubyte !0xff \b%2.2x +>>134 ubyte !0xff \b%2.2x +>>135 ubyte !0xff \b%2.2x +# seconds since 0:0:0 1 jan 1970 UTC as octal number mainly in ASCII null or space terminated +>136 string >\0 \b, seconds %-.11s +# header checksum stored as an octal number in ASCII null or space terminated +#>148 string x \b, cksum %.7s +# linkname[100] +>157 string >\0 \b, linkname %-.40s +# additional fields for ustar +>257 string =ustar +# owner user name null terminated +>>265 string >\0 \b, user %-.32s +# group name null terminated +>>297 string >\0 \b, group %-.32s +# device major minor if not zero +>>329 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>329 string x \b, devmaj %-.7s +>>337 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>337 string x \b, devmin %-.7s +# prefix[155] +>>345 string >\0 \b, prefix %-.155s +# old non ustar/POSIX tar +>257 string !ustar +>>508 string =tar\0 +# padding[255] in old star +>>>257 string >\0 \b, padding: %-.40s +>>508 default x +# padding[255] in old tar sometimes comment field +>>>257 string >\0 \b, comment: %-.40s + +# Incremental snapshot gnu-tar format from: +# https://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html +0 string GNU\ tar- GNU tar incremental snapshot data +>&0 regex [0-9]\.[0-9]+-[0-9]+ version %s + +# cpio archives +# +# Yes, the top two "cpio archive" formats *are* supposed to just be "short". +# The idea is to indicate archives produced on machines with the same +# byte order as the machine running "file" with "cpio archive", and +# to indicate archives produced on machines with the opposite byte order +# from the machine running "file" with "cpio byte-swapped archive". +# +# The SVR4 "cpio(4)" hints that there are additional formats, but they +# are defined as "short"s; I think all the new formats are +# character-header formats and thus are strings, not numbers. +0 short 070707 cpio archive +!:mime application/x-cpio +0 short 0143561 cpio byte-swapped archive +!:mime application/x-cpio # encoding: swapped +0 string 070707 cpio ASCII archive (pre-SVR4 or odc) +0 string 070701 cpio ASCII archive (SVR4 with no CRC) +0 string 070702 cpio ASCII archive (SVR4 with CRC) + +# +# Various archive formats used by various versions of the "ar" +# command. +# + +# +# Original UNIX archive formats. +# They were written with binary values in host byte order, and +# the magic number was a host "int", which might have been 16 bits +# or 32 bits. We don't say "PDP-11" or "VAX", as there might have +# been ports to little-endian 16-bit-int or 32-bit-int platforms +# (x86?) using some of those formats; if none existed, feel free +# to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian +# 32-bit. There might have been big-endian ports of that sort as +# well. +# +0 leshort 0177555 very old 16-bit-int little-endian archive +0 beshort 0177555 very old 16-bit-int big-endian archive +0 lelong 0177555 very old 32-bit-int little-endian archive +0 belong 0177555 very old 32-bit-int big-endian archive + +0 leshort 0177545 old 16-bit-int little-endian archive +>2 string __.SYMDEF random library +0 beshort 0177545 old 16-bit-int big-endian archive +>2 string __.SYMDEF random library +0 lelong 0177545 old 32-bit-int little-endian archive +>4 string __.SYMDEF random library +0 belong 0177545 old 32-bit-int big-endian archive +>4 string __.SYMDEF random library + +# +# From "pdp" (but why a 4-byte quantity?) +# +0 lelong 0x39bed PDP-11 old archive +0 lelong 0x39bee PDP-11 4.0 archive + +# +# XXX - what flavor of APL used this, and was it a variant of +# some ar archive format? It's similar to, but not the same +# as, the APL workspace magic numbers in pdp. +# +0 long 0100554 apl workspace + +# +# System V Release 1 portable(?) archive format. +# +0 string = System V Release 1 ar archive +!:mime application/x-archive + +# +# Debian package; it's in the portable archive format, and needs to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "debian". +# +# Update: Joerg Jenderek +# URL: https://en.wikipedia.org/wiki/Deb_(file_format) +0 string =!\ndebian +# https://manpages.debian.org/testing/dpkg/dpkg-split.1.en.html +>14 string -split part of multipart Debian package +!:mime application/vnd.debian.binary-package +# udeb is used for stripped down deb file +#!:ext deb/udeb +>14 string -binary Debian binary package +!:mime application/vnd.debian.binary-package +# For ipk packager see also https://en.wikipedia.org/wiki/Opkg +#!:ext deb/udeb/ipk +# This should not happen +>14 default x Unknown Debian package +# NL terminated version; for most Debian cases this is 2.0 or 2.1 for split +>68 string >\0 (format %s) +#>68 string !2.0\n +#>>68 string x (format %.3s) +>68 string =2.0\n +# 2nd archive name=control archive name like control.tar.gz or control.tar.xz +>>72 string >\0 \b, with %.14s +# look for 3rd archive name=data archive name like data.tar.{gz,xz,bz2,lzma} +>>0 search/0x93e4f data.tar. \b, data compression +# the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised +# for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb +>>>&0 string x %.2s +# skip space (0x20 BSD) and slash (0x2f System V) character marking end of name +>>>&2 ubyte !0x20 +>>>>&-1 ubyte !0x2f +# display 3rd character of file name extension like 2 of bz2 or m of lzma +>>>>>&-1 ubyte x \b%c +>>>>>>&0 ubyte !0x20 +>>>>>>>&-1 ubyte !0x2f +# display 4th character of file name extension like a of lzma +>>>>>>>>&-1 ubyte x \b%c +# split debian package case +>68 string =2.1\n +# dpkg-1.18.25/dpkg-split/info.c +# NL terminated ASCII package name like ckermit +>>&0 string x \b, %s +# NL terminated package version like 302-5.3 +>>>&1 string x %s +# NL terminated MD5 checksum +>>>>&1 string x \b, MD5 %s +# NL terminated original package length +>>>>>&1 string x \b, unsplitted size %s +# NL terminated part length +>>>>>>&1 string x \b, part length %s +# NL terminated package part like n/m +>>>>>>>&1 string x \b, part %s +# NL terminated package architecture like armhf since dpkg 1.16.1 or later +>>>>>>>>&1 string x \b, %s + +# +# MIPS archive; they're in the portable archive format, and need to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "__________E". +# +0 string =!\n__________E MIPS archive +!:mime application/x-archive +>20 string U with MIPS Ucode members +>21 string L with MIPSEL members +>21 string B with MIPSEB members +>19 string L and an EL hash table +>19 string B and an EB hash table +>22 string X -- out of date + +# +# BSD/SVR2-and-later portable archive formats. +# +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/AR +# Reference: https://www.unix.com/man-page/opensolaris/3HEAD/ar.h/ +# Note: Mach-O universal binary in ./cafebabe is dependent +# TODO: unify current ar archive, MIPS archive, Debian package +# distinguish BSD, SVR; 32, 64 bit; HP from other 32-bit SVR; +# *.ar packages from *.a libraries. handle empty archive +0 string =!\n current ar archive +# print first and possibly second ar_name[16] for debugging purpose +#>8 string x \b, 1st "%.16s" +#>68 string x \b, 2nd "%.16s" +!:mime application/x-archive +# a in most case for libraries; lib for Microsoft libraries; ar else cases +#!:ext a/lib/ar +>8 string __.SYMDEF random library +# first member with long marked name __.SYMDEF SORTED implies BSD library +>68 string __.SYMDEF\ SORTED random library +# Reference: https://parisc.wiki.kernel.org/images-parisc/b/b2/Rad_11_0_32.pdf +# "archive file" entry moved from ./hp +# LST header system_id 0210h~PA-RISC 1.1,... identifies the target architecture +# LST header a_magic 0619h~relocatable library +>68 belong 0x020b0619 - PA-RISC1.0 relocatable library +>68 belong 0x02100619 - PA-RISC1.1 relocatable library +>68 belong 0x02110619 - PA-RISC1.2 relocatable library +>68 belong 0x02140619 - PA-RISC2.0 relocatable library +#EOF for common ar archives + +# +# "Thin" archive, as can be produced by GNU ar. +# +0 string =!\n thin archive with +>68 belong 0 no symbol entries +>68 belong 1 %d symbol entry +>68 belong >1 %d symbol entries + +0 search/1 -h- Software Tools format archive text + +# ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com) +# +# The first byte is the magic (0x1a), byte 2 is the compression type for +# the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS +# filename of the first file (null terminated). Since some types collide +# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%), +# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo. +0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000031a ARC archive data, packed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched +!:mime application/x-arc +# [JW] stuff taken from idarc, obviously ARC successors: +0 lelong&0x8080ffff 0x00000a1a PAK archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000141a ARC+ archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000481a HYP archive data +!:mime application/x-arc + +# Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk) +# I can't create either SPARK or ArcFS archives so I have not tested this stuff +# [GRR: the original entries collide with ARC, above; replaced with combined +# version (not tested)] +#0 byte 0x1a RISC OS archive (spark format) +0 string \032archive RISC OS archive (ArcFS format) +0 string Archive\000 RISC OS archive (ArcFS format) + +# All these were taken from idarc, many could not be verified. Unfortunately, +# there were many low-quality sigs, i.e. easy to trigger false positives. +# Please notify me of any real-world fishy/ambiguous signatures and I'll try +# to get my hands on the actual archiver and see if I find something better. [JW] +# probably many can be enhanced by finding some 0-byte or control char near the start + +# idarc calls this Crush/Uncompressed... *shrug* +0 string CRUSH Crush archive data +# Squeeze It (.sqz) +0 string HLSQZ Squeeze It archive data +# SQWEZ +0 string SQWEZ SQWEZ archive data +# HPack (.hpk) +0 string HPAK HPack archive data +# HAP +0 string \x91\x33HF HAP archive data +# MD/MDCD +0 string MDmd MDCD archive data +# LIM +0 string LIM\x1a LIM archive data +# SAR +3 string LH5 SAR archive data +# BSArc/BS2 +0 string \212\3SB\020\0 BSArc/BS2 archive data +# Bethesda Softworks Archive (Oblivion) +0 string BSA\0 BSArc archive data +>4 lelong x version %d +# MAR +2 string =-ah MAR archive data +# ACB +#0 belong&0x00f800ff 0x00800000 ACB archive data +# CPZ +# TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data +# JRC +0 string JRchive JRC archive data +# Quantum +0 string DS\0 Quantum archive data +# ReSOF +0 string PK\3\6 ReSOF archive data +# QuArk +0 string 7\4 QuArk archive data +# YAC +14 string YC YAC archive data +# X1 +0 string X1 X1 archive data +0 string XhDr X1 archive data +# CDC Codec (.dqt) +0 belong&0xffffe000 0x76ff2000 CDC Codec archive data +# AMGC +0 string \xad6" AMGC archive data +# NuLIB +0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data +# PakLeo +0 string LEOLZW PAKLeo archive data +# ChArc +0 string SChF ChArc archive data +# PSA +0 string PSA PSA archive data +# CrossePAC +0 string DSIGDCC CrossePAC archive data +# Freeze +0 string \x1f\x9f\x4a\x10\x0a Freeze archive data +# KBoom +0 string \xc2\xa8MP\xc2\xa8 KBoom archive data +# NSQ, must go after CDC Codec +0 string \x76\xff NSQ archive data +# DPA +0 string Dirk\ Paehl DPA archive data +# BA +# TODO: idarc says "bytes 0-2 == bytes 3-5" +# TTComp +# URL: http://fileformats.archiveteam.org/wiki/TTComp_archive +# Update: Joerg Jenderek +# GRR: line below is too general as it matches also Panorama database "TCDB 2003-10 demo.pan", others +0 string \0\6 +# look for first keyword of Panorama database *.pan +>12 search/261 DESIGN +# skip keyword with low entropy +>12 default x TTComp archive, binary, 4K dictionary +# (version 5.25) labeled the above entry as "TTComp archive data" +# From: Joerg Jenderek +# URL: https://wiki.68kmla.org/DiskCopy_4.2_format_specification +# reference: http://nulib.com/library/FTN.e00005.htm +0x52 ubeshort 0x0100 +# test for disk image size equal or above 400k +>0x40 ubelong >409599 +# test also for disk image size equal or below 1440k to skip +# windows7en.mbr UNICODE.DAT +>>0x40 ubelong <1474561 +# To skip Flags$StringJoiner.class with size 00106A61h test also for only 4 disk image sizes +# 00064000 for 400k GCR disks +# 000c8000 for 800k GCR disks +# 000b4000 for 720k MFM disks +# 00168000 for 1440k MFM disks +>>>0x40 ubelong&0xffE03fFF 0 +# display information of Apple DiskCopy 4.2 floppy image +# image pascal name padded with NULs like Microsoft Mail +>00 pstring/B x Apple DiskCopy 4.2 image %s +#!:mime application/octet-stream +!:mime application/x-dc42-floppy-image +!:apple dCpydImg +#!:ext image/dc42 +# data size in bytes like 409600 +>0x40 ubelong x \b, %u bytes +# for debugging purpose size in hexadecimal +#>0x40 ubelong x (0x%8.8x) +# tag size in bytes +>0x44 ubelong >0 \b, 0x%x tag size +# data checksum +#>0x48 ubelong x \b, 0x%x checksum +# tag checksum +#>0x4c ubelong x \b, 0x%x tag checksum +# disk encoding +>0x50 ubyte 0 \b, GCR CLV ssdd (400k) +>0x50 ubyte 1 \b, GCR CLV dsdd (800k) +>0x50 ubyte 2 \b, MFM CAV dsdd (720k) +>0x50 ubyte 3 \b, MFM CAV dshd (1440k) +>0x50 ubyte >3 \b, 0x%x encoding +# format byte +>0x51 ubyte x \b, 0x%x format +#>0x54 ubequad x \b, data 0x%16.16llx +# ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation? +0 string ESP ESP archive data +# ZPack +0 string \1ZPK\1 ZPack archive data +# Sky +0 string \xbc\x40 Sky archive data +# UFA +0 string UFA UFA archive data +# Dry +0 string =-H2O DRY archive data +# FoxSQZ +0 string FOXSQZ FoxSQZ archive data +# AR7 +0 string ,AR7 AR7 archive data +# PPMZ +0 string PPMZ PPMZ archive data +# MS Compress +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/MS-DOS_installation_compression +# Reference: https://hwiegman.home.xs4all.nl/fileformats/compress/szdd_kwaj_format.html +# Note: use correct version of extracting tool like EXPAND, UNPACK, DECOMP or 7Z +4 string \x88\xf0\x27 +# KWAJ variant +>0 string KWAJ MS Compress archive data, KWAJ variant +!:mime application/x-ms-compress-kwaj +# extension not working in version 5.32 +# magic/Magdir/archive, 284: Warning: EXTENSION type ` ??_' has bad char '?' +# file: line 284: Bad magic entry ' ??_' +#!:ext ??_ +# compression method (0-4) +>>8 uleshort x \b, %u method +# offset of compressed data +>>10 uleshort x \b, 0x%x offset +#>>(10.s) uleshort x +#>>>&-6 string x \b, TEST extension %-.3s +# header flags to mark header extensions +>>12 uleshort >0 \b, 0x%x flags +# 4 bytes: decompressed length of file +>>12 uleshort &0x01 +>>>14 ulelong x \b, original size: %u bytes +# 2 bytes: unknown purpose +# 2 bytes: length of unknown data + mentioned bytes +# 1-9 bytes: null-terminated file name +# 1-4 bytes: null-terminated file extension +>>12 uleshort &0x08 +>>>12 uleshort ^0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>>&16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>&16 string x %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>12 uleshort &0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +# 2 bytes: length of data + mentioned bytes +# +# SZDD variant Haruhiko Okumura's LZSS or 7z type MsLZ +>0 string SZDD MS Compress archive data, SZDD variant +!:mime application/x-ms-compress-szdd +#!:ext ??_ +# The character missing from the end of the filename (0=unknown) +>>9 string >\0 \b, %-.1s is last character of original name +# https://www.betaarchive.com/forum/viewtopic.php?t=26161 +# Compression mode: "A" (0x41) found but sometimes "B" in Windows 3.1 builds 026 and 034e +>>8 string !A \b, %-.1s method +>>10 ulelong >0 \b, original size: %u bytes +# QBasic SZDD variant +3 string \x88\xf0\x27 +>0 string SZ\x20 MS Compress archive data, QBasic variant +!:mime application/x-ms-compress-sz +#!:ext ??$ +>>8 ulelong >0 \b, original size: %u bytes + +# MP3 (archiver, not lossy audio compression) +0 string MP3\x1a MP3-Archiver archive data +# ZET +0 string OZ\xc3\x9d ZET archive data +# TSComp +0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data +# ARQ +0 string gW\4\1 ARQ archive data +# Squash +3 string OctSqu Squash archive data +# Terse +0 string \5\1\1\0 Terse archive data +# PUCrunch +0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data +# UHarc +0 string UHA UHarc archive data +# ABComp +0 string \2AB ABComp archive data +0 string \3AB2 ABComp archive data +# CMP +0 string CO\0 CMP archive data +# Splint +0 string \x93\xb9\x06 Splint archive data +# InstallShield +0 string \x13\x5d\x65\x8c InstallShield Z archive Data +# Gather +1 string GTH Gather archive data +# BOA +0 string BOA BOA archive data +# RAX +0 string ULEB\xa RAX archive data +# Xtreme +0 string ULEB\0 Xtreme archive data +# Pack Magic +0 string @\xc3\xa2\1\0 Pack Magic archive data +# BTS +0 belong&0xfeffffff 0x1a034465 BTS archive data +# ELI 5750 +0 string Ora\ ELI 5750 archive data +# QFC +0 string \x1aFC\x1a QFC archive data +0 string \x1aQF\x1a QFC archive data +# PRO-PACK +0 string RNC PRO-PACK archive data +# 777 +0 string 777 777 archive data +# LZS221 +0 string sTaC LZS221 archive data +# HPA +0 string HPA HPA archive data +# Arhangel +0 string LG Arhangel archive data +# EXP1, uses bzip2 +0 string 0123456789012345BZh EXP1 archive data +# IMP +0 string IMP\xa IMP archive data +# NRV +0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data +# Squish +0 string \x73\xb2\x90\xf4 Squish archive data +# Par +0 string PHILIPP Par archive data +0 string PAR Par archive data +# HIT +0 string UB HIT archive data +# SBX +0 belong&0xfffff000 0x53423000 SBX archive data +# NaShrink +0 string NSK NaShrink archive data +# SAPCAR +0 string #\ CAR\ archive\ header SAPCAR archive data +0 string CAR\ 2.00RG SAPCAR archive data +# Disintegrator +0 string DST Disintegrator archive data +# ASD +0 string ASD ASD archive data +# InstallShield CAB +0 string ISc( InstallShield CAB +# TOP4 +0 string T4\x1a TOP4 archive data +# BatComp left out: sig looks like COM executable +# so TODO: get real 4dos batcomp file and find sig +# BlakHole +0 string BH\5\7 BlakHole archive data +# BIX +0 string BIX0 BIX archive data +# ChiefLZA +0 string ChfLZ ChiefLZA archive data +# Blink +0 string Blink Blink archive data +# Logitech Compress +0 string \xda\xfa Logitech Compress archive data +# ARS-Sfx (FIXME: really a SFX? then goto COM/EXE) +1 string (C)\ STEPANYUK ARS-Sfx archive data +# AKT/AKT32 +0 string AKT32 AKT32 archive data +0 string AKT AKT archive data +# NPack +0 string MSTSM NPack archive data +# PFT +0 string \0\x50\0\x14 PFT archive data +# SemOne +0 string SEM SemOne archive data +# PPMD +0 string \x8f\xaf\xac\x84 PPMD archive data +# FIZ +0 string FIZ FIZ archive data +# MSXiE +0 belong&0xfffff0f0 0x4d530000 MSXiE archive data +# DeepFreezer +0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data +# DC +0 string =2 string \x2\x4 Xpack DiskImage archive data +#!:ext xdi +# XPack Data +# *.xpa updated by Joerg Jenderek Sep 2015 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/ +0 string xpa XPA +#!:ext xpa +# XPA32 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/xpa32.zip +# created by XPA32.EXE version 1.0.2 for Windows +>0 string xpa\0\1 \b32 archive data +# created by XPACK.COM version 1.67m or 1.67r with short 0x1800 +>3 ubeshort !0x0001 \bck archive data +# XPack Single Data +# changed by Joerg Jenderek Sep 2015 back to like in version 5.12 +# letter 'I'+ acute accent is equivalent to \xcd +0 string \xcd\ jm Xpack single archive data +#!:mime application/x-xpa-compressed +#!:ext xpa + +# TODO: missing due to unknown magic/magic at end of file: +#DWC +#ARG +#ZAR +#PC/3270 +#InstallIt +#RKive +#RK +#XPack Diskimage + +# These were inspired by idarc, but actually verified +# Dzip archiver (.dz) +# Update: Joerg Jenderek +# URL: http://speeddemosarchive.com/dzip/ +# reference: http://speeddemosarchive.com/dzip/dz29src.zip/main.c +# GRR: line below is too general as it matches also ASCII texts like Doszip commander help dz.txt +0 string DZ +# latest version is 2.9 dated 7 may 2003 +>2 byte <4 Dzip archive data +!:mime application/x-dzip +#!:ext dz +>>2 byte x \b, version %i +>>3 byte x \b.%i +>>4 ulelong x \b, offset 0x%x +>>8 ulelong x \b, %u files +# ZZip archiver (.zz) +0 string ZZ\ \0\0 ZZip archive data +0 string ZZ0 ZZip archive data +# PAQ archiver (.paq) +0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data +0 string PAQ PAQ archive data +>3 byte&0xf0 0x30 +>>3 byte x (v%c) +# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP) +0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data +0 string JARCS JAR (ARJ Software, Inc.) archive data + +# ARJ archiver (jason@jarthur.Claremont.EDU) +0 leshort 0xea60 ARJ archive data +!:mime application/x-arj +>5 byte x \b, v%d, +>8 byte &0x04 multi-volume, +>8 byte &0x10 slash-switched, +>8 byte &0x20 backup, +>34 string x original name: %s, +>7 byte 0 os: MS-DOS +>7 byte 1 os: PRIMOS +>7 byte 2 os: Unix +>7 byte 3 os: Amiga +>7 byte 4 os: Macintosh +>7 byte 5 os: OS/2 +>7 byte 6 os: Apple ][ GS +>7 byte 7 os: Atari ST +>7 byte 8 os: NeXT +>7 byte 9 os: VAX/VMS +>3 byte >0 %d] +# [JW] idarc says this is also possible +2 leshort 0xea60 ARJ archive data + +# HA archiver (Greg Roelofs, newt@uchicago.edu) +# This is a really bad format. A file containing HAWAII will match this... +#0 string HA HA archive data, +#>2 leshort =1 1 file, +#>2 leshort >1 %hu files, +#>4 byte&0x0f =0 first is type CPY +#>4 byte&0x0f =1 first is type ASC +#>4 byte&0x0f =2 first is type HSC +#>4 byte&0x0f =0x0e first is type DIR +#>4 byte&0x0f =0x0f first is type SPECIAL +# suggestion: at least identify small archives (<1024 files) +0 belong&0xffff00fc 0x48410000 HA archive data +>2 leshort =1 1 file, +>2 leshort >1 %u files, +>4 byte&0x0f =0 first is type CPY +>4 byte&0x0f =1 first is type ASC +>4 byte&0x0f =2 first is type HSC +>4 byte&0x0f =0x0e first is type DIR +>4 byte&0x0f =0x0f first is type SPECIAL + +# HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz) +0 string HPAK HPACK archive data + +# JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net +0 string \351,\001JAM\ JAM archive, +>7 string >\0 version %.4s +>0x26 byte =0x27 - +>>0x2b string >\0 label %.11s, +>>0x27 lelong x serial %08x, +>>0x36 string >\0 fstype %.8s + +# Very old RAR archive +# https://jasonblanks.com/wp-includes/images/papers/KnowyourarchiveRAR.pdf +0 string RE\x7e\x5e RAR archive data (26 string \x8\0\0\0mimetypeapplication/ + +# KOffice / OpenOffice & StarOffice / OpenDocument formats +# From: Abel Cheung + +# KOffice (1.2 or above) formats +# (mimetype contains "application/vnd.kde.") +>>50 string vnd.kde. KOffice (>=1.2) +>>>58 string karbon Karbon document +>>>58 string kchart KChart document +>>>58 string kformula KFormula document +>>>58 string kivio Kivio document +>>>58 string kontour Kontour document +>>>58 string kpresenter KPresenter document +>>>58 string kspread KSpread document +>>>58 string kword KWord document + +# OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) +# (mimetype contains "application/vnd.sun.xml.") +# URL: https://en.wikipedia.org/wiki/OpenOffice.org_XML +# reference: http://fileformats.archiveteam.org/wiki/OpenOffice.org_XML +>>50 string vnd.sun.xml. OpenOffice.org 1.x +>>>62 string writer Writer +>>>>68 byte !0x2e document +!:mime application/vnd.sun.xml.writer +#!:ext sxw +>>>>68 string .template template +!:mime application/vnd.sun.xml.writer.template +#!:ext stw +>>>>68 string .web Web template +!:mime application/vnd.sun.xml.writer.web +#!:ext stw +>>>>68 string .global global document +!:mime application/vnd.sun.xml.writer.global +#!:ext sxg +>>>62 string calc Calc +>>>>66 byte !0x2e spreadsheet +!:mime application/vnd.sun.xml.calc +#!:ext sxc +>>>>66 string .template template +!:mime application/vnd.sun.xml.calc.template +#!:ext stc +>>>62 string draw Draw +>>>>66 byte !0x2e document +!:mime application/vnd.sun.xml.draw +#!:ext sxd +>>>>66 string .template template +!:mime application/vnd.sun.xml.draw.template +#!:ext std +>>>62 string impress Impress +>>>>69 byte !0x2e presentation +!:mime application/vnd.sun.xml.impress +#!:ext sxi +>>>>69 string .template template +!:mime application/vnd.sun.xml.impress.template +#!:ext sti +>>>62 string math Math document +!:mime application/vnd.sun.xml.math +#!:ext sxm +>>>62 string base Database file +!:mime application/vnd.sun.xml.base +#!:ext sdb + +# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) +# URL: http://fileformats.archiveteam.org/wiki/OpenDocument +# https://lists.oasis-open.org/archives/office/200505/msg00006.html +# (mimetype contains "application/vnd.oasis.opendocument.") +>>50 string vnd.oasis.opendocument. OpenDocument +>>>73 string text +>>>>77 byte !0x2d Text +!:mime application/vnd.oasis.opendocument.text +#!:ext odt +>>>>77 string -template Text Template +!:mime application/vnd.oasis.opendocument.text-template +#!:ext ott +>>>>77 string -web HTML Document Template +!:mime application/vnd.oasis.opendocument.text-web +#!:ext oth +>>>>77 string -master Master Document +!:mime application/vnd.oasis.opendocument.text-master +#!:ext odm +>>>73 string graphics +>>>>81 byte !0x2d Drawing +!:mime application/vnd.oasis.opendocument.graphics +#!:ext odg +>>>>81 string -template Drawing Template +!:mime application/vnd.oasis.opendocument.graphics-template +#!:ext otg +>>>73 string presentation +>>>>85 byte !0x2d Presentation +!:mime application/vnd.oasis.opendocument.presentation +#!:ext odp +>>>>85 string -template Presentation Template +!:mime application/vnd.oasis.opendocument.presentation-template +#!:ext otp +>>>73 string spreadsheet +>>>>84 byte !0x2d Spreadsheet +!:mime application/vnd.oasis.opendocument.spreadsheet +#!:ext ods +>>>>84 string -template Spreadsheet Template +!:mime application/vnd.oasis.opendocument.spreadsheet-template +#!:ext ots +>>>73 string chart +>>>>78 byte !0x2d Chart +!:mime application/vnd.oasis.opendocument.chart +#!:ext odc +>>>>78 string -template Chart Template +!:mime application/vnd.oasis.opendocument.chart-template +#!:ext otc +>>>73 string formula +>>>>80 byte !0x2d Formula +!:mime application/vnd.oasis.opendocument.formula +#!:ext odf +>>>>80 string -template Formula Template +!:mime application/vnd.oasis.opendocument.formula-template +#!:ext otf +# https://www.loc.gov/preservation/digital/formats/fdd/fdd000441.shtml +>>>73 string database Database +!:mime application/vnd.oasis.opendocument.database +#!:ext odb +# Valid for LibreOffice Base 6.0.1.1 at least +>>>73 string base Database +# https://bugs.documentfoundation.org/show_bug.cgi?id=45854 +!:mime application/vnd.oasis.opendocument.database +#!:mime application/vnd.oasis.opendocument.base +#!:ext odb +>>>73 string image +>>>>78 byte !0x2d Image +!:mime application/vnd.oasis.opendocument.image +#!:ext odi +>>>>78 string -template Image Template +!:mime application/vnd.oasis.opendocument.image-template +#!:ext oti + +# EPUB (OEBPS) books using OCF (OEBPS Container Format) +# https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. +# From: Ralf Brown +>>50 string epub+zip EPUB document +!:mime application/epub+zip + +# From: Joerg Jenderek +# URL: http://en.wikipedia.org/wiki/CorelDRAW +# NOTE: version; til 2 WL-based; from 3 til 13 by ./riff; from 14 zip based +>>50 string x-vnd.corel. Corel +>>>62 string draw.document+zip Draw drawing, version 14-16 +!:mime application/x-vnd.corel.draw.document+zip +#!:ext cdr +>>>62 string draw.template+zip Draw template, version 14-16 +!:mime application/x-vnd.corel.draw.template+zip +#!:ext cdrt +>>>62 string zcf.draw.document+zip Draw drawing, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.document+zip +#!:ext cdr +>>>62 string zcf.draw.template+zip Draw template, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.template+zip +#!:ext cdt/cdrt +# URL: http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html +>>>62 string zcf.pattern+zip Draw pattern, version 22 +!:mime application/x-vnd.corel.zcf.pattern+zip +#!:ext pat +# URL: https://en.wikipedia.org/wiki/Corel_Designer +# Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer +# Note: called by TrID "Corel DESIGN graphics" +>>>62 string designer.document+zip DESIGNER graphics, version 14-16 +!:mime application/x-vnd.corel.designer.document+zip +#!:ext des +>>>62 string zcf.designer.document+zip DESIGNER graphics, version 17-21 +!:mime application/x-vnd.corel.zcf.designer.document+zip +#!:ext des +# URL: http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/ +# CorelDRAW-Corel-Symbol-Library-CSL.html +>>>62 string symbol.library+zip Symbol Library, version 6-16.3 +!:mime application/x-vnd.corel.symbol.library+zip +#!:ext csl +>>>62 string zcf.symbol.library+zip Symbol Library, version 17-22 +!:mime application/x-vnd.corel.zcf.symbol.library+zip +#!:ext csl + +# Catch other ZIP-with-mimetype formats +# In a ZIP file, the bytes immediately after a member's contents are +# always "PK". The 2 regex rules here print the "mimetype" member's +# contents up to the first 'P'. Luckily, most MIME types don't contain +# any capital 'P's. This is a kludge. +# (mimetype contains "application/") +>>50 default x Zip data +>>>38 regex [!-OQ-~]+ (MIME type "%s"?) +!:mime application/zip +# (mimetype contents other than "application/*") +>26 string \x8\0\0\0mimetype +>>38 string !application/ +>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?) +!:mime application/zip + +# Java Jar files +>(26.s+30) leshort 0xcafe Java archive data (JAR) +!:mime application/java-archive + +# iOS App +>(26.s+30) leshort !0xcafe +>>26 string !\x8\0\0\0mimetype +>>>30 string Payload/ +>>>>38 search/64 .app/ iOS App +!:mime application/x-ios-app + +>30 search/100/b application/epub+zip EPUB document +!:mime application/epub+zip + +# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) +# Next line excludes specialized formats: +>(26.s+30) leshort !0xcafe +>>30 search/100/b !application/epub+zip +>>>26 string !\x8\0\0\0mimetype Zip archive data +!:mime application/zip +>>>>4 beshort x \b, at least +>>>>4 beshort x to extract +>>>>8 beshort x \b, compression method= +>>>>0x161 string WINZIP \b, WinZIP self-extracting + +# StarView Metafile +# From Pierre Ducroquet +0 string VCLMTF StarView MetaFile +>6 beshort x \b, version %d +>8 belong x \b, size %d + +# Zoo archiver +20 lelong 0xfdc4a7dc Zoo archive data +!:mime application/x-zoo +>4 byte >48 \b, v%c. +>>6 byte >47 \b%c +>>>7 byte >47 \b%c +>32 byte >0 \b, modify: v%d +>>33 byte x \b.%d+ +>42 lelong 0xfdc4a7dc \b, +>>70 byte >0 extract: v%d +>>>71 byte x \b.%d+ + +# Shell archives +10 string #\ This\ is\ a\ shell\ archive shell archive text +!:mime application/octet-stream + +# +# LBR. NB: May conflict with the questionable +# "binary Computer Graphics Metafile" format. +# +0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data +# +# From Rafael Laboissiere +# The Project Revision Control System (see +# http://prcs.sourceforge.net) generates a packaged project +# file which is recognized by the following entry: +0 leshort 0xeb81 PRCS packaged project + +# Microsoft cabinets +# by David Necas (Yeti) +#0 string MSCF\0\0\0\0 Microsoft cabinet file data, +#>25 byte x v%d +#>24 byte x \b.%d +# MPi: All CABs have version 1.3, so this is pointless. +# Better magic in debian-additions. + +# GTKtalog catalogs +# by David Necas (Yeti) +4 string gtktalog\ GTKtalog catalog data, +>13 string 3 version 3 +>>14 beshort 0x677a (gzipped) +>>14 beshort !0x677a (not gzipped) +>13 string >3 version %s + +############################################################################ +# Parity archive reconstruction file, the 'par' file format now used on Usenet. +0 string PAR\0 PARity archive data +>48 leshort =0 - Index file +>48 leshort >0 - file number %d + +# Felix von Leitner +0 string d8:announce BitTorrent file +!:mime application/x-bittorrent +# Durval Menezes, +0 string d13:announce-list BitTorrent file +!:mime application/x-bittorrent +0 string d7:comment BitTorrent file +!:mime application/x-bittorrent +0 string d4:info BitTorrent file +!:mime application/x-bittorrent + +# Atari MSA archive - Teemu Hukkanen +0 beshort 0x0e0f Atari MSA archive data +>2 beshort x \b, %d sectors per track +>4 beshort 0 \b, 1 sided +>4 beshort 1 \b, 2 sided +>6 beshort x \b, starting track: %d +>8 beshort x \b, ending track: %d + +# Alternate ZIP string (amc@arwen.cs.berkeley.edu) +0 string PK00PK\003\004 Zip archive data +!:mime application/zip +#!:ext zip/cbz + +# ACE archive (from http://www.wotsit.org/download.asp?f=ace) +# by Stefan `Sec` Zehl +7 string **ACE** ACE archive data +>15 byte >0 version %d +>16 byte =0x00 \b, from MS-DOS +>16 byte =0x01 \b, from OS/2 +>16 byte =0x02 \b, from Win/32 +>16 byte =0x03 \b, from Unix +>16 byte =0x04 \b, from MacOS +>16 byte =0x05 \b, from WinNT +>16 byte =0x06 \b, from Primos +>16 byte =0x07 \b, from AppleGS +>16 byte =0x08 \b, from Atari +>16 byte =0x09 \b, from Vax/VMS +>16 byte =0x0A \b, from Amiga +>16 byte =0x0B \b, from Next +>14 byte x \b, version %d to extract +>5 leshort &0x0080 \b, multiple volumes, +>>17 byte x \b (part %d), +>5 leshort &0x0002 \b, contains comment +>5 leshort &0x0200 \b, sfx +>5 leshort &0x0400 \b, small dictionary +>5 leshort &0x0800 \b, multi-volume +>5 leshort &0x1000 \b, contains AV-String +>>30 string \x16*UNREGISTERED\x20VERSION* (unregistered) +>5 leshort &0x2000 \b, with recovery record +>5 leshort &0x4000 \b, locked +>5 leshort &0x8000 \b, solid +# Date in MS-DOS format (whatever that is) +#>18 lelong x Created on + +# sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann +# +0x1A string sfArk sfArk compressed Soundfont +>0x15 string 2 +>>0x1 string >\0 Version %s +>>0x2A string >\0 : %s + +# DR-DOS 7.03 Packed File *.??_ +# Reference: http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm +# Note: unpacked by PNUNPACK.EXE +0 string Packed\ File\ +# by looking for Control-Z skip ASCII text starting with Packed File +>0x18 ubyte 0x1a Personal NetWare Packed File +!:mime application/x-novell-compress +#!:ext ??_ +>>12 string x \b, was "%.12s" +# 1 or 2 +#>>0x19 ubyte x \b, at 0x19 %u +>>0x1b ulelong x with %u bytes + +# EET archive +# From: Tilman Sauerbeck +0 belong 0x1ee7ff00 EET archive +!:mime application/x-eet + +# rzip archives +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +# From: Joerg Jenderek +# URL: https://help.foxitsoftware.com/kb/install-fzip-file.php +# reference: http://mark0.net/download/triddefs_xml.7z/ +# defs/f/fzip.trid.xml +# Note: unknown compression; No "PK" zip magic; normally in directory like +# "%APPDATA%\Foxit Software\Addon\Foxit Reader\Install" +0 ubequad 0x2506781901010000 Foxit add-on/update +!:mime application/x-fzip +#!:ext fzip + +# From: "Robert Dale" +0 belong 123 dar archive, +>4 belong x label "%.8x +>>8 belong x %.8x +>>>12 beshort x %.4x" +>14 byte 0x54 end slice +>14 beshort 0x4e4e multi-part +>14 beshort 0x4e53 multi-part, with -S + +# Symbian installation files +# https://www.thouky.co.uk/software/psifs/sis.html +# http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf +8 lelong 0x10000419 Symbian installation file +!:mime application/vnd.symbian.install +>4 lelong 0x1000006D (EPOC release 3/4/5) +>4 lelong 0x10003A12 (EPOC release 6) +0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x) +!:mime x-epoc/x-sisx-app + +# From "Nelson A. de Oliveira" +0 string MPQ\032 MoPaQ (MPQ) archive + +# From: "Nelson A. de Oliveira" +# .kgb +0 string KGB_arch KGB Archiver file +>10 string x with compression level %.1s + +# Type: Parity Archive +# From: Daniel van Eeden +0 string PAR2 Parity Archive Volume Set + +# Bacula volume format. (Volumes always start with a block header.) +# URL: https://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html +# From: Adam Buchbinder +12 string BB02 Bacula volume +>20 bedate x \b, started %s + +# ePub is XHTML + XML inside a ZIP archive. The first member of the +# archive must be an uncompressed file called 'mimetype' with contents +# 'application/epub+zip' + + +# From: "Michael Gorny" +# ZPAQ: http://mattmahoney.net/dc/zpaq.html +0 string zPQ ZPAQ stream +>3 byte x \b, level %d +# From: Barry Carter +# https://encode.ru/threads/456-zpaq-updates/page32 +0 string 7kSt ZPAQ file + +# BBeB ebook, unencrypted (LRF format) +# URL: https://www.sven.de/librie/Librie/LrfFormat +# From: Adam Buchbinder +0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted +>8 beshort x \b, version %d +>36 byte 1 \b, front-to-back +>36 byte 16 \b, back-to-front +>42 beshort x \b, (%dx, +>44 beshort x %d) + +# Symantec GHOST image by Joerg Jenderek at May 2014 +# https://us.norton.com/ghost/ +# https://www.garykessler.net/library/file_sigs.html +0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image +# *.GHO +>2 ubyte&0x08 0x00 \b, first file +# *.GHS or *.[0-9] with cns program option +>2 ubyte&0x08 0x08 \b, split file +# part of split index interesting for *.ghs +>>4 ubyte x id=0x%x +# compression tag minus one equals numeric compression command line switch z[1-9] +>3 ubyte 0 \b, no compression +>3 ubyte 2 \b, fast compression (Z1) +>3 ubyte 3 \b, medium compression (Z2) +>3 ubyte >3 +>>3 ubyte <11 \b, compression (Z%d-1) +>2 ubyte&0x08 0x00 +# ~ 30 byte password field only for *.gho +>>12 ubequad !0 \b, password protected +>>44 ubyte !1 +# 1~Image All, sector-by-sector only for *.gho +>>>10 ubyte 1 \b, sector copy +# 1~Image Boot track only for *.gho +>>>43 ubyte 1 \b, boot track +# 1~Image Disc only for *.gho implies Image Boot track and sector copy +>>44 ubyte 1 \b, disc sector copy +# optional image description only *.gho +>>0xff string >\0 "%-.254s" +# look for DOS sector end sequence +>0xE08 search/7776 \x55\xAA +>>&-512 indirect x \b; contains + +# Google Chrome extensions +# https://developer.chrome.com/extensions/crx +# https://developer.chrome.com/extensions/hosting +0 string Cr24 Google Chrome extension +!:mime application/x-chrome-extension +>4 ulong x \b, version %u + +# SeqBox - Sequenced container +# ext: sbx, seqbox +# Marco Pontello marcopon@gmail.com +# reference: https://github.com/MarcoPon/SeqBox +0 string SBx SeqBox, +>3 byte x version %d + +# LyNX archive +56 string USE\040LYNX\040TO\040DISSOLVE\040THIS\040FILE LyNX archive + +# From: Joerg Jenderek +# URL: https://www.acronis.com/ +# Reference: https://en.wikipedia.org/wiki/TIB_(file_format) +# Note: only tested with True Image 2013 Build 5962 and 2019 Build 14110 +0 ubequad 0xce24b9a220000000 Acronis True Image backup +!:mime application/x-acronis-tib +#!:ext tib +# 01000000 +#>20 ubelong x \b, at 20 0x%x +# 20000000 +#>28 ubelong x \b, at 28 0x%x +# strings like "Generic- SD/MMC 1.00" "Unknown Disk" "Msft Virtual Disk 1.0" +# ??? +# strings like "\Device\0000011e" "\Device\0000015a" +#>0 search/0x6852300/cs \\Device\\ +#>>&-1 pstring x \b, %s +# "\Device\HarddiskVolume30" "\Device\HarddiskVolume39" +#>>>&1 search/180/cs \\Device\\ +#>>>>&-1 pstring x \b, %s +#>>>>>&0 search/29/cs \0\0\xc8\0 +# disk label +#>>>>>>&10 lestring16 x \b, disk label %11.11s +#>>>>>>&9 plestring16 x \b, disk label "%11.11s" +#>>>>>>&10 ubequad x %16.16llx + + +# Gentoo XPAK binary package +# by Michal Gorny +# https://gitweb.gentoo.org/proj/portage.git/tree/man/xpak.5 +-4 string STOP +>-16 string XPAKSTOP Gentoo binary package (XPAK) + +# From: Joerg Jenderek +# URL: https://kodi.wiki/view/TexturePacker +# Reference: https://mirrors.kodi.tv/releases/source/17.3-Krypton.tar.gz +# /xbmc-Krypton/xbmc/guilib/XBTF.h +# /xbmc-Krypton/xbmc/guilib/XBTF.cpp +0 string XBTF +# skip ASCII text by looking for terminating \0 of path +>264 ubyte 0 XBMC texture package +!:mime application/x-xbmc-xbt +#!:ext xbt +# XBTF_VERSION 2 +>>4 string !2 \b, version %-.1s +# nofFiles /xbmc-Krypton/xbmc/guilib/XBTFReader.cpp +>>5 ulelong x \b, %u file +# plural s +>>5 ulelong >1 \bs +# path[CXBTFFile[MaximumPathLength=256] +>>9 string x \b, 1st %s + +# ALZIP archive +# by Hyungjun Park , Hajin Jang +# http://kippler.com/win/unalz/ +# https://salsa.debian.org/l10n-korean-team/unalz +0 string ALZ\001 ALZ archive data +#!:ext alz + +# https://cf-aldn.altools.co.kr/setup/EGG_Specification.zip +0 string EGGA EGG archive data, +#!:ext egg +>5 byte x version %u +>4 byte x \b.%u +>>0x0E ulelong =0x08E28222 +>>0x0E ulelong =0x24F5A262 \b, split +>>0x0E ulelong =0x24E5A060 \b, solid +>>0x0E default x \b, unknown + +# PAQ9A archive +# URL: http://mattmahoney.net/dc/#paq9a +# Note: Line 1186 of paq9a.cpp gives the magic bytes +0 string pQ9\001 PAQ9A archive + +#------------------------------------------------------------------------------ +# $File: compress,v 1.80 2021/03/15 17:49:24 christos Exp $ +# compress: file(1) magic for pure-compression formats (no archives) +# +# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. +# +# Formats for various forms of compressed data +# Formats for "compress" proper have been moved into "compress.c", +# because it tries to uncompress it to figure out what's inside. + +# standard unix compress +0 string \037\235 compress'd data +!:mime application/x-compress +!:apple LZIVZIVU +>2 byte&0x80 >0 block compressed +>2 byte&0x1f x %d bits + +# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver) +# URL: https://en.wikipedia.org/wiki/Gzip +# Reference: https://tools.ietf.org/html/rfc1952 +# Update: Joerg Jenderek, Apr 2019 +# Edited by Chris Chittleborough , March 2002 +# * Original filename is only at offset 10 if "extra field" absent +# * Produce shorter output - notably, only report compression methods +# other than 8 ("deflate", the only method defined in RFC 1952). +# Note: find defs -iname '*.trid.xml' -exec grep -q '1F8B08' {} \; -ls +# TODO: +# FBR Blueberry FlashBack screen Record https://www.flashbackrecorder.com/ +# KPR KOffice/Calligra KPresenter application/x-kpresenter +# KPT KOffice/Calligra KPresenter template? application/x-kpresenter +# SAV Diggles Saved Game File http://www.innonics.com +# SAV FarCry (demo) saved game http://www.farcry-thegame.com +# DAT ZOAGZIP game data format http://en.wikipedia.org/wiki/SD_Gundam_Capsule_Fighter +0 string \037\213 +# to display gzip compressed (strength=100=2*50) before other (strength=50)? +#!:strength * 2 +# no FNAME and FCOMMENT bit implies no file name/comment. That means only binary +>3 byte&0x18 =0 +# For binary gzipped no ASCII text should occur +# mcd-monu-cad.trid.xml +>>10 string MCD Monu-Cad Drawing, Component or Font +#>>36 string Created\ with\ MONU-CAD +#!:mime application/octet-stream +# http://fileformats.archiveteam.org/wiki/Monu-CAD +# http://www.monucad.com/downloads/FullDemo-2005.EXE +# /HANDS96.MCC Component +# /DEMO_DD01.MCD Drawing +# /MCALF020.FNT Font +#!:ext mcc/mcd/fnt +# http://www.generalcadd.com +>>10 string GXD General CADD, Drawing or Component +#!:mime application/octet-stream +# /gxc/BUILDINGEDGE.gxc Component +# /gxd/HOCKETT-STPAUL-WRHSE.gxd Drawing +# /gxd/POWERLAND-MILL-ADD-11.gxd Drawing v9.1.06 +#!:ext gxc/gxd +#>>>13 ubyte 0 \b, version 0 +>>>13 string 09 \b, version 9 +# other gzipped binary like gzipped tar, VirtualBox extension package,... +>>10 default x gzip compressed data +!:mime application/gzip +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# gzipped TAR or VirtualBox extension package +#!:mime application/x-compressed-tar +#!:mime application/x-virtualbox-vbox-extpack +# https://www.w3.org/TR/SVG/mimereg.html +#!:mime image/image/svg+xml-compressed +# zlib.3.gz +# microcode-20180312.tgz +# tpz same as tgz +# lua-md5_1.2-1_i386_i486.ipk https://en.wikipedia.org/wiki/Opkg +# Oracle_VM_VirtualBox_Extension_Pack-5.0.12-104815.vbox-extpack +#!:ext gz/tgz/tpz/ipk/vbox-extpack/svgz +# FNAME/FCOMMENT bit implies file name/comment as iso-8859-1 text +>3 byte&0x18 >0 gzip compressed data +!:mime application/gzip +# gzipped tar, gzipped Abiword document +#!:mime application/x-compressed-tar +#!:mime application/x-abiword-compressed +#!:mime image/image/svg+xml-compressed +# kleopatra_splashscreen.svgz gzipped .svg +#!:ext gz/tgz/tpz/zabw/svgz +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# display information of gzip compressed files +#>2 byte x THIS iS GZIP +>2 byte <8 \b, reserved method +>2 byte >8 \b, unknown method +>3 byte &0x01 \b, ASCII +>3 byte &0x02 \b, has CRC +>3 byte &0x04 \b, extra field +>3 byte&0xC =0x08 +>>10 string x \b, was "%s" +>3 byte &0x10 \b, has comment +>3 byte &0x20 \b, encrypted +>4 ledate >0 \b, last modified: %s +>8 byte 2 \b, max compression +>8 byte 4 \b, max speed +>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT) +>9 byte =0x01 \b, from Amiga +>9 byte =0x02 \b, from VMS +>9 byte =0x03 \b, from Unix +>9 byte =0x04 \b, from VM/CMS +>9 byte =0x05 \b, from Atari +>9 byte =0x06 \b, from HPFS filesystem (OS/2, NT) +>9 byte =0x07 \b, from MacOS +>9 byte =0x08 \b, from Z-System +>9 byte =0x09 \b, from CP/M +>9 byte =0x0A \b, from TOPS/20 +>9 byte =0x0B \b, from NTFS filesystem (NT) +>9 byte =0x0C \b, from QDOS +>9 byte =0x0D \b, from Acorn RISCOS +# size of the original (uncompressed) input data modulo 2^32 +#>-4 ulelong x \b, original size modulo 2^32 %u +#ERROR: line 114: non zero offset 1048572 at level 1 + +# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis +0 string \037\036 packed data +!:mime application/octet-stream +>2 belong >1 \b, %d characters originally +>2 belong =1 \b, %d character originally +# +# This magic number is byte-order-independent. +0 short 0x1f1f old packed data +!:mime application/octet-stream + +# XXX - why *two* entries for "compacted data", one of which is +# byte-order independent, and one of which is byte-order dependent? +# +0 short 0x1fff compacted data +!:mime application/octet-stream +# This string is valid for SunOS (BE) and a matching "short" is listed +# in the Ultrix (LE) magic file. +0 string \377\037 compacted data +!:mime application/octet-stream +0 short 0145405 huf output +!:mime application/octet-stream + +# bzip2 +0 string BZh bzip2 compressed data +!:mime application/x-bzip2 +>3 byte >47 \b, block size = %c00k + +# bzip a block-sorting file compressor +# by Julian Seward and others +0 string BZ0 bzip compressed data +!:mime application/x-bzip +>3 byte >47 \b, block size = %c00k + +# lzip +0 string LZIP lzip compressed data +!:mime application/x-lzip +>4 byte x \b, version: %d + +# squeeze and crunch +# Michael Haardt +0 beshort 0x76FF squeezed data, +>4 string x original name %s +0 beshort 0x76FE crunched data, +>2 string x original name %s +0 beshort 0x76FD LZH compressed data, +>2 string x original name %s + +# Freeze +0 string \037\237 frozen file 2.1 +0 string \037\236 frozen file 1.0 (or gzip 0.5) + +# SCO compress -H (LZH) +0 string \037\240 SCO compress -H (LZH) data + +# European GSM 06.10 is a provisional standard for full-rate speech +# transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse +# excitation/long term prediction) coding at 13 kbit/s. +# +# There's only a magic nibble (4 bits); that nibble repeats every 33 +# bytes. This isn't suited for use, but maybe we can use it someday. +# +# This will cause very short GSM files to be declared as data and +# mismatches to be declared as data too! +#0 byte&0xF0 0xd0 data +#>33 byte&0xF0 0xd0 +#>66 byte&0xF0 0xd0 +#>99 byte&0xF0 0xd0 +#>132 byte&0xF0 0xd0 GSM 06.10 compressed audio + +# lzop from +0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data +>9 beshort <0x0940 +>>9 byte&0xf0 =0x00 - version 0. +>>9 beshort&0x0fff x \b%03x, +>>13 byte 1 LZO1X-1, +>>13 byte 2 LZO1X-1(15), +>>13 byte 3 LZO1X-999, +## >>22 bedate >0 last modified: %s, +>>14 byte =0x00 os: MS-DOS +>>14 byte =0x01 os: Amiga +>>14 byte =0x02 os: VMS +>>14 byte =0x03 os: Unix +>>14 byte =0x05 os: Atari +>>14 byte =0x06 os: OS/2 +>>14 byte =0x07 os: MacOS +>>14 byte =0x0A os: Tops/20 +>>14 byte =0x0B os: WinNT +>>14 byte =0x0E os: Win32 +>9 beshort >0x0939 +>>9 byte&0xf0 =0x00 - version 0. +>>9 byte&0xf0 =0x10 - version 1. +>>9 byte&0xf0 =0x20 - version 2. +>>9 beshort&0x0fff x \b%03x, +>>15 byte 1 LZO1X-1, +>>15 byte 2 LZO1X-1(15), +>>15 byte 3 LZO1X-999, +## >>25 bedate >0 last modified: %s, +>>17 byte =0x00 os: MS-DOS +>>17 byte =0x01 os: Amiga +>>17 byte =0x02 os: VMS +>>17 byte =0x03 os: Unix +>>17 byte =0x05 os: Atari +>>17 byte =0x06 os: OS/2 +>>17 byte =0x07 os: MacOS +>>17 byte =0x0A os: Tops/20 +>>17 byte =0x0B os: WinNT +>>17 byte =0x0E os: Win32 + +# 4.3BSD-Quasijarus Strong Compression +# https://minnie.tuhs.org/Quasijarus/compress.html +0 string \037\241 Quasijarus strong compressed data + +# From: Cory Dikkers +0 string XPKF Amiga xpkf.library compressed data +0 string PP11 Power Packer 1.1 compressed data +0 string PP20 Power Packer 2.0 compressed data, +>4 belong 0x09090909 fast compression +>4 belong 0x090A0A0A mediocre compression +>4 belong 0x090A0B0B good compression +>4 belong 0x090A0C0C very good compression +>4 belong 0x090A0C0D best compression + +# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at) +# https://www.7-zip.org or DOC/7zFormat.txt +# +0 string 7z\274\257\047\034 7-zip archive data, +>6 byte x version %d +>7 byte x \b.%d +!:mime application/x-7z-compressed +#!:ext 7z/cb7 + +# Type: LZMA +0 lelong&0xffffff =0x5d +>12 leshort 0xff lzma compressed data, +!:mime application/x-lzma +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld +>12 leshort 0 lzma compressed data, +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld + +# http://tukaani.org/xz/xz-file-format.txt +0 ustring \xFD7zXZ\x00 xz compressed data, checksum +>7 byte&0xf 0x0 NONE +>7 byte&0xf 0x1 CRC32 +>7 byte&0xf 0x4 CRC64 +>7 byte&0xf 0xa SHA-256 + +!:strength * 2 +!:mime application/x-xz + +# https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt +0 string LRZI LRZIP compressed data +>4 byte x - version %d +>5 byte x \b.%d +!:mime application/x-lrzip + +# https://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html +0 lelong 0x184d2204 lz4 compressed data (v1.4+) +!:mime application/x-lz4 +# Added by osm0sis@xda-developers.com +0 lelong 0x184c2103 lz4 compressed data (v1.0-v1.3) +!:mime application/x-lz4 +0 lelong 0x184c2102 lz4-l compressed data (v0.1-v0.9) +!:mime application/x-lz4 + +# Zstandard/LZ4 skippable frames +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong&0xFFFFFFF0 0x184D2A50 +>(4.l+8) indirect x + +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong 0xEC30A437 Zstandard dictionary +!:mime application/x-std-dictionary +>4 lelong x (ID %u) + +# AFX compressed files (Wolfram Kleff) +2 string -afx- AFX compressed file data + +# Supplementary magic data for the file(1) command to support +# rzip(1). The format is described in magic(5). +# +# Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with +# this file. +# +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +0 string ArC\x01 FreeArc archive + +# Type: DACT compressed files +0 long 0x444354C3 DACT compressed data +>4 byte >-1 (version %i. +>5 byte >-1 %i. +>6 byte >-1 %i) +>7 long >0 , original size: %i bytes +>15 long >30 , block size: %i bytes + +# Valve Pack (VPK) files +0 lelong 0x55aa1234 Valve Pak file +>0x4 lelong x \b, version %u +>0x8 lelong x \b, %u entries + +# Snappy framing format +# https://code.google.com/p/snappy/source/browse/trunk/framing_format.txt +0 string \377\006\0\0sNaPpY snappy framed data +!:mime application/x-snappy-framed + +# qpress, https://www.quicklz.com/ +0 string qpress10 qpress compressed data +!:mime application/x-qpress + +# Zlib https://www.ietf.org/rfc/rfc6713.txt +0 string/b x +>0 beshort%31 =0 +>>0 byte&0xf =8 +>>>0 byte&0x80 =0 zlib compressed data +!:mime application/zlib + +# BWC compression +0 string BWC +>3 byte 0 BWC compressed data + +# UCL compression +0 bequad 0x00e955434cff011a UCL compressed data + +# Softlib archive +0 string SLIB Softlib archive +>4 leshort x \b, version %d +>6 leshort x (contains %d files) + +# URL: https://github.com/lzfse/lzfse/blob/master/src/lzfse_internal.h#L276 +# From: Eric Hall +0 string bvx- lzfse encoded, no compression +0 string bvx1 lzfse compressed, uncompressed tables +0 string bvx2 lzfse compressed, compressed tables +0 string bvxn lzfse encoded, lzvn compressed + +# pcxLib.exe compression program +# http://www.shikadi.net/moddingwiki/PCX_Library +0 string/b pcxLib + +#------------------------------------------------------------ +# $File: android,v 1.18 2021/02/23 00:51:10 christos Exp $ +# Various android related magic entries +#------------------------------------------------------------ + +# Dalvik .dex format. http://retrodev.com/android/dexformat.html +# From "Mike Fleming" +# Fixed to avoid regexec 17 errors on some dex files +# From "Tim Strazzere" +0 string dex\n +>0 regex dex\n[0-9]{2}\0 Dalvik dex file +>4 string >000 version %s +0 string dey\n +>0 regex dey\n[0-9]{2}\0 Dalvik dex file (optimized for host) +>4 string >000 version %s + +# Android bootimg format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/mkbootimg/bootimg.h +# https://github.com/djrbliss/loki/blob/master/loki.h#L43 +0 string ANDROID! Android bootimg +>1024 string LOKI \b, LOKI'd +>>1028 lelong 0 \b (boot) +>>1028 lelong 1 \b (recovery) +>8 lelong >0 \b, kernel +>>12 lelong >0 \b (0x%x) +>16 lelong >0 \b, ramdisk +>>20 lelong >0 \b (0x%x) +>24 lelong >0 \b, second stage +>>28 lelong >0 \b (0x%x) +>36 lelong >0 \b, page size: %d +>38 string >0 \b, name: %s +>64 string >0 \b, cmdline (%s) + +# Android sparse img format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/libsparse/sparse_format.h +0 lelong 0xed26ff3a Android sparse image +>4 leshort x \b, version: %d +>6 leshort x \b.%d +>16 lelong x \b, Total of %d +>12 lelong x \b %d-byte output blocks in +>20 lelong x \b %d input chunks. + +# Android binary XML magic +# In include/androidfw/ResourceTypes.h: +# RES_XML_TYPE = 0x0003 followed by the size of the header (ResXMLTree_header), +# which is 8 bytes (2 bytes type + 2 bytes header size + 4 bytes size). +0 lelong 0x00080003 Android binary XML + +# Android cryptfs footer +# From https://android.googlesource.com/\ +# platform/system/vold/+/refs/heads/master/cryptfs.h +0 lelong 0xd0b5b1c4 Android cryptfs footer +>4 leshort x \b, version: %d +>6 leshort x \b.%d + +# Android Vdex format +# From https://android.googlesource.com/\ +# platform/art/+/master/runtime/vdex_file.h +0 string vdex Android vdex file, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d + +# Android Vdex format, dexfile is currently being updated +# by android system +# From https://android.googlesource.com/\ +# platform/art/+/master/dex2oat/dex2oat.cc +0 string wdex Android vdex file, being processed by dex2oat, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d diff --git a/Final_Zip/AIK/KSU/PBRP/cleanup.sh b/Final_Zip/AIK/KSU/PBRP/cleanup.sh new file mode 100755 index 0000000..d8f1d61 --- /dev/null +++ b/Final_Zip/AIK/KSU/PBRP/cleanup.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# AIK-Linux/cleanup: reset working directory +# osm0sis @ xda-developers + +case $1 in + --help) echo "usage: cleanup.sh [--local] [--quiet]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + statarg="-f %Su"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) statarg="-c %U";; +esac; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; + +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + sudo=sudo; +fi; + +$sudo rm -rf ramdisk split_img *new.* || exit 1; + +case $1 in + --quiet) ;; + *) echo "Working directory cleaned.";; +esac; +exit 0; + diff --git a/Final_Zip/AIK/KSU/PBRP/repackimg.sh b/Final_Zip/AIK/KSU/PBRP/repackimg.sh new file mode 100755 index 0000000..5709f0f --- /dev/null +++ b/Final_Zip/AIK/KSU/PBRP/repackimg.sh @@ -0,0 +1,413 @@ +#!/bin/bash +# AIK-Linux/repackimg: repack ramdisk and build image +# osm0sis @ xda-developers + +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: repackimg.sh [--local] [--original] [--origsize] [--level <0-9>] [--avbkey ] [--forceelf]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + + javaver=$(java -version 2>&1 | head -n1 | cut -d\" -f2); + javamaj=$(echo $javaver | cut -d. -f1); + javamin=$(echo $javaver | cut -d. -f2); + if [ "$javamaj" -lt 9 ] && [ "$javamaj" -eq 1 -a "$javamin" -lt 8 ]; then + java() { "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" "$@"; } + fi; + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; +chmod -R 755 "$bin" "$aik/"*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -z "$(ls split_img/* 2>/dev/null)" -o ! -e ramdisk ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +while [ "$1" ]; do + case $1 in + --original) original=1;; + --origsize) origsize=1;; + --forceelf) repackelf=1;; + --level) + case $2 in + ''|*[!0-9]*) ;; + *) level="-$2"; lvltxt=" - Level: $2"; shift;; + esac; + ;; + --avbkey) + if [ "$2" ]; then + for keytest in "$2" "$cur/$2" "$aik/$2"; do + if [ ! -z "$(ls $keytest.pk8 2>/dev/null)" -a ! -z "$(ls $keytest.x509.* 2>/dev/null)" ]; then + avbkey="$keytest"; avbtxt=" - Key: $2"; shift; break; + fi; + done; + fi; + ;; + esac; + shift; +done; + +ramdiskcomp=`cat split_img/*-*ramdiskcomp 2>/dev/null`; +if [ -z "$(ls ramdisk/* 2>/dev/null)" ] && [ ! "$ramdiskcomp" = "empty" -a ! "$original" ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - RepackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +if [ ! -z "$(ls *-new.* 2>/dev/null)" ]; then + echo "Warning: Overwriting existing files!"; + echo " "; +fi; +rm -f "*-new.*"; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" ]; then + sudo=sudo; sumsg=" (as root)"; +else + cpioarg="-R 0:0"; +fi; + +if [ "$original" ]; then + echo "Repacking with original ramdisk..."; +elif [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: Using empty ramdisk for repack!"; + compext=.empty; + touch ramdisk-new.cpio$compext; +else + echo "Packing ramdisk$sumsg..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + if [ -z "$level" ]; then + case $ramdiskcomp in + xz) level=-1;; + lz4*) level=-9;; + esac; + fi; + echo "Using compression: $ramdiskcomp$lvltxt"; + repackcmd="$ramdiskcomp $level"; + compext=$ramdiskcomp; + case $ramdiskcomp in + gzip) compext=gz;; + lzop) compext=lzo;; + xz) repackcmd="xz $level -Ccrc32";; + lzma) repackcmd="xz $level -Flzma";; + bzip2) compext=bz2;; + lz4) repackcmd="$bin/$arch/lz4 $level";; + lz4-l) repackcmd="$bin/$arch/lz4 $level -l"; compext=lz4;; + cpio) repackcmd="cat"; compext="";; + *) abort; exit 1;; + esac; + if [ "$compext" ]; then + compext=.$compext; + fi; + cd ramdisk; + $sudo find . | $sudo $cpio $cpioarg -H newc -o 2>/dev/null | $repackcmd > ../ramdisk-new.cpio$compext; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Getting build information..."; +cd split_img; +imgtype=`cat *-imgtype`; +case $imgtype in + KRNL) ;; + AOSP_VNDR) vendor=vendor_;; + *) + if [ -f *-kernel ]; then + kernel=`ls *-kernel`; echo "kernel = $kernel"; + kernel="split_img/$kernel"; + fi; + ;; +esac; +if [ "$original" ]; then + ramdisk=`ls *-*ramdisk.cpio*`; echo "${vendor}ramdisk = $ramdisk"; + ramdisk="split_img/$ramdisk"; +else + ramdisk="ramdisk-new.cpio$compext"; +fi; +case $imgtype in + KRNL) rsz=$(wc -c < ../"$ramdisk"); echo "ramdisk_size = $rsz";; + OSIP) echo "cmdline = $(cat *-*cmdline)";; + U-Boot) + name=`cat *-name`; echo "name = $name"; + uarch=`cat *-arch`; + os=`cat *-os`; + type=`cat *-type`; + comp=`cat *-comp`; echo "type = $uarch $os $type ($comp)"; + [ "$comp" = "uncompressed" ] && comp=none; + addr=`cat *-addr`; echo "load_addr = $addr"; + ep=`cat *-ep`; echo "entry_point = $ep"; + ;; + *) + if [ -f *-second ]; then + second=`ls *-second`; echo "second = $second"; + second=(--second "split_img/$second"); + fi; + if [ -f *-dtb ]; then + dtb=`ls *-dtb`; echo "dtb = $dtb"; + dtb=(--dtb "split_img/$dtb"); + fi; + if [ -f *-recovery_dtbo ]; then + recoverydtbo=`ls *-recovery_dtbo`; echo "recovery_dtbo = $recoverydtbo"; + recoverydtbo=(--recovery_dtbo "split_img/$recoverydtbo"); + fi; + if [ -f *-*cmdline ]; then + cmdname=`ls *-*cmdline`; + cmdline=`cat *-*cmdline`; echo "${vendor}cmdline = $cmdline"; + cmd=("split_img/$cmdname"@cmdline); + fi; + if [ -f *-board ]; then + board=`cat *-board`; echo "board = $board"; + fi; + if [ -f *-base ]; then + base=`cat *-base`; echo "base = $base"; + fi; + if [ -f *-pagesize ]; then + pagesize=`cat *-pagesize`; echo "pagesize = $pagesize"; + fi; + if [ -f *-kernel_offset ]; then + kerneloff=`cat *-kernel_offset`; echo "kernel_offset = $kerneloff"; + fi; + if [ -f *-ramdisk_offset ]; then + ramdiskoff=`cat *-ramdisk_offset`; echo "ramdisk_offset = $ramdiskoff"; + fi; + if [ -f *-second_offset ]; then + secondoff=`cat *-second_offset`; echo "second_offset = $secondoff"; + fi; + if [ -f *-tags_offset ]; then + tagsoff=`cat *-tags_offset`; echo "tags_offset = $tagsoff"; + fi; + if [ -f *-dtb_offset ]; then + dtboff=`cat *-dtb_offset`; echo "dtb_offset = $dtboff"; + fi; + if [ -f *-os_version ]; then + osver=`cat *-os_version`; echo "os_version = $osver"; + fi; + if [ -f *-os_patch_level ]; then + oslvl=`cat *-os_patch_level`; echo "os_patch_level = $oslvl"; + fi; + if [ -f *-header_version ]; then + hdrver=`cat *-header_version`; echo "header_version = $hdrver"; + fi; + if [ -f *-hashtype ]; then + hashtype=`cat *-hashtype`; echo "hashtype = $hashtype"; + hashtype="--hashtype $hashtype"; + fi; + if [ -f *-dt ]; then + dttype=`cat *-dttype`; + dt=`ls *-dt`; echo "dt = $dt"; + rpm=("split_img/$dt",rpm); + dt=(--dt "split_img/$dt"); + fi; + if [ -f *-unknown ]; then + unknown=`cat *-unknown`; echo "unknown = $unknown"; + fi; + if [ -f *-header ]; then + header=`ls *-header`; + header="split_img/$header"; + fi; + ;; +esac; +cd ..; + +if [ -f split_img/*-mtktype ]; then + mtktype=`cat split_img/*-mtktype`; + echo " "; + echo "Generating MTK headers..."; + echo " "; + echo "Using ramdisk type: $mtktype"; + "$bin/$arch/mkmtkhdr" --kernel "$kernel" --$mtktype "$ramdisk" >/dev/null; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + mv -f "$(basename "$kernel")-mtk" kernel-new.mtk; + mv -f "$(basename "$ramdisk")-mtk" $mtktype-new.mtk; + kernel=kernel-new.mtk; + ramdisk=$mtktype-new.mtk; +fi; + +if [ -f split_img/*-sigtype ]; then + outname=unsigned-new.img; +else + outname=image-new.img; +fi; + +[ "$dttype" = "ELF" ] && repackelf=1; +if [ "$imgtype" = "ELF" ] && [ ! "$header" -o ! "$repackelf" ]; then + imgtype=AOSP; + echo " "; + echo "Warning: ELF format without RPM detected; will be repacked using AOSP format!"; +fi; + +echo " "; +echo "Building image..."; +echo " "; +echo "Using format: $imgtype"; +echo " "; +case $imgtype in + AOSP_VNDR) "$bin/$arch/mkbootimg" --vendor_ramdisk "$ramdisk" "${dtb[@]}" --vendor_cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --tags_offset $tagsoff --dtb_offset $dtboff --os_version "$osver" --os_patch_level "$oslvl" --header_version $hdrver --vendor_boot $outname;; + AOSP) "$bin/$arch/mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" "${dtb[@]}" "${recoverydtbo[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --dtb_offset "$dtboff" --os_version "$osver" --os_patch_level "$oslvl" --header_version "$hdrver" $hashtype "${dt[@]}" -o $outname;; + AOSP-PXA) "$bin/$arch/pxa-mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --unknown $unknown "${dt[@]}" -o $outname;; + ELF) "$bin/$arch/elftool" pack -o $outname header="$header" "$kernel" "$ramdisk",ramdisk "${rpm[@]}" "${cmd[@]}" >/dev/null;; + KRNL) "$bin/$arch/rkcrc" -k "$ramdisk" $outname;; + OSIP) + mkdir split_img/.temp 2>/dev/null; + for i in bootstub cmdline.txt hdr kernel parameter sig; do + cp -f split_img/*-*$(basename $i .txt | sed -e 's/hdr/header/') split_img/.temp/$i 2>/dev/null; + done; + cp -f "$ramdisk" split_img/.temp/ramdisk.cpio.gz; + "$bin/$arch/mboot" -d split_img/.temp -f $outname; + ;; + U-Boot) + part0="$kernel"; + case $type in + Multi) part1=(:"$ramdisk");; + RAMDisk) part0="$ramdisk";; + esac; + "$bin/$arch/mkimage" -A $uarch -O $os -T $type -C $comp -a $addr -e $ep -n "$name" -d "$part0""${part1[@]}" $outname >/dev/null; + ;; + *) echo " "; echo "Unsupported format."; abort; exit 1;; +esac; +if [ ! $? -eq "0" ]; then + abort; + exit 1; +fi; + +rm -rf split_img/.temp; + +if [ -f split_img/*-sigtype ]; then + sigtype=`cat split_img/*-sigtype`; + if [ -f split_img/*-avbtype ]; then + avbtype=`cat split_img/*-avbtype`; + fi; + if [ -f split_img/*-blobtype ]; then + blobtype=`cat split_img/*-blobtype`; + fi; + echo "Signing new image..."; + echo " "; + echo "Using signature: $sigtype $avbtype$avbtxt$blobtype"; + [ ! "$avbkey" ] && avbkey="$bin/avb/verity"; + echo " "; + case $sigtype in + AVBv1) java -jar "$bin/boot_signer.jar" /$avbtype unsigned-new.img "$avbkey.pk8" "$avbkey.x509."* image-new.img 2>/dev/null;; + BLOB) + awk 'BEGIN { printf "-SIGNED-BY-SIGNBLOB-\00\00\00\00\00\00\00\00" }' > image-new.img; + "$bin/$arch/blobpack" blob.tmp $blobtype unsigned-new.img >/dev/null; + cat blob.tmp >> image-new.img; + rm -f blob.tmp; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --pack image-new.img --keyblock "$bin/chromeos/kernel.keyblock" --signprivate "$bin/chromeos/kernel_data_key.vbprivk" --version 1 --vmlinuz unsigned-new.img --bootloader "$bin/chromeos/empty" --config "$bin/chromeos/empty" --arch arm --flags 0x1;; + DHTB) + "$bin/$arch/dhtbsign" -i unsigned-new.img -o image-new.img >/dev/null; + rm -f split_img/*-tailtype 2>/dev/null; + ;; + NOOK*) cat split_img/*-master_boot.key unsigned-new.img > image-new.img;; + esac; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; +fi; + +if [ -f split_img/*-lokitype ]; then + lokitype=`cat split_img/*-lokitype`; + echo "Loki patching new image..."; + echo " "; + echo "Using type: $lokitype"; + echo " "; + mv -f image-new.img unlokied-new.img; + if [ -f aboot.img ]; then + "$bin/$arch/loki_tool" patch $lokitype aboot.img unlokied-new.img image-new.img >/dev/null; + if [ ! $? -eq "0" ]; then + echo "Patching failed."; + abort; + exit 1; + fi; + else + echo "Device aboot.img required in script directory to find Loki patch offset."; + abort; + exit 1; + fi; +elif [ -f split_img/*-microloader.bin ]; then + echo "Amonet patching new image..."; + echo " "; + cp -f image-new.img unamonet-new.img; + cp -f split_img/*-microloader.bin microloader.tmp; + dd bs=1024 count=1 conv=notrunc if=unamonet-new.img of=head.tmp 2>/dev/null; + dd bs=1024 seek=1 conv=notrunc if=head.tmp of=image-new.img 2>/dev/null; + dd conv=notrunc if=microloader.tmp of=image-new.img 2>/dev/null; + rm -f head.tmp microloader.tmp; +fi; + +if [ -f split_img/*-tailtype ]; then + tailtype=`cat split_img/*-tailtype`; + echo "Appending footer..."; + echo " "; + echo "Using type: $tailtype"; + echo " "; + case $tailtype in + Bump) awk 'BEGIN { printf "\x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79" }' >> image-new.img;; + SEAndroid) printf 'SEANDROIDENFORCE' >> image-new.img;; + esac; +fi; + +if [ "$origsize" -a -f split_img/*-origsize ]; then + filesize=`cat split_img/*-origsize`; + echo "Padding to original size..."; + echo " "; + cp -f image-new.img unpadded-new.img; + truncate -s $filesize image-new.img; +fi; + +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/KSU/PBRP/unpackimg.sh b/Final_Zip/AIK/KSU/PBRP/unpackimg.sh new file mode 100755 index 0000000..6198f2a --- /dev/null +++ b/Final_Zip/AIK/KSU/PBRP/unpackimg.sh @@ -0,0 +1,370 @@ +#!/bin/bash +# AIK-Linux/unpackimg: split image and unpack ramdisk +# osm0sis @ xda-developers + +cleanup() { "$aik/cleanup.sh" $local --quiet; } +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: unpackimg.sh [--local] [--nosudo] "; exit 1;; + --local) local="--local"; shift;; +esac; +case $1 in + --nosudo) nosudo=1; shift;; + --sudo) shift;; +esac; +if [ ! "$nosudo" ]; then + sudo=sudo; sumsg=" (as root)"; +fi; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + file() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/file" "$@"; } + lzma() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + tail() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/tail" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +if [ ! "$local" ]; then + cd "$aik"; +fi; +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +img="$1"; +[ -f "$cur/$1" ] && img="$cur/$1"; +if [ ! "$img" ]; then + while IFS= read -r line; do + case $line in + aboot.img|image-new.img|unlokied-new.img|unsigned-new.img) continue;; + esac; + img="$line"; + break; + done < <(ls *.elf *.img *.sin 2>/dev/null); +fi; +img="$(readlink -f "$img")"; +if [ ! -f "$img" ]; then + echo "No image file supplied."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - UnpackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +file=$(basename "$img"); +echo "Supplied image: $file"; +echo " "; + +if [ -d split_img -o -d ramdisk ]; then + if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + rmsumsg=" (as root)"; + fi; + echo "Removing old work folders and files$rmsumsg..."; + echo " "; + cleanup; +fi; + +echo "Setting up work folders..."; +echo " "; +mkdir split_img ramdisk; + +cd split_img; +filesize=$(wc -c < "$img"); +echo "$filesize" > "$file-origsize"; +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "signing" ]; then + echo $imgtest | awk '{ print $1 }' > "$file-sigtype"; + sigtype=$(cat "$file-sigtype"); + echo "Signature with \"$sigtype\" type detected, removing..."; + echo " "; + case $sigtype in + BLOB) + cp -f "$img" "$file"; + "$bin/$arch/blobunpack" "$file" | tail -n+5 | cut -d" " -f2 | dd bs=1 count=3 > "$file-blobtype" 2>/dev/null; + mv -f "$file."* "$file"; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --get-vmlinuz "$img" --vmlinuz-out "$file";; + DHTB) dd bs=4096 skip=512 iflag=skip_bytes conv=notrunc if="$img" of="$file" 2>/dev/null;; + NOOK) + dd bs=1048576 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=1048576 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + NOOKTAB) + dd bs=262144 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=262144 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + SIN*) + "$bin/$arch/sony_dump" . "$img" >/dev/null; + mv -f "$file."* "$file"; + rm -f "$file-sigtype"; + ;; + esac; + img="$file"; +fi; + +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "bootimg" ]; then + [ "$(echo $imgtest | awk '{ print $3 }')" = "PXA" ] && typesuffix=-PXA; + echo "$(echo $imgtest | awk '{ print $1 }')$typesuffix" > "$file-imgtype"; + imgtype=$(cat "$file-imgtype"); +else + cd ..; + cleanup; + echo "Unrecognized format."; + abort; + exit 1; +fi; +echo "Image type: $imgtype"; +echo " "; + +case $imgtype in + AOSP*|ELF|KRNL|OSIP|U-Boot) ;; + *) + cd ..; + cleanup; + echo "Unsupported format."; + abort; + exit 1; + ;; +esac; + +case $(echo $imgtest | awk '{ print $3 }') in + LOKI) + echo $imgtest | awk '{ print $5 }' | cut -d\( -f2 | cut -d\) -f1 > "$file-lokitype"; + lokitype=$(cat "$file-lokitype"); + echo "Loki patch with \"$lokitype\" type detected, reverting..."; + echo " "; + echo "Warning: A dump of your device's aboot.img is required to re-Loki!"; + echo " "; + "$bin/$arch/loki_tool" unlok "$img" "$file" >/dev/null; + img="$file"; + ;; + AMONET) + echo "Amonet patch detected, reverting..."; + echo " "; + dd bs=2048 count=1 conv=notrunc if="$img" of="$file-microloader.bin" 2>/dev/null; + dd bs=1024 skip=1 conv=notrunc if="$file-microloader.bin" of="$file-head" 2>/dev/null; + truncate -s 1024 "$file-microloader.bin"; + truncate -s 2048 "$file-head"; + dd bs=2048 skip=1 conv=notrunc if="$img" of="$file-tail" 2>/dev/null; + cat "$file-head" "$file-tail" > "$file"; + rm -f "$file-head" "$file-tail"; + img="$file"; + ;; +esac; + +tailtest="$(dd if="$img" iflag=skip_bytes skip=$(($(wc -c < "$img") - 8192)) bs=8192 count=1 2>/dev/null | file -m $bin/androidbootimg.magic - 2>/dev/null | cut -d: -f2-)"; +case $tailtest in + *data) tailtest="$(tail -n50 "$img" | file -m "$bin/androidbootimg.magic" - 2>/dev/null | cut -d: -f2-)";; +esac; +tailtype="$(echo $tailtest | awk '{ print $1 }')"; +case $tailtype in + AVB*) + echo "Signature with \"$tailtype\" type detected."; + echo " "; + case $tailtype in + *v1) + echo $tailtype > "$file-sigtype"; + echo $tailtest | awk '{ print $4 }' > "$file-avbtype"; + ;; + esac; + ;; + Bump|SEAndroid) + echo "Footer with \"$tailtype\" type detected."; + echo " "; + echo $tailtype > "$file-tailtype"; + ;; +esac; + +if [ "$imgtype" = "U-Boot" ]; then + imgsize=$(($(printf '%d\n' 0x$(hexdump -n 4 -s 12 -e '16/1 "%02x""\n"' "$img")) + 64)); + if [ ! "$filesize" = "$imgsize" ]; then + echo "Trimming..."; + echo " "; + dd bs=$imgsize count=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + img="$file"; + fi; +fi; + +echo 'Splitting image to "split_img/"...'; +case $imgtype in + AOSP_VNDR) vendor=vendor_;; +esac; +case $imgtype in + AOSP|AOSP_VNDR) "$bin/$arch/unpackbootimg" -i "$img";; + AOSP-PXA) "$bin/$arch/pxa-unpackbootimg" -i "$img";; + ELF) + mkdir elftool_out; + "$bin/$arch/elftool" unpack -i "$img" -o elftool_out >/dev/null; + mv -f elftool_out/header "$file-header" 2>/dev/null; + rm -rf elftool_out; + "$bin/$arch/unpackelf" -i "$img"; + ;; + KRNL) dd bs=4096 skip=8 iflag=skip_bytes conv=notrunc if="$img" of="$file-ramdisk" 2>&1 | tail -n+3 | cut -d" " -f1-2;; + OSIP) + "$bin/$arch/mboot" -u -f "$img"; + [ ! $? -eq "0" ] && error=1; + for i in bootstub cmdline.txt hdr kernel parameter ramdisk.cpio.gz sig; do + mv -f $i "$file-$(basename $i .txt | sed -e 's/hdr/header/' -e 's/ramdisk.cpio.gz/ramdisk/')" 2>/dev/null || true; + done; + ;; + U-Boot) + "$bin/$arch/dumpimage" -l "$img"; + "$bin/$arch/dumpimage" -l "$img" > "$file-header"; + grep "Name:" "$file-header" | cut -c15- > "$file-name"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f1 > "$file-arch"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f2 > "$file-os"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f3 | cut -d- -f1 > "$file-type"; + grep "Type:" "$file-header" | cut -d\( -f2 | cut -d\) -f1 | cut -d" " -f1 | cut -d- -f1 > "$file-comp"; + grep "Address:" "$file-header" | cut -c15- > "$file-addr"; + grep "Point:" "$file-header" | cut -c15- > "$file-ep"; + rm -f "$file-header"; + "$bin/$arch/dumpimage" -p 0 -o "$file-kernel" "$img"; + [ ! $? -eq "0" ] && error=1; + case $(cat "$file-type") in + Multi) "$bin/$arch/dumpimage" -p 1 -o "$file-ramdisk" "$img";; + RAMDisk) mv -f "$file-kernel" "$file-ramdisk";; + *) touch "$file-ramdisk";; + esac; + ;; +esac; +if [ ! $? -eq "0" -o "$error" ]; then + cd ..; + cleanup; + abort; + exit 1; +fi; + +if [ -f *-kernel ] && [ "$(file -m "$bin/androidbootimg.magic" *-kernel 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')" = "MTK" ]; then + mtk=1; + echo " "; + echo "MTK header found in kernel, removing..."; + dd bs=512 skip=1 conv=notrunc if="$file-kernel" of=tempkern 2>/dev/null; + mv -f tempkern "$file-kernel"; +fi; +mtktest="$(file -m "$bin/androidbootimg.magic" *-*ramdisk 2>/dev/null | cut -d: -f2-)"; +mtktype=$(echo $mtktest | awk '{ print $3 }'); +if [ "$(echo $mtktest | awk '{ print $1 }')" = "MTK" ]; then + if [ ! "$mtk" ]; then + echo " "; + echo "Warning: No MTK header found in kernel!"; + mtk=1; + fi; + echo "MTK header found in \"$mtktype\" type ramdisk, removing..."; + dd bs=512 skip=1 conv=notrunc if="$(ls *-*ramdisk)" of=temprd 2>/dev/null; + mv -f temprd "$(ls *-*ramdisk)"; +else + if [ "$mtk" ]; then + if [ ! "$mtktype" ]; then + echo 'Warning: No MTK header found in ramdisk, assuming "rootfs" type!'; + mtktype="rootfs"; + fi; + fi; +fi; +[ "$mtk" ] && echo $mtktype > "$file-mtktype"; + +if [ -f *-dt ]; then + dttest="$(file -m "$bin/androidbootimg.magic" *-dt 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')"; + echo $dttest > "$file-dttype"; + if [ "$imgtype" = "ELF" ]; then + case $dttest in + QCDT|ELF) ;; + *) echo " "; + echo "Non-QC DTB found, packing kernel and appending..."; + gzip --no-name -9 "$file-kernel"; + mv -f "$file-kernel.gz" "$file-kernel"; + cat "$file-dt" >> "$file-kernel"; + rm -f "$file-dt"*;; + esac; + fi; +fi; + +file -m "$bin/magic" *-*ramdisk 2>/dev/null | cut -d: -f2 | awk '{ print $1 }' > "$file-${vendor}ramdiskcomp"; +ramdiskcomp=`cat *-*ramdiskcomp`; +unpackcmd="$ramdiskcomp -dc"; +compext=$ramdiskcomp; +case $ramdiskcomp in + gzip) unpackcmd="gzip -dcq"; compext=gz;; + lzop) compext=lzo;; + xz) ;; + lzma) ;; + bzip2) compext=bz2;; + lz4) unpackcmd="$bin/$arch/lz4 -dcq";; + lz4-l) unpackcmd="$bin/$arch/lz4 -dcq"; compext=lz4;; + cpio) unpackcmd="cat"; compext="";; + empty) compext=empty;; + *) compext="";; +esac; +if [ "$compext" ]; then + compext=.$compext; +fi; +mv -f "$(ls *-*ramdisk)" "$file-${vendor}ramdisk.cpio$compext" 2>/dev/null; +cd ..; +if [ "$ramdiskcomp" = "data" ]; then + echo "Unrecognized format."; + abort; + exit 1; +fi; + +echo " "; +if [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: No ramdisk found to be unpacked!"; +else + echo "Unpacking ramdisk$sumsg to \"ramdisk/\"..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + echo "Compression used: $ramdiskcomp"; + if [ ! "$compext" -a ! "$ramdiskcomp" = "cpio" ]; then + echo "Unsupported format."; + abort; + exit 1; + fi; + $sudo chown 0:0 ramdisk 2>/dev/null; + cd ramdisk; + $unpackcmd "../split_img/$file-${vendor}ramdisk.cpio$compext" | $sudo $cpio -i -d --no-absolute-filenames; + if [ ! $? -eq "0" ]; then + [ "$nosudo" ] && echo "Unpacking failed, try without --nosudo."; + cd ..; + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/androidbootimg.magic b/Final_Zip/AIK/KSU/SHRP-R/bin/androidbootimg.magic new file mode 100755 index 0000000..4e7a106 --- /dev/null +++ b/Final_Zip/AIK/KSU/SHRP-R/bin/androidbootimg.magic @@ -0,0 +1,111 @@ +#------------------------------------------------------------------------------ +# Various Android OEM non-standard boot image related magic entries +# osm0sis @ xda-developers +#------------------------------------------------------------------------------ + +# ASUS Blob Signature +0 string -SIGNED-BY-SIGNBLOB- BLOB signing + +# Barnes & Noble Nook Signature +64 string Red\x20Loader NOOK signing (red loader) +64 string Green\x20Loader NOOK signing (green loader) +64 string Green\x20Recovery NOOK signing (green recovery) +64 string eMMC\x20boot.img+secondloader NOOK signing (emmc boot) +64 string eMMC\x20recovery.img+secondloader NOOK signing (emmc recovery) +48 string BauwksBoot NOOKTAB signing (bauwks) + +# Google ChromeOS Signature +0 string CHROMEOS CHROMEOS signing + +# Samsung/Spreadtrum DHTB Signature +0 string DHTB\x01\x00\x00 DHTB signing + +# Sony SIN Packaging/Signature +0 string \x01\x00\x00\x00 SINv1 signing +0 string \x02\x00\x00\x00 SINv2 signing +0 string \x03SIN SINv3 signing + +# Google Pixel/Nexus/AOSP Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search ANDROID! AOSP bootimg +>>36 string \x00\x00\x00\x02 \b, PXA variant (020) +>>36 string \x00\x00\x80\x02 \b, PXA variant (028) +>>36 string \x00\x00\x00\x03 \b, PXA variant (030) +>>96 search microloader +>>>1024 string ANDROID! \b, AMONET header +>>1024 string LOKI \b, LOKI header +>>>1028 string \x00 \b (boot) +>>>1028 string \x01 \b (recovery) +>>2048 search \x88\x16\x88\x58 \b, MTK headers +!:strength * 3 + +# Google Pixel/AOSP Vendor Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search VNDRBOOT AOSP_VNDR bootimg +!:strength * 3 + +# DENX U-Boot +0 string \x27\x05\x19\x56 U-Boot bootimg + +# Intel OSIP +1000 search \xFC\xFA\xBC\x00 OSIP bootimg (headerless) +!:strength / 15 +0 string $OS$\x00\x00\x01 OSIP bootimg +>52 string \x00\x00\x00\x00 \b, boot (signed) +>52 string \x01\x00\x00\x00 \b, boot (unsigned) +>52 string \x0C\x00\x00\x00 \b, recovery (signed) +>52 string \x0D\x00\x00\x00 \b, recovery (unsigned) + +# Rockchip KRNL +0 string KRNL KRNL bootimg + +# Sony ELF +0 string \x7FELF ELF +>5 string \x01\x01\x61 bootimg +>18 string \x28 (ARM +>18 string \x03 (x86_ +>18 string \x08 (MIPS +>4 string \x01 \b) +>4 string \x02 \b64) +>0 search \x88\x16\x88\x58 \b, MTK headers + +# MediaTek MTK +# [for detection after boot image has already been split] +0 search \x88\x16\x88\x58 MTK header +>0 search KERNEL \b, kernel type +>0 search ROOTFS \b, rootfs type +>0 search RECOVERY \b, recovery type +!:strength / 20 + +# Qualcomm Device Tree +# [for detection after boot image has already been split] +0 string QCDT QCDT header +!:strength / 20 + +# Google Android Verified Boot 1.0 Signature +# [for detection with the tail of the boot image] +0 search \x02\x01\x01\x30\x82 AVBv1 signing footer +>0 search /boot \b, boot type +>0 search /recovery \b, recovery type +!:strength / 20 + +# Google Android Verified Boot 2.0 Signature +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search AVBf AVBv2 signing footer +!:strength / 20 + +# LG Bump +# [for detection with the tail of the boot image] +0 search \x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79 Bump footer +!:strength / 20 + +# Samsung SEAndroid +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search SEANDROIDENFORCE SEAndroid footer +!:strength / 20 diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/avb/verity.pk8 b/Final_Zip/AIK/KSU/SHRP-R/bin/avb/verity.pk8 new file mode 100755 index 0000000..bebf216 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/avb/verity.pk8 differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/avb/verity.x509.pem b/Final_Zip/AIK/KSU/SHRP-R/bin/avb/verity.x509.pem new file mode 100755 index 0000000..86399c3 --- /dev/null +++ b/Final_Zip/AIK/KSU/SHRP-R/bin/avb/verity.x509.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIID/TCCAuWgAwIBAgIJAJcPmDkJqolJMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g +VmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UE +AwwHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe +Fw0xNDExMDYxOTA3NDBaFw00MjAzMjQxOTA3NDBaMIGUMQswCQYDVQQGEwJVUzET +MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEQMA4G +A1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UEAwwHQW5kcm9p +ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAOjreE0vTVSRenuzO9vnaWfk0eQzYab0gqpi +6xAzi6dmD+ugoEKJmbPiuE5Dwf21isZ9uhUUu0dQM46dK4ocKxMRrcnmGxydFn6o +fs3ODJMXOkv2gKXL/FdbEPdDbxzdu8z3yk+W67udM/fW7WbaQ3DO0knu+izKak/3 +T41c5uoXmQ81UNtAzRGzGchNVXMmWuTGOkg6U+0I2Td7K8yvUMWhAWPPpKLtVH9r +AL5TzjYNR92izdKcz3AjRsI3CTjtpiVABGeX0TcjRSuZB7K9EK56HV+OFNS6I1NP +jdD7FIShyGlqqZdUOkAUZYanbpgeT5N7QL6uuqcGpoTOkalu6kkCAwEAAaNQME4w +HQYDVR0OBBYEFH5DM/m7oArf4O3peeKO0ZIEkrQPMB8GA1UdIwQYMBaAFH5DM/m7 +oArf4O3peeKO0ZIEkrQPMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB +AHO3NSvDE5jFvMehGGtS8BnFYdFKRIglDMc4niWSzhzOVYRH4WajxdtBWc5fx0ix +NF/+hVKVhP6AIOQa+++sk+HIi7RvioPPbhjcsVlZe7cUEGrLSSveGouQyc+j0+m6 +JF84kszIl5GGNMTnx0XRPO+g8t6h5LWfnVydgZfpGRRg+WHewk1U2HlvTjIceb0N +dcoJ8WKJAFWdcuE7VIm4w+vF/DYX/A2Oyzr2+QRhmYSv1cusgAeC1tvH4ap+J1Lg +UnOu5Kh/FqPLLSwNVQp4Bu7b9QFfqK8Moj84bj88NqRGZgDyqzuTrFxn6FW7dmyA +yttuAJAEAymk1mipd9+zp38= +-----END CERTIFICATE----- diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/boot_signer.jar b/Final_Zip/AIK/KSU/SHRP-R/bin/boot_signer.jar new file mode 100755 index 0000000..dd96a3e Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/boot_signer.jar differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/chromeos/empty b/Final_Zip/AIK/KSU/SHRP-R/bin/chromeos/empty new file mode 100755 index 0000000..8b13789 --- /dev/null +++ b/Final_Zip/AIK/KSU/SHRP-R/bin/chromeos/empty @@ -0,0 +1 @@ + diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/chromeos/kernel.keyblock b/Final_Zip/AIK/KSU/SHRP-R/bin/chromeos/kernel.keyblock new file mode 100755 index 0000000..9740be4 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/chromeos/kernel.keyblock differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/chromeos/kernel_data_key.vbprivk b/Final_Zip/AIK/KSU/SHRP-R/bin/chromeos/kernel_data_key.vbprivk new file mode 100755 index 0000000..8d392fb Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/chromeos/kernel_data_key.vbprivk differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/blobpack b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/blobpack new file mode 100755 index 0000000..685c6c0 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/blobpack differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/blobunpack b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/blobunpack new file mode 100755 index 0000000..2d96696 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/blobunpack differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/dhtbsign b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/dhtbsign new file mode 100755 index 0000000..f117b88 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/dumpimage b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/dumpimage new file mode 100755 index 0000000..8ba15d3 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/dumpimage differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/elftool b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/elftool new file mode 100755 index 0000000..b25dd56 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/elftool differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/futility b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/futility new file mode 100755 index 0000000..c830e31 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/futility differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/loki_tool b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/loki_tool new file mode 100755 index 0000000..d305760 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/loki_tool differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/lz4 b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/lz4 new file mode 100755 index 0000000..801bad4 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/lz4 differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/mboot b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/mboot new file mode 100755 index 0000000..023eab0 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/mboot differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/mkbootimg b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/mkbootimg new file mode 100755 index 0000000..ed68c2d Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/mkimage b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/mkimage new file mode 100755 index 0000000..8e97c0c Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/mkimage differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/mkmtkhdr b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/mkmtkhdr new file mode 100755 index 0000000..d71db24 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/pxa-mkbootimg b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/pxa-mkbootimg new file mode 100755 index 0000000..0636873 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/pxa-unpackbootimg b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/pxa-unpackbootimg new file mode 100755 index 0000000..8dbdecf Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/rkcrc b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/rkcrc new file mode 100755 index 0000000..45027f3 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/rkcrc differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/sony_dump b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/sony_dump new file mode 100755 index 0000000..2563e25 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/sony_dump differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/unpackbootimg b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/unpackbootimg new file mode 100755 index 0000000..b70aed5 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/unpackelf b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/unpackelf new file mode 100755 index 0000000..12e9057 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/i686/unpackelf differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/blobpack b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/blobpack new file mode 100755 index 0000000..90256d4 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/blobpack differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/blobunpack b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/blobunpack new file mode 100755 index 0000000..53374ff Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/dhtbsign b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/dhtbsign new file mode 100755 index 0000000..ccb7a67 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/dumpimage b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/dumpimage new file mode 100755 index 0000000..861bd68 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/elftool b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/elftool new file mode 100755 index 0000000..07a520d Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/elftool differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/futility b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/futility new file mode 100755 index 0000000..4d56ec3 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/futility differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/loki_tool b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/loki_tool new file mode 100755 index 0000000..4a1b74a Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/lz4 b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/lz4 new file mode 100755 index 0000000..8a4136b Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/lz4 differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/mboot b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/mboot new file mode 100755 index 0000000..8bf92d4 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/mboot differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/mkbootimg b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/mkbootimg new file mode 100755 index 0000000..2b628c3 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/mkimage b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/mkimage new file mode 100755 index 0000000..6419ea3 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/mkimage differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/mkmtkhdr b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/mkmtkhdr new file mode 100755 index 0000000..1ab256f Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/pxa-mkbootimg b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..5885720 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..d7b1b7d Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/rkcrc b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/rkcrc new file mode 100755 index 0000000..f218228 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/sony_dump b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/sony_dump new file mode 100755 index 0000000..6fc3696 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/unpackbootimg b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/unpackbootimg new file mode 100755 index 0000000..8f4fccf Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/unpackelf b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/unpackelf new file mode 100755 index 0000000..477e25d Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/linux/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/blobpack b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/blobpack new file mode 100755 index 0000000..2336ec0 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/blobpack differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/blobunpack b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/blobunpack new file mode 100755 index 0000000..834cb50 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/blobunpack differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/cpio b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/cpio new file mode 100755 index 0000000..b7e41f1 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/cpio differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/dd b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/dd new file mode 100755 index 0000000..b684139 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/dd differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/dhtbsign b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/dhtbsign new file mode 100755 index 0000000..b3ba0ba Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/dumpimage b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/dumpimage new file mode 100755 index 0000000..917c8ed Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/dumpimage differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/elftool b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/elftool new file mode 100755 index 0000000..27f12be Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/elftool differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/file b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/file new file mode 100755 index 0000000..8024db5 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/file differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/futility b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/futility new file mode 100755 index 0000000..8658249 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/futility differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/libiconv.2.dylib b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/libiconv.2.dylib new file mode 100755 index 0000000..ec61db0 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/libintl.8.dylib b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/libintl.8.dylib new file mode 100755 index 0000000..c297f0a Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/libintl.8.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/liblzma.5.dylib b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/liblzma.5.dylib new file mode 100755 index 0000000..126d338 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/liblzo2.2.dylib b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/liblzo2.2.dylib new file mode 100755 index 0000000..8a24e23 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/libmagic.1.dylib b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/libmagic.1.dylib new file mode 100755 index 0000000..92e6c7f Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/loki_tool b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/loki_tool new file mode 100755 index 0000000..7eecf68 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/loki_tool differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/lz4 b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/lz4 new file mode 100755 index 0000000..43126f8 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/lz4 differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/lzop b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/lzop new file mode 100755 index 0000000..fc3103c Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/lzop differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/mboot b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/mboot new file mode 100755 index 0000000..dfa0d3e Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/mboot differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/mkbootimg b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/mkbootimg new file mode 100755 index 0000000..82f05a9 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/mkimage b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/mkimage new file mode 100755 index 0000000..e760d6e Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/mkimage differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/mkmtkhdr b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/mkmtkhdr new file mode 100755 index 0000000..907ba0f Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/pxa-mkbootimg b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/pxa-mkbootimg new file mode 100755 index 0000000..12f8337 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/pxa-unpackbootimg b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/pxa-unpackbootimg new file mode 100755 index 0000000..2f1fe6c Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/rkcrc b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/rkcrc new file mode 100755 index 0000000..c2b70ce Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/rkcrc differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/sony_dump b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/sony_dump new file mode 100755 index 0000000..2f187e6 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/sony_dump differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/tail b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/tail new file mode 100755 index 0000000..99ee578 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/tail differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/truncate b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/truncate new file mode 100755 index 0000000..26bf16b Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/truncate differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/unpackbootimg b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/unpackbootimg new file mode 100755 index 0000000..e92b74e Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/unpackelf b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/unpackelf new file mode 100755 index 0000000..4ea11d0 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/unpackelf differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/xz b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/xz new file mode 100755 index 0000000..b501c14 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/i386/xz differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/blobpack b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/blobpack new file mode 100755 index 0000000..816fcf2 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/blobpack differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/blobunpack b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/blobunpack new file mode 100755 index 0000000..9241057 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/cpio b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/cpio new file mode 100755 index 0000000..991c5a8 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/cpio differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/dd b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/dd new file mode 100755 index 0000000..e927886 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/dd differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/dhtbsign b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/dhtbsign new file mode 100755 index 0000000..162fa88 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/dumpimage b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/dumpimage new file mode 100755 index 0000000..473538b Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/elftool b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/elftool new file mode 100755 index 0000000..0185019 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/elftool differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/file b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/file new file mode 100755 index 0000000..0b9f24c Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/file differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/futility b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/futility new file mode 100755 index 0000000..a28db4d Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/futility differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/libiconv.2.dylib b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/libiconv.2.dylib new file mode 100755 index 0000000..8f56eed Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/libintl.8.dylib b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/libintl.8.dylib new file mode 100755 index 0000000..f270e89 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/libintl.8.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/liblzma.5.dylib b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/liblzma.5.dylib new file mode 100755 index 0000000..39c6b96 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/liblzo2.2.dylib b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/liblzo2.2.dylib new file mode 100755 index 0000000..a05b7eb Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/libmagic.1.dylib b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/libmagic.1.dylib new file mode 100755 index 0000000..29ad687 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/loki_tool b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/loki_tool new file mode 100755 index 0000000..1b9f062 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/lz4 b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/lz4 new file mode 100755 index 0000000..bcee28d Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/lz4 differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/lzop b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/lzop new file mode 100755 index 0000000..8be71f4 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/lzop differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/mboot b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/mboot new file mode 100755 index 0000000..ad67219 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/mboot differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/mkbootimg b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/mkbootimg new file mode 100755 index 0000000..137aef2 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/mkimage b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/mkimage new file mode 100755 index 0000000..61d5a9c Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/mkimage differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/mkmtkhdr b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/mkmtkhdr new file mode 100755 index 0000000..99949d5 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/pxa-mkbootimg b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..0ec79a3 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..03fc864 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/rkcrc b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/rkcrc new file mode 100755 index 0000000..9b0b94a Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/sony_dump b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/sony_dump new file mode 100755 index 0000000..e219101 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/tail b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/tail new file mode 100755 index 0000000..59692eb Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/tail differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/truncate b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/truncate new file mode 100755 index 0000000..f2ed631 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/truncate differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/unpackbootimg b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/unpackbootimg new file mode 100755 index 0000000..a717c48 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/unpackelf b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/unpackelf new file mode 100755 index 0000000..d6edefa Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/xz b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/xz new file mode 100755 index 0000000..6faedc7 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP-R/bin/macos/x86_64/xz differ diff --git a/Final_Zip/AIK/KSU/SHRP-R/bin/magic b/Final_Zip/AIK/KSU/SHRP-R/bin/magic new file mode 100755 index 0000000..4530761 --- /dev/null +++ b/Final_Zip/AIK/KSU/SHRP-R/bin/magic @@ -0,0 +1,1916 @@ +#------------------------------------------------------------------------------ +# Slimmed down magic file for archives only +#------------------------------------------------------------------------------ +# $File: archive,v 1.145 2021/01/03 20:58:47 christos Exp $ +# archive: file(1) magic for archive formats (see also "msdos" for self- +# extracting compressed archives) +# +# cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc. +# pre-POSIX "tar" archives are also handled in the C code ../../src/is_tar.c. + +# POSIX tar archives +# URL: https://en.wikipedia.org/wiki/Tar_(computing) +# Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current +# header mainly padded with nul bytes +500 quad 0 +!:strength /2 +# filename or extended attribute printable strings in range space null til umlaut ue +>0 ubeshort >0x1F00 +>>0 ubeshort <0xFCFD +# last 4 header bytes often null but tar\0 in gtarfail2.tar gtarfail.tar-bad +# at https://sourceforge.net/projects/s-tar/files/testscripts/ +>>>508 ubelong&0x8B9E8DFF 0 +# nul, space or ascii digit 0-7 at start of mode +>>>>100 ubyte&0xC8 =0 +>>>>>101 ubyte&0xC8 =0 +# nul, space at end of check sum +>>>>>>155 ubyte&0xDF =0 +# space or ascii digit 0 at start of check sum +>>>>>>>148 ubyte&0xEF =0x20 +# minimal check and then display tar archive information which can also be +# embedded inside others like Android Backup, Clam AntiVirus database +>257 string !ustar +# header padded with nuls +>>257 ulong =0 +# GNU tar version 1.29 with non pax format option without refusing +# creates misleading V7 header for Long path, Multi-volume, Volume type +>>>156 ubyte 0x4c GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x4d GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x56 GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 default x tar archive (V7) +!:mime application/x-tar +#!:ext tar +# other stuff in padding +# some implementations add new fields to the blank area at the end of the header record +# created for example by DOS TAR 3.20g 1994 Tim V.Shapore with -j option +>>257 ulong !0 tar archive (old) +!:mime application/x-tar +#!:ext tar +# magic in newer, GNU, posix variants +>257 string =ustar +# 2 last char of magic and UStar version because string expression does not work +# 2 space characters followed by a null for GNU variant +>>261 ubelong =0x72202000 POSIX tar archive (GNU) +!:mime application/x-gtar +#!:ext tar/gtar +# UStar version with ASCII "00" +>>261 ubelong 0x72003030 POSIX +# gLOBAL and ExTENSION type only found in POSIX.1-2001 format +>>>156 ubyte 0x67 \b.1-2001 +>>>156 ubyte 0x78 \b.1-2001 +>>>156 ubyte x tar archive +!:mime application/x-ustar +#!:ext tar/ustar +# version with 2 binary nuls embedded in Android Backup like com.android.settings.ab +>>261 ubelong 0x72000000 tar archive (ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# not seen ustar variant with garbish version +>>261 default x tar archive (unknown ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# type flag of 1st tar archive member +#>156 ubyte x \b, %c-type +>156 ubyte x +>>156 ubyte 0 \b, file +>>156 ubyte 0x30 \b, file +>>156 ubyte 0x31 \b, hard link +>>156 ubyte 0x32 \b, symlink +>>156 ubyte 0x33 \b, char device +>>156 ubyte 0x34 \b, block device +>>156 ubyte 0x35 \b, directory +>>156 ubyte 0x36 \b, fifo +>>156 ubyte 0x37 \b, reserved +>>156 ubyte 0x4c \b, long path +>>156 ubyte 0x4d \b, multi volume +>>156 ubyte 0x56 \b, volume +>>156 ubyte 0x67 \b, global +>>156 ubyte 0x78 \b, extension +>>156 default x \b, type +>>>156 ubyte x '%c' +# name[100] +>0 string >\0 %-.60s +# mode mainly stored as an octal number in ASCII null or space terminated +>100 string >\0 \b, mode %-.7s +# user id mainly as octal numbers in ASCII null or space terminated +>108 string >\0 \b, uid %-.7s +# group id mainly as octal numbers in ASCII null or space terminated +>116 string >\0 \b, gid %-.7s +# size mainly as octal number in ASCII +>124 ubyte <0x38 +>>124 string >\0 \b, size %-.12s +# coding indicated by setting the high-order bit of the leftmost byte +>124 ubyte >0xEF \b, size 0x +>>124 ubyte !0xff \b%2.2x +>>125 ubyte !0xff \b%2.2x +>>126 ubyte !0xff \b%2.2x +>>127 ubyte !0xff \b%2.2x +>>128 ubyte !0xff \b%2.2x +>>129 ubyte !0xff \b%2.2x +>>130 ubyte !0xff \b%2.2x +>>131 ubyte !0xff \b%2.2x +>>132 ubyte !0xff \b%2.2x +>>133 ubyte !0xff \b%2.2x +>>134 ubyte !0xff \b%2.2x +>>135 ubyte !0xff \b%2.2x +# seconds since 0:0:0 1 jan 1970 UTC as octal number mainly in ASCII null or space terminated +>136 string >\0 \b, seconds %-.11s +# header checksum stored as an octal number in ASCII null or space terminated +#>148 string x \b, cksum %.7s +# linkname[100] +>157 string >\0 \b, linkname %-.40s +# additional fields for ustar +>257 string =ustar +# owner user name null terminated +>>265 string >\0 \b, user %-.32s +# group name null terminated +>>297 string >\0 \b, group %-.32s +# device major minor if not zero +>>329 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>329 string x \b, devmaj %-.7s +>>337 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>337 string x \b, devmin %-.7s +# prefix[155] +>>345 string >\0 \b, prefix %-.155s +# old non ustar/POSIX tar +>257 string !ustar +>>508 string =tar\0 +# padding[255] in old star +>>>257 string >\0 \b, padding: %-.40s +>>508 default x +# padding[255] in old tar sometimes comment field +>>>257 string >\0 \b, comment: %-.40s + +# Incremental snapshot gnu-tar format from: +# https://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html +0 string GNU\ tar- GNU tar incremental snapshot data +>&0 regex [0-9]\.[0-9]+-[0-9]+ version %s + +# cpio archives +# +# Yes, the top two "cpio archive" formats *are* supposed to just be "short". +# The idea is to indicate archives produced on machines with the same +# byte order as the machine running "file" with "cpio archive", and +# to indicate archives produced on machines with the opposite byte order +# from the machine running "file" with "cpio byte-swapped archive". +# +# The SVR4 "cpio(4)" hints that there are additional formats, but they +# are defined as "short"s; I think all the new formats are +# character-header formats and thus are strings, not numbers. +0 short 070707 cpio archive +!:mime application/x-cpio +0 short 0143561 cpio byte-swapped archive +!:mime application/x-cpio # encoding: swapped +0 string 070707 cpio ASCII archive (pre-SVR4 or odc) +0 string 070701 cpio ASCII archive (SVR4 with no CRC) +0 string 070702 cpio ASCII archive (SVR4 with CRC) + +# +# Various archive formats used by various versions of the "ar" +# command. +# + +# +# Original UNIX archive formats. +# They were written with binary values in host byte order, and +# the magic number was a host "int", which might have been 16 bits +# or 32 bits. We don't say "PDP-11" or "VAX", as there might have +# been ports to little-endian 16-bit-int or 32-bit-int platforms +# (x86?) using some of those formats; if none existed, feel free +# to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian +# 32-bit. There might have been big-endian ports of that sort as +# well. +# +0 leshort 0177555 very old 16-bit-int little-endian archive +0 beshort 0177555 very old 16-bit-int big-endian archive +0 lelong 0177555 very old 32-bit-int little-endian archive +0 belong 0177555 very old 32-bit-int big-endian archive + +0 leshort 0177545 old 16-bit-int little-endian archive +>2 string __.SYMDEF random library +0 beshort 0177545 old 16-bit-int big-endian archive +>2 string __.SYMDEF random library +0 lelong 0177545 old 32-bit-int little-endian archive +>4 string __.SYMDEF random library +0 belong 0177545 old 32-bit-int big-endian archive +>4 string __.SYMDEF random library + +# +# From "pdp" (but why a 4-byte quantity?) +# +0 lelong 0x39bed PDP-11 old archive +0 lelong 0x39bee PDP-11 4.0 archive + +# +# XXX - what flavor of APL used this, and was it a variant of +# some ar archive format? It's similar to, but not the same +# as, the APL workspace magic numbers in pdp. +# +0 long 0100554 apl workspace + +# +# System V Release 1 portable(?) archive format. +# +0 string = System V Release 1 ar archive +!:mime application/x-archive + +# +# Debian package; it's in the portable archive format, and needs to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "debian". +# +# Update: Joerg Jenderek +# URL: https://en.wikipedia.org/wiki/Deb_(file_format) +0 string =!\ndebian +# https://manpages.debian.org/testing/dpkg/dpkg-split.1.en.html +>14 string -split part of multipart Debian package +!:mime application/vnd.debian.binary-package +# udeb is used for stripped down deb file +#!:ext deb/udeb +>14 string -binary Debian binary package +!:mime application/vnd.debian.binary-package +# For ipk packager see also https://en.wikipedia.org/wiki/Opkg +#!:ext deb/udeb/ipk +# This should not happen +>14 default x Unknown Debian package +# NL terminated version; for most Debian cases this is 2.0 or 2.1 for split +>68 string >\0 (format %s) +#>68 string !2.0\n +#>>68 string x (format %.3s) +>68 string =2.0\n +# 2nd archive name=control archive name like control.tar.gz or control.tar.xz +>>72 string >\0 \b, with %.14s +# look for 3rd archive name=data archive name like data.tar.{gz,xz,bz2,lzma} +>>0 search/0x93e4f data.tar. \b, data compression +# the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised +# for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb +>>>&0 string x %.2s +# skip space (0x20 BSD) and slash (0x2f System V) character marking end of name +>>>&2 ubyte !0x20 +>>>>&-1 ubyte !0x2f +# display 3rd character of file name extension like 2 of bz2 or m of lzma +>>>>>&-1 ubyte x \b%c +>>>>>>&0 ubyte !0x20 +>>>>>>>&-1 ubyte !0x2f +# display 4th character of file name extension like a of lzma +>>>>>>>>&-1 ubyte x \b%c +# split debian package case +>68 string =2.1\n +# dpkg-1.18.25/dpkg-split/info.c +# NL terminated ASCII package name like ckermit +>>&0 string x \b, %s +# NL terminated package version like 302-5.3 +>>>&1 string x %s +# NL terminated MD5 checksum +>>>>&1 string x \b, MD5 %s +# NL terminated original package length +>>>>>&1 string x \b, unsplitted size %s +# NL terminated part length +>>>>>>&1 string x \b, part length %s +# NL terminated package part like n/m +>>>>>>>&1 string x \b, part %s +# NL terminated package architecture like armhf since dpkg 1.16.1 or later +>>>>>>>>&1 string x \b, %s + +# +# MIPS archive; they're in the portable archive format, and need to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "__________E". +# +0 string =!\n__________E MIPS archive +!:mime application/x-archive +>20 string U with MIPS Ucode members +>21 string L with MIPSEL members +>21 string B with MIPSEB members +>19 string L and an EL hash table +>19 string B and an EB hash table +>22 string X -- out of date + +# +# BSD/SVR2-and-later portable archive formats. +# +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/AR +# Reference: https://www.unix.com/man-page/opensolaris/3HEAD/ar.h/ +# Note: Mach-O universal binary in ./cafebabe is dependent +# TODO: unify current ar archive, MIPS archive, Debian package +# distinguish BSD, SVR; 32, 64 bit; HP from other 32-bit SVR; +# *.ar packages from *.a libraries. handle empty archive +0 string =!\n current ar archive +# print first and possibly second ar_name[16] for debugging purpose +#>8 string x \b, 1st "%.16s" +#>68 string x \b, 2nd "%.16s" +!:mime application/x-archive +# a in most case for libraries; lib for Microsoft libraries; ar else cases +#!:ext a/lib/ar +>8 string __.SYMDEF random library +# first member with long marked name __.SYMDEF SORTED implies BSD library +>68 string __.SYMDEF\ SORTED random library +# Reference: https://parisc.wiki.kernel.org/images-parisc/b/b2/Rad_11_0_32.pdf +# "archive file" entry moved from ./hp +# LST header system_id 0210h~PA-RISC 1.1,... identifies the target architecture +# LST header a_magic 0619h~relocatable library +>68 belong 0x020b0619 - PA-RISC1.0 relocatable library +>68 belong 0x02100619 - PA-RISC1.1 relocatable library +>68 belong 0x02110619 - PA-RISC1.2 relocatable library +>68 belong 0x02140619 - PA-RISC2.0 relocatable library +#EOF for common ar archives + +# +# "Thin" archive, as can be produced by GNU ar. +# +0 string =!\n thin archive with +>68 belong 0 no symbol entries +>68 belong 1 %d symbol entry +>68 belong >1 %d symbol entries + +0 search/1 -h- Software Tools format archive text + +# ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com) +# +# The first byte is the magic (0x1a), byte 2 is the compression type for +# the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS +# filename of the first file (null terminated). Since some types collide +# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%), +# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo. +0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000031a ARC archive data, packed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched +!:mime application/x-arc +# [JW] stuff taken from idarc, obviously ARC successors: +0 lelong&0x8080ffff 0x00000a1a PAK archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000141a ARC+ archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000481a HYP archive data +!:mime application/x-arc + +# Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk) +# I can't create either SPARK or ArcFS archives so I have not tested this stuff +# [GRR: the original entries collide with ARC, above; replaced with combined +# version (not tested)] +#0 byte 0x1a RISC OS archive (spark format) +0 string \032archive RISC OS archive (ArcFS format) +0 string Archive\000 RISC OS archive (ArcFS format) + +# All these were taken from idarc, many could not be verified. Unfortunately, +# there were many low-quality sigs, i.e. easy to trigger false positives. +# Please notify me of any real-world fishy/ambiguous signatures and I'll try +# to get my hands on the actual archiver and see if I find something better. [JW] +# probably many can be enhanced by finding some 0-byte or control char near the start + +# idarc calls this Crush/Uncompressed... *shrug* +0 string CRUSH Crush archive data +# Squeeze It (.sqz) +0 string HLSQZ Squeeze It archive data +# SQWEZ +0 string SQWEZ SQWEZ archive data +# HPack (.hpk) +0 string HPAK HPack archive data +# HAP +0 string \x91\x33HF HAP archive data +# MD/MDCD +0 string MDmd MDCD archive data +# LIM +0 string LIM\x1a LIM archive data +# SAR +3 string LH5 SAR archive data +# BSArc/BS2 +0 string \212\3SB\020\0 BSArc/BS2 archive data +# Bethesda Softworks Archive (Oblivion) +0 string BSA\0 BSArc archive data +>4 lelong x version %d +# MAR +2 string =-ah MAR archive data +# ACB +#0 belong&0x00f800ff 0x00800000 ACB archive data +# CPZ +# TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data +# JRC +0 string JRchive JRC archive data +# Quantum +0 string DS\0 Quantum archive data +# ReSOF +0 string PK\3\6 ReSOF archive data +# QuArk +0 string 7\4 QuArk archive data +# YAC +14 string YC YAC archive data +# X1 +0 string X1 X1 archive data +0 string XhDr X1 archive data +# CDC Codec (.dqt) +0 belong&0xffffe000 0x76ff2000 CDC Codec archive data +# AMGC +0 string \xad6" AMGC archive data +# NuLIB +0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data +# PakLeo +0 string LEOLZW PAKLeo archive data +# ChArc +0 string SChF ChArc archive data +# PSA +0 string PSA PSA archive data +# CrossePAC +0 string DSIGDCC CrossePAC archive data +# Freeze +0 string \x1f\x9f\x4a\x10\x0a Freeze archive data +# KBoom +0 string \xc2\xa8MP\xc2\xa8 KBoom archive data +# NSQ, must go after CDC Codec +0 string \x76\xff NSQ archive data +# DPA +0 string Dirk\ Paehl DPA archive data +# BA +# TODO: idarc says "bytes 0-2 == bytes 3-5" +# TTComp +# URL: http://fileformats.archiveteam.org/wiki/TTComp_archive +# Update: Joerg Jenderek +# GRR: line below is too general as it matches also Panorama database "TCDB 2003-10 demo.pan", others +0 string \0\6 +# look for first keyword of Panorama database *.pan +>12 search/261 DESIGN +# skip keyword with low entropy +>12 default x TTComp archive, binary, 4K dictionary +# (version 5.25) labeled the above entry as "TTComp archive data" +# From: Joerg Jenderek +# URL: https://wiki.68kmla.org/DiskCopy_4.2_format_specification +# reference: http://nulib.com/library/FTN.e00005.htm +0x52 ubeshort 0x0100 +# test for disk image size equal or above 400k +>0x40 ubelong >409599 +# test also for disk image size equal or below 1440k to skip +# windows7en.mbr UNICODE.DAT +>>0x40 ubelong <1474561 +# To skip Flags$StringJoiner.class with size 00106A61h test also for only 4 disk image sizes +# 00064000 for 400k GCR disks +# 000c8000 for 800k GCR disks +# 000b4000 for 720k MFM disks +# 00168000 for 1440k MFM disks +>>>0x40 ubelong&0xffE03fFF 0 +# display information of Apple DiskCopy 4.2 floppy image +# image pascal name padded with NULs like Microsoft Mail +>00 pstring/B x Apple DiskCopy 4.2 image %s +#!:mime application/octet-stream +!:mime application/x-dc42-floppy-image +!:apple dCpydImg +#!:ext image/dc42 +# data size in bytes like 409600 +>0x40 ubelong x \b, %u bytes +# for debugging purpose size in hexadecimal +#>0x40 ubelong x (0x%8.8x) +# tag size in bytes +>0x44 ubelong >0 \b, 0x%x tag size +# data checksum +#>0x48 ubelong x \b, 0x%x checksum +# tag checksum +#>0x4c ubelong x \b, 0x%x tag checksum +# disk encoding +>0x50 ubyte 0 \b, GCR CLV ssdd (400k) +>0x50 ubyte 1 \b, GCR CLV dsdd (800k) +>0x50 ubyte 2 \b, MFM CAV dsdd (720k) +>0x50 ubyte 3 \b, MFM CAV dshd (1440k) +>0x50 ubyte >3 \b, 0x%x encoding +# format byte +>0x51 ubyte x \b, 0x%x format +#>0x54 ubequad x \b, data 0x%16.16llx +# ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation? +0 string ESP ESP archive data +# ZPack +0 string \1ZPK\1 ZPack archive data +# Sky +0 string \xbc\x40 Sky archive data +# UFA +0 string UFA UFA archive data +# Dry +0 string =-H2O DRY archive data +# FoxSQZ +0 string FOXSQZ FoxSQZ archive data +# AR7 +0 string ,AR7 AR7 archive data +# PPMZ +0 string PPMZ PPMZ archive data +# MS Compress +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/MS-DOS_installation_compression +# Reference: https://hwiegman.home.xs4all.nl/fileformats/compress/szdd_kwaj_format.html +# Note: use correct version of extracting tool like EXPAND, UNPACK, DECOMP or 7Z +4 string \x88\xf0\x27 +# KWAJ variant +>0 string KWAJ MS Compress archive data, KWAJ variant +!:mime application/x-ms-compress-kwaj +# extension not working in version 5.32 +# magic/Magdir/archive, 284: Warning: EXTENSION type ` ??_' has bad char '?' +# file: line 284: Bad magic entry ' ??_' +#!:ext ??_ +# compression method (0-4) +>>8 uleshort x \b, %u method +# offset of compressed data +>>10 uleshort x \b, 0x%x offset +#>>(10.s) uleshort x +#>>>&-6 string x \b, TEST extension %-.3s +# header flags to mark header extensions +>>12 uleshort >0 \b, 0x%x flags +# 4 bytes: decompressed length of file +>>12 uleshort &0x01 +>>>14 ulelong x \b, original size: %u bytes +# 2 bytes: unknown purpose +# 2 bytes: length of unknown data + mentioned bytes +# 1-9 bytes: null-terminated file name +# 1-4 bytes: null-terminated file extension +>>12 uleshort &0x08 +>>>12 uleshort ^0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>>&16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>&16 string x %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>12 uleshort &0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +# 2 bytes: length of data + mentioned bytes +# +# SZDD variant Haruhiko Okumura's LZSS or 7z type MsLZ +>0 string SZDD MS Compress archive data, SZDD variant +!:mime application/x-ms-compress-szdd +#!:ext ??_ +# The character missing from the end of the filename (0=unknown) +>>9 string >\0 \b, %-.1s is last character of original name +# https://www.betaarchive.com/forum/viewtopic.php?t=26161 +# Compression mode: "A" (0x41) found but sometimes "B" in Windows 3.1 builds 026 and 034e +>>8 string !A \b, %-.1s method +>>10 ulelong >0 \b, original size: %u bytes +# QBasic SZDD variant +3 string \x88\xf0\x27 +>0 string SZ\x20 MS Compress archive data, QBasic variant +!:mime application/x-ms-compress-sz +#!:ext ??$ +>>8 ulelong >0 \b, original size: %u bytes + +# MP3 (archiver, not lossy audio compression) +0 string MP3\x1a MP3-Archiver archive data +# ZET +0 string OZ\xc3\x9d ZET archive data +# TSComp +0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data +# ARQ +0 string gW\4\1 ARQ archive data +# Squash +3 string OctSqu Squash archive data +# Terse +0 string \5\1\1\0 Terse archive data +# PUCrunch +0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data +# UHarc +0 string UHA UHarc archive data +# ABComp +0 string \2AB ABComp archive data +0 string \3AB2 ABComp archive data +# CMP +0 string CO\0 CMP archive data +# Splint +0 string \x93\xb9\x06 Splint archive data +# InstallShield +0 string \x13\x5d\x65\x8c InstallShield Z archive Data +# Gather +1 string GTH Gather archive data +# BOA +0 string BOA BOA archive data +# RAX +0 string ULEB\xa RAX archive data +# Xtreme +0 string ULEB\0 Xtreme archive data +# Pack Magic +0 string @\xc3\xa2\1\0 Pack Magic archive data +# BTS +0 belong&0xfeffffff 0x1a034465 BTS archive data +# ELI 5750 +0 string Ora\ ELI 5750 archive data +# QFC +0 string \x1aFC\x1a QFC archive data +0 string \x1aQF\x1a QFC archive data +# PRO-PACK +0 string RNC PRO-PACK archive data +# 777 +0 string 777 777 archive data +# LZS221 +0 string sTaC LZS221 archive data +# HPA +0 string HPA HPA archive data +# Arhangel +0 string LG Arhangel archive data +# EXP1, uses bzip2 +0 string 0123456789012345BZh EXP1 archive data +# IMP +0 string IMP\xa IMP archive data +# NRV +0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data +# Squish +0 string \x73\xb2\x90\xf4 Squish archive data +# Par +0 string PHILIPP Par archive data +0 string PAR Par archive data +# HIT +0 string UB HIT archive data +# SBX +0 belong&0xfffff000 0x53423000 SBX archive data +# NaShrink +0 string NSK NaShrink archive data +# SAPCAR +0 string #\ CAR\ archive\ header SAPCAR archive data +0 string CAR\ 2.00RG SAPCAR archive data +# Disintegrator +0 string DST Disintegrator archive data +# ASD +0 string ASD ASD archive data +# InstallShield CAB +0 string ISc( InstallShield CAB +# TOP4 +0 string T4\x1a TOP4 archive data +# BatComp left out: sig looks like COM executable +# so TODO: get real 4dos batcomp file and find sig +# BlakHole +0 string BH\5\7 BlakHole archive data +# BIX +0 string BIX0 BIX archive data +# ChiefLZA +0 string ChfLZ ChiefLZA archive data +# Blink +0 string Blink Blink archive data +# Logitech Compress +0 string \xda\xfa Logitech Compress archive data +# ARS-Sfx (FIXME: really a SFX? then goto COM/EXE) +1 string (C)\ STEPANYUK ARS-Sfx archive data +# AKT/AKT32 +0 string AKT32 AKT32 archive data +0 string AKT AKT archive data +# NPack +0 string MSTSM NPack archive data +# PFT +0 string \0\x50\0\x14 PFT archive data +# SemOne +0 string SEM SemOne archive data +# PPMD +0 string \x8f\xaf\xac\x84 PPMD archive data +# FIZ +0 string FIZ FIZ archive data +# MSXiE +0 belong&0xfffff0f0 0x4d530000 MSXiE archive data +# DeepFreezer +0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data +# DC +0 string =2 string \x2\x4 Xpack DiskImage archive data +#!:ext xdi +# XPack Data +# *.xpa updated by Joerg Jenderek Sep 2015 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/ +0 string xpa XPA +#!:ext xpa +# XPA32 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/xpa32.zip +# created by XPA32.EXE version 1.0.2 for Windows +>0 string xpa\0\1 \b32 archive data +# created by XPACK.COM version 1.67m or 1.67r with short 0x1800 +>3 ubeshort !0x0001 \bck archive data +# XPack Single Data +# changed by Joerg Jenderek Sep 2015 back to like in version 5.12 +# letter 'I'+ acute accent is equivalent to \xcd +0 string \xcd\ jm Xpack single archive data +#!:mime application/x-xpa-compressed +#!:ext xpa + +# TODO: missing due to unknown magic/magic at end of file: +#DWC +#ARG +#ZAR +#PC/3270 +#InstallIt +#RKive +#RK +#XPack Diskimage + +# These were inspired by idarc, but actually verified +# Dzip archiver (.dz) +# Update: Joerg Jenderek +# URL: http://speeddemosarchive.com/dzip/ +# reference: http://speeddemosarchive.com/dzip/dz29src.zip/main.c +# GRR: line below is too general as it matches also ASCII texts like Doszip commander help dz.txt +0 string DZ +# latest version is 2.9 dated 7 may 2003 +>2 byte <4 Dzip archive data +!:mime application/x-dzip +#!:ext dz +>>2 byte x \b, version %i +>>3 byte x \b.%i +>>4 ulelong x \b, offset 0x%x +>>8 ulelong x \b, %u files +# ZZip archiver (.zz) +0 string ZZ\ \0\0 ZZip archive data +0 string ZZ0 ZZip archive data +# PAQ archiver (.paq) +0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data +0 string PAQ PAQ archive data +>3 byte&0xf0 0x30 +>>3 byte x (v%c) +# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP) +0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data +0 string JARCS JAR (ARJ Software, Inc.) archive data + +# ARJ archiver (jason@jarthur.Claremont.EDU) +0 leshort 0xea60 ARJ archive data +!:mime application/x-arj +>5 byte x \b, v%d, +>8 byte &0x04 multi-volume, +>8 byte &0x10 slash-switched, +>8 byte &0x20 backup, +>34 string x original name: %s, +>7 byte 0 os: MS-DOS +>7 byte 1 os: PRIMOS +>7 byte 2 os: Unix +>7 byte 3 os: Amiga +>7 byte 4 os: Macintosh +>7 byte 5 os: OS/2 +>7 byte 6 os: Apple ][ GS +>7 byte 7 os: Atari ST +>7 byte 8 os: NeXT +>7 byte 9 os: VAX/VMS +>3 byte >0 %d] +# [JW] idarc says this is also possible +2 leshort 0xea60 ARJ archive data + +# HA archiver (Greg Roelofs, newt@uchicago.edu) +# This is a really bad format. A file containing HAWAII will match this... +#0 string HA HA archive data, +#>2 leshort =1 1 file, +#>2 leshort >1 %hu files, +#>4 byte&0x0f =0 first is type CPY +#>4 byte&0x0f =1 first is type ASC +#>4 byte&0x0f =2 first is type HSC +#>4 byte&0x0f =0x0e first is type DIR +#>4 byte&0x0f =0x0f first is type SPECIAL +# suggestion: at least identify small archives (<1024 files) +0 belong&0xffff00fc 0x48410000 HA archive data +>2 leshort =1 1 file, +>2 leshort >1 %u files, +>4 byte&0x0f =0 first is type CPY +>4 byte&0x0f =1 first is type ASC +>4 byte&0x0f =2 first is type HSC +>4 byte&0x0f =0x0e first is type DIR +>4 byte&0x0f =0x0f first is type SPECIAL + +# HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz) +0 string HPAK HPACK archive data + +# JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net +0 string \351,\001JAM\ JAM archive, +>7 string >\0 version %.4s +>0x26 byte =0x27 - +>>0x2b string >\0 label %.11s, +>>0x27 lelong x serial %08x, +>>0x36 string >\0 fstype %.8s + +# Very old RAR archive +# https://jasonblanks.com/wp-includes/images/papers/KnowyourarchiveRAR.pdf +0 string RE\x7e\x5e RAR archive data (26 string \x8\0\0\0mimetypeapplication/ + +# KOffice / OpenOffice & StarOffice / OpenDocument formats +# From: Abel Cheung + +# KOffice (1.2 or above) formats +# (mimetype contains "application/vnd.kde.") +>>50 string vnd.kde. KOffice (>=1.2) +>>>58 string karbon Karbon document +>>>58 string kchart KChart document +>>>58 string kformula KFormula document +>>>58 string kivio Kivio document +>>>58 string kontour Kontour document +>>>58 string kpresenter KPresenter document +>>>58 string kspread KSpread document +>>>58 string kword KWord document + +# OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) +# (mimetype contains "application/vnd.sun.xml.") +# URL: https://en.wikipedia.org/wiki/OpenOffice.org_XML +# reference: http://fileformats.archiveteam.org/wiki/OpenOffice.org_XML +>>50 string vnd.sun.xml. OpenOffice.org 1.x +>>>62 string writer Writer +>>>>68 byte !0x2e document +!:mime application/vnd.sun.xml.writer +#!:ext sxw +>>>>68 string .template template +!:mime application/vnd.sun.xml.writer.template +#!:ext stw +>>>>68 string .web Web template +!:mime application/vnd.sun.xml.writer.web +#!:ext stw +>>>>68 string .global global document +!:mime application/vnd.sun.xml.writer.global +#!:ext sxg +>>>62 string calc Calc +>>>>66 byte !0x2e spreadsheet +!:mime application/vnd.sun.xml.calc +#!:ext sxc +>>>>66 string .template template +!:mime application/vnd.sun.xml.calc.template +#!:ext stc +>>>62 string draw Draw +>>>>66 byte !0x2e document +!:mime application/vnd.sun.xml.draw +#!:ext sxd +>>>>66 string .template template +!:mime application/vnd.sun.xml.draw.template +#!:ext std +>>>62 string impress Impress +>>>>69 byte !0x2e presentation +!:mime application/vnd.sun.xml.impress +#!:ext sxi +>>>>69 string .template template +!:mime application/vnd.sun.xml.impress.template +#!:ext sti +>>>62 string math Math document +!:mime application/vnd.sun.xml.math +#!:ext sxm +>>>62 string base Database file +!:mime application/vnd.sun.xml.base +#!:ext sdb + +# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) +# URL: http://fileformats.archiveteam.org/wiki/OpenDocument +# https://lists.oasis-open.org/archives/office/200505/msg00006.html +# (mimetype contains "application/vnd.oasis.opendocument.") +>>50 string vnd.oasis.opendocument. OpenDocument +>>>73 string text +>>>>77 byte !0x2d Text +!:mime application/vnd.oasis.opendocument.text +#!:ext odt +>>>>77 string -template Text Template +!:mime application/vnd.oasis.opendocument.text-template +#!:ext ott +>>>>77 string -web HTML Document Template +!:mime application/vnd.oasis.opendocument.text-web +#!:ext oth +>>>>77 string -master Master Document +!:mime application/vnd.oasis.opendocument.text-master +#!:ext odm +>>>73 string graphics +>>>>81 byte !0x2d Drawing +!:mime application/vnd.oasis.opendocument.graphics +#!:ext odg +>>>>81 string -template Drawing Template +!:mime application/vnd.oasis.opendocument.graphics-template +#!:ext otg +>>>73 string presentation +>>>>85 byte !0x2d Presentation +!:mime application/vnd.oasis.opendocument.presentation +#!:ext odp +>>>>85 string -template Presentation Template +!:mime application/vnd.oasis.opendocument.presentation-template +#!:ext otp +>>>73 string spreadsheet +>>>>84 byte !0x2d Spreadsheet +!:mime application/vnd.oasis.opendocument.spreadsheet +#!:ext ods +>>>>84 string -template Spreadsheet Template +!:mime application/vnd.oasis.opendocument.spreadsheet-template +#!:ext ots +>>>73 string chart +>>>>78 byte !0x2d Chart +!:mime application/vnd.oasis.opendocument.chart +#!:ext odc +>>>>78 string -template Chart Template +!:mime application/vnd.oasis.opendocument.chart-template +#!:ext otc +>>>73 string formula +>>>>80 byte !0x2d Formula +!:mime application/vnd.oasis.opendocument.formula +#!:ext odf +>>>>80 string -template Formula Template +!:mime application/vnd.oasis.opendocument.formula-template +#!:ext otf +# https://www.loc.gov/preservation/digital/formats/fdd/fdd000441.shtml +>>>73 string database Database +!:mime application/vnd.oasis.opendocument.database +#!:ext odb +# Valid for LibreOffice Base 6.0.1.1 at least +>>>73 string base Database +# https://bugs.documentfoundation.org/show_bug.cgi?id=45854 +!:mime application/vnd.oasis.opendocument.database +#!:mime application/vnd.oasis.opendocument.base +#!:ext odb +>>>73 string image +>>>>78 byte !0x2d Image +!:mime application/vnd.oasis.opendocument.image +#!:ext odi +>>>>78 string -template Image Template +!:mime application/vnd.oasis.opendocument.image-template +#!:ext oti + +# EPUB (OEBPS) books using OCF (OEBPS Container Format) +# https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. +# From: Ralf Brown +>>50 string epub+zip EPUB document +!:mime application/epub+zip + +# From: Joerg Jenderek +# URL: http://en.wikipedia.org/wiki/CorelDRAW +# NOTE: version; til 2 WL-based; from 3 til 13 by ./riff; from 14 zip based +>>50 string x-vnd.corel. Corel +>>>62 string draw.document+zip Draw drawing, version 14-16 +!:mime application/x-vnd.corel.draw.document+zip +#!:ext cdr +>>>62 string draw.template+zip Draw template, version 14-16 +!:mime application/x-vnd.corel.draw.template+zip +#!:ext cdrt +>>>62 string zcf.draw.document+zip Draw drawing, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.document+zip +#!:ext cdr +>>>62 string zcf.draw.template+zip Draw template, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.template+zip +#!:ext cdt/cdrt +# URL: http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html +>>>62 string zcf.pattern+zip Draw pattern, version 22 +!:mime application/x-vnd.corel.zcf.pattern+zip +#!:ext pat +# URL: https://en.wikipedia.org/wiki/Corel_Designer +# Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer +# Note: called by TrID "Corel DESIGN graphics" +>>>62 string designer.document+zip DESIGNER graphics, version 14-16 +!:mime application/x-vnd.corel.designer.document+zip +#!:ext des +>>>62 string zcf.designer.document+zip DESIGNER graphics, version 17-21 +!:mime application/x-vnd.corel.zcf.designer.document+zip +#!:ext des +# URL: http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/ +# CorelDRAW-Corel-Symbol-Library-CSL.html +>>>62 string symbol.library+zip Symbol Library, version 6-16.3 +!:mime application/x-vnd.corel.symbol.library+zip +#!:ext csl +>>>62 string zcf.symbol.library+zip Symbol Library, version 17-22 +!:mime application/x-vnd.corel.zcf.symbol.library+zip +#!:ext csl + +# Catch other ZIP-with-mimetype formats +# In a ZIP file, the bytes immediately after a member's contents are +# always "PK". The 2 regex rules here print the "mimetype" member's +# contents up to the first 'P'. Luckily, most MIME types don't contain +# any capital 'P's. This is a kludge. +# (mimetype contains "application/") +>>50 default x Zip data +>>>38 regex [!-OQ-~]+ (MIME type "%s"?) +!:mime application/zip +# (mimetype contents other than "application/*") +>26 string \x8\0\0\0mimetype +>>38 string !application/ +>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?) +!:mime application/zip + +# Java Jar files +>(26.s+30) leshort 0xcafe Java archive data (JAR) +!:mime application/java-archive + +# iOS App +>(26.s+30) leshort !0xcafe +>>26 string !\x8\0\0\0mimetype +>>>30 string Payload/ +>>>>38 search/64 .app/ iOS App +!:mime application/x-ios-app + +>30 search/100/b application/epub+zip EPUB document +!:mime application/epub+zip + +# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) +# Next line excludes specialized formats: +>(26.s+30) leshort !0xcafe +>>30 search/100/b !application/epub+zip +>>>26 string !\x8\0\0\0mimetype Zip archive data +!:mime application/zip +>>>>4 beshort x \b, at least +>>>>4 beshort x to extract +>>>>8 beshort x \b, compression method= +>>>>0x161 string WINZIP \b, WinZIP self-extracting + +# StarView Metafile +# From Pierre Ducroquet +0 string VCLMTF StarView MetaFile +>6 beshort x \b, version %d +>8 belong x \b, size %d + +# Zoo archiver +20 lelong 0xfdc4a7dc Zoo archive data +!:mime application/x-zoo +>4 byte >48 \b, v%c. +>>6 byte >47 \b%c +>>>7 byte >47 \b%c +>32 byte >0 \b, modify: v%d +>>33 byte x \b.%d+ +>42 lelong 0xfdc4a7dc \b, +>>70 byte >0 extract: v%d +>>>71 byte x \b.%d+ + +# Shell archives +10 string #\ This\ is\ a\ shell\ archive shell archive text +!:mime application/octet-stream + +# +# LBR. NB: May conflict with the questionable +# "binary Computer Graphics Metafile" format. +# +0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data +# +# From Rafael Laboissiere +# The Project Revision Control System (see +# http://prcs.sourceforge.net) generates a packaged project +# file which is recognized by the following entry: +0 leshort 0xeb81 PRCS packaged project + +# Microsoft cabinets +# by David Necas (Yeti) +#0 string MSCF\0\0\0\0 Microsoft cabinet file data, +#>25 byte x v%d +#>24 byte x \b.%d +# MPi: All CABs have version 1.3, so this is pointless. +# Better magic in debian-additions. + +# GTKtalog catalogs +# by David Necas (Yeti) +4 string gtktalog\ GTKtalog catalog data, +>13 string 3 version 3 +>>14 beshort 0x677a (gzipped) +>>14 beshort !0x677a (not gzipped) +>13 string >3 version %s + +############################################################################ +# Parity archive reconstruction file, the 'par' file format now used on Usenet. +0 string PAR\0 PARity archive data +>48 leshort =0 - Index file +>48 leshort >0 - file number %d + +# Felix von Leitner +0 string d8:announce BitTorrent file +!:mime application/x-bittorrent +# Durval Menezes, +0 string d13:announce-list BitTorrent file +!:mime application/x-bittorrent +0 string d7:comment BitTorrent file +!:mime application/x-bittorrent +0 string d4:info BitTorrent file +!:mime application/x-bittorrent + +# Atari MSA archive - Teemu Hukkanen +0 beshort 0x0e0f Atari MSA archive data +>2 beshort x \b, %d sectors per track +>4 beshort 0 \b, 1 sided +>4 beshort 1 \b, 2 sided +>6 beshort x \b, starting track: %d +>8 beshort x \b, ending track: %d + +# Alternate ZIP string (amc@arwen.cs.berkeley.edu) +0 string PK00PK\003\004 Zip archive data +!:mime application/zip +#!:ext zip/cbz + +# ACE archive (from http://www.wotsit.org/download.asp?f=ace) +# by Stefan `Sec` Zehl +7 string **ACE** ACE archive data +>15 byte >0 version %d +>16 byte =0x00 \b, from MS-DOS +>16 byte =0x01 \b, from OS/2 +>16 byte =0x02 \b, from Win/32 +>16 byte =0x03 \b, from Unix +>16 byte =0x04 \b, from MacOS +>16 byte =0x05 \b, from WinNT +>16 byte =0x06 \b, from Primos +>16 byte =0x07 \b, from AppleGS +>16 byte =0x08 \b, from Atari +>16 byte =0x09 \b, from Vax/VMS +>16 byte =0x0A \b, from Amiga +>16 byte =0x0B \b, from Next +>14 byte x \b, version %d to extract +>5 leshort &0x0080 \b, multiple volumes, +>>17 byte x \b (part %d), +>5 leshort &0x0002 \b, contains comment +>5 leshort &0x0200 \b, sfx +>5 leshort &0x0400 \b, small dictionary +>5 leshort &0x0800 \b, multi-volume +>5 leshort &0x1000 \b, contains AV-String +>>30 string \x16*UNREGISTERED\x20VERSION* (unregistered) +>5 leshort &0x2000 \b, with recovery record +>5 leshort &0x4000 \b, locked +>5 leshort &0x8000 \b, solid +# Date in MS-DOS format (whatever that is) +#>18 lelong x Created on + +# sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann +# +0x1A string sfArk sfArk compressed Soundfont +>0x15 string 2 +>>0x1 string >\0 Version %s +>>0x2A string >\0 : %s + +# DR-DOS 7.03 Packed File *.??_ +# Reference: http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm +# Note: unpacked by PNUNPACK.EXE +0 string Packed\ File\ +# by looking for Control-Z skip ASCII text starting with Packed File +>0x18 ubyte 0x1a Personal NetWare Packed File +!:mime application/x-novell-compress +#!:ext ??_ +>>12 string x \b, was "%.12s" +# 1 or 2 +#>>0x19 ubyte x \b, at 0x19 %u +>>0x1b ulelong x with %u bytes + +# EET archive +# From: Tilman Sauerbeck +0 belong 0x1ee7ff00 EET archive +!:mime application/x-eet + +# rzip archives +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +# From: Joerg Jenderek +# URL: https://help.foxitsoftware.com/kb/install-fzip-file.php +# reference: http://mark0.net/download/triddefs_xml.7z/ +# defs/f/fzip.trid.xml +# Note: unknown compression; No "PK" zip magic; normally in directory like +# "%APPDATA%\Foxit Software\Addon\Foxit Reader\Install" +0 ubequad 0x2506781901010000 Foxit add-on/update +!:mime application/x-fzip +#!:ext fzip + +# From: "Robert Dale" +0 belong 123 dar archive, +>4 belong x label "%.8x +>>8 belong x %.8x +>>>12 beshort x %.4x" +>14 byte 0x54 end slice +>14 beshort 0x4e4e multi-part +>14 beshort 0x4e53 multi-part, with -S + +# Symbian installation files +# https://www.thouky.co.uk/software/psifs/sis.html +# http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf +8 lelong 0x10000419 Symbian installation file +!:mime application/vnd.symbian.install +>4 lelong 0x1000006D (EPOC release 3/4/5) +>4 lelong 0x10003A12 (EPOC release 6) +0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x) +!:mime x-epoc/x-sisx-app + +# From "Nelson A. de Oliveira" +0 string MPQ\032 MoPaQ (MPQ) archive + +# From: "Nelson A. de Oliveira" +# .kgb +0 string KGB_arch KGB Archiver file +>10 string x with compression level %.1s + +# Type: Parity Archive +# From: Daniel van Eeden +0 string PAR2 Parity Archive Volume Set + +# Bacula volume format. (Volumes always start with a block header.) +# URL: https://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html +# From: Adam Buchbinder +12 string BB02 Bacula volume +>20 bedate x \b, started %s + +# ePub is XHTML + XML inside a ZIP archive. The first member of the +# archive must be an uncompressed file called 'mimetype' with contents +# 'application/epub+zip' + + +# From: "Michael Gorny" +# ZPAQ: http://mattmahoney.net/dc/zpaq.html +0 string zPQ ZPAQ stream +>3 byte x \b, level %d +# From: Barry Carter +# https://encode.ru/threads/456-zpaq-updates/page32 +0 string 7kSt ZPAQ file + +# BBeB ebook, unencrypted (LRF format) +# URL: https://www.sven.de/librie/Librie/LrfFormat +# From: Adam Buchbinder +0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted +>8 beshort x \b, version %d +>36 byte 1 \b, front-to-back +>36 byte 16 \b, back-to-front +>42 beshort x \b, (%dx, +>44 beshort x %d) + +# Symantec GHOST image by Joerg Jenderek at May 2014 +# https://us.norton.com/ghost/ +# https://www.garykessler.net/library/file_sigs.html +0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image +# *.GHO +>2 ubyte&0x08 0x00 \b, first file +# *.GHS or *.[0-9] with cns program option +>2 ubyte&0x08 0x08 \b, split file +# part of split index interesting for *.ghs +>>4 ubyte x id=0x%x +# compression tag minus one equals numeric compression command line switch z[1-9] +>3 ubyte 0 \b, no compression +>3 ubyte 2 \b, fast compression (Z1) +>3 ubyte 3 \b, medium compression (Z2) +>3 ubyte >3 +>>3 ubyte <11 \b, compression (Z%d-1) +>2 ubyte&0x08 0x00 +# ~ 30 byte password field only for *.gho +>>12 ubequad !0 \b, password protected +>>44 ubyte !1 +# 1~Image All, sector-by-sector only for *.gho +>>>10 ubyte 1 \b, sector copy +# 1~Image Boot track only for *.gho +>>>43 ubyte 1 \b, boot track +# 1~Image Disc only for *.gho implies Image Boot track and sector copy +>>44 ubyte 1 \b, disc sector copy +# optional image description only *.gho +>>0xff string >\0 "%-.254s" +# look for DOS sector end sequence +>0xE08 search/7776 \x55\xAA +>>&-512 indirect x \b; contains + +# Google Chrome extensions +# https://developer.chrome.com/extensions/crx +# https://developer.chrome.com/extensions/hosting +0 string Cr24 Google Chrome extension +!:mime application/x-chrome-extension +>4 ulong x \b, version %u + +# SeqBox - Sequenced container +# ext: sbx, seqbox +# Marco Pontello marcopon@gmail.com +# reference: https://github.com/MarcoPon/SeqBox +0 string SBx SeqBox, +>3 byte x version %d + +# LyNX archive +56 string USE\040LYNX\040TO\040DISSOLVE\040THIS\040FILE LyNX archive + +# From: Joerg Jenderek +# URL: https://www.acronis.com/ +# Reference: https://en.wikipedia.org/wiki/TIB_(file_format) +# Note: only tested with True Image 2013 Build 5962 and 2019 Build 14110 +0 ubequad 0xce24b9a220000000 Acronis True Image backup +!:mime application/x-acronis-tib +#!:ext tib +# 01000000 +#>20 ubelong x \b, at 20 0x%x +# 20000000 +#>28 ubelong x \b, at 28 0x%x +# strings like "Generic- SD/MMC 1.00" "Unknown Disk" "Msft Virtual Disk 1.0" +# ??? +# strings like "\Device\0000011e" "\Device\0000015a" +#>0 search/0x6852300/cs \\Device\\ +#>>&-1 pstring x \b, %s +# "\Device\HarddiskVolume30" "\Device\HarddiskVolume39" +#>>>&1 search/180/cs \\Device\\ +#>>>>&-1 pstring x \b, %s +#>>>>>&0 search/29/cs \0\0\xc8\0 +# disk label +#>>>>>>&10 lestring16 x \b, disk label %11.11s +#>>>>>>&9 plestring16 x \b, disk label "%11.11s" +#>>>>>>&10 ubequad x %16.16llx + + +# Gentoo XPAK binary package +# by Michal Gorny +# https://gitweb.gentoo.org/proj/portage.git/tree/man/xpak.5 +-4 string STOP +>-16 string XPAKSTOP Gentoo binary package (XPAK) + +# From: Joerg Jenderek +# URL: https://kodi.wiki/view/TexturePacker +# Reference: https://mirrors.kodi.tv/releases/source/17.3-Krypton.tar.gz +# /xbmc-Krypton/xbmc/guilib/XBTF.h +# /xbmc-Krypton/xbmc/guilib/XBTF.cpp +0 string XBTF +# skip ASCII text by looking for terminating \0 of path +>264 ubyte 0 XBMC texture package +!:mime application/x-xbmc-xbt +#!:ext xbt +# XBTF_VERSION 2 +>>4 string !2 \b, version %-.1s +# nofFiles /xbmc-Krypton/xbmc/guilib/XBTFReader.cpp +>>5 ulelong x \b, %u file +# plural s +>>5 ulelong >1 \bs +# path[CXBTFFile[MaximumPathLength=256] +>>9 string x \b, 1st %s + +# ALZIP archive +# by Hyungjun Park , Hajin Jang +# http://kippler.com/win/unalz/ +# https://salsa.debian.org/l10n-korean-team/unalz +0 string ALZ\001 ALZ archive data +#!:ext alz + +# https://cf-aldn.altools.co.kr/setup/EGG_Specification.zip +0 string EGGA EGG archive data, +#!:ext egg +>5 byte x version %u +>4 byte x \b.%u +>>0x0E ulelong =0x08E28222 +>>0x0E ulelong =0x24F5A262 \b, split +>>0x0E ulelong =0x24E5A060 \b, solid +>>0x0E default x \b, unknown + +# PAQ9A archive +# URL: http://mattmahoney.net/dc/#paq9a +# Note: Line 1186 of paq9a.cpp gives the magic bytes +0 string pQ9\001 PAQ9A archive + +#------------------------------------------------------------------------------ +# $File: compress,v 1.80 2021/03/15 17:49:24 christos Exp $ +# compress: file(1) magic for pure-compression formats (no archives) +# +# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. +# +# Formats for various forms of compressed data +# Formats for "compress" proper have been moved into "compress.c", +# because it tries to uncompress it to figure out what's inside. + +# standard unix compress +0 string \037\235 compress'd data +!:mime application/x-compress +!:apple LZIVZIVU +>2 byte&0x80 >0 block compressed +>2 byte&0x1f x %d bits + +# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver) +# URL: https://en.wikipedia.org/wiki/Gzip +# Reference: https://tools.ietf.org/html/rfc1952 +# Update: Joerg Jenderek, Apr 2019 +# Edited by Chris Chittleborough , March 2002 +# * Original filename is only at offset 10 if "extra field" absent +# * Produce shorter output - notably, only report compression methods +# other than 8 ("deflate", the only method defined in RFC 1952). +# Note: find defs -iname '*.trid.xml' -exec grep -q '1F8B08' {} \; -ls +# TODO: +# FBR Blueberry FlashBack screen Record https://www.flashbackrecorder.com/ +# KPR KOffice/Calligra KPresenter application/x-kpresenter +# KPT KOffice/Calligra KPresenter template? application/x-kpresenter +# SAV Diggles Saved Game File http://www.innonics.com +# SAV FarCry (demo) saved game http://www.farcry-thegame.com +# DAT ZOAGZIP game data format http://en.wikipedia.org/wiki/SD_Gundam_Capsule_Fighter +0 string \037\213 +# to display gzip compressed (strength=100=2*50) before other (strength=50)? +#!:strength * 2 +# no FNAME and FCOMMENT bit implies no file name/comment. That means only binary +>3 byte&0x18 =0 +# For binary gzipped no ASCII text should occur +# mcd-monu-cad.trid.xml +>>10 string MCD Monu-Cad Drawing, Component or Font +#>>36 string Created\ with\ MONU-CAD +#!:mime application/octet-stream +# http://fileformats.archiveteam.org/wiki/Monu-CAD +# http://www.monucad.com/downloads/FullDemo-2005.EXE +# /HANDS96.MCC Component +# /DEMO_DD01.MCD Drawing +# /MCALF020.FNT Font +#!:ext mcc/mcd/fnt +# http://www.generalcadd.com +>>10 string GXD General CADD, Drawing or Component +#!:mime application/octet-stream +# /gxc/BUILDINGEDGE.gxc Component +# /gxd/HOCKETT-STPAUL-WRHSE.gxd Drawing +# /gxd/POWERLAND-MILL-ADD-11.gxd Drawing v9.1.06 +#!:ext gxc/gxd +#>>>13 ubyte 0 \b, version 0 +>>>13 string 09 \b, version 9 +# other gzipped binary like gzipped tar, VirtualBox extension package,... +>>10 default x gzip compressed data +!:mime application/gzip +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# gzipped TAR or VirtualBox extension package +#!:mime application/x-compressed-tar +#!:mime application/x-virtualbox-vbox-extpack +# https://www.w3.org/TR/SVG/mimereg.html +#!:mime image/image/svg+xml-compressed +# zlib.3.gz +# microcode-20180312.tgz +# tpz same as tgz +# lua-md5_1.2-1_i386_i486.ipk https://en.wikipedia.org/wiki/Opkg +# Oracle_VM_VirtualBox_Extension_Pack-5.0.12-104815.vbox-extpack +#!:ext gz/tgz/tpz/ipk/vbox-extpack/svgz +# FNAME/FCOMMENT bit implies file name/comment as iso-8859-1 text +>3 byte&0x18 >0 gzip compressed data +!:mime application/gzip +# gzipped tar, gzipped Abiword document +#!:mime application/x-compressed-tar +#!:mime application/x-abiword-compressed +#!:mime image/image/svg+xml-compressed +# kleopatra_splashscreen.svgz gzipped .svg +#!:ext gz/tgz/tpz/zabw/svgz +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# display information of gzip compressed files +#>2 byte x THIS iS GZIP +>2 byte <8 \b, reserved method +>2 byte >8 \b, unknown method +>3 byte &0x01 \b, ASCII +>3 byte &0x02 \b, has CRC +>3 byte &0x04 \b, extra field +>3 byte&0xC =0x08 +>>10 string x \b, was "%s" +>3 byte &0x10 \b, has comment +>3 byte &0x20 \b, encrypted +>4 ledate >0 \b, last modified: %s +>8 byte 2 \b, max compression +>8 byte 4 \b, max speed +>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT) +>9 byte =0x01 \b, from Amiga +>9 byte =0x02 \b, from VMS +>9 byte =0x03 \b, from Unix +>9 byte =0x04 \b, from VM/CMS +>9 byte =0x05 \b, from Atari +>9 byte =0x06 \b, from HPFS filesystem (OS/2, NT) +>9 byte =0x07 \b, from MacOS +>9 byte =0x08 \b, from Z-System +>9 byte =0x09 \b, from CP/M +>9 byte =0x0A \b, from TOPS/20 +>9 byte =0x0B \b, from NTFS filesystem (NT) +>9 byte =0x0C \b, from QDOS +>9 byte =0x0D \b, from Acorn RISCOS +# size of the original (uncompressed) input data modulo 2^32 +#>-4 ulelong x \b, original size modulo 2^32 %u +#ERROR: line 114: non zero offset 1048572 at level 1 + +# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis +0 string \037\036 packed data +!:mime application/octet-stream +>2 belong >1 \b, %d characters originally +>2 belong =1 \b, %d character originally +# +# This magic number is byte-order-independent. +0 short 0x1f1f old packed data +!:mime application/octet-stream + +# XXX - why *two* entries for "compacted data", one of which is +# byte-order independent, and one of which is byte-order dependent? +# +0 short 0x1fff compacted data +!:mime application/octet-stream +# This string is valid for SunOS (BE) and a matching "short" is listed +# in the Ultrix (LE) magic file. +0 string \377\037 compacted data +!:mime application/octet-stream +0 short 0145405 huf output +!:mime application/octet-stream + +# bzip2 +0 string BZh bzip2 compressed data +!:mime application/x-bzip2 +>3 byte >47 \b, block size = %c00k + +# bzip a block-sorting file compressor +# by Julian Seward and others +0 string BZ0 bzip compressed data +!:mime application/x-bzip +>3 byte >47 \b, block size = %c00k + +# lzip +0 string LZIP lzip compressed data +!:mime application/x-lzip +>4 byte x \b, version: %d + +# squeeze and crunch +# Michael Haardt +0 beshort 0x76FF squeezed data, +>4 string x original name %s +0 beshort 0x76FE crunched data, +>2 string x original name %s +0 beshort 0x76FD LZH compressed data, +>2 string x original name %s + +# Freeze +0 string \037\237 frozen file 2.1 +0 string \037\236 frozen file 1.0 (or gzip 0.5) + +# SCO compress -H (LZH) +0 string \037\240 SCO compress -H (LZH) data + +# European GSM 06.10 is a provisional standard for full-rate speech +# transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse +# excitation/long term prediction) coding at 13 kbit/s. +# +# There's only a magic nibble (4 bits); that nibble repeats every 33 +# bytes. This isn't suited for use, but maybe we can use it someday. +# +# This will cause very short GSM files to be declared as data and +# mismatches to be declared as data too! +#0 byte&0xF0 0xd0 data +#>33 byte&0xF0 0xd0 +#>66 byte&0xF0 0xd0 +#>99 byte&0xF0 0xd0 +#>132 byte&0xF0 0xd0 GSM 06.10 compressed audio + +# lzop from +0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data +>9 beshort <0x0940 +>>9 byte&0xf0 =0x00 - version 0. +>>9 beshort&0x0fff x \b%03x, +>>13 byte 1 LZO1X-1, +>>13 byte 2 LZO1X-1(15), +>>13 byte 3 LZO1X-999, +## >>22 bedate >0 last modified: %s, +>>14 byte =0x00 os: MS-DOS +>>14 byte =0x01 os: Amiga +>>14 byte =0x02 os: VMS +>>14 byte =0x03 os: Unix +>>14 byte =0x05 os: Atari +>>14 byte =0x06 os: OS/2 +>>14 byte =0x07 os: MacOS +>>14 byte =0x0A os: Tops/20 +>>14 byte =0x0B os: WinNT +>>14 byte =0x0E os: Win32 +>9 beshort >0x0939 +>>9 byte&0xf0 =0x00 - version 0. +>>9 byte&0xf0 =0x10 - version 1. +>>9 byte&0xf0 =0x20 - version 2. +>>9 beshort&0x0fff x \b%03x, +>>15 byte 1 LZO1X-1, +>>15 byte 2 LZO1X-1(15), +>>15 byte 3 LZO1X-999, +## >>25 bedate >0 last modified: %s, +>>17 byte =0x00 os: MS-DOS +>>17 byte =0x01 os: Amiga +>>17 byte =0x02 os: VMS +>>17 byte =0x03 os: Unix +>>17 byte =0x05 os: Atari +>>17 byte =0x06 os: OS/2 +>>17 byte =0x07 os: MacOS +>>17 byte =0x0A os: Tops/20 +>>17 byte =0x0B os: WinNT +>>17 byte =0x0E os: Win32 + +# 4.3BSD-Quasijarus Strong Compression +# https://minnie.tuhs.org/Quasijarus/compress.html +0 string \037\241 Quasijarus strong compressed data + +# From: Cory Dikkers +0 string XPKF Amiga xpkf.library compressed data +0 string PP11 Power Packer 1.1 compressed data +0 string PP20 Power Packer 2.0 compressed data, +>4 belong 0x09090909 fast compression +>4 belong 0x090A0A0A mediocre compression +>4 belong 0x090A0B0B good compression +>4 belong 0x090A0C0C very good compression +>4 belong 0x090A0C0D best compression + +# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at) +# https://www.7-zip.org or DOC/7zFormat.txt +# +0 string 7z\274\257\047\034 7-zip archive data, +>6 byte x version %d +>7 byte x \b.%d +!:mime application/x-7z-compressed +#!:ext 7z/cb7 + +# Type: LZMA +0 lelong&0xffffff =0x5d +>12 leshort 0xff lzma compressed data, +!:mime application/x-lzma +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld +>12 leshort 0 lzma compressed data, +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld + +# http://tukaani.org/xz/xz-file-format.txt +0 ustring \xFD7zXZ\x00 xz compressed data, checksum +>7 byte&0xf 0x0 NONE +>7 byte&0xf 0x1 CRC32 +>7 byte&0xf 0x4 CRC64 +>7 byte&0xf 0xa SHA-256 + +!:strength * 2 +!:mime application/x-xz + +# https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt +0 string LRZI LRZIP compressed data +>4 byte x - version %d +>5 byte x \b.%d +!:mime application/x-lrzip + +# https://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html +0 lelong 0x184d2204 lz4 compressed data (v1.4+) +!:mime application/x-lz4 +# Added by osm0sis@xda-developers.com +0 lelong 0x184c2103 lz4 compressed data (v1.0-v1.3) +!:mime application/x-lz4 +0 lelong 0x184c2102 lz4-l compressed data (v0.1-v0.9) +!:mime application/x-lz4 + +# Zstandard/LZ4 skippable frames +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong&0xFFFFFFF0 0x184D2A50 +>(4.l+8) indirect x + +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong 0xEC30A437 Zstandard dictionary +!:mime application/x-std-dictionary +>4 lelong x (ID %u) + +# AFX compressed files (Wolfram Kleff) +2 string -afx- AFX compressed file data + +# Supplementary magic data for the file(1) command to support +# rzip(1). The format is described in magic(5). +# +# Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with +# this file. +# +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +0 string ArC\x01 FreeArc archive + +# Type: DACT compressed files +0 long 0x444354C3 DACT compressed data +>4 byte >-1 (version %i. +>5 byte >-1 %i. +>6 byte >-1 %i) +>7 long >0 , original size: %i bytes +>15 long >30 , block size: %i bytes + +# Valve Pack (VPK) files +0 lelong 0x55aa1234 Valve Pak file +>0x4 lelong x \b, version %u +>0x8 lelong x \b, %u entries + +# Snappy framing format +# https://code.google.com/p/snappy/source/browse/trunk/framing_format.txt +0 string \377\006\0\0sNaPpY snappy framed data +!:mime application/x-snappy-framed + +# qpress, https://www.quicklz.com/ +0 string qpress10 qpress compressed data +!:mime application/x-qpress + +# Zlib https://www.ietf.org/rfc/rfc6713.txt +0 string/b x +>0 beshort%31 =0 +>>0 byte&0xf =8 +>>>0 byte&0x80 =0 zlib compressed data +!:mime application/zlib + +# BWC compression +0 string BWC +>3 byte 0 BWC compressed data + +# UCL compression +0 bequad 0x00e955434cff011a UCL compressed data + +# Softlib archive +0 string SLIB Softlib archive +>4 leshort x \b, version %d +>6 leshort x (contains %d files) + +# URL: https://github.com/lzfse/lzfse/blob/master/src/lzfse_internal.h#L276 +# From: Eric Hall +0 string bvx- lzfse encoded, no compression +0 string bvx1 lzfse compressed, uncompressed tables +0 string bvx2 lzfse compressed, compressed tables +0 string bvxn lzfse encoded, lzvn compressed + +# pcxLib.exe compression program +# http://www.shikadi.net/moddingwiki/PCX_Library +0 string/b pcxLib + +#------------------------------------------------------------ +# $File: android,v 1.18 2021/02/23 00:51:10 christos Exp $ +# Various android related magic entries +#------------------------------------------------------------ + +# Dalvik .dex format. http://retrodev.com/android/dexformat.html +# From "Mike Fleming" +# Fixed to avoid regexec 17 errors on some dex files +# From "Tim Strazzere" +0 string dex\n +>0 regex dex\n[0-9]{2}\0 Dalvik dex file +>4 string >000 version %s +0 string dey\n +>0 regex dey\n[0-9]{2}\0 Dalvik dex file (optimized for host) +>4 string >000 version %s + +# Android bootimg format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/mkbootimg/bootimg.h +# https://github.com/djrbliss/loki/blob/master/loki.h#L43 +0 string ANDROID! Android bootimg +>1024 string LOKI \b, LOKI'd +>>1028 lelong 0 \b (boot) +>>1028 lelong 1 \b (recovery) +>8 lelong >0 \b, kernel +>>12 lelong >0 \b (0x%x) +>16 lelong >0 \b, ramdisk +>>20 lelong >0 \b (0x%x) +>24 lelong >0 \b, second stage +>>28 lelong >0 \b (0x%x) +>36 lelong >0 \b, page size: %d +>38 string >0 \b, name: %s +>64 string >0 \b, cmdline (%s) + +# Android sparse img format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/libsparse/sparse_format.h +0 lelong 0xed26ff3a Android sparse image +>4 leshort x \b, version: %d +>6 leshort x \b.%d +>16 lelong x \b, Total of %d +>12 lelong x \b %d-byte output blocks in +>20 lelong x \b %d input chunks. + +# Android binary XML magic +# In include/androidfw/ResourceTypes.h: +# RES_XML_TYPE = 0x0003 followed by the size of the header (ResXMLTree_header), +# which is 8 bytes (2 bytes type + 2 bytes header size + 4 bytes size). +0 lelong 0x00080003 Android binary XML + +# Android cryptfs footer +# From https://android.googlesource.com/\ +# platform/system/vold/+/refs/heads/master/cryptfs.h +0 lelong 0xd0b5b1c4 Android cryptfs footer +>4 leshort x \b, version: %d +>6 leshort x \b.%d + +# Android Vdex format +# From https://android.googlesource.com/\ +# platform/art/+/master/runtime/vdex_file.h +0 string vdex Android vdex file, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d + +# Android Vdex format, dexfile is currently being updated +# by android system +# From https://android.googlesource.com/\ +# platform/art/+/master/dex2oat/dex2oat.cc +0 string wdex Android vdex file, being processed by dex2oat, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d diff --git a/Final_Zip/AIK/KSU/SHRP-R/cleanup.sh b/Final_Zip/AIK/KSU/SHRP-R/cleanup.sh new file mode 100755 index 0000000..d8f1d61 --- /dev/null +++ b/Final_Zip/AIK/KSU/SHRP-R/cleanup.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# AIK-Linux/cleanup: reset working directory +# osm0sis @ xda-developers + +case $1 in + --help) echo "usage: cleanup.sh [--local] [--quiet]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + statarg="-f %Su"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) statarg="-c %U";; +esac; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; + +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + sudo=sudo; +fi; + +$sudo rm -rf ramdisk split_img *new.* || exit 1; + +case $1 in + --quiet) ;; + *) echo "Working directory cleaned.";; +esac; +exit 0; + diff --git a/Final_Zip/AIK/KSU/SHRP-R/repackimg.sh b/Final_Zip/AIK/KSU/SHRP-R/repackimg.sh new file mode 100755 index 0000000..5709f0f --- /dev/null +++ b/Final_Zip/AIK/KSU/SHRP-R/repackimg.sh @@ -0,0 +1,413 @@ +#!/bin/bash +# AIK-Linux/repackimg: repack ramdisk and build image +# osm0sis @ xda-developers + +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: repackimg.sh [--local] [--original] [--origsize] [--level <0-9>] [--avbkey ] [--forceelf]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + + javaver=$(java -version 2>&1 | head -n1 | cut -d\" -f2); + javamaj=$(echo $javaver | cut -d. -f1); + javamin=$(echo $javaver | cut -d. -f2); + if [ "$javamaj" -lt 9 ] && [ "$javamaj" -eq 1 -a "$javamin" -lt 8 ]; then + java() { "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" "$@"; } + fi; + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; +chmod -R 755 "$bin" "$aik/"*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -z "$(ls split_img/* 2>/dev/null)" -o ! -e ramdisk ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +while [ "$1" ]; do + case $1 in + --original) original=1;; + --origsize) origsize=1;; + --forceelf) repackelf=1;; + --level) + case $2 in + ''|*[!0-9]*) ;; + *) level="-$2"; lvltxt=" - Level: $2"; shift;; + esac; + ;; + --avbkey) + if [ "$2" ]; then + for keytest in "$2" "$cur/$2" "$aik/$2"; do + if [ ! -z "$(ls $keytest.pk8 2>/dev/null)" -a ! -z "$(ls $keytest.x509.* 2>/dev/null)" ]; then + avbkey="$keytest"; avbtxt=" - Key: $2"; shift; break; + fi; + done; + fi; + ;; + esac; + shift; +done; + +ramdiskcomp=`cat split_img/*-*ramdiskcomp 2>/dev/null`; +if [ -z "$(ls ramdisk/* 2>/dev/null)" ] && [ ! "$ramdiskcomp" = "empty" -a ! "$original" ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - RepackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +if [ ! -z "$(ls *-new.* 2>/dev/null)" ]; then + echo "Warning: Overwriting existing files!"; + echo " "; +fi; +rm -f "*-new.*"; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" ]; then + sudo=sudo; sumsg=" (as root)"; +else + cpioarg="-R 0:0"; +fi; + +if [ "$original" ]; then + echo "Repacking with original ramdisk..."; +elif [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: Using empty ramdisk for repack!"; + compext=.empty; + touch ramdisk-new.cpio$compext; +else + echo "Packing ramdisk$sumsg..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + if [ -z "$level" ]; then + case $ramdiskcomp in + xz) level=-1;; + lz4*) level=-9;; + esac; + fi; + echo "Using compression: $ramdiskcomp$lvltxt"; + repackcmd="$ramdiskcomp $level"; + compext=$ramdiskcomp; + case $ramdiskcomp in + gzip) compext=gz;; + lzop) compext=lzo;; + xz) repackcmd="xz $level -Ccrc32";; + lzma) repackcmd="xz $level -Flzma";; + bzip2) compext=bz2;; + lz4) repackcmd="$bin/$arch/lz4 $level";; + lz4-l) repackcmd="$bin/$arch/lz4 $level -l"; compext=lz4;; + cpio) repackcmd="cat"; compext="";; + *) abort; exit 1;; + esac; + if [ "$compext" ]; then + compext=.$compext; + fi; + cd ramdisk; + $sudo find . | $sudo $cpio $cpioarg -H newc -o 2>/dev/null | $repackcmd > ../ramdisk-new.cpio$compext; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Getting build information..."; +cd split_img; +imgtype=`cat *-imgtype`; +case $imgtype in + KRNL) ;; + AOSP_VNDR) vendor=vendor_;; + *) + if [ -f *-kernel ]; then + kernel=`ls *-kernel`; echo "kernel = $kernel"; + kernel="split_img/$kernel"; + fi; + ;; +esac; +if [ "$original" ]; then + ramdisk=`ls *-*ramdisk.cpio*`; echo "${vendor}ramdisk = $ramdisk"; + ramdisk="split_img/$ramdisk"; +else + ramdisk="ramdisk-new.cpio$compext"; +fi; +case $imgtype in + KRNL) rsz=$(wc -c < ../"$ramdisk"); echo "ramdisk_size = $rsz";; + OSIP) echo "cmdline = $(cat *-*cmdline)";; + U-Boot) + name=`cat *-name`; echo "name = $name"; + uarch=`cat *-arch`; + os=`cat *-os`; + type=`cat *-type`; + comp=`cat *-comp`; echo "type = $uarch $os $type ($comp)"; + [ "$comp" = "uncompressed" ] && comp=none; + addr=`cat *-addr`; echo "load_addr = $addr"; + ep=`cat *-ep`; echo "entry_point = $ep"; + ;; + *) + if [ -f *-second ]; then + second=`ls *-second`; echo "second = $second"; + second=(--second "split_img/$second"); + fi; + if [ -f *-dtb ]; then + dtb=`ls *-dtb`; echo "dtb = $dtb"; + dtb=(--dtb "split_img/$dtb"); + fi; + if [ -f *-recovery_dtbo ]; then + recoverydtbo=`ls *-recovery_dtbo`; echo "recovery_dtbo = $recoverydtbo"; + recoverydtbo=(--recovery_dtbo "split_img/$recoverydtbo"); + fi; + if [ -f *-*cmdline ]; then + cmdname=`ls *-*cmdline`; + cmdline=`cat *-*cmdline`; echo "${vendor}cmdline = $cmdline"; + cmd=("split_img/$cmdname"@cmdline); + fi; + if [ -f *-board ]; then + board=`cat *-board`; echo "board = $board"; + fi; + if [ -f *-base ]; then + base=`cat *-base`; echo "base = $base"; + fi; + if [ -f *-pagesize ]; then + pagesize=`cat *-pagesize`; echo "pagesize = $pagesize"; + fi; + if [ -f *-kernel_offset ]; then + kerneloff=`cat *-kernel_offset`; echo "kernel_offset = $kerneloff"; + fi; + if [ -f *-ramdisk_offset ]; then + ramdiskoff=`cat *-ramdisk_offset`; echo "ramdisk_offset = $ramdiskoff"; + fi; + if [ -f *-second_offset ]; then + secondoff=`cat *-second_offset`; echo "second_offset = $secondoff"; + fi; + if [ -f *-tags_offset ]; then + tagsoff=`cat *-tags_offset`; echo "tags_offset = $tagsoff"; + fi; + if [ -f *-dtb_offset ]; then + dtboff=`cat *-dtb_offset`; echo "dtb_offset = $dtboff"; + fi; + if [ -f *-os_version ]; then + osver=`cat *-os_version`; echo "os_version = $osver"; + fi; + if [ -f *-os_patch_level ]; then + oslvl=`cat *-os_patch_level`; echo "os_patch_level = $oslvl"; + fi; + if [ -f *-header_version ]; then + hdrver=`cat *-header_version`; echo "header_version = $hdrver"; + fi; + if [ -f *-hashtype ]; then + hashtype=`cat *-hashtype`; echo "hashtype = $hashtype"; + hashtype="--hashtype $hashtype"; + fi; + if [ -f *-dt ]; then + dttype=`cat *-dttype`; + dt=`ls *-dt`; echo "dt = $dt"; + rpm=("split_img/$dt",rpm); + dt=(--dt "split_img/$dt"); + fi; + if [ -f *-unknown ]; then + unknown=`cat *-unknown`; echo "unknown = $unknown"; + fi; + if [ -f *-header ]; then + header=`ls *-header`; + header="split_img/$header"; + fi; + ;; +esac; +cd ..; + +if [ -f split_img/*-mtktype ]; then + mtktype=`cat split_img/*-mtktype`; + echo " "; + echo "Generating MTK headers..."; + echo " "; + echo "Using ramdisk type: $mtktype"; + "$bin/$arch/mkmtkhdr" --kernel "$kernel" --$mtktype "$ramdisk" >/dev/null; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + mv -f "$(basename "$kernel")-mtk" kernel-new.mtk; + mv -f "$(basename "$ramdisk")-mtk" $mtktype-new.mtk; + kernel=kernel-new.mtk; + ramdisk=$mtktype-new.mtk; +fi; + +if [ -f split_img/*-sigtype ]; then + outname=unsigned-new.img; +else + outname=image-new.img; +fi; + +[ "$dttype" = "ELF" ] && repackelf=1; +if [ "$imgtype" = "ELF" ] && [ ! "$header" -o ! "$repackelf" ]; then + imgtype=AOSP; + echo " "; + echo "Warning: ELF format without RPM detected; will be repacked using AOSP format!"; +fi; + +echo " "; +echo "Building image..."; +echo " "; +echo "Using format: $imgtype"; +echo " "; +case $imgtype in + AOSP_VNDR) "$bin/$arch/mkbootimg" --vendor_ramdisk "$ramdisk" "${dtb[@]}" --vendor_cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --tags_offset $tagsoff --dtb_offset $dtboff --os_version "$osver" --os_patch_level "$oslvl" --header_version $hdrver --vendor_boot $outname;; + AOSP) "$bin/$arch/mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" "${dtb[@]}" "${recoverydtbo[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --dtb_offset "$dtboff" --os_version "$osver" --os_patch_level "$oslvl" --header_version "$hdrver" $hashtype "${dt[@]}" -o $outname;; + AOSP-PXA) "$bin/$arch/pxa-mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --unknown $unknown "${dt[@]}" -o $outname;; + ELF) "$bin/$arch/elftool" pack -o $outname header="$header" "$kernel" "$ramdisk",ramdisk "${rpm[@]}" "${cmd[@]}" >/dev/null;; + KRNL) "$bin/$arch/rkcrc" -k "$ramdisk" $outname;; + OSIP) + mkdir split_img/.temp 2>/dev/null; + for i in bootstub cmdline.txt hdr kernel parameter sig; do + cp -f split_img/*-*$(basename $i .txt | sed -e 's/hdr/header/') split_img/.temp/$i 2>/dev/null; + done; + cp -f "$ramdisk" split_img/.temp/ramdisk.cpio.gz; + "$bin/$arch/mboot" -d split_img/.temp -f $outname; + ;; + U-Boot) + part0="$kernel"; + case $type in + Multi) part1=(:"$ramdisk");; + RAMDisk) part0="$ramdisk";; + esac; + "$bin/$arch/mkimage" -A $uarch -O $os -T $type -C $comp -a $addr -e $ep -n "$name" -d "$part0""${part1[@]}" $outname >/dev/null; + ;; + *) echo " "; echo "Unsupported format."; abort; exit 1;; +esac; +if [ ! $? -eq "0" ]; then + abort; + exit 1; +fi; + +rm -rf split_img/.temp; + +if [ -f split_img/*-sigtype ]; then + sigtype=`cat split_img/*-sigtype`; + if [ -f split_img/*-avbtype ]; then + avbtype=`cat split_img/*-avbtype`; + fi; + if [ -f split_img/*-blobtype ]; then + blobtype=`cat split_img/*-blobtype`; + fi; + echo "Signing new image..."; + echo " "; + echo "Using signature: $sigtype $avbtype$avbtxt$blobtype"; + [ ! "$avbkey" ] && avbkey="$bin/avb/verity"; + echo " "; + case $sigtype in + AVBv1) java -jar "$bin/boot_signer.jar" /$avbtype unsigned-new.img "$avbkey.pk8" "$avbkey.x509."* image-new.img 2>/dev/null;; + BLOB) + awk 'BEGIN { printf "-SIGNED-BY-SIGNBLOB-\00\00\00\00\00\00\00\00" }' > image-new.img; + "$bin/$arch/blobpack" blob.tmp $blobtype unsigned-new.img >/dev/null; + cat blob.tmp >> image-new.img; + rm -f blob.tmp; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --pack image-new.img --keyblock "$bin/chromeos/kernel.keyblock" --signprivate "$bin/chromeos/kernel_data_key.vbprivk" --version 1 --vmlinuz unsigned-new.img --bootloader "$bin/chromeos/empty" --config "$bin/chromeos/empty" --arch arm --flags 0x1;; + DHTB) + "$bin/$arch/dhtbsign" -i unsigned-new.img -o image-new.img >/dev/null; + rm -f split_img/*-tailtype 2>/dev/null; + ;; + NOOK*) cat split_img/*-master_boot.key unsigned-new.img > image-new.img;; + esac; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; +fi; + +if [ -f split_img/*-lokitype ]; then + lokitype=`cat split_img/*-lokitype`; + echo "Loki patching new image..."; + echo " "; + echo "Using type: $lokitype"; + echo " "; + mv -f image-new.img unlokied-new.img; + if [ -f aboot.img ]; then + "$bin/$arch/loki_tool" patch $lokitype aboot.img unlokied-new.img image-new.img >/dev/null; + if [ ! $? -eq "0" ]; then + echo "Patching failed."; + abort; + exit 1; + fi; + else + echo "Device aboot.img required in script directory to find Loki patch offset."; + abort; + exit 1; + fi; +elif [ -f split_img/*-microloader.bin ]; then + echo "Amonet patching new image..."; + echo " "; + cp -f image-new.img unamonet-new.img; + cp -f split_img/*-microloader.bin microloader.tmp; + dd bs=1024 count=1 conv=notrunc if=unamonet-new.img of=head.tmp 2>/dev/null; + dd bs=1024 seek=1 conv=notrunc if=head.tmp of=image-new.img 2>/dev/null; + dd conv=notrunc if=microloader.tmp of=image-new.img 2>/dev/null; + rm -f head.tmp microloader.tmp; +fi; + +if [ -f split_img/*-tailtype ]; then + tailtype=`cat split_img/*-tailtype`; + echo "Appending footer..."; + echo " "; + echo "Using type: $tailtype"; + echo " "; + case $tailtype in + Bump) awk 'BEGIN { printf "\x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79" }' >> image-new.img;; + SEAndroid) printf 'SEANDROIDENFORCE' >> image-new.img;; + esac; +fi; + +if [ "$origsize" -a -f split_img/*-origsize ]; then + filesize=`cat split_img/*-origsize`; + echo "Padding to original size..."; + echo " "; + cp -f image-new.img unpadded-new.img; + truncate -s $filesize image-new.img; +fi; + +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/KSU/SHRP-R/unpackimg.sh b/Final_Zip/AIK/KSU/SHRP-R/unpackimg.sh new file mode 100755 index 0000000..6198f2a --- /dev/null +++ b/Final_Zip/AIK/KSU/SHRP-R/unpackimg.sh @@ -0,0 +1,370 @@ +#!/bin/bash +# AIK-Linux/unpackimg: split image and unpack ramdisk +# osm0sis @ xda-developers + +cleanup() { "$aik/cleanup.sh" $local --quiet; } +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: unpackimg.sh [--local] [--nosudo] "; exit 1;; + --local) local="--local"; shift;; +esac; +case $1 in + --nosudo) nosudo=1; shift;; + --sudo) shift;; +esac; +if [ ! "$nosudo" ]; then + sudo=sudo; sumsg=" (as root)"; +fi; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + file() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/file" "$@"; } + lzma() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + tail() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/tail" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +if [ ! "$local" ]; then + cd "$aik"; +fi; +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +img="$1"; +[ -f "$cur/$1" ] && img="$cur/$1"; +if [ ! "$img" ]; then + while IFS= read -r line; do + case $line in + aboot.img|image-new.img|unlokied-new.img|unsigned-new.img) continue;; + esac; + img="$line"; + break; + done < <(ls *.elf *.img *.sin 2>/dev/null); +fi; +img="$(readlink -f "$img")"; +if [ ! -f "$img" ]; then + echo "No image file supplied."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - UnpackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +file=$(basename "$img"); +echo "Supplied image: $file"; +echo " "; + +if [ -d split_img -o -d ramdisk ]; then + if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + rmsumsg=" (as root)"; + fi; + echo "Removing old work folders and files$rmsumsg..."; + echo " "; + cleanup; +fi; + +echo "Setting up work folders..."; +echo " "; +mkdir split_img ramdisk; + +cd split_img; +filesize=$(wc -c < "$img"); +echo "$filesize" > "$file-origsize"; +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "signing" ]; then + echo $imgtest | awk '{ print $1 }' > "$file-sigtype"; + sigtype=$(cat "$file-sigtype"); + echo "Signature with \"$sigtype\" type detected, removing..."; + echo " "; + case $sigtype in + BLOB) + cp -f "$img" "$file"; + "$bin/$arch/blobunpack" "$file" | tail -n+5 | cut -d" " -f2 | dd bs=1 count=3 > "$file-blobtype" 2>/dev/null; + mv -f "$file."* "$file"; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --get-vmlinuz "$img" --vmlinuz-out "$file";; + DHTB) dd bs=4096 skip=512 iflag=skip_bytes conv=notrunc if="$img" of="$file" 2>/dev/null;; + NOOK) + dd bs=1048576 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=1048576 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + NOOKTAB) + dd bs=262144 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=262144 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + SIN*) + "$bin/$arch/sony_dump" . "$img" >/dev/null; + mv -f "$file."* "$file"; + rm -f "$file-sigtype"; + ;; + esac; + img="$file"; +fi; + +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "bootimg" ]; then + [ "$(echo $imgtest | awk '{ print $3 }')" = "PXA" ] && typesuffix=-PXA; + echo "$(echo $imgtest | awk '{ print $1 }')$typesuffix" > "$file-imgtype"; + imgtype=$(cat "$file-imgtype"); +else + cd ..; + cleanup; + echo "Unrecognized format."; + abort; + exit 1; +fi; +echo "Image type: $imgtype"; +echo " "; + +case $imgtype in + AOSP*|ELF|KRNL|OSIP|U-Boot) ;; + *) + cd ..; + cleanup; + echo "Unsupported format."; + abort; + exit 1; + ;; +esac; + +case $(echo $imgtest | awk '{ print $3 }') in + LOKI) + echo $imgtest | awk '{ print $5 }' | cut -d\( -f2 | cut -d\) -f1 > "$file-lokitype"; + lokitype=$(cat "$file-lokitype"); + echo "Loki patch with \"$lokitype\" type detected, reverting..."; + echo " "; + echo "Warning: A dump of your device's aboot.img is required to re-Loki!"; + echo " "; + "$bin/$arch/loki_tool" unlok "$img" "$file" >/dev/null; + img="$file"; + ;; + AMONET) + echo "Amonet patch detected, reverting..."; + echo " "; + dd bs=2048 count=1 conv=notrunc if="$img" of="$file-microloader.bin" 2>/dev/null; + dd bs=1024 skip=1 conv=notrunc if="$file-microloader.bin" of="$file-head" 2>/dev/null; + truncate -s 1024 "$file-microloader.bin"; + truncate -s 2048 "$file-head"; + dd bs=2048 skip=1 conv=notrunc if="$img" of="$file-tail" 2>/dev/null; + cat "$file-head" "$file-tail" > "$file"; + rm -f "$file-head" "$file-tail"; + img="$file"; + ;; +esac; + +tailtest="$(dd if="$img" iflag=skip_bytes skip=$(($(wc -c < "$img") - 8192)) bs=8192 count=1 2>/dev/null | file -m $bin/androidbootimg.magic - 2>/dev/null | cut -d: -f2-)"; +case $tailtest in + *data) tailtest="$(tail -n50 "$img" | file -m "$bin/androidbootimg.magic" - 2>/dev/null | cut -d: -f2-)";; +esac; +tailtype="$(echo $tailtest | awk '{ print $1 }')"; +case $tailtype in + AVB*) + echo "Signature with \"$tailtype\" type detected."; + echo " "; + case $tailtype in + *v1) + echo $tailtype > "$file-sigtype"; + echo $tailtest | awk '{ print $4 }' > "$file-avbtype"; + ;; + esac; + ;; + Bump|SEAndroid) + echo "Footer with \"$tailtype\" type detected."; + echo " "; + echo $tailtype > "$file-tailtype"; + ;; +esac; + +if [ "$imgtype" = "U-Boot" ]; then + imgsize=$(($(printf '%d\n' 0x$(hexdump -n 4 -s 12 -e '16/1 "%02x""\n"' "$img")) + 64)); + if [ ! "$filesize" = "$imgsize" ]; then + echo "Trimming..."; + echo " "; + dd bs=$imgsize count=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + img="$file"; + fi; +fi; + +echo 'Splitting image to "split_img/"...'; +case $imgtype in + AOSP_VNDR) vendor=vendor_;; +esac; +case $imgtype in + AOSP|AOSP_VNDR) "$bin/$arch/unpackbootimg" -i "$img";; + AOSP-PXA) "$bin/$arch/pxa-unpackbootimg" -i "$img";; + ELF) + mkdir elftool_out; + "$bin/$arch/elftool" unpack -i "$img" -o elftool_out >/dev/null; + mv -f elftool_out/header "$file-header" 2>/dev/null; + rm -rf elftool_out; + "$bin/$arch/unpackelf" -i "$img"; + ;; + KRNL) dd bs=4096 skip=8 iflag=skip_bytes conv=notrunc if="$img" of="$file-ramdisk" 2>&1 | tail -n+3 | cut -d" " -f1-2;; + OSIP) + "$bin/$arch/mboot" -u -f "$img"; + [ ! $? -eq "0" ] && error=1; + for i in bootstub cmdline.txt hdr kernel parameter ramdisk.cpio.gz sig; do + mv -f $i "$file-$(basename $i .txt | sed -e 's/hdr/header/' -e 's/ramdisk.cpio.gz/ramdisk/')" 2>/dev/null || true; + done; + ;; + U-Boot) + "$bin/$arch/dumpimage" -l "$img"; + "$bin/$arch/dumpimage" -l "$img" > "$file-header"; + grep "Name:" "$file-header" | cut -c15- > "$file-name"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f1 > "$file-arch"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f2 > "$file-os"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f3 | cut -d- -f1 > "$file-type"; + grep "Type:" "$file-header" | cut -d\( -f2 | cut -d\) -f1 | cut -d" " -f1 | cut -d- -f1 > "$file-comp"; + grep "Address:" "$file-header" | cut -c15- > "$file-addr"; + grep "Point:" "$file-header" | cut -c15- > "$file-ep"; + rm -f "$file-header"; + "$bin/$arch/dumpimage" -p 0 -o "$file-kernel" "$img"; + [ ! $? -eq "0" ] && error=1; + case $(cat "$file-type") in + Multi) "$bin/$arch/dumpimage" -p 1 -o "$file-ramdisk" "$img";; + RAMDisk) mv -f "$file-kernel" "$file-ramdisk";; + *) touch "$file-ramdisk";; + esac; + ;; +esac; +if [ ! $? -eq "0" -o "$error" ]; then + cd ..; + cleanup; + abort; + exit 1; +fi; + +if [ -f *-kernel ] && [ "$(file -m "$bin/androidbootimg.magic" *-kernel 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')" = "MTK" ]; then + mtk=1; + echo " "; + echo "MTK header found in kernel, removing..."; + dd bs=512 skip=1 conv=notrunc if="$file-kernel" of=tempkern 2>/dev/null; + mv -f tempkern "$file-kernel"; +fi; +mtktest="$(file -m "$bin/androidbootimg.magic" *-*ramdisk 2>/dev/null | cut -d: -f2-)"; +mtktype=$(echo $mtktest | awk '{ print $3 }'); +if [ "$(echo $mtktest | awk '{ print $1 }')" = "MTK" ]; then + if [ ! "$mtk" ]; then + echo " "; + echo "Warning: No MTK header found in kernel!"; + mtk=1; + fi; + echo "MTK header found in \"$mtktype\" type ramdisk, removing..."; + dd bs=512 skip=1 conv=notrunc if="$(ls *-*ramdisk)" of=temprd 2>/dev/null; + mv -f temprd "$(ls *-*ramdisk)"; +else + if [ "$mtk" ]; then + if [ ! "$mtktype" ]; then + echo 'Warning: No MTK header found in ramdisk, assuming "rootfs" type!'; + mtktype="rootfs"; + fi; + fi; +fi; +[ "$mtk" ] && echo $mtktype > "$file-mtktype"; + +if [ -f *-dt ]; then + dttest="$(file -m "$bin/androidbootimg.magic" *-dt 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')"; + echo $dttest > "$file-dttype"; + if [ "$imgtype" = "ELF" ]; then + case $dttest in + QCDT|ELF) ;; + *) echo " "; + echo "Non-QC DTB found, packing kernel and appending..."; + gzip --no-name -9 "$file-kernel"; + mv -f "$file-kernel.gz" "$file-kernel"; + cat "$file-dt" >> "$file-kernel"; + rm -f "$file-dt"*;; + esac; + fi; +fi; + +file -m "$bin/magic" *-*ramdisk 2>/dev/null | cut -d: -f2 | awk '{ print $1 }' > "$file-${vendor}ramdiskcomp"; +ramdiskcomp=`cat *-*ramdiskcomp`; +unpackcmd="$ramdiskcomp -dc"; +compext=$ramdiskcomp; +case $ramdiskcomp in + gzip) unpackcmd="gzip -dcq"; compext=gz;; + lzop) compext=lzo;; + xz) ;; + lzma) ;; + bzip2) compext=bz2;; + lz4) unpackcmd="$bin/$arch/lz4 -dcq";; + lz4-l) unpackcmd="$bin/$arch/lz4 -dcq"; compext=lz4;; + cpio) unpackcmd="cat"; compext="";; + empty) compext=empty;; + *) compext="";; +esac; +if [ "$compext" ]; then + compext=.$compext; +fi; +mv -f "$(ls *-*ramdisk)" "$file-${vendor}ramdisk.cpio$compext" 2>/dev/null; +cd ..; +if [ "$ramdiskcomp" = "data" ]; then + echo "Unrecognized format."; + abort; + exit 1; +fi; + +echo " "; +if [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: No ramdisk found to be unpacked!"; +else + echo "Unpacking ramdisk$sumsg to \"ramdisk/\"..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + echo "Compression used: $ramdiskcomp"; + if [ ! "$compext" -a ! "$ramdiskcomp" = "cpio" ]; then + echo "Unsupported format."; + abort; + exit 1; + fi; + $sudo chown 0:0 ramdisk 2>/dev/null; + cd ramdisk; + $unpackcmd "../split_img/$file-${vendor}ramdisk.cpio$compext" | $sudo $cpio -i -d --no-absolute-filenames; + if [ ! $? -eq "0" ]; then + [ "$nosudo" ] && echo "Unpacking failed, try without --nosudo."; + cd ..; + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/KSU/SHRP/bin/androidbootimg.magic b/Final_Zip/AIK/KSU/SHRP/bin/androidbootimg.magic new file mode 100755 index 0000000..4e7a106 --- /dev/null +++ b/Final_Zip/AIK/KSU/SHRP/bin/androidbootimg.magic @@ -0,0 +1,111 @@ +#------------------------------------------------------------------------------ +# Various Android OEM non-standard boot image related magic entries +# osm0sis @ xda-developers +#------------------------------------------------------------------------------ + +# ASUS Blob Signature +0 string -SIGNED-BY-SIGNBLOB- BLOB signing + +# Barnes & Noble Nook Signature +64 string Red\x20Loader NOOK signing (red loader) +64 string Green\x20Loader NOOK signing (green loader) +64 string Green\x20Recovery NOOK signing (green recovery) +64 string eMMC\x20boot.img+secondloader NOOK signing (emmc boot) +64 string eMMC\x20recovery.img+secondloader NOOK signing (emmc recovery) +48 string BauwksBoot NOOKTAB signing (bauwks) + +# Google ChromeOS Signature +0 string CHROMEOS CHROMEOS signing + +# Samsung/Spreadtrum DHTB Signature +0 string DHTB\x01\x00\x00 DHTB signing + +# Sony SIN Packaging/Signature +0 string \x01\x00\x00\x00 SINv1 signing +0 string \x02\x00\x00\x00 SINv2 signing +0 string \x03SIN SINv3 signing + +# Google Pixel/Nexus/AOSP Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search ANDROID! AOSP bootimg +>>36 string \x00\x00\x00\x02 \b, PXA variant (020) +>>36 string \x00\x00\x80\x02 \b, PXA variant (028) +>>36 string \x00\x00\x00\x03 \b, PXA variant (030) +>>96 search microloader +>>>1024 string ANDROID! \b, AMONET header +>>1024 string LOKI \b, LOKI header +>>>1028 string \x00 \b (boot) +>>>1028 string \x01 \b (recovery) +>>2048 search \x88\x16\x88\x58 \b, MTK headers +!:strength * 3 + +# Google Pixel/AOSP Vendor Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search VNDRBOOT AOSP_VNDR bootimg +!:strength * 3 + +# DENX U-Boot +0 string \x27\x05\x19\x56 U-Boot bootimg + +# Intel OSIP +1000 search \xFC\xFA\xBC\x00 OSIP bootimg (headerless) +!:strength / 15 +0 string $OS$\x00\x00\x01 OSIP bootimg +>52 string \x00\x00\x00\x00 \b, boot (signed) +>52 string \x01\x00\x00\x00 \b, boot (unsigned) +>52 string \x0C\x00\x00\x00 \b, recovery (signed) +>52 string \x0D\x00\x00\x00 \b, recovery (unsigned) + +# Rockchip KRNL +0 string KRNL KRNL bootimg + +# Sony ELF +0 string \x7FELF ELF +>5 string \x01\x01\x61 bootimg +>18 string \x28 (ARM +>18 string \x03 (x86_ +>18 string \x08 (MIPS +>4 string \x01 \b) +>4 string \x02 \b64) +>0 search \x88\x16\x88\x58 \b, MTK headers + +# MediaTek MTK +# [for detection after boot image has already been split] +0 search \x88\x16\x88\x58 MTK header +>0 search KERNEL \b, kernel type +>0 search ROOTFS \b, rootfs type +>0 search RECOVERY \b, recovery type +!:strength / 20 + +# Qualcomm Device Tree +# [for detection after boot image has already been split] +0 string QCDT QCDT header +!:strength / 20 + +# Google Android Verified Boot 1.0 Signature +# [for detection with the tail of the boot image] +0 search \x02\x01\x01\x30\x82 AVBv1 signing footer +>0 search /boot \b, boot type +>0 search /recovery \b, recovery type +!:strength / 20 + +# Google Android Verified Boot 2.0 Signature +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search AVBf AVBv2 signing footer +!:strength / 20 + +# LG Bump +# [for detection with the tail of the boot image] +0 search \x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79 Bump footer +!:strength / 20 + +# Samsung SEAndroid +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search SEANDROIDENFORCE SEAndroid footer +!:strength / 20 diff --git a/Final_Zip/AIK/KSU/SHRP/bin/avb/verity.pk8 b/Final_Zip/AIK/KSU/SHRP/bin/avb/verity.pk8 new file mode 100755 index 0000000..bebf216 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/avb/verity.pk8 differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/avb/verity.x509.pem b/Final_Zip/AIK/KSU/SHRP/bin/avb/verity.x509.pem new file mode 100755 index 0000000..86399c3 --- /dev/null +++ b/Final_Zip/AIK/KSU/SHRP/bin/avb/verity.x509.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIID/TCCAuWgAwIBAgIJAJcPmDkJqolJMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g +VmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UE +AwwHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe +Fw0xNDExMDYxOTA3NDBaFw00MjAzMjQxOTA3NDBaMIGUMQswCQYDVQQGEwJVUzET +MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEQMA4G +A1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UEAwwHQW5kcm9p +ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAOjreE0vTVSRenuzO9vnaWfk0eQzYab0gqpi +6xAzi6dmD+ugoEKJmbPiuE5Dwf21isZ9uhUUu0dQM46dK4ocKxMRrcnmGxydFn6o +fs3ODJMXOkv2gKXL/FdbEPdDbxzdu8z3yk+W67udM/fW7WbaQ3DO0knu+izKak/3 +T41c5uoXmQ81UNtAzRGzGchNVXMmWuTGOkg6U+0I2Td7K8yvUMWhAWPPpKLtVH9r +AL5TzjYNR92izdKcz3AjRsI3CTjtpiVABGeX0TcjRSuZB7K9EK56HV+OFNS6I1NP +jdD7FIShyGlqqZdUOkAUZYanbpgeT5N7QL6uuqcGpoTOkalu6kkCAwEAAaNQME4w +HQYDVR0OBBYEFH5DM/m7oArf4O3peeKO0ZIEkrQPMB8GA1UdIwQYMBaAFH5DM/m7 +oArf4O3peeKO0ZIEkrQPMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB +AHO3NSvDE5jFvMehGGtS8BnFYdFKRIglDMc4niWSzhzOVYRH4WajxdtBWc5fx0ix +NF/+hVKVhP6AIOQa+++sk+HIi7RvioPPbhjcsVlZe7cUEGrLSSveGouQyc+j0+m6 +JF84kszIl5GGNMTnx0XRPO+g8t6h5LWfnVydgZfpGRRg+WHewk1U2HlvTjIceb0N +dcoJ8WKJAFWdcuE7VIm4w+vF/DYX/A2Oyzr2+QRhmYSv1cusgAeC1tvH4ap+J1Lg +UnOu5Kh/FqPLLSwNVQp4Bu7b9QFfqK8Moj84bj88NqRGZgDyqzuTrFxn6FW7dmyA +yttuAJAEAymk1mipd9+zp38= +-----END CERTIFICATE----- diff --git a/Final_Zip/AIK/KSU/SHRP/bin/boot_signer.jar b/Final_Zip/AIK/KSU/SHRP/bin/boot_signer.jar new file mode 100755 index 0000000..dd96a3e Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/boot_signer.jar differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/chromeos/empty b/Final_Zip/AIK/KSU/SHRP/bin/chromeos/empty new file mode 100755 index 0000000..8b13789 --- /dev/null +++ b/Final_Zip/AIK/KSU/SHRP/bin/chromeos/empty @@ -0,0 +1 @@ + diff --git a/Final_Zip/AIK/KSU/SHRP/bin/chromeos/kernel.keyblock b/Final_Zip/AIK/KSU/SHRP/bin/chromeos/kernel.keyblock new file mode 100755 index 0000000..9740be4 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/chromeos/kernel.keyblock differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/chromeos/kernel_data_key.vbprivk b/Final_Zip/AIK/KSU/SHRP/bin/chromeos/kernel_data_key.vbprivk new file mode 100755 index 0000000..8d392fb Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/chromeos/kernel_data_key.vbprivk differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/blobpack b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/blobpack new file mode 100755 index 0000000..685c6c0 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/blobpack differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/blobunpack b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/blobunpack new file mode 100755 index 0000000..2d96696 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/blobunpack differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/dhtbsign b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/dhtbsign new file mode 100755 index 0000000..f117b88 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/dumpimage b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/dumpimage new file mode 100755 index 0000000..8ba15d3 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/dumpimage differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/elftool b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/elftool new file mode 100755 index 0000000..b25dd56 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/elftool differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/futility b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/futility new file mode 100755 index 0000000..c830e31 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/futility differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/loki_tool b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/loki_tool new file mode 100755 index 0000000..d305760 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/loki_tool differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/lz4 b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/lz4 new file mode 100755 index 0000000..801bad4 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/lz4 differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/mboot b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/mboot new file mode 100755 index 0000000..023eab0 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/mboot differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/mkbootimg b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/mkbootimg new file mode 100755 index 0000000..ed68c2d Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/mkimage b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/mkimage new file mode 100755 index 0000000..8e97c0c Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/mkimage differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/mkmtkhdr b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/mkmtkhdr new file mode 100755 index 0000000..d71db24 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/pxa-mkbootimg b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/pxa-mkbootimg new file mode 100755 index 0000000..0636873 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/pxa-unpackbootimg b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/pxa-unpackbootimg new file mode 100755 index 0000000..8dbdecf Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/rkcrc b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/rkcrc new file mode 100755 index 0000000..45027f3 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/rkcrc differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/sony_dump b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/sony_dump new file mode 100755 index 0000000..2563e25 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/sony_dump differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/unpackbootimg b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/unpackbootimg new file mode 100755 index 0000000..b70aed5 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/unpackelf b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/unpackelf new file mode 100755 index 0000000..12e9057 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/i686/unpackelf differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/blobpack b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/blobpack new file mode 100755 index 0000000..90256d4 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/blobpack differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/blobunpack b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/blobunpack new file mode 100755 index 0000000..53374ff Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/dhtbsign b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/dhtbsign new file mode 100755 index 0000000..ccb7a67 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/dumpimage b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/dumpimage new file mode 100755 index 0000000..861bd68 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/elftool b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/elftool new file mode 100755 index 0000000..07a520d Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/elftool differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/futility b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/futility new file mode 100755 index 0000000..4d56ec3 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/futility differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/loki_tool b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/loki_tool new file mode 100755 index 0000000..4a1b74a Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/lz4 b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/lz4 new file mode 100755 index 0000000..8a4136b Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/lz4 differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/mboot b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/mboot new file mode 100755 index 0000000..8bf92d4 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/mboot differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/mkbootimg b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/mkbootimg new file mode 100755 index 0000000..2b628c3 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/mkimage b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/mkimage new file mode 100755 index 0000000..6419ea3 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/mkimage differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/mkmtkhdr b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/mkmtkhdr new file mode 100755 index 0000000..1ab256f Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/pxa-mkbootimg b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..5885720 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..d7b1b7d Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/rkcrc b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/rkcrc new file mode 100755 index 0000000..f218228 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/sony_dump b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/sony_dump new file mode 100755 index 0000000..6fc3696 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/unpackbootimg b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/unpackbootimg new file mode 100755 index 0000000..8f4fccf Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/unpackelf b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/unpackelf new file mode 100755 index 0000000..477e25d Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/linux/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/blobpack b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/blobpack new file mode 100755 index 0000000..2336ec0 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/blobpack differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/blobunpack b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/blobunpack new file mode 100755 index 0000000..834cb50 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/blobunpack differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/cpio b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/cpio new file mode 100755 index 0000000..b7e41f1 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/cpio differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/dd b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/dd new file mode 100755 index 0000000..b684139 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/dd differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/dhtbsign b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/dhtbsign new file mode 100755 index 0000000..b3ba0ba Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/dumpimage b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/dumpimage new file mode 100755 index 0000000..917c8ed Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/dumpimage differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/elftool b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/elftool new file mode 100755 index 0000000..27f12be Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/elftool differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/file b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/file new file mode 100755 index 0000000..8024db5 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/file differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/futility b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/futility new file mode 100755 index 0000000..8658249 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/futility differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/libiconv.2.dylib b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/libiconv.2.dylib new file mode 100755 index 0000000..ec61db0 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/libintl.8.dylib b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/libintl.8.dylib new file mode 100755 index 0000000..c297f0a Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/libintl.8.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/liblzma.5.dylib b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/liblzma.5.dylib new file mode 100755 index 0000000..126d338 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/liblzo2.2.dylib b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/liblzo2.2.dylib new file mode 100755 index 0000000..8a24e23 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/libmagic.1.dylib b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/libmagic.1.dylib new file mode 100755 index 0000000..92e6c7f Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/loki_tool b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/loki_tool new file mode 100755 index 0000000..7eecf68 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/loki_tool differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/lz4 b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/lz4 new file mode 100755 index 0000000..43126f8 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/lz4 differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/lzop b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/lzop new file mode 100755 index 0000000..fc3103c Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/lzop differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/mboot b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/mboot new file mode 100755 index 0000000..dfa0d3e Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/mboot differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/mkbootimg b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/mkbootimg new file mode 100755 index 0000000..82f05a9 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/mkimage b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/mkimage new file mode 100755 index 0000000..e760d6e Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/mkimage differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/mkmtkhdr b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/mkmtkhdr new file mode 100755 index 0000000..907ba0f Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/pxa-mkbootimg b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/pxa-mkbootimg new file mode 100755 index 0000000..12f8337 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/pxa-unpackbootimg b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/pxa-unpackbootimg new file mode 100755 index 0000000..2f1fe6c Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/rkcrc b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/rkcrc new file mode 100755 index 0000000..c2b70ce Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/rkcrc differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/sony_dump b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/sony_dump new file mode 100755 index 0000000..2f187e6 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/sony_dump differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/tail b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/tail new file mode 100755 index 0000000..99ee578 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/tail differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/truncate b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/truncate new file mode 100755 index 0000000..26bf16b Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/truncate differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/unpackbootimg b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/unpackbootimg new file mode 100755 index 0000000..e92b74e Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/unpackelf b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/unpackelf new file mode 100755 index 0000000..4ea11d0 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/unpackelf differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/xz b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/xz new file mode 100755 index 0000000..b501c14 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/i386/xz differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/blobpack b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/blobpack new file mode 100755 index 0000000..816fcf2 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/blobpack differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/blobunpack b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/blobunpack new file mode 100755 index 0000000..9241057 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/cpio b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/cpio new file mode 100755 index 0000000..991c5a8 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/cpio differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/dd b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/dd new file mode 100755 index 0000000..e927886 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/dd differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/dhtbsign b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/dhtbsign new file mode 100755 index 0000000..162fa88 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/dumpimage b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/dumpimage new file mode 100755 index 0000000..473538b Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/elftool b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/elftool new file mode 100755 index 0000000..0185019 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/elftool differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/file b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/file new file mode 100755 index 0000000..0b9f24c Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/file differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/futility b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/futility new file mode 100755 index 0000000..a28db4d Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/futility differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/libiconv.2.dylib b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/libiconv.2.dylib new file mode 100755 index 0000000..8f56eed Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/libintl.8.dylib b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/libintl.8.dylib new file mode 100755 index 0000000..f270e89 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/libintl.8.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/liblzma.5.dylib b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/liblzma.5.dylib new file mode 100755 index 0000000..39c6b96 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/liblzo2.2.dylib b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/liblzo2.2.dylib new file mode 100755 index 0000000..a05b7eb Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/libmagic.1.dylib b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/libmagic.1.dylib new file mode 100755 index 0000000..29ad687 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/loki_tool b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/loki_tool new file mode 100755 index 0000000..1b9f062 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/lz4 b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/lz4 new file mode 100755 index 0000000..bcee28d Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/lz4 differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/lzop b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/lzop new file mode 100755 index 0000000..8be71f4 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/lzop differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/mboot b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/mboot new file mode 100755 index 0000000..ad67219 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/mboot differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/mkbootimg b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/mkbootimg new file mode 100755 index 0000000..137aef2 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/mkimage b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/mkimage new file mode 100755 index 0000000..61d5a9c Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/mkimage differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/mkmtkhdr b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/mkmtkhdr new file mode 100755 index 0000000..99949d5 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/pxa-mkbootimg b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..0ec79a3 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..03fc864 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/rkcrc b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/rkcrc new file mode 100755 index 0000000..9b0b94a Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/sony_dump b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/sony_dump new file mode 100755 index 0000000..e219101 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/tail b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/tail new file mode 100755 index 0000000..59692eb Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/tail differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/truncate b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/truncate new file mode 100755 index 0000000..f2ed631 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/truncate differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/unpackbootimg b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/unpackbootimg new file mode 100755 index 0000000..a717c48 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/unpackelf b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/unpackelf new file mode 100755 index 0000000..d6edefa Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/xz b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/xz new file mode 100755 index 0000000..6faedc7 Binary files /dev/null and b/Final_Zip/AIK/KSU/SHRP/bin/macos/x86_64/xz differ diff --git a/Final_Zip/AIK/KSU/SHRP/bin/magic b/Final_Zip/AIK/KSU/SHRP/bin/magic new file mode 100755 index 0000000..4530761 --- /dev/null +++ b/Final_Zip/AIK/KSU/SHRP/bin/magic @@ -0,0 +1,1916 @@ +#------------------------------------------------------------------------------ +# Slimmed down magic file for archives only +#------------------------------------------------------------------------------ +# $File: archive,v 1.145 2021/01/03 20:58:47 christos Exp $ +# archive: file(1) magic for archive formats (see also "msdos" for self- +# extracting compressed archives) +# +# cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc. +# pre-POSIX "tar" archives are also handled in the C code ../../src/is_tar.c. + +# POSIX tar archives +# URL: https://en.wikipedia.org/wiki/Tar_(computing) +# Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current +# header mainly padded with nul bytes +500 quad 0 +!:strength /2 +# filename or extended attribute printable strings in range space null til umlaut ue +>0 ubeshort >0x1F00 +>>0 ubeshort <0xFCFD +# last 4 header bytes often null but tar\0 in gtarfail2.tar gtarfail.tar-bad +# at https://sourceforge.net/projects/s-tar/files/testscripts/ +>>>508 ubelong&0x8B9E8DFF 0 +# nul, space or ascii digit 0-7 at start of mode +>>>>100 ubyte&0xC8 =0 +>>>>>101 ubyte&0xC8 =0 +# nul, space at end of check sum +>>>>>>155 ubyte&0xDF =0 +# space or ascii digit 0 at start of check sum +>>>>>>>148 ubyte&0xEF =0x20 +# minimal check and then display tar archive information which can also be +# embedded inside others like Android Backup, Clam AntiVirus database +>257 string !ustar +# header padded with nuls +>>257 ulong =0 +# GNU tar version 1.29 with non pax format option without refusing +# creates misleading V7 header for Long path, Multi-volume, Volume type +>>>156 ubyte 0x4c GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x4d GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x56 GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 default x tar archive (V7) +!:mime application/x-tar +#!:ext tar +# other stuff in padding +# some implementations add new fields to the blank area at the end of the header record +# created for example by DOS TAR 3.20g 1994 Tim V.Shapore with -j option +>>257 ulong !0 tar archive (old) +!:mime application/x-tar +#!:ext tar +# magic in newer, GNU, posix variants +>257 string =ustar +# 2 last char of magic and UStar version because string expression does not work +# 2 space characters followed by a null for GNU variant +>>261 ubelong =0x72202000 POSIX tar archive (GNU) +!:mime application/x-gtar +#!:ext tar/gtar +# UStar version with ASCII "00" +>>261 ubelong 0x72003030 POSIX +# gLOBAL and ExTENSION type only found in POSIX.1-2001 format +>>>156 ubyte 0x67 \b.1-2001 +>>>156 ubyte 0x78 \b.1-2001 +>>>156 ubyte x tar archive +!:mime application/x-ustar +#!:ext tar/ustar +# version with 2 binary nuls embedded in Android Backup like com.android.settings.ab +>>261 ubelong 0x72000000 tar archive (ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# not seen ustar variant with garbish version +>>261 default x tar archive (unknown ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# type flag of 1st tar archive member +#>156 ubyte x \b, %c-type +>156 ubyte x +>>156 ubyte 0 \b, file +>>156 ubyte 0x30 \b, file +>>156 ubyte 0x31 \b, hard link +>>156 ubyte 0x32 \b, symlink +>>156 ubyte 0x33 \b, char device +>>156 ubyte 0x34 \b, block device +>>156 ubyte 0x35 \b, directory +>>156 ubyte 0x36 \b, fifo +>>156 ubyte 0x37 \b, reserved +>>156 ubyte 0x4c \b, long path +>>156 ubyte 0x4d \b, multi volume +>>156 ubyte 0x56 \b, volume +>>156 ubyte 0x67 \b, global +>>156 ubyte 0x78 \b, extension +>>156 default x \b, type +>>>156 ubyte x '%c' +# name[100] +>0 string >\0 %-.60s +# mode mainly stored as an octal number in ASCII null or space terminated +>100 string >\0 \b, mode %-.7s +# user id mainly as octal numbers in ASCII null or space terminated +>108 string >\0 \b, uid %-.7s +# group id mainly as octal numbers in ASCII null or space terminated +>116 string >\0 \b, gid %-.7s +# size mainly as octal number in ASCII +>124 ubyte <0x38 +>>124 string >\0 \b, size %-.12s +# coding indicated by setting the high-order bit of the leftmost byte +>124 ubyte >0xEF \b, size 0x +>>124 ubyte !0xff \b%2.2x +>>125 ubyte !0xff \b%2.2x +>>126 ubyte !0xff \b%2.2x +>>127 ubyte !0xff \b%2.2x +>>128 ubyte !0xff \b%2.2x +>>129 ubyte !0xff \b%2.2x +>>130 ubyte !0xff \b%2.2x +>>131 ubyte !0xff \b%2.2x +>>132 ubyte !0xff \b%2.2x +>>133 ubyte !0xff \b%2.2x +>>134 ubyte !0xff \b%2.2x +>>135 ubyte !0xff \b%2.2x +# seconds since 0:0:0 1 jan 1970 UTC as octal number mainly in ASCII null or space terminated +>136 string >\0 \b, seconds %-.11s +# header checksum stored as an octal number in ASCII null or space terminated +#>148 string x \b, cksum %.7s +# linkname[100] +>157 string >\0 \b, linkname %-.40s +# additional fields for ustar +>257 string =ustar +# owner user name null terminated +>>265 string >\0 \b, user %-.32s +# group name null terminated +>>297 string >\0 \b, group %-.32s +# device major minor if not zero +>>329 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>329 string x \b, devmaj %-.7s +>>337 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>337 string x \b, devmin %-.7s +# prefix[155] +>>345 string >\0 \b, prefix %-.155s +# old non ustar/POSIX tar +>257 string !ustar +>>508 string =tar\0 +# padding[255] in old star +>>>257 string >\0 \b, padding: %-.40s +>>508 default x +# padding[255] in old tar sometimes comment field +>>>257 string >\0 \b, comment: %-.40s + +# Incremental snapshot gnu-tar format from: +# https://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html +0 string GNU\ tar- GNU tar incremental snapshot data +>&0 regex [0-9]\.[0-9]+-[0-9]+ version %s + +# cpio archives +# +# Yes, the top two "cpio archive" formats *are* supposed to just be "short". +# The idea is to indicate archives produced on machines with the same +# byte order as the machine running "file" with "cpio archive", and +# to indicate archives produced on machines with the opposite byte order +# from the machine running "file" with "cpio byte-swapped archive". +# +# The SVR4 "cpio(4)" hints that there are additional formats, but they +# are defined as "short"s; I think all the new formats are +# character-header formats and thus are strings, not numbers. +0 short 070707 cpio archive +!:mime application/x-cpio +0 short 0143561 cpio byte-swapped archive +!:mime application/x-cpio # encoding: swapped +0 string 070707 cpio ASCII archive (pre-SVR4 or odc) +0 string 070701 cpio ASCII archive (SVR4 with no CRC) +0 string 070702 cpio ASCII archive (SVR4 with CRC) + +# +# Various archive formats used by various versions of the "ar" +# command. +# + +# +# Original UNIX archive formats. +# They were written with binary values in host byte order, and +# the magic number was a host "int", which might have been 16 bits +# or 32 bits. We don't say "PDP-11" or "VAX", as there might have +# been ports to little-endian 16-bit-int or 32-bit-int platforms +# (x86?) using some of those formats; if none existed, feel free +# to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian +# 32-bit. There might have been big-endian ports of that sort as +# well. +# +0 leshort 0177555 very old 16-bit-int little-endian archive +0 beshort 0177555 very old 16-bit-int big-endian archive +0 lelong 0177555 very old 32-bit-int little-endian archive +0 belong 0177555 very old 32-bit-int big-endian archive + +0 leshort 0177545 old 16-bit-int little-endian archive +>2 string __.SYMDEF random library +0 beshort 0177545 old 16-bit-int big-endian archive +>2 string __.SYMDEF random library +0 lelong 0177545 old 32-bit-int little-endian archive +>4 string __.SYMDEF random library +0 belong 0177545 old 32-bit-int big-endian archive +>4 string __.SYMDEF random library + +# +# From "pdp" (but why a 4-byte quantity?) +# +0 lelong 0x39bed PDP-11 old archive +0 lelong 0x39bee PDP-11 4.0 archive + +# +# XXX - what flavor of APL used this, and was it a variant of +# some ar archive format? It's similar to, but not the same +# as, the APL workspace magic numbers in pdp. +# +0 long 0100554 apl workspace + +# +# System V Release 1 portable(?) archive format. +# +0 string = System V Release 1 ar archive +!:mime application/x-archive + +# +# Debian package; it's in the portable archive format, and needs to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "debian". +# +# Update: Joerg Jenderek +# URL: https://en.wikipedia.org/wiki/Deb_(file_format) +0 string =!\ndebian +# https://manpages.debian.org/testing/dpkg/dpkg-split.1.en.html +>14 string -split part of multipart Debian package +!:mime application/vnd.debian.binary-package +# udeb is used for stripped down deb file +#!:ext deb/udeb +>14 string -binary Debian binary package +!:mime application/vnd.debian.binary-package +# For ipk packager see also https://en.wikipedia.org/wiki/Opkg +#!:ext deb/udeb/ipk +# This should not happen +>14 default x Unknown Debian package +# NL terminated version; for most Debian cases this is 2.0 or 2.1 for split +>68 string >\0 (format %s) +#>68 string !2.0\n +#>>68 string x (format %.3s) +>68 string =2.0\n +# 2nd archive name=control archive name like control.tar.gz or control.tar.xz +>>72 string >\0 \b, with %.14s +# look for 3rd archive name=data archive name like data.tar.{gz,xz,bz2,lzma} +>>0 search/0x93e4f data.tar. \b, data compression +# the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised +# for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb +>>>&0 string x %.2s +# skip space (0x20 BSD) and slash (0x2f System V) character marking end of name +>>>&2 ubyte !0x20 +>>>>&-1 ubyte !0x2f +# display 3rd character of file name extension like 2 of bz2 or m of lzma +>>>>>&-1 ubyte x \b%c +>>>>>>&0 ubyte !0x20 +>>>>>>>&-1 ubyte !0x2f +# display 4th character of file name extension like a of lzma +>>>>>>>>&-1 ubyte x \b%c +# split debian package case +>68 string =2.1\n +# dpkg-1.18.25/dpkg-split/info.c +# NL terminated ASCII package name like ckermit +>>&0 string x \b, %s +# NL terminated package version like 302-5.3 +>>>&1 string x %s +# NL terminated MD5 checksum +>>>>&1 string x \b, MD5 %s +# NL terminated original package length +>>>>>&1 string x \b, unsplitted size %s +# NL terminated part length +>>>>>>&1 string x \b, part length %s +# NL terminated package part like n/m +>>>>>>>&1 string x \b, part %s +# NL terminated package architecture like armhf since dpkg 1.16.1 or later +>>>>>>>>&1 string x \b, %s + +# +# MIPS archive; they're in the portable archive format, and need to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "__________E". +# +0 string =!\n__________E MIPS archive +!:mime application/x-archive +>20 string U with MIPS Ucode members +>21 string L with MIPSEL members +>21 string B with MIPSEB members +>19 string L and an EL hash table +>19 string B and an EB hash table +>22 string X -- out of date + +# +# BSD/SVR2-and-later portable archive formats. +# +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/AR +# Reference: https://www.unix.com/man-page/opensolaris/3HEAD/ar.h/ +# Note: Mach-O universal binary in ./cafebabe is dependent +# TODO: unify current ar archive, MIPS archive, Debian package +# distinguish BSD, SVR; 32, 64 bit; HP from other 32-bit SVR; +# *.ar packages from *.a libraries. handle empty archive +0 string =!\n current ar archive +# print first and possibly second ar_name[16] for debugging purpose +#>8 string x \b, 1st "%.16s" +#>68 string x \b, 2nd "%.16s" +!:mime application/x-archive +# a in most case for libraries; lib for Microsoft libraries; ar else cases +#!:ext a/lib/ar +>8 string __.SYMDEF random library +# first member with long marked name __.SYMDEF SORTED implies BSD library +>68 string __.SYMDEF\ SORTED random library +# Reference: https://parisc.wiki.kernel.org/images-parisc/b/b2/Rad_11_0_32.pdf +# "archive file" entry moved from ./hp +# LST header system_id 0210h~PA-RISC 1.1,... identifies the target architecture +# LST header a_magic 0619h~relocatable library +>68 belong 0x020b0619 - PA-RISC1.0 relocatable library +>68 belong 0x02100619 - PA-RISC1.1 relocatable library +>68 belong 0x02110619 - PA-RISC1.2 relocatable library +>68 belong 0x02140619 - PA-RISC2.0 relocatable library +#EOF for common ar archives + +# +# "Thin" archive, as can be produced by GNU ar. +# +0 string =!\n thin archive with +>68 belong 0 no symbol entries +>68 belong 1 %d symbol entry +>68 belong >1 %d symbol entries + +0 search/1 -h- Software Tools format archive text + +# ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com) +# +# The first byte is the magic (0x1a), byte 2 is the compression type for +# the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS +# filename of the first file (null terminated). Since some types collide +# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%), +# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo. +0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000031a ARC archive data, packed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched +!:mime application/x-arc +# [JW] stuff taken from idarc, obviously ARC successors: +0 lelong&0x8080ffff 0x00000a1a PAK archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000141a ARC+ archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000481a HYP archive data +!:mime application/x-arc + +# Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk) +# I can't create either SPARK or ArcFS archives so I have not tested this stuff +# [GRR: the original entries collide with ARC, above; replaced with combined +# version (not tested)] +#0 byte 0x1a RISC OS archive (spark format) +0 string \032archive RISC OS archive (ArcFS format) +0 string Archive\000 RISC OS archive (ArcFS format) + +# All these were taken from idarc, many could not be verified. Unfortunately, +# there were many low-quality sigs, i.e. easy to trigger false positives. +# Please notify me of any real-world fishy/ambiguous signatures and I'll try +# to get my hands on the actual archiver and see if I find something better. [JW] +# probably many can be enhanced by finding some 0-byte or control char near the start + +# idarc calls this Crush/Uncompressed... *shrug* +0 string CRUSH Crush archive data +# Squeeze It (.sqz) +0 string HLSQZ Squeeze It archive data +# SQWEZ +0 string SQWEZ SQWEZ archive data +# HPack (.hpk) +0 string HPAK HPack archive data +# HAP +0 string \x91\x33HF HAP archive data +# MD/MDCD +0 string MDmd MDCD archive data +# LIM +0 string LIM\x1a LIM archive data +# SAR +3 string LH5 SAR archive data +# BSArc/BS2 +0 string \212\3SB\020\0 BSArc/BS2 archive data +# Bethesda Softworks Archive (Oblivion) +0 string BSA\0 BSArc archive data +>4 lelong x version %d +# MAR +2 string =-ah MAR archive data +# ACB +#0 belong&0x00f800ff 0x00800000 ACB archive data +# CPZ +# TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data +# JRC +0 string JRchive JRC archive data +# Quantum +0 string DS\0 Quantum archive data +# ReSOF +0 string PK\3\6 ReSOF archive data +# QuArk +0 string 7\4 QuArk archive data +# YAC +14 string YC YAC archive data +# X1 +0 string X1 X1 archive data +0 string XhDr X1 archive data +# CDC Codec (.dqt) +0 belong&0xffffe000 0x76ff2000 CDC Codec archive data +# AMGC +0 string \xad6" AMGC archive data +# NuLIB +0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data +# PakLeo +0 string LEOLZW PAKLeo archive data +# ChArc +0 string SChF ChArc archive data +# PSA +0 string PSA PSA archive data +# CrossePAC +0 string DSIGDCC CrossePAC archive data +# Freeze +0 string \x1f\x9f\x4a\x10\x0a Freeze archive data +# KBoom +0 string \xc2\xa8MP\xc2\xa8 KBoom archive data +# NSQ, must go after CDC Codec +0 string \x76\xff NSQ archive data +# DPA +0 string Dirk\ Paehl DPA archive data +# BA +# TODO: idarc says "bytes 0-2 == bytes 3-5" +# TTComp +# URL: http://fileformats.archiveteam.org/wiki/TTComp_archive +# Update: Joerg Jenderek +# GRR: line below is too general as it matches also Panorama database "TCDB 2003-10 demo.pan", others +0 string \0\6 +# look for first keyword of Panorama database *.pan +>12 search/261 DESIGN +# skip keyword with low entropy +>12 default x TTComp archive, binary, 4K dictionary +# (version 5.25) labeled the above entry as "TTComp archive data" +# From: Joerg Jenderek +# URL: https://wiki.68kmla.org/DiskCopy_4.2_format_specification +# reference: http://nulib.com/library/FTN.e00005.htm +0x52 ubeshort 0x0100 +# test for disk image size equal or above 400k +>0x40 ubelong >409599 +# test also for disk image size equal or below 1440k to skip +# windows7en.mbr UNICODE.DAT +>>0x40 ubelong <1474561 +# To skip Flags$StringJoiner.class with size 00106A61h test also for only 4 disk image sizes +# 00064000 for 400k GCR disks +# 000c8000 for 800k GCR disks +# 000b4000 for 720k MFM disks +# 00168000 for 1440k MFM disks +>>>0x40 ubelong&0xffE03fFF 0 +# display information of Apple DiskCopy 4.2 floppy image +# image pascal name padded with NULs like Microsoft Mail +>00 pstring/B x Apple DiskCopy 4.2 image %s +#!:mime application/octet-stream +!:mime application/x-dc42-floppy-image +!:apple dCpydImg +#!:ext image/dc42 +# data size in bytes like 409600 +>0x40 ubelong x \b, %u bytes +# for debugging purpose size in hexadecimal +#>0x40 ubelong x (0x%8.8x) +# tag size in bytes +>0x44 ubelong >0 \b, 0x%x tag size +# data checksum +#>0x48 ubelong x \b, 0x%x checksum +# tag checksum +#>0x4c ubelong x \b, 0x%x tag checksum +# disk encoding +>0x50 ubyte 0 \b, GCR CLV ssdd (400k) +>0x50 ubyte 1 \b, GCR CLV dsdd (800k) +>0x50 ubyte 2 \b, MFM CAV dsdd (720k) +>0x50 ubyte 3 \b, MFM CAV dshd (1440k) +>0x50 ubyte >3 \b, 0x%x encoding +# format byte +>0x51 ubyte x \b, 0x%x format +#>0x54 ubequad x \b, data 0x%16.16llx +# ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation? +0 string ESP ESP archive data +# ZPack +0 string \1ZPK\1 ZPack archive data +# Sky +0 string \xbc\x40 Sky archive data +# UFA +0 string UFA UFA archive data +# Dry +0 string =-H2O DRY archive data +# FoxSQZ +0 string FOXSQZ FoxSQZ archive data +# AR7 +0 string ,AR7 AR7 archive data +# PPMZ +0 string PPMZ PPMZ archive data +# MS Compress +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/MS-DOS_installation_compression +# Reference: https://hwiegman.home.xs4all.nl/fileformats/compress/szdd_kwaj_format.html +# Note: use correct version of extracting tool like EXPAND, UNPACK, DECOMP or 7Z +4 string \x88\xf0\x27 +# KWAJ variant +>0 string KWAJ MS Compress archive data, KWAJ variant +!:mime application/x-ms-compress-kwaj +# extension not working in version 5.32 +# magic/Magdir/archive, 284: Warning: EXTENSION type ` ??_' has bad char '?' +# file: line 284: Bad magic entry ' ??_' +#!:ext ??_ +# compression method (0-4) +>>8 uleshort x \b, %u method +# offset of compressed data +>>10 uleshort x \b, 0x%x offset +#>>(10.s) uleshort x +#>>>&-6 string x \b, TEST extension %-.3s +# header flags to mark header extensions +>>12 uleshort >0 \b, 0x%x flags +# 4 bytes: decompressed length of file +>>12 uleshort &0x01 +>>>14 ulelong x \b, original size: %u bytes +# 2 bytes: unknown purpose +# 2 bytes: length of unknown data + mentioned bytes +# 1-9 bytes: null-terminated file name +# 1-4 bytes: null-terminated file extension +>>12 uleshort &0x08 +>>>12 uleshort ^0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>>&16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>&16 string x %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>12 uleshort &0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +# 2 bytes: length of data + mentioned bytes +# +# SZDD variant Haruhiko Okumura's LZSS or 7z type MsLZ +>0 string SZDD MS Compress archive data, SZDD variant +!:mime application/x-ms-compress-szdd +#!:ext ??_ +# The character missing from the end of the filename (0=unknown) +>>9 string >\0 \b, %-.1s is last character of original name +# https://www.betaarchive.com/forum/viewtopic.php?t=26161 +# Compression mode: "A" (0x41) found but sometimes "B" in Windows 3.1 builds 026 and 034e +>>8 string !A \b, %-.1s method +>>10 ulelong >0 \b, original size: %u bytes +# QBasic SZDD variant +3 string \x88\xf0\x27 +>0 string SZ\x20 MS Compress archive data, QBasic variant +!:mime application/x-ms-compress-sz +#!:ext ??$ +>>8 ulelong >0 \b, original size: %u bytes + +# MP3 (archiver, not lossy audio compression) +0 string MP3\x1a MP3-Archiver archive data +# ZET +0 string OZ\xc3\x9d ZET archive data +# TSComp +0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data +# ARQ +0 string gW\4\1 ARQ archive data +# Squash +3 string OctSqu Squash archive data +# Terse +0 string \5\1\1\0 Terse archive data +# PUCrunch +0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data +# UHarc +0 string UHA UHarc archive data +# ABComp +0 string \2AB ABComp archive data +0 string \3AB2 ABComp archive data +# CMP +0 string CO\0 CMP archive data +# Splint +0 string \x93\xb9\x06 Splint archive data +# InstallShield +0 string \x13\x5d\x65\x8c InstallShield Z archive Data +# Gather +1 string GTH Gather archive data +# BOA +0 string BOA BOA archive data +# RAX +0 string ULEB\xa RAX archive data +# Xtreme +0 string ULEB\0 Xtreme archive data +# Pack Magic +0 string @\xc3\xa2\1\0 Pack Magic archive data +# BTS +0 belong&0xfeffffff 0x1a034465 BTS archive data +# ELI 5750 +0 string Ora\ ELI 5750 archive data +# QFC +0 string \x1aFC\x1a QFC archive data +0 string \x1aQF\x1a QFC archive data +# PRO-PACK +0 string RNC PRO-PACK archive data +# 777 +0 string 777 777 archive data +# LZS221 +0 string sTaC LZS221 archive data +# HPA +0 string HPA HPA archive data +# Arhangel +0 string LG Arhangel archive data +# EXP1, uses bzip2 +0 string 0123456789012345BZh EXP1 archive data +# IMP +0 string IMP\xa IMP archive data +# NRV +0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data +# Squish +0 string \x73\xb2\x90\xf4 Squish archive data +# Par +0 string PHILIPP Par archive data +0 string PAR Par archive data +# HIT +0 string UB HIT archive data +# SBX +0 belong&0xfffff000 0x53423000 SBX archive data +# NaShrink +0 string NSK NaShrink archive data +# SAPCAR +0 string #\ CAR\ archive\ header SAPCAR archive data +0 string CAR\ 2.00RG SAPCAR archive data +# Disintegrator +0 string DST Disintegrator archive data +# ASD +0 string ASD ASD archive data +# InstallShield CAB +0 string ISc( InstallShield CAB +# TOP4 +0 string T4\x1a TOP4 archive data +# BatComp left out: sig looks like COM executable +# so TODO: get real 4dos batcomp file and find sig +# BlakHole +0 string BH\5\7 BlakHole archive data +# BIX +0 string BIX0 BIX archive data +# ChiefLZA +0 string ChfLZ ChiefLZA archive data +# Blink +0 string Blink Blink archive data +# Logitech Compress +0 string \xda\xfa Logitech Compress archive data +# ARS-Sfx (FIXME: really a SFX? then goto COM/EXE) +1 string (C)\ STEPANYUK ARS-Sfx archive data +# AKT/AKT32 +0 string AKT32 AKT32 archive data +0 string AKT AKT archive data +# NPack +0 string MSTSM NPack archive data +# PFT +0 string \0\x50\0\x14 PFT archive data +# SemOne +0 string SEM SemOne archive data +# PPMD +0 string \x8f\xaf\xac\x84 PPMD archive data +# FIZ +0 string FIZ FIZ archive data +# MSXiE +0 belong&0xfffff0f0 0x4d530000 MSXiE archive data +# DeepFreezer +0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data +# DC +0 string =2 string \x2\x4 Xpack DiskImage archive data +#!:ext xdi +# XPack Data +# *.xpa updated by Joerg Jenderek Sep 2015 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/ +0 string xpa XPA +#!:ext xpa +# XPA32 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/xpa32.zip +# created by XPA32.EXE version 1.0.2 for Windows +>0 string xpa\0\1 \b32 archive data +# created by XPACK.COM version 1.67m or 1.67r with short 0x1800 +>3 ubeshort !0x0001 \bck archive data +# XPack Single Data +# changed by Joerg Jenderek Sep 2015 back to like in version 5.12 +# letter 'I'+ acute accent is equivalent to \xcd +0 string \xcd\ jm Xpack single archive data +#!:mime application/x-xpa-compressed +#!:ext xpa + +# TODO: missing due to unknown magic/magic at end of file: +#DWC +#ARG +#ZAR +#PC/3270 +#InstallIt +#RKive +#RK +#XPack Diskimage + +# These were inspired by idarc, but actually verified +# Dzip archiver (.dz) +# Update: Joerg Jenderek +# URL: http://speeddemosarchive.com/dzip/ +# reference: http://speeddemosarchive.com/dzip/dz29src.zip/main.c +# GRR: line below is too general as it matches also ASCII texts like Doszip commander help dz.txt +0 string DZ +# latest version is 2.9 dated 7 may 2003 +>2 byte <4 Dzip archive data +!:mime application/x-dzip +#!:ext dz +>>2 byte x \b, version %i +>>3 byte x \b.%i +>>4 ulelong x \b, offset 0x%x +>>8 ulelong x \b, %u files +# ZZip archiver (.zz) +0 string ZZ\ \0\0 ZZip archive data +0 string ZZ0 ZZip archive data +# PAQ archiver (.paq) +0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data +0 string PAQ PAQ archive data +>3 byte&0xf0 0x30 +>>3 byte x (v%c) +# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP) +0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data +0 string JARCS JAR (ARJ Software, Inc.) archive data + +# ARJ archiver (jason@jarthur.Claremont.EDU) +0 leshort 0xea60 ARJ archive data +!:mime application/x-arj +>5 byte x \b, v%d, +>8 byte &0x04 multi-volume, +>8 byte &0x10 slash-switched, +>8 byte &0x20 backup, +>34 string x original name: %s, +>7 byte 0 os: MS-DOS +>7 byte 1 os: PRIMOS +>7 byte 2 os: Unix +>7 byte 3 os: Amiga +>7 byte 4 os: Macintosh +>7 byte 5 os: OS/2 +>7 byte 6 os: Apple ][ GS +>7 byte 7 os: Atari ST +>7 byte 8 os: NeXT +>7 byte 9 os: VAX/VMS +>3 byte >0 %d] +# [JW] idarc says this is also possible +2 leshort 0xea60 ARJ archive data + +# HA archiver (Greg Roelofs, newt@uchicago.edu) +# This is a really bad format. A file containing HAWAII will match this... +#0 string HA HA archive data, +#>2 leshort =1 1 file, +#>2 leshort >1 %hu files, +#>4 byte&0x0f =0 first is type CPY +#>4 byte&0x0f =1 first is type ASC +#>4 byte&0x0f =2 first is type HSC +#>4 byte&0x0f =0x0e first is type DIR +#>4 byte&0x0f =0x0f first is type SPECIAL +# suggestion: at least identify small archives (<1024 files) +0 belong&0xffff00fc 0x48410000 HA archive data +>2 leshort =1 1 file, +>2 leshort >1 %u files, +>4 byte&0x0f =0 first is type CPY +>4 byte&0x0f =1 first is type ASC +>4 byte&0x0f =2 first is type HSC +>4 byte&0x0f =0x0e first is type DIR +>4 byte&0x0f =0x0f first is type SPECIAL + +# HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz) +0 string HPAK HPACK archive data + +# JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net +0 string \351,\001JAM\ JAM archive, +>7 string >\0 version %.4s +>0x26 byte =0x27 - +>>0x2b string >\0 label %.11s, +>>0x27 lelong x serial %08x, +>>0x36 string >\0 fstype %.8s + +# Very old RAR archive +# https://jasonblanks.com/wp-includes/images/papers/KnowyourarchiveRAR.pdf +0 string RE\x7e\x5e RAR archive data (26 string \x8\0\0\0mimetypeapplication/ + +# KOffice / OpenOffice & StarOffice / OpenDocument formats +# From: Abel Cheung + +# KOffice (1.2 or above) formats +# (mimetype contains "application/vnd.kde.") +>>50 string vnd.kde. KOffice (>=1.2) +>>>58 string karbon Karbon document +>>>58 string kchart KChart document +>>>58 string kformula KFormula document +>>>58 string kivio Kivio document +>>>58 string kontour Kontour document +>>>58 string kpresenter KPresenter document +>>>58 string kspread KSpread document +>>>58 string kword KWord document + +# OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) +# (mimetype contains "application/vnd.sun.xml.") +# URL: https://en.wikipedia.org/wiki/OpenOffice.org_XML +# reference: http://fileformats.archiveteam.org/wiki/OpenOffice.org_XML +>>50 string vnd.sun.xml. OpenOffice.org 1.x +>>>62 string writer Writer +>>>>68 byte !0x2e document +!:mime application/vnd.sun.xml.writer +#!:ext sxw +>>>>68 string .template template +!:mime application/vnd.sun.xml.writer.template +#!:ext stw +>>>>68 string .web Web template +!:mime application/vnd.sun.xml.writer.web +#!:ext stw +>>>>68 string .global global document +!:mime application/vnd.sun.xml.writer.global +#!:ext sxg +>>>62 string calc Calc +>>>>66 byte !0x2e spreadsheet +!:mime application/vnd.sun.xml.calc +#!:ext sxc +>>>>66 string .template template +!:mime application/vnd.sun.xml.calc.template +#!:ext stc +>>>62 string draw Draw +>>>>66 byte !0x2e document +!:mime application/vnd.sun.xml.draw +#!:ext sxd +>>>>66 string .template template +!:mime application/vnd.sun.xml.draw.template +#!:ext std +>>>62 string impress Impress +>>>>69 byte !0x2e presentation +!:mime application/vnd.sun.xml.impress +#!:ext sxi +>>>>69 string .template template +!:mime application/vnd.sun.xml.impress.template +#!:ext sti +>>>62 string math Math document +!:mime application/vnd.sun.xml.math +#!:ext sxm +>>>62 string base Database file +!:mime application/vnd.sun.xml.base +#!:ext sdb + +# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) +# URL: http://fileformats.archiveteam.org/wiki/OpenDocument +# https://lists.oasis-open.org/archives/office/200505/msg00006.html +# (mimetype contains "application/vnd.oasis.opendocument.") +>>50 string vnd.oasis.opendocument. OpenDocument +>>>73 string text +>>>>77 byte !0x2d Text +!:mime application/vnd.oasis.opendocument.text +#!:ext odt +>>>>77 string -template Text Template +!:mime application/vnd.oasis.opendocument.text-template +#!:ext ott +>>>>77 string -web HTML Document Template +!:mime application/vnd.oasis.opendocument.text-web +#!:ext oth +>>>>77 string -master Master Document +!:mime application/vnd.oasis.opendocument.text-master +#!:ext odm +>>>73 string graphics +>>>>81 byte !0x2d Drawing +!:mime application/vnd.oasis.opendocument.graphics +#!:ext odg +>>>>81 string -template Drawing Template +!:mime application/vnd.oasis.opendocument.graphics-template +#!:ext otg +>>>73 string presentation +>>>>85 byte !0x2d Presentation +!:mime application/vnd.oasis.opendocument.presentation +#!:ext odp +>>>>85 string -template Presentation Template +!:mime application/vnd.oasis.opendocument.presentation-template +#!:ext otp +>>>73 string spreadsheet +>>>>84 byte !0x2d Spreadsheet +!:mime application/vnd.oasis.opendocument.spreadsheet +#!:ext ods +>>>>84 string -template Spreadsheet Template +!:mime application/vnd.oasis.opendocument.spreadsheet-template +#!:ext ots +>>>73 string chart +>>>>78 byte !0x2d Chart +!:mime application/vnd.oasis.opendocument.chart +#!:ext odc +>>>>78 string -template Chart Template +!:mime application/vnd.oasis.opendocument.chart-template +#!:ext otc +>>>73 string formula +>>>>80 byte !0x2d Formula +!:mime application/vnd.oasis.opendocument.formula +#!:ext odf +>>>>80 string -template Formula Template +!:mime application/vnd.oasis.opendocument.formula-template +#!:ext otf +# https://www.loc.gov/preservation/digital/formats/fdd/fdd000441.shtml +>>>73 string database Database +!:mime application/vnd.oasis.opendocument.database +#!:ext odb +# Valid for LibreOffice Base 6.0.1.1 at least +>>>73 string base Database +# https://bugs.documentfoundation.org/show_bug.cgi?id=45854 +!:mime application/vnd.oasis.opendocument.database +#!:mime application/vnd.oasis.opendocument.base +#!:ext odb +>>>73 string image +>>>>78 byte !0x2d Image +!:mime application/vnd.oasis.opendocument.image +#!:ext odi +>>>>78 string -template Image Template +!:mime application/vnd.oasis.opendocument.image-template +#!:ext oti + +# EPUB (OEBPS) books using OCF (OEBPS Container Format) +# https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. +# From: Ralf Brown +>>50 string epub+zip EPUB document +!:mime application/epub+zip + +# From: Joerg Jenderek +# URL: http://en.wikipedia.org/wiki/CorelDRAW +# NOTE: version; til 2 WL-based; from 3 til 13 by ./riff; from 14 zip based +>>50 string x-vnd.corel. Corel +>>>62 string draw.document+zip Draw drawing, version 14-16 +!:mime application/x-vnd.corel.draw.document+zip +#!:ext cdr +>>>62 string draw.template+zip Draw template, version 14-16 +!:mime application/x-vnd.corel.draw.template+zip +#!:ext cdrt +>>>62 string zcf.draw.document+zip Draw drawing, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.document+zip +#!:ext cdr +>>>62 string zcf.draw.template+zip Draw template, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.template+zip +#!:ext cdt/cdrt +# URL: http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html +>>>62 string zcf.pattern+zip Draw pattern, version 22 +!:mime application/x-vnd.corel.zcf.pattern+zip +#!:ext pat +# URL: https://en.wikipedia.org/wiki/Corel_Designer +# Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer +# Note: called by TrID "Corel DESIGN graphics" +>>>62 string designer.document+zip DESIGNER graphics, version 14-16 +!:mime application/x-vnd.corel.designer.document+zip +#!:ext des +>>>62 string zcf.designer.document+zip DESIGNER graphics, version 17-21 +!:mime application/x-vnd.corel.zcf.designer.document+zip +#!:ext des +# URL: http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/ +# CorelDRAW-Corel-Symbol-Library-CSL.html +>>>62 string symbol.library+zip Symbol Library, version 6-16.3 +!:mime application/x-vnd.corel.symbol.library+zip +#!:ext csl +>>>62 string zcf.symbol.library+zip Symbol Library, version 17-22 +!:mime application/x-vnd.corel.zcf.symbol.library+zip +#!:ext csl + +# Catch other ZIP-with-mimetype formats +# In a ZIP file, the bytes immediately after a member's contents are +# always "PK". The 2 regex rules here print the "mimetype" member's +# contents up to the first 'P'. Luckily, most MIME types don't contain +# any capital 'P's. This is a kludge. +# (mimetype contains "application/") +>>50 default x Zip data +>>>38 regex [!-OQ-~]+ (MIME type "%s"?) +!:mime application/zip +# (mimetype contents other than "application/*") +>26 string \x8\0\0\0mimetype +>>38 string !application/ +>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?) +!:mime application/zip + +# Java Jar files +>(26.s+30) leshort 0xcafe Java archive data (JAR) +!:mime application/java-archive + +# iOS App +>(26.s+30) leshort !0xcafe +>>26 string !\x8\0\0\0mimetype +>>>30 string Payload/ +>>>>38 search/64 .app/ iOS App +!:mime application/x-ios-app + +>30 search/100/b application/epub+zip EPUB document +!:mime application/epub+zip + +# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) +# Next line excludes specialized formats: +>(26.s+30) leshort !0xcafe +>>30 search/100/b !application/epub+zip +>>>26 string !\x8\0\0\0mimetype Zip archive data +!:mime application/zip +>>>>4 beshort x \b, at least +>>>>4 beshort x to extract +>>>>8 beshort x \b, compression method= +>>>>0x161 string WINZIP \b, WinZIP self-extracting + +# StarView Metafile +# From Pierre Ducroquet +0 string VCLMTF StarView MetaFile +>6 beshort x \b, version %d +>8 belong x \b, size %d + +# Zoo archiver +20 lelong 0xfdc4a7dc Zoo archive data +!:mime application/x-zoo +>4 byte >48 \b, v%c. +>>6 byte >47 \b%c +>>>7 byte >47 \b%c +>32 byte >0 \b, modify: v%d +>>33 byte x \b.%d+ +>42 lelong 0xfdc4a7dc \b, +>>70 byte >0 extract: v%d +>>>71 byte x \b.%d+ + +# Shell archives +10 string #\ This\ is\ a\ shell\ archive shell archive text +!:mime application/octet-stream + +# +# LBR. NB: May conflict with the questionable +# "binary Computer Graphics Metafile" format. +# +0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data +# +# From Rafael Laboissiere +# The Project Revision Control System (see +# http://prcs.sourceforge.net) generates a packaged project +# file which is recognized by the following entry: +0 leshort 0xeb81 PRCS packaged project + +# Microsoft cabinets +# by David Necas (Yeti) +#0 string MSCF\0\0\0\0 Microsoft cabinet file data, +#>25 byte x v%d +#>24 byte x \b.%d +# MPi: All CABs have version 1.3, so this is pointless. +# Better magic in debian-additions. + +# GTKtalog catalogs +# by David Necas (Yeti) +4 string gtktalog\ GTKtalog catalog data, +>13 string 3 version 3 +>>14 beshort 0x677a (gzipped) +>>14 beshort !0x677a (not gzipped) +>13 string >3 version %s + +############################################################################ +# Parity archive reconstruction file, the 'par' file format now used on Usenet. +0 string PAR\0 PARity archive data +>48 leshort =0 - Index file +>48 leshort >0 - file number %d + +# Felix von Leitner +0 string d8:announce BitTorrent file +!:mime application/x-bittorrent +# Durval Menezes, +0 string d13:announce-list BitTorrent file +!:mime application/x-bittorrent +0 string d7:comment BitTorrent file +!:mime application/x-bittorrent +0 string d4:info BitTorrent file +!:mime application/x-bittorrent + +# Atari MSA archive - Teemu Hukkanen +0 beshort 0x0e0f Atari MSA archive data +>2 beshort x \b, %d sectors per track +>4 beshort 0 \b, 1 sided +>4 beshort 1 \b, 2 sided +>6 beshort x \b, starting track: %d +>8 beshort x \b, ending track: %d + +# Alternate ZIP string (amc@arwen.cs.berkeley.edu) +0 string PK00PK\003\004 Zip archive data +!:mime application/zip +#!:ext zip/cbz + +# ACE archive (from http://www.wotsit.org/download.asp?f=ace) +# by Stefan `Sec` Zehl +7 string **ACE** ACE archive data +>15 byte >0 version %d +>16 byte =0x00 \b, from MS-DOS +>16 byte =0x01 \b, from OS/2 +>16 byte =0x02 \b, from Win/32 +>16 byte =0x03 \b, from Unix +>16 byte =0x04 \b, from MacOS +>16 byte =0x05 \b, from WinNT +>16 byte =0x06 \b, from Primos +>16 byte =0x07 \b, from AppleGS +>16 byte =0x08 \b, from Atari +>16 byte =0x09 \b, from Vax/VMS +>16 byte =0x0A \b, from Amiga +>16 byte =0x0B \b, from Next +>14 byte x \b, version %d to extract +>5 leshort &0x0080 \b, multiple volumes, +>>17 byte x \b (part %d), +>5 leshort &0x0002 \b, contains comment +>5 leshort &0x0200 \b, sfx +>5 leshort &0x0400 \b, small dictionary +>5 leshort &0x0800 \b, multi-volume +>5 leshort &0x1000 \b, contains AV-String +>>30 string \x16*UNREGISTERED\x20VERSION* (unregistered) +>5 leshort &0x2000 \b, with recovery record +>5 leshort &0x4000 \b, locked +>5 leshort &0x8000 \b, solid +# Date in MS-DOS format (whatever that is) +#>18 lelong x Created on + +# sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann +# +0x1A string sfArk sfArk compressed Soundfont +>0x15 string 2 +>>0x1 string >\0 Version %s +>>0x2A string >\0 : %s + +# DR-DOS 7.03 Packed File *.??_ +# Reference: http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm +# Note: unpacked by PNUNPACK.EXE +0 string Packed\ File\ +# by looking for Control-Z skip ASCII text starting with Packed File +>0x18 ubyte 0x1a Personal NetWare Packed File +!:mime application/x-novell-compress +#!:ext ??_ +>>12 string x \b, was "%.12s" +# 1 or 2 +#>>0x19 ubyte x \b, at 0x19 %u +>>0x1b ulelong x with %u bytes + +# EET archive +# From: Tilman Sauerbeck +0 belong 0x1ee7ff00 EET archive +!:mime application/x-eet + +# rzip archives +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +# From: Joerg Jenderek +# URL: https://help.foxitsoftware.com/kb/install-fzip-file.php +# reference: http://mark0.net/download/triddefs_xml.7z/ +# defs/f/fzip.trid.xml +# Note: unknown compression; No "PK" zip magic; normally in directory like +# "%APPDATA%\Foxit Software\Addon\Foxit Reader\Install" +0 ubequad 0x2506781901010000 Foxit add-on/update +!:mime application/x-fzip +#!:ext fzip + +# From: "Robert Dale" +0 belong 123 dar archive, +>4 belong x label "%.8x +>>8 belong x %.8x +>>>12 beshort x %.4x" +>14 byte 0x54 end slice +>14 beshort 0x4e4e multi-part +>14 beshort 0x4e53 multi-part, with -S + +# Symbian installation files +# https://www.thouky.co.uk/software/psifs/sis.html +# http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf +8 lelong 0x10000419 Symbian installation file +!:mime application/vnd.symbian.install +>4 lelong 0x1000006D (EPOC release 3/4/5) +>4 lelong 0x10003A12 (EPOC release 6) +0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x) +!:mime x-epoc/x-sisx-app + +# From "Nelson A. de Oliveira" +0 string MPQ\032 MoPaQ (MPQ) archive + +# From: "Nelson A. de Oliveira" +# .kgb +0 string KGB_arch KGB Archiver file +>10 string x with compression level %.1s + +# Type: Parity Archive +# From: Daniel van Eeden +0 string PAR2 Parity Archive Volume Set + +# Bacula volume format. (Volumes always start with a block header.) +# URL: https://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html +# From: Adam Buchbinder +12 string BB02 Bacula volume +>20 bedate x \b, started %s + +# ePub is XHTML + XML inside a ZIP archive. The first member of the +# archive must be an uncompressed file called 'mimetype' with contents +# 'application/epub+zip' + + +# From: "Michael Gorny" +# ZPAQ: http://mattmahoney.net/dc/zpaq.html +0 string zPQ ZPAQ stream +>3 byte x \b, level %d +# From: Barry Carter +# https://encode.ru/threads/456-zpaq-updates/page32 +0 string 7kSt ZPAQ file + +# BBeB ebook, unencrypted (LRF format) +# URL: https://www.sven.de/librie/Librie/LrfFormat +# From: Adam Buchbinder +0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted +>8 beshort x \b, version %d +>36 byte 1 \b, front-to-back +>36 byte 16 \b, back-to-front +>42 beshort x \b, (%dx, +>44 beshort x %d) + +# Symantec GHOST image by Joerg Jenderek at May 2014 +# https://us.norton.com/ghost/ +# https://www.garykessler.net/library/file_sigs.html +0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image +# *.GHO +>2 ubyte&0x08 0x00 \b, first file +# *.GHS or *.[0-9] with cns program option +>2 ubyte&0x08 0x08 \b, split file +# part of split index interesting for *.ghs +>>4 ubyte x id=0x%x +# compression tag minus one equals numeric compression command line switch z[1-9] +>3 ubyte 0 \b, no compression +>3 ubyte 2 \b, fast compression (Z1) +>3 ubyte 3 \b, medium compression (Z2) +>3 ubyte >3 +>>3 ubyte <11 \b, compression (Z%d-1) +>2 ubyte&0x08 0x00 +# ~ 30 byte password field only for *.gho +>>12 ubequad !0 \b, password protected +>>44 ubyte !1 +# 1~Image All, sector-by-sector only for *.gho +>>>10 ubyte 1 \b, sector copy +# 1~Image Boot track only for *.gho +>>>43 ubyte 1 \b, boot track +# 1~Image Disc only for *.gho implies Image Boot track and sector copy +>>44 ubyte 1 \b, disc sector copy +# optional image description only *.gho +>>0xff string >\0 "%-.254s" +# look for DOS sector end sequence +>0xE08 search/7776 \x55\xAA +>>&-512 indirect x \b; contains + +# Google Chrome extensions +# https://developer.chrome.com/extensions/crx +# https://developer.chrome.com/extensions/hosting +0 string Cr24 Google Chrome extension +!:mime application/x-chrome-extension +>4 ulong x \b, version %u + +# SeqBox - Sequenced container +# ext: sbx, seqbox +# Marco Pontello marcopon@gmail.com +# reference: https://github.com/MarcoPon/SeqBox +0 string SBx SeqBox, +>3 byte x version %d + +# LyNX archive +56 string USE\040LYNX\040TO\040DISSOLVE\040THIS\040FILE LyNX archive + +# From: Joerg Jenderek +# URL: https://www.acronis.com/ +# Reference: https://en.wikipedia.org/wiki/TIB_(file_format) +# Note: only tested with True Image 2013 Build 5962 and 2019 Build 14110 +0 ubequad 0xce24b9a220000000 Acronis True Image backup +!:mime application/x-acronis-tib +#!:ext tib +# 01000000 +#>20 ubelong x \b, at 20 0x%x +# 20000000 +#>28 ubelong x \b, at 28 0x%x +# strings like "Generic- SD/MMC 1.00" "Unknown Disk" "Msft Virtual Disk 1.0" +# ??? +# strings like "\Device\0000011e" "\Device\0000015a" +#>0 search/0x6852300/cs \\Device\\ +#>>&-1 pstring x \b, %s +# "\Device\HarddiskVolume30" "\Device\HarddiskVolume39" +#>>>&1 search/180/cs \\Device\\ +#>>>>&-1 pstring x \b, %s +#>>>>>&0 search/29/cs \0\0\xc8\0 +# disk label +#>>>>>>&10 lestring16 x \b, disk label %11.11s +#>>>>>>&9 plestring16 x \b, disk label "%11.11s" +#>>>>>>&10 ubequad x %16.16llx + + +# Gentoo XPAK binary package +# by Michal Gorny +# https://gitweb.gentoo.org/proj/portage.git/tree/man/xpak.5 +-4 string STOP +>-16 string XPAKSTOP Gentoo binary package (XPAK) + +# From: Joerg Jenderek +# URL: https://kodi.wiki/view/TexturePacker +# Reference: https://mirrors.kodi.tv/releases/source/17.3-Krypton.tar.gz +# /xbmc-Krypton/xbmc/guilib/XBTF.h +# /xbmc-Krypton/xbmc/guilib/XBTF.cpp +0 string XBTF +# skip ASCII text by looking for terminating \0 of path +>264 ubyte 0 XBMC texture package +!:mime application/x-xbmc-xbt +#!:ext xbt +# XBTF_VERSION 2 +>>4 string !2 \b, version %-.1s +# nofFiles /xbmc-Krypton/xbmc/guilib/XBTFReader.cpp +>>5 ulelong x \b, %u file +# plural s +>>5 ulelong >1 \bs +# path[CXBTFFile[MaximumPathLength=256] +>>9 string x \b, 1st %s + +# ALZIP archive +# by Hyungjun Park , Hajin Jang +# http://kippler.com/win/unalz/ +# https://salsa.debian.org/l10n-korean-team/unalz +0 string ALZ\001 ALZ archive data +#!:ext alz + +# https://cf-aldn.altools.co.kr/setup/EGG_Specification.zip +0 string EGGA EGG archive data, +#!:ext egg +>5 byte x version %u +>4 byte x \b.%u +>>0x0E ulelong =0x08E28222 +>>0x0E ulelong =0x24F5A262 \b, split +>>0x0E ulelong =0x24E5A060 \b, solid +>>0x0E default x \b, unknown + +# PAQ9A archive +# URL: http://mattmahoney.net/dc/#paq9a +# Note: Line 1186 of paq9a.cpp gives the magic bytes +0 string pQ9\001 PAQ9A archive + +#------------------------------------------------------------------------------ +# $File: compress,v 1.80 2021/03/15 17:49:24 christos Exp $ +# compress: file(1) magic for pure-compression formats (no archives) +# +# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. +# +# Formats for various forms of compressed data +# Formats for "compress" proper have been moved into "compress.c", +# because it tries to uncompress it to figure out what's inside. + +# standard unix compress +0 string \037\235 compress'd data +!:mime application/x-compress +!:apple LZIVZIVU +>2 byte&0x80 >0 block compressed +>2 byte&0x1f x %d bits + +# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver) +# URL: https://en.wikipedia.org/wiki/Gzip +# Reference: https://tools.ietf.org/html/rfc1952 +# Update: Joerg Jenderek, Apr 2019 +# Edited by Chris Chittleborough , March 2002 +# * Original filename is only at offset 10 if "extra field" absent +# * Produce shorter output - notably, only report compression methods +# other than 8 ("deflate", the only method defined in RFC 1952). +# Note: find defs -iname '*.trid.xml' -exec grep -q '1F8B08' {} \; -ls +# TODO: +# FBR Blueberry FlashBack screen Record https://www.flashbackrecorder.com/ +# KPR KOffice/Calligra KPresenter application/x-kpresenter +# KPT KOffice/Calligra KPresenter template? application/x-kpresenter +# SAV Diggles Saved Game File http://www.innonics.com +# SAV FarCry (demo) saved game http://www.farcry-thegame.com +# DAT ZOAGZIP game data format http://en.wikipedia.org/wiki/SD_Gundam_Capsule_Fighter +0 string \037\213 +# to display gzip compressed (strength=100=2*50) before other (strength=50)? +#!:strength * 2 +# no FNAME and FCOMMENT bit implies no file name/comment. That means only binary +>3 byte&0x18 =0 +# For binary gzipped no ASCII text should occur +# mcd-monu-cad.trid.xml +>>10 string MCD Monu-Cad Drawing, Component or Font +#>>36 string Created\ with\ MONU-CAD +#!:mime application/octet-stream +# http://fileformats.archiveteam.org/wiki/Monu-CAD +# http://www.monucad.com/downloads/FullDemo-2005.EXE +# /HANDS96.MCC Component +# /DEMO_DD01.MCD Drawing +# /MCALF020.FNT Font +#!:ext mcc/mcd/fnt +# http://www.generalcadd.com +>>10 string GXD General CADD, Drawing or Component +#!:mime application/octet-stream +# /gxc/BUILDINGEDGE.gxc Component +# /gxd/HOCKETT-STPAUL-WRHSE.gxd Drawing +# /gxd/POWERLAND-MILL-ADD-11.gxd Drawing v9.1.06 +#!:ext gxc/gxd +#>>>13 ubyte 0 \b, version 0 +>>>13 string 09 \b, version 9 +# other gzipped binary like gzipped tar, VirtualBox extension package,... +>>10 default x gzip compressed data +!:mime application/gzip +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# gzipped TAR or VirtualBox extension package +#!:mime application/x-compressed-tar +#!:mime application/x-virtualbox-vbox-extpack +# https://www.w3.org/TR/SVG/mimereg.html +#!:mime image/image/svg+xml-compressed +# zlib.3.gz +# microcode-20180312.tgz +# tpz same as tgz +# lua-md5_1.2-1_i386_i486.ipk https://en.wikipedia.org/wiki/Opkg +# Oracle_VM_VirtualBox_Extension_Pack-5.0.12-104815.vbox-extpack +#!:ext gz/tgz/tpz/ipk/vbox-extpack/svgz +# FNAME/FCOMMENT bit implies file name/comment as iso-8859-1 text +>3 byte&0x18 >0 gzip compressed data +!:mime application/gzip +# gzipped tar, gzipped Abiword document +#!:mime application/x-compressed-tar +#!:mime application/x-abiword-compressed +#!:mime image/image/svg+xml-compressed +# kleopatra_splashscreen.svgz gzipped .svg +#!:ext gz/tgz/tpz/zabw/svgz +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# display information of gzip compressed files +#>2 byte x THIS iS GZIP +>2 byte <8 \b, reserved method +>2 byte >8 \b, unknown method +>3 byte &0x01 \b, ASCII +>3 byte &0x02 \b, has CRC +>3 byte &0x04 \b, extra field +>3 byte&0xC =0x08 +>>10 string x \b, was "%s" +>3 byte &0x10 \b, has comment +>3 byte &0x20 \b, encrypted +>4 ledate >0 \b, last modified: %s +>8 byte 2 \b, max compression +>8 byte 4 \b, max speed +>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT) +>9 byte =0x01 \b, from Amiga +>9 byte =0x02 \b, from VMS +>9 byte =0x03 \b, from Unix +>9 byte =0x04 \b, from VM/CMS +>9 byte =0x05 \b, from Atari +>9 byte =0x06 \b, from HPFS filesystem (OS/2, NT) +>9 byte =0x07 \b, from MacOS +>9 byte =0x08 \b, from Z-System +>9 byte =0x09 \b, from CP/M +>9 byte =0x0A \b, from TOPS/20 +>9 byte =0x0B \b, from NTFS filesystem (NT) +>9 byte =0x0C \b, from QDOS +>9 byte =0x0D \b, from Acorn RISCOS +# size of the original (uncompressed) input data modulo 2^32 +#>-4 ulelong x \b, original size modulo 2^32 %u +#ERROR: line 114: non zero offset 1048572 at level 1 + +# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis +0 string \037\036 packed data +!:mime application/octet-stream +>2 belong >1 \b, %d characters originally +>2 belong =1 \b, %d character originally +# +# This magic number is byte-order-independent. +0 short 0x1f1f old packed data +!:mime application/octet-stream + +# XXX - why *two* entries for "compacted data", one of which is +# byte-order independent, and one of which is byte-order dependent? +# +0 short 0x1fff compacted data +!:mime application/octet-stream +# This string is valid for SunOS (BE) and a matching "short" is listed +# in the Ultrix (LE) magic file. +0 string \377\037 compacted data +!:mime application/octet-stream +0 short 0145405 huf output +!:mime application/octet-stream + +# bzip2 +0 string BZh bzip2 compressed data +!:mime application/x-bzip2 +>3 byte >47 \b, block size = %c00k + +# bzip a block-sorting file compressor +# by Julian Seward and others +0 string BZ0 bzip compressed data +!:mime application/x-bzip +>3 byte >47 \b, block size = %c00k + +# lzip +0 string LZIP lzip compressed data +!:mime application/x-lzip +>4 byte x \b, version: %d + +# squeeze and crunch +# Michael Haardt +0 beshort 0x76FF squeezed data, +>4 string x original name %s +0 beshort 0x76FE crunched data, +>2 string x original name %s +0 beshort 0x76FD LZH compressed data, +>2 string x original name %s + +# Freeze +0 string \037\237 frozen file 2.1 +0 string \037\236 frozen file 1.0 (or gzip 0.5) + +# SCO compress -H (LZH) +0 string \037\240 SCO compress -H (LZH) data + +# European GSM 06.10 is a provisional standard for full-rate speech +# transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse +# excitation/long term prediction) coding at 13 kbit/s. +# +# There's only a magic nibble (4 bits); that nibble repeats every 33 +# bytes. This isn't suited for use, but maybe we can use it someday. +# +# This will cause very short GSM files to be declared as data and +# mismatches to be declared as data too! +#0 byte&0xF0 0xd0 data +#>33 byte&0xF0 0xd0 +#>66 byte&0xF0 0xd0 +#>99 byte&0xF0 0xd0 +#>132 byte&0xF0 0xd0 GSM 06.10 compressed audio + +# lzop from +0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data +>9 beshort <0x0940 +>>9 byte&0xf0 =0x00 - version 0. +>>9 beshort&0x0fff x \b%03x, +>>13 byte 1 LZO1X-1, +>>13 byte 2 LZO1X-1(15), +>>13 byte 3 LZO1X-999, +## >>22 bedate >0 last modified: %s, +>>14 byte =0x00 os: MS-DOS +>>14 byte =0x01 os: Amiga +>>14 byte =0x02 os: VMS +>>14 byte =0x03 os: Unix +>>14 byte =0x05 os: Atari +>>14 byte =0x06 os: OS/2 +>>14 byte =0x07 os: MacOS +>>14 byte =0x0A os: Tops/20 +>>14 byte =0x0B os: WinNT +>>14 byte =0x0E os: Win32 +>9 beshort >0x0939 +>>9 byte&0xf0 =0x00 - version 0. +>>9 byte&0xf0 =0x10 - version 1. +>>9 byte&0xf0 =0x20 - version 2. +>>9 beshort&0x0fff x \b%03x, +>>15 byte 1 LZO1X-1, +>>15 byte 2 LZO1X-1(15), +>>15 byte 3 LZO1X-999, +## >>25 bedate >0 last modified: %s, +>>17 byte =0x00 os: MS-DOS +>>17 byte =0x01 os: Amiga +>>17 byte =0x02 os: VMS +>>17 byte =0x03 os: Unix +>>17 byte =0x05 os: Atari +>>17 byte =0x06 os: OS/2 +>>17 byte =0x07 os: MacOS +>>17 byte =0x0A os: Tops/20 +>>17 byte =0x0B os: WinNT +>>17 byte =0x0E os: Win32 + +# 4.3BSD-Quasijarus Strong Compression +# https://minnie.tuhs.org/Quasijarus/compress.html +0 string \037\241 Quasijarus strong compressed data + +# From: Cory Dikkers +0 string XPKF Amiga xpkf.library compressed data +0 string PP11 Power Packer 1.1 compressed data +0 string PP20 Power Packer 2.0 compressed data, +>4 belong 0x09090909 fast compression +>4 belong 0x090A0A0A mediocre compression +>4 belong 0x090A0B0B good compression +>4 belong 0x090A0C0C very good compression +>4 belong 0x090A0C0D best compression + +# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at) +# https://www.7-zip.org or DOC/7zFormat.txt +# +0 string 7z\274\257\047\034 7-zip archive data, +>6 byte x version %d +>7 byte x \b.%d +!:mime application/x-7z-compressed +#!:ext 7z/cb7 + +# Type: LZMA +0 lelong&0xffffff =0x5d +>12 leshort 0xff lzma compressed data, +!:mime application/x-lzma +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld +>12 leshort 0 lzma compressed data, +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld + +# http://tukaani.org/xz/xz-file-format.txt +0 ustring \xFD7zXZ\x00 xz compressed data, checksum +>7 byte&0xf 0x0 NONE +>7 byte&0xf 0x1 CRC32 +>7 byte&0xf 0x4 CRC64 +>7 byte&0xf 0xa SHA-256 + +!:strength * 2 +!:mime application/x-xz + +# https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt +0 string LRZI LRZIP compressed data +>4 byte x - version %d +>5 byte x \b.%d +!:mime application/x-lrzip + +# https://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html +0 lelong 0x184d2204 lz4 compressed data (v1.4+) +!:mime application/x-lz4 +# Added by osm0sis@xda-developers.com +0 lelong 0x184c2103 lz4 compressed data (v1.0-v1.3) +!:mime application/x-lz4 +0 lelong 0x184c2102 lz4-l compressed data (v0.1-v0.9) +!:mime application/x-lz4 + +# Zstandard/LZ4 skippable frames +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong&0xFFFFFFF0 0x184D2A50 +>(4.l+8) indirect x + +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong 0xEC30A437 Zstandard dictionary +!:mime application/x-std-dictionary +>4 lelong x (ID %u) + +# AFX compressed files (Wolfram Kleff) +2 string -afx- AFX compressed file data + +# Supplementary magic data for the file(1) command to support +# rzip(1). The format is described in magic(5). +# +# Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with +# this file. +# +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +0 string ArC\x01 FreeArc archive + +# Type: DACT compressed files +0 long 0x444354C3 DACT compressed data +>4 byte >-1 (version %i. +>5 byte >-1 %i. +>6 byte >-1 %i) +>7 long >0 , original size: %i bytes +>15 long >30 , block size: %i bytes + +# Valve Pack (VPK) files +0 lelong 0x55aa1234 Valve Pak file +>0x4 lelong x \b, version %u +>0x8 lelong x \b, %u entries + +# Snappy framing format +# https://code.google.com/p/snappy/source/browse/trunk/framing_format.txt +0 string \377\006\0\0sNaPpY snappy framed data +!:mime application/x-snappy-framed + +# qpress, https://www.quicklz.com/ +0 string qpress10 qpress compressed data +!:mime application/x-qpress + +# Zlib https://www.ietf.org/rfc/rfc6713.txt +0 string/b x +>0 beshort%31 =0 +>>0 byte&0xf =8 +>>>0 byte&0x80 =0 zlib compressed data +!:mime application/zlib + +# BWC compression +0 string BWC +>3 byte 0 BWC compressed data + +# UCL compression +0 bequad 0x00e955434cff011a UCL compressed data + +# Softlib archive +0 string SLIB Softlib archive +>4 leshort x \b, version %d +>6 leshort x (contains %d files) + +# URL: https://github.com/lzfse/lzfse/blob/master/src/lzfse_internal.h#L276 +# From: Eric Hall +0 string bvx- lzfse encoded, no compression +0 string bvx1 lzfse compressed, uncompressed tables +0 string bvx2 lzfse compressed, compressed tables +0 string bvxn lzfse encoded, lzvn compressed + +# pcxLib.exe compression program +# http://www.shikadi.net/moddingwiki/PCX_Library +0 string/b pcxLib + +#------------------------------------------------------------ +# $File: android,v 1.18 2021/02/23 00:51:10 christos Exp $ +# Various android related magic entries +#------------------------------------------------------------ + +# Dalvik .dex format. http://retrodev.com/android/dexformat.html +# From "Mike Fleming" +# Fixed to avoid regexec 17 errors on some dex files +# From "Tim Strazzere" +0 string dex\n +>0 regex dex\n[0-9]{2}\0 Dalvik dex file +>4 string >000 version %s +0 string dey\n +>0 regex dey\n[0-9]{2}\0 Dalvik dex file (optimized for host) +>4 string >000 version %s + +# Android bootimg format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/mkbootimg/bootimg.h +# https://github.com/djrbliss/loki/blob/master/loki.h#L43 +0 string ANDROID! Android bootimg +>1024 string LOKI \b, LOKI'd +>>1028 lelong 0 \b (boot) +>>1028 lelong 1 \b (recovery) +>8 lelong >0 \b, kernel +>>12 lelong >0 \b (0x%x) +>16 lelong >0 \b, ramdisk +>>20 lelong >0 \b (0x%x) +>24 lelong >0 \b, second stage +>>28 lelong >0 \b (0x%x) +>36 lelong >0 \b, page size: %d +>38 string >0 \b, name: %s +>64 string >0 \b, cmdline (%s) + +# Android sparse img format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/libsparse/sparse_format.h +0 lelong 0xed26ff3a Android sparse image +>4 leshort x \b, version: %d +>6 leshort x \b.%d +>16 lelong x \b, Total of %d +>12 lelong x \b %d-byte output blocks in +>20 lelong x \b %d input chunks. + +# Android binary XML magic +# In include/androidfw/ResourceTypes.h: +# RES_XML_TYPE = 0x0003 followed by the size of the header (ResXMLTree_header), +# which is 8 bytes (2 bytes type + 2 bytes header size + 4 bytes size). +0 lelong 0x00080003 Android binary XML + +# Android cryptfs footer +# From https://android.googlesource.com/\ +# platform/system/vold/+/refs/heads/master/cryptfs.h +0 lelong 0xd0b5b1c4 Android cryptfs footer +>4 leshort x \b, version: %d +>6 leshort x \b.%d + +# Android Vdex format +# From https://android.googlesource.com/\ +# platform/art/+/master/runtime/vdex_file.h +0 string vdex Android vdex file, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d + +# Android Vdex format, dexfile is currently being updated +# by android system +# From https://android.googlesource.com/\ +# platform/art/+/master/dex2oat/dex2oat.cc +0 string wdex Android vdex file, being processed by dex2oat, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d diff --git a/Final_Zip/AIK/KSU/SHRP/cleanup.sh b/Final_Zip/AIK/KSU/SHRP/cleanup.sh new file mode 100755 index 0000000..d8f1d61 --- /dev/null +++ b/Final_Zip/AIK/KSU/SHRP/cleanup.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# AIK-Linux/cleanup: reset working directory +# osm0sis @ xda-developers + +case $1 in + --help) echo "usage: cleanup.sh [--local] [--quiet]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + statarg="-f %Su"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) statarg="-c %U";; +esac; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; + +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + sudo=sudo; +fi; + +$sudo rm -rf ramdisk split_img *new.* || exit 1; + +case $1 in + --quiet) ;; + *) echo "Working directory cleaned.";; +esac; +exit 0; + diff --git a/Final_Zip/AIK/KSU/SHRP/repackimg.sh b/Final_Zip/AIK/KSU/SHRP/repackimg.sh new file mode 100755 index 0000000..5709f0f --- /dev/null +++ b/Final_Zip/AIK/KSU/SHRP/repackimg.sh @@ -0,0 +1,413 @@ +#!/bin/bash +# AIK-Linux/repackimg: repack ramdisk and build image +# osm0sis @ xda-developers + +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: repackimg.sh [--local] [--original] [--origsize] [--level <0-9>] [--avbkey ] [--forceelf]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + + javaver=$(java -version 2>&1 | head -n1 | cut -d\" -f2); + javamaj=$(echo $javaver | cut -d. -f1); + javamin=$(echo $javaver | cut -d. -f2); + if [ "$javamaj" -lt 9 ] && [ "$javamaj" -eq 1 -a "$javamin" -lt 8 ]; then + java() { "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" "$@"; } + fi; + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; +chmod -R 755 "$bin" "$aik/"*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -z "$(ls split_img/* 2>/dev/null)" -o ! -e ramdisk ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +while [ "$1" ]; do + case $1 in + --original) original=1;; + --origsize) origsize=1;; + --forceelf) repackelf=1;; + --level) + case $2 in + ''|*[!0-9]*) ;; + *) level="-$2"; lvltxt=" - Level: $2"; shift;; + esac; + ;; + --avbkey) + if [ "$2" ]; then + for keytest in "$2" "$cur/$2" "$aik/$2"; do + if [ ! -z "$(ls $keytest.pk8 2>/dev/null)" -a ! -z "$(ls $keytest.x509.* 2>/dev/null)" ]; then + avbkey="$keytest"; avbtxt=" - Key: $2"; shift; break; + fi; + done; + fi; + ;; + esac; + shift; +done; + +ramdiskcomp=`cat split_img/*-*ramdiskcomp 2>/dev/null`; +if [ -z "$(ls ramdisk/* 2>/dev/null)" ] && [ ! "$ramdiskcomp" = "empty" -a ! "$original" ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - RepackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +if [ ! -z "$(ls *-new.* 2>/dev/null)" ]; then + echo "Warning: Overwriting existing files!"; + echo " "; +fi; +rm -f "*-new.*"; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" ]; then + sudo=sudo; sumsg=" (as root)"; +else + cpioarg="-R 0:0"; +fi; + +if [ "$original" ]; then + echo "Repacking with original ramdisk..."; +elif [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: Using empty ramdisk for repack!"; + compext=.empty; + touch ramdisk-new.cpio$compext; +else + echo "Packing ramdisk$sumsg..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + if [ -z "$level" ]; then + case $ramdiskcomp in + xz) level=-1;; + lz4*) level=-9;; + esac; + fi; + echo "Using compression: $ramdiskcomp$lvltxt"; + repackcmd="$ramdiskcomp $level"; + compext=$ramdiskcomp; + case $ramdiskcomp in + gzip) compext=gz;; + lzop) compext=lzo;; + xz) repackcmd="xz $level -Ccrc32";; + lzma) repackcmd="xz $level -Flzma";; + bzip2) compext=bz2;; + lz4) repackcmd="$bin/$arch/lz4 $level";; + lz4-l) repackcmd="$bin/$arch/lz4 $level -l"; compext=lz4;; + cpio) repackcmd="cat"; compext="";; + *) abort; exit 1;; + esac; + if [ "$compext" ]; then + compext=.$compext; + fi; + cd ramdisk; + $sudo find . | $sudo $cpio $cpioarg -H newc -o 2>/dev/null | $repackcmd > ../ramdisk-new.cpio$compext; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Getting build information..."; +cd split_img; +imgtype=`cat *-imgtype`; +case $imgtype in + KRNL) ;; + AOSP_VNDR) vendor=vendor_;; + *) + if [ -f *-kernel ]; then + kernel=`ls *-kernel`; echo "kernel = $kernel"; + kernel="split_img/$kernel"; + fi; + ;; +esac; +if [ "$original" ]; then + ramdisk=`ls *-*ramdisk.cpio*`; echo "${vendor}ramdisk = $ramdisk"; + ramdisk="split_img/$ramdisk"; +else + ramdisk="ramdisk-new.cpio$compext"; +fi; +case $imgtype in + KRNL) rsz=$(wc -c < ../"$ramdisk"); echo "ramdisk_size = $rsz";; + OSIP) echo "cmdline = $(cat *-*cmdline)";; + U-Boot) + name=`cat *-name`; echo "name = $name"; + uarch=`cat *-arch`; + os=`cat *-os`; + type=`cat *-type`; + comp=`cat *-comp`; echo "type = $uarch $os $type ($comp)"; + [ "$comp" = "uncompressed" ] && comp=none; + addr=`cat *-addr`; echo "load_addr = $addr"; + ep=`cat *-ep`; echo "entry_point = $ep"; + ;; + *) + if [ -f *-second ]; then + second=`ls *-second`; echo "second = $second"; + second=(--second "split_img/$second"); + fi; + if [ -f *-dtb ]; then + dtb=`ls *-dtb`; echo "dtb = $dtb"; + dtb=(--dtb "split_img/$dtb"); + fi; + if [ -f *-recovery_dtbo ]; then + recoverydtbo=`ls *-recovery_dtbo`; echo "recovery_dtbo = $recoverydtbo"; + recoverydtbo=(--recovery_dtbo "split_img/$recoverydtbo"); + fi; + if [ -f *-*cmdline ]; then + cmdname=`ls *-*cmdline`; + cmdline=`cat *-*cmdline`; echo "${vendor}cmdline = $cmdline"; + cmd=("split_img/$cmdname"@cmdline); + fi; + if [ -f *-board ]; then + board=`cat *-board`; echo "board = $board"; + fi; + if [ -f *-base ]; then + base=`cat *-base`; echo "base = $base"; + fi; + if [ -f *-pagesize ]; then + pagesize=`cat *-pagesize`; echo "pagesize = $pagesize"; + fi; + if [ -f *-kernel_offset ]; then + kerneloff=`cat *-kernel_offset`; echo "kernel_offset = $kerneloff"; + fi; + if [ -f *-ramdisk_offset ]; then + ramdiskoff=`cat *-ramdisk_offset`; echo "ramdisk_offset = $ramdiskoff"; + fi; + if [ -f *-second_offset ]; then + secondoff=`cat *-second_offset`; echo "second_offset = $secondoff"; + fi; + if [ -f *-tags_offset ]; then + tagsoff=`cat *-tags_offset`; echo "tags_offset = $tagsoff"; + fi; + if [ -f *-dtb_offset ]; then + dtboff=`cat *-dtb_offset`; echo "dtb_offset = $dtboff"; + fi; + if [ -f *-os_version ]; then + osver=`cat *-os_version`; echo "os_version = $osver"; + fi; + if [ -f *-os_patch_level ]; then + oslvl=`cat *-os_patch_level`; echo "os_patch_level = $oslvl"; + fi; + if [ -f *-header_version ]; then + hdrver=`cat *-header_version`; echo "header_version = $hdrver"; + fi; + if [ -f *-hashtype ]; then + hashtype=`cat *-hashtype`; echo "hashtype = $hashtype"; + hashtype="--hashtype $hashtype"; + fi; + if [ -f *-dt ]; then + dttype=`cat *-dttype`; + dt=`ls *-dt`; echo "dt = $dt"; + rpm=("split_img/$dt",rpm); + dt=(--dt "split_img/$dt"); + fi; + if [ -f *-unknown ]; then + unknown=`cat *-unknown`; echo "unknown = $unknown"; + fi; + if [ -f *-header ]; then + header=`ls *-header`; + header="split_img/$header"; + fi; + ;; +esac; +cd ..; + +if [ -f split_img/*-mtktype ]; then + mtktype=`cat split_img/*-mtktype`; + echo " "; + echo "Generating MTK headers..."; + echo " "; + echo "Using ramdisk type: $mtktype"; + "$bin/$arch/mkmtkhdr" --kernel "$kernel" --$mtktype "$ramdisk" >/dev/null; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + mv -f "$(basename "$kernel")-mtk" kernel-new.mtk; + mv -f "$(basename "$ramdisk")-mtk" $mtktype-new.mtk; + kernel=kernel-new.mtk; + ramdisk=$mtktype-new.mtk; +fi; + +if [ -f split_img/*-sigtype ]; then + outname=unsigned-new.img; +else + outname=image-new.img; +fi; + +[ "$dttype" = "ELF" ] && repackelf=1; +if [ "$imgtype" = "ELF" ] && [ ! "$header" -o ! "$repackelf" ]; then + imgtype=AOSP; + echo " "; + echo "Warning: ELF format without RPM detected; will be repacked using AOSP format!"; +fi; + +echo " "; +echo "Building image..."; +echo " "; +echo "Using format: $imgtype"; +echo " "; +case $imgtype in + AOSP_VNDR) "$bin/$arch/mkbootimg" --vendor_ramdisk "$ramdisk" "${dtb[@]}" --vendor_cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --tags_offset $tagsoff --dtb_offset $dtboff --os_version "$osver" --os_patch_level "$oslvl" --header_version $hdrver --vendor_boot $outname;; + AOSP) "$bin/$arch/mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" "${dtb[@]}" "${recoverydtbo[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --dtb_offset "$dtboff" --os_version "$osver" --os_patch_level "$oslvl" --header_version "$hdrver" $hashtype "${dt[@]}" -o $outname;; + AOSP-PXA) "$bin/$arch/pxa-mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --unknown $unknown "${dt[@]}" -o $outname;; + ELF) "$bin/$arch/elftool" pack -o $outname header="$header" "$kernel" "$ramdisk",ramdisk "${rpm[@]}" "${cmd[@]}" >/dev/null;; + KRNL) "$bin/$arch/rkcrc" -k "$ramdisk" $outname;; + OSIP) + mkdir split_img/.temp 2>/dev/null; + for i in bootstub cmdline.txt hdr kernel parameter sig; do + cp -f split_img/*-*$(basename $i .txt | sed -e 's/hdr/header/') split_img/.temp/$i 2>/dev/null; + done; + cp -f "$ramdisk" split_img/.temp/ramdisk.cpio.gz; + "$bin/$arch/mboot" -d split_img/.temp -f $outname; + ;; + U-Boot) + part0="$kernel"; + case $type in + Multi) part1=(:"$ramdisk");; + RAMDisk) part0="$ramdisk";; + esac; + "$bin/$arch/mkimage" -A $uarch -O $os -T $type -C $comp -a $addr -e $ep -n "$name" -d "$part0""${part1[@]}" $outname >/dev/null; + ;; + *) echo " "; echo "Unsupported format."; abort; exit 1;; +esac; +if [ ! $? -eq "0" ]; then + abort; + exit 1; +fi; + +rm -rf split_img/.temp; + +if [ -f split_img/*-sigtype ]; then + sigtype=`cat split_img/*-sigtype`; + if [ -f split_img/*-avbtype ]; then + avbtype=`cat split_img/*-avbtype`; + fi; + if [ -f split_img/*-blobtype ]; then + blobtype=`cat split_img/*-blobtype`; + fi; + echo "Signing new image..."; + echo " "; + echo "Using signature: $sigtype $avbtype$avbtxt$blobtype"; + [ ! "$avbkey" ] && avbkey="$bin/avb/verity"; + echo " "; + case $sigtype in + AVBv1) java -jar "$bin/boot_signer.jar" /$avbtype unsigned-new.img "$avbkey.pk8" "$avbkey.x509."* image-new.img 2>/dev/null;; + BLOB) + awk 'BEGIN { printf "-SIGNED-BY-SIGNBLOB-\00\00\00\00\00\00\00\00" }' > image-new.img; + "$bin/$arch/blobpack" blob.tmp $blobtype unsigned-new.img >/dev/null; + cat blob.tmp >> image-new.img; + rm -f blob.tmp; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --pack image-new.img --keyblock "$bin/chromeos/kernel.keyblock" --signprivate "$bin/chromeos/kernel_data_key.vbprivk" --version 1 --vmlinuz unsigned-new.img --bootloader "$bin/chromeos/empty" --config "$bin/chromeos/empty" --arch arm --flags 0x1;; + DHTB) + "$bin/$arch/dhtbsign" -i unsigned-new.img -o image-new.img >/dev/null; + rm -f split_img/*-tailtype 2>/dev/null; + ;; + NOOK*) cat split_img/*-master_boot.key unsigned-new.img > image-new.img;; + esac; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; +fi; + +if [ -f split_img/*-lokitype ]; then + lokitype=`cat split_img/*-lokitype`; + echo "Loki patching new image..."; + echo " "; + echo "Using type: $lokitype"; + echo " "; + mv -f image-new.img unlokied-new.img; + if [ -f aboot.img ]; then + "$bin/$arch/loki_tool" patch $lokitype aboot.img unlokied-new.img image-new.img >/dev/null; + if [ ! $? -eq "0" ]; then + echo "Patching failed."; + abort; + exit 1; + fi; + else + echo "Device aboot.img required in script directory to find Loki patch offset."; + abort; + exit 1; + fi; +elif [ -f split_img/*-microloader.bin ]; then + echo "Amonet patching new image..."; + echo " "; + cp -f image-new.img unamonet-new.img; + cp -f split_img/*-microloader.bin microloader.tmp; + dd bs=1024 count=1 conv=notrunc if=unamonet-new.img of=head.tmp 2>/dev/null; + dd bs=1024 seek=1 conv=notrunc if=head.tmp of=image-new.img 2>/dev/null; + dd conv=notrunc if=microloader.tmp of=image-new.img 2>/dev/null; + rm -f head.tmp microloader.tmp; +fi; + +if [ -f split_img/*-tailtype ]; then + tailtype=`cat split_img/*-tailtype`; + echo "Appending footer..."; + echo " "; + echo "Using type: $tailtype"; + echo " "; + case $tailtype in + Bump) awk 'BEGIN { printf "\x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79" }' >> image-new.img;; + SEAndroid) printf 'SEANDROIDENFORCE' >> image-new.img;; + esac; +fi; + +if [ "$origsize" -a -f split_img/*-origsize ]; then + filesize=`cat split_img/*-origsize`; + echo "Padding to original size..."; + echo " "; + cp -f image-new.img unpadded-new.img; + truncate -s $filesize image-new.img; +fi; + +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/KSU/SHRP/unpackimg.sh b/Final_Zip/AIK/KSU/SHRP/unpackimg.sh new file mode 100755 index 0000000..6198f2a --- /dev/null +++ b/Final_Zip/AIK/KSU/SHRP/unpackimg.sh @@ -0,0 +1,370 @@ +#!/bin/bash +# AIK-Linux/unpackimg: split image and unpack ramdisk +# osm0sis @ xda-developers + +cleanup() { "$aik/cleanup.sh" $local --quiet; } +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: unpackimg.sh [--local] [--nosudo] "; exit 1;; + --local) local="--local"; shift;; +esac; +case $1 in + --nosudo) nosudo=1; shift;; + --sudo) shift;; +esac; +if [ ! "$nosudo" ]; then + sudo=sudo; sumsg=" (as root)"; +fi; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + file() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/file" "$@"; } + lzma() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + tail() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/tail" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +if [ ! "$local" ]; then + cd "$aik"; +fi; +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +img="$1"; +[ -f "$cur/$1" ] && img="$cur/$1"; +if [ ! "$img" ]; then + while IFS= read -r line; do + case $line in + aboot.img|image-new.img|unlokied-new.img|unsigned-new.img) continue;; + esac; + img="$line"; + break; + done < <(ls *.elf *.img *.sin 2>/dev/null); +fi; +img="$(readlink -f "$img")"; +if [ ! -f "$img" ]; then + echo "No image file supplied."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - UnpackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +file=$(basename "$img"); +echo "Supplied image: $file"; +echo " "; + +if [ -d split_img -o -d ramdisk ]; then + if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + rmsumsg=" (as root)"; + fi; + echo "Removing old work folders and files$rmsumsg..."; + echo " "; + cleanup; +fi; + +echo "Setting up work folders..."; +echo " "; +mkdir split_img ramdisk; + +cd split_img; +filesize=$(wc -c < "$img"); +echo "$filesize" > "$file-origsize"; +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "signing" ]; then + echo $imgtest | awk '{ print $1 }' > "$file-sigtype"; + sigtype=$(cat "$file-sigtype"); + echo "Signature with \"$sigtype\" type detected, removing..."; + echo " "; + case $sigtype in + BLOB) + cp -f "$img" "$file"; + "$bin/$arch/blobunpack" "$file" | tail -n+5 | cut -d" " -f2 | dd bs=1 count=3 > "$file-blobtype" 2>/dev/null; + mv -f "$file."* "$file"; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --get-vmlinuz "$img" --vmlinuz-out "$file";; + DHTB) dd bs=4096 skip=512 iflag=skip_bytes conv=notrunc if="$img" of="$file" 2>/dev/null;; + NOOK) + dd bs=1048576 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=1048576 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + NOOKTAB) + dd bs=262144 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=262144 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + SIN*) + "$bin/$arch/sony_dump" . "$img" >/dev/null; + mv -f "$file."* "$file"; + rm -f "$file-sigtype"; + ;; + esac; + img="$file"; +fi; + +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "bootimg" ]; then + [ "$(echo $imgtest | awk '{ print $3 }')" = "PXA" ] && typesuffix=-PXA; + echo "$(echo $imgtest | awk '{ print $1 }')$typesuffix" > "$file-imgtype"; + imgtype=$(cat "$file-imgtype"); +else + cd ..; + cleanup; + echo "Unrecognized format."; + abort; + exit 1; +fi; +echo "Image type: $imgtype"; +echo " "; + +case $imgtype in + AOSP*|ELF|KRNL|OSIP|U-Boot) ;; + *) + cd ..; + cleanup; + echo "Unsupported format."; + abort; + exit 1; + ;; +esac; + +case $(echo $imgtest | awk '{ print $3 }') in + LOKI) + echo $imgtest | awk '{ print $5 }' | cut -d\( -f2 | cut -d\) -f1 > "$file-lokitype"; + lokitype=$(cat "$file-lokitype"); + echo "Loki patch with \"$lokitype\" type detected, reverting..."; + echo " "; + echo "Warning: A dump of your device's aboot.img is required to re-Loki!"; + echo " "; + "$bin/$arch/loki_tool" unlok "$img" "$file" >/dev/null; + img="$file"; + ;; + AMONET) + echo "Amonet patch detected, reverting..."; + echo " "; + dd bs=2048 count=1 conv=notrunc if="$img" of="$file-microloader.bin" 2>/dev/null; + dd bs=1024 skip=1 conv=notrunc if="$file-microloader.bin" of="$file-head" 2>/dev/null; + truncate -s 1024 "$file-microloader.bin"; + truncate -s 2048 "$file-head"; + dd bs=2048 skip=1 conv=notrunc if="$img" of="$file-tail" 2>/dev/null; + cat "$file-head" "$file-tail" > "$file"; + rm -f "$file-head" "$file-tail"; + img="$file"; + ;; +esac; + +tailtest="$(dd if="$img" iflag=skip_bytes skip=$(($(wc -c < "$img") - 8192)) bs=8192 count=1 2>/dev/null | file -m $bin/androidbootimg.magic - 2>/dev/null | cut -d: -f2-)"; +case $tailtest in + *data) tailtest="$(tail -n50 "$img" | file -m "$bin/androidbootimg.magic" - 2>/dev/null | cut -d: -f2-)";; +esac; +tailtype="$(echo $tailtest | awk '{ print $1 }')"; +case $tailtype in + AVB*) + echo "Signature with \"$tailtype\" type detected."; + echo " "; + case $tailtype in + *v1) + echo $tailtype > "$file-sigtype"; + echo $tailtest | awk '{ print $4 }' > "$file-avbtype"; + ;; + esac; + ;; + Bump|SEAndroid) + echo "Footer with \"$tailtype\" type detected."; + echo " "; + echo $tailtype > "$file-tailtype"; + ;; +esac; + +if [ "$imgtype" = "U-Boot" ]; then + imgsize=$(($(printf '%d\n' 0x$(hexdump -n 4 -s 12 -e '16/1 "%02x""\n"' "$img")) + 64)); + if [ ! "$filesize" = "$imgsize" ]; then + echo "Trimming..."; + echo " "; + dd bs=$imgsize count=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + img="$file"; + fi; +fi; + +echo 'Splitting image to "split_img/"...'; +case $imgtype in + AOSP_VNDR) vendor=vendor_;; +esac; +case $imgtype in + AOSP|AOSP_VNDR) "$bin/$arch/unpackbootimg" -i "$img";; + AOSP-PXA) "$bin/$arch/pxa-unpackbootimg" -i "$img";; + ELF) + mkdir elftool_out; + "$bin/$arch/elftool" unpack -i "$img" -o elftool_out >/dev/null; + mv -f elftool_out/header "$file-header" 2>/dev/null; + rm -rf elftool_out; + "$bin/$arch/unpackelf" -i "$img"; + ;; + KRNL) dd bs=4096 skip=8 iflag=skip_bytes conv=notrunc if="$img" of="$file-ramdisk" 2>&1 | tail -n+3 | cut -d" " -f1-2;; + OSIP) + "$bin/$arch/mboot" -u -f "$img"; + [ ! $? -eq "0" ] && error=1; + for i in bootstub cmdline.txt hdr kernel parameter ramdisk.cpio.gz sig; do + mv -f $i "$file-$(basename $i .txt | sed -e 's/hdr/header/' -e 's/ramdisk.cpio.gz/ramdisk/')" 2>/dev/null || true; + done; + ;; + U-Boot) + "$bin/$arch/dumpimage" -l "$img"; + "$bin/$arch/dumpimage" -l "$img" > "$file-header"; + grep "Name:" "$file-header" | cut -c15- > "$file-name"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f1 > "$file-arch"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f2 > "$file-os"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f3 | cut -d- -f1 > "$file-type"; + grep "Type:" "$file-header" | cut -d\( -f2 | cut -d\) -f1 | cut -d" " -f1 | cut -d- -f1 > "$file-comp"; + grep "Address:" "$file-header" | cut -c15- > "$file-addr"; + grep "Point:" "$file-header" | cut -c15- > "$file-ep"; + rm -f "$file-header"; + "$bin/$arch/dumpimage" -p 0 -o "$file-kernel" "$img"; + [ ! $? -eq "0" ] && error=1; + case $(cat "$file-type") in + Multi) "$bin/$arch/dumpimage" -p 1 -o "$file-ramdisk" "$img";; + RAMDisk) mv -f "$file-kernel" "$file-ramdisk";; + *) touch "$file-ramdisk";; + esac; + ;; +esac; +if [ ! $? -eq "0" -o "$error" ]; then + cd ..; + cleanup; + abort; + exit 1; +fi; + +if [ -f *-kernel ] && [ "$(file -m "$bin/androidbootimg.magic" *-kernel 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')" = "MTK" ]; then + mtk=1; + echo " "; + echo "MTK header found in kernel, removing..."; + dd bs=512 skip=1 conv=notrunc if="$file-kernel" of=tempkern 2>/dev/null; + mv -f tempkern "$file-kernel"; +fi; +mtktest="$(file -m "$bin/androidbootimg.magic" *-*ramdisk 2>/dev/null | cut -d: -f2-)"; +mtktype=$(echo $mtktest | awk '{ print $3 }'); +if [ "$(echo $mtktest | awk '{ print $1 }')" = "MTK" ]; then + if [ ! "$mtk" ]; then + echo " "; + echo "Warning: No MTK header found in kernel!"; + mtk=1; + fi; + echo "MTK header found in \"$mtktype\" type ramdisk, removing..."; + dd bs=512 skip=1 conv=notrunc if="$(ls *-*ramdisk)" of=temprd 2>/dev/null; + mv -f temprd "$(ls *-*ramdisk)"; +else + if [ "$mtk" ]; then + if [ ! "$mtktype" ]; then + echo 'Warning: No MTK header found in ramdisk, assuming "rootfs" type!'; + mtktype="rootfs"; + fi; + fi; +fi; +[ "$mtk" ] && echo $mtktype > "$file-mtktype"; + +if [ -f *-dt ]; then + dttest="$(file -m "$bin/androidbootimg.magic" *-dt 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')"; + echo $dttest > "$file-dttype"; + if [ "$imgtype" = "ELF" ]; then + case $dttest in + QCDT|ELF) ;; + *) echo " "; + echo "Non-QC DTB found, packing kernel and appending..."; + gzip --no-name -9 "$file-kernel"; + mv -f "$file-kernel.gz" "$file-kernel"; + cat "$file-dt" >> "$file-kernel"; + rm -f "$file-dt"*;; + esac; + fi; +fi; + +file -m "$bin/magic" *-*ramdisk 2>/dev/null | cut -d: -f2 | awk '{ print $1 }' > "$file-${vendor}ramdiskcomp"; +ramdiskcomp=`cat *-*ramdiskcomp`; +unpackcmd="$ramdiskcomp -dc"; +compext=$ramdiskcomp; +case $ramdiskcomp in + gzip) unpackcmd="gzip -dcq"; compext=gz;; + lzop) compext=lzo;; + xz) ;; + lzma) ;; + bzip2) compext=bz2;; + lz4) unpackcmd="$bin/$arch/lz4 -dcq";; + lz4-l) unpackcmd="$bin/$arch/lz4 -dcq"; compext=lz4;; + cpio) unpackcmd="cat"; compext="";; + empty) compext=empty;; + *) compext="";; +esac; +if [ "$compext" ]; then + compext=.$compext; +fi; +mv -f "$(ls *-*ramdisk)" "$file-${vendor}ramdisk.cpio$compext" 2>/dev/null; +cd ..; +if [ "$ramdiskcomp" = "data" ]; then + echo "Unrecognized format."; + abort; + exit 1; +fi; + +echo " "; +if [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: No ramdisk found to be unpacked!"; +else + echo "Unpacking ramdisk$sumsg to \"ramdisk/\"..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + echo "Compression used: $ramdiskcomp"; + if [ ! "$compext" -a ! "$ramdiskcomp" = "cpio" ]; then + echo "Unsupported format."; + abort; + exit 1; + fi; + $sudo chown 0:0 ramdisk 2>/dev/null; + cd ramdisk; + $unpackcmd "../split_img/$file-${vendor}ramdisk.cpio$compext" | $sudo $cpio -i -d --no-absolute-filenames; + if [ ! $? -eq "0" ]; then + [ "$nosudo" ] && echo "Unpacking failed, try without --nosudo."; + cd ..; + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/androidbootimg.magic b/Final_Zip/AIK/KSU/TWRP-R/bin/androidbootimg.magic new file mode 100755 index 0000000..4e7a106 --- /dev/null +++ b/Final_Zip/AIK/KSU/TWRP-R/bin/androidbootimg.magic @@ -0,0 +1,111 @@ +#------------------------------------------------------------------------------ +# Various Android OEM non-standard boot image related magic entries +# osm0sis @ xda-developers +#------------------------------------------------------------------------------ + +# ASUS Blob Signature +0 string -SIGNED-BY-SIGNBLOB- BLOB signing + +# Barnes & Noble Nook Signature +64 string Red\x20Loader NOOK signing (red loader) +64 string Green\x20Loader NOOK signing (green loader) +64 string Green\x20Recovery NOOK signing (green recovery) +64 string eMMC\x20boot.img+secondloader NOOK signing (emmc boot) +64 string eMMC\x20recovery.img+secondloader NOOK signing (emmc recovery) +48 string BauwksBoot NOOKTAB signing (bauwks) + +# Google ChromeOS Signature +0 string CHROMEOS CHROMEOS signing + +# Samsung/Spreadtrum DHTB Signature +0 string DHTB\x01\x00\x00 DHTB signing + +# Sony SIN Packaging/Signature +0 string \x01\x00\x00\x00 SINv1 signing +0 string \x02\x00\x00\x00 SINv2 signing +0 string \x03SIN SINv3 signing + +# Google Pixel/Nexus/AOSP Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search ANDROID! AOSP bootimg +>>36 string \x00\x00\x00\x02 \b, PXA variant (020) +>>36 string \x00\x00\x80\x02 \b, PXA variant (028) +>>36 string \x00\x00\x00\x03 \b, PXA variant (030) +>>96 search microloader +>>>1024 string ANDROID! \b, AMONET header +>>1024 string LOKI \b, LOKI header +>>>1028 string \x00 \b (boot) +>>>1028 string \x01 \b (recovery) +>>2048 search \x88\x16\x88\x58 \b, MTK headers +!:strength * 3 + +# Google Pixel/AOSP Vendor Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search VNDRBOOT AOSP_VNDR bootimg +!:strength * 3 + +# DENX U-Boot +0 string \x27\x05\x19\x56 U-Boot bootimg + +# Intel OSIP +1000 search \xFC\xFA\xBC\x00 OSIP bootimg (headerless) +!:strength / 15 +0 string $OS$\x00\x00\x01 OSIP bootimg +>52 string \x00\x00\x00\x00 \b, boot (signed) +>52 string \x01\x00\x00\x00 \b, boot (unsigned) +>52 string \x0C\x00\x00\x00 \b, recovery (signed) +>52 string \x0D\x00\x00\x00 \b, recovery (unsigned) + +# Rockchip KRNL +0 string KRNL KRNL bootimg + +# Sony ELF +0 string \x7FELF ELF +>5 string \x01\x01\x61 bootimg +>18 string \x28 (ARM +>18 string \x03 (x86_ +>18 string \x08 (MIPS +>4 string \x01 \b) +>4 string \x02 \b64) +>0 search \x88\x16\x88\x58 \b, MTK headers + +# MediaTek MTK +# [for detection after boot image has already been split] +0 search \x88\x16\x88\x58 MTK header +>0 search KERNEL \b, kernel type +>0 search ROOTFS \b, rootfs type +>0 search RECOVERY \b, recovery type +!:strength / 20 + +# Qualcomm Device Tree +# [for detection after boot image has already been split] +0 string QCDT QCDT header +!:strength / 20 + +# Google Android Verified Boot 1.0 Signature +# [for detection with the tail of the boot image] +0 search \x02\x01\x01\x30\x82 AVBv1 signing footer +>0 search /boot \b, boot type +>0 search /recovery \b, recovery type +!:strength / 20 + +# Google Android Verified Boot 2.0 Signature +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search AVBf AVBv2 signing footer +!:strength / 20 + +# LG Bump +# [for detection with the tail of the boot image] +0 search \x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79 Bump footer +!:strength / 20 + +# Samsung SEAndroid +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search SEANDROIDENFORCE SEAndroid footer +!:strength / 20 diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/avb/verity.pk8 b/Final_Zip/AIK/KSU/TWRP-R/bin/avb/verity.pk8 new file mode 100755 index 0000000..bebf216 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/avb/verity.pk8 differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/avb/verity.x509.pem b/Final_Zip/AIK/KSU/TWRP-R/bin/avb/verity.x509.pem new file mode 100755 index 0000000..86399c3 --- /dev/null +++ b/Final_Zip/AIK/KSU/TWRP-R/bin/avb/verity.x509.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIID/TCCAuWgAwIBAgIJAJcPmDkJqolJMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g +VmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UE +AwwHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe +Fw0xNDExMDYxOTA3NDBaFw00MjAzMjQxOTA3NDBaMIGUMQswCQYDVQQGEwJVUzET +MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEQMA4G +A1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UEAwwHQW5kcm9p +ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAOjreE0vTVSRenuzO9vnaWfk0eQzYab0gqpi +6xAzi6dmD+ugoEKJmbPiuE5Dwf21isZ9uhUUu0dQM46dK4ocKxMRrcnmGxydFn6o +fs3ODJMXOkv2gKXL/FdbEPdDbxzdu8z3yk+W67udM/fW7WbaQ3DO0knu+izKak/3 +T41c5uoXmQ81UNtAzRGzGchNVXMmWuTGOkg6U+0I2Td7K8yvUMWhAWPPpKLtVH9r +AL5TzjYNR92izdKcz3AjRsI3CTjtpiVABGeX0TcjRSuZB7K9EK56HV+OFNS6I1NP +jdD7FIShyGlqqZdUOkAUZYanbpgeT5N7QL6uuqcGpoTOkalu6kkCAwEAAaNQME4w +HQYDVR0OBBYEFH5DM/m7oArf4O3peeKO0ZIEkrQPMB8GA1UdIwQYMBaAFH5DM/m7 +oArf4O3peeKO0ZIEkrQPMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB +AHO3NSvDE5jFvMehGGtS8BnFYdFKRIglDMc4niWSzhzOVYRH4WajxdtBWc5fx0ix +NF/+hVKVhP6AIOQa+++sk+HIi7RvioPPbhjcsVlZe7cUEGrLSSveGouQyc+j0+m6 +JF84kszIl5GGNMTnx0XRPO+g8t6h5LWfnVydgZfpGRRg+WHewk1U2HlvTjIceb0N +dcoJ8WKJAFWdcuE7VIm4w+vF/DYX/A2Oyzr2+QRhmYSv1cusgAeC1tvH4ap+J1Lg +UnOu5Kh/FqPLLSwNVQp4Bu7b9QFfqK8Moj84bj88NqRGZgDyqzuTrFxn6FW7dmyA +yttuAJAEAymk1mipd9+zp38= +-----END CERTIFICATE----- diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/boot_signer.jar b/Final_Zip/AIK/KSU/TWRP-R/bin/boot_signer.jar new file mode 100755 index 0000000..dd96a3e Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/boot_signer.jar differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/chromeos/empty b/Final_Zip/AIK/KSU/TWRP-R/bin/chromeos/empty new file mode 100755 index 0000000..8b13789 --- /dev/null +++ b/Final_Zip/AIK/KSU/TWRP-R/bin/chromeos/empty @@ -0,0 +1 @@ + diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/chromeos/kernel.keyblock b/Final_Zip/AIK/KSU/TWRP-R/bin/chromeos/kernel.keyblock new file mode 100755 index 0000000..9740be4 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/chromeos/kernel.keyblock differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/chromeos/kernel_data_key.vbprivk b/Final_Zip/AIK/KSU/TWRP-R/bin/chromeos/kernel_data_key.vbprivk new file mode 100755 index 0000000..8d392fb Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/chromeos/kernel_data_key.vbprivk differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/blobpack b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/blobpack new file mode 100755 index 0000000..685c6c0 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/blobpack differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/blobunpack b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/blobunpack new file mode 100755 index 0000000..2d96696 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/blobunpack differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/dhtbsign b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/dhtbsign new file mode 100755 index 0000000..f117b88 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/dumpimage b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/dumpimage new file mode 100755 index 0000000..8ba15d3 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/dumpimage differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/elftool b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/elftool new file mode 100755 index 0000000..b25dd56 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/elftool differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/futility b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/futility new file mode 100755 index 0000000..c830e31 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/futility differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/loki_tool b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/loki_tool new file mode 100755 index 0000000..d305760 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/loki_tool differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/lz4 b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/lz4 new file mode 100755 index 0000000..801bad4 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/lz4 differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/mboot b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/mboot new file mode 100755 index 0000000..023eab0 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/mboot differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/mkbootimg b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/mkbootimg new file mode 100755 index 0000000..ed68c2d Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/mkimage b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/mkimage new file mode 100755 index 0000000..8e97c0c Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/mkimage differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/mkmtkhdr b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/mkmtkhdr new file mode 100755 index 0000000..d71db24 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/pxa-mkbootimg b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/pxa-mkbootimg new file mode 100755 index 0000000..0636873 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/pxa-unpackbootimg b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/pxa-unpackbootimg new file mode 100755 index 0000000..8dbdecf Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/rkcrc b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/rkcrc new file mode 100755 index 0000000..45027f3 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/rkcrc differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/sony_dump b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/sony_dump new file mode 100755 index 0000000..2563e25 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/sony_dump differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/unpackbootimg b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/unpackbootimg new file mode 100755 index 0000000..b70aed5 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/unpackelf b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/unpackelf new file mode 100755 index 0000000..12e9057 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/i686/unpackelf differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/blobpack b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/blobpack new file mode 100755 index 0000000..90256d4 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/blobpack differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/blobunpack b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/blobunpack new file mode 100755 index 0000000..53374ff Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/dhtbsign b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/dhtbsign new file mode 100755 index 0000000..ccb7a67 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/dumpimage b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/dumpimage new file mode 100755 index 0000000..861bd68 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/elftool b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/elftool new file mode 100755 index 0000000..07a520d Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/elftool differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/futility b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/futility new file mode 100755 index 0000000..4d56ec3 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/futility differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/loki_tool b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/loki_tool new file mode 100755 index 0000000..4a1b74a Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/lz4 b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/lz4 new file mode 100755 index 0000000..8a4136b Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/lz4 differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/mboot b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/mboot new file mode 100755 index 0000000..8bf92d4 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/mboot differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/mkbootimg b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/mkbootimg new file mode 100755 index 0000000..2b628c3 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/mkimage b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/mkimage new file mode 100755 index 0000000..6419ea3 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/mkimage differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/mkmtkhdr b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/mkmtkhdr new file mode 100755 index 0000000..1ab256f Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/pxa-mkbootimg b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..5885720 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..d7b1b7d Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/rkcrc b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/rkcrc new file mode 100755 index 0000000..f218228 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/sony_dump b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/sony_dump new file mode 100755 index 0000000..6fc3696 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/unpackbootimg b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/unpackbootimg new file mode 100755 index 0000000..8f4fccf Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/unpackelf b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/unpackelf new file mode 100755 index 0000000..477e25d Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/linux/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/blobpack b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/blobpack new file mode 100755 index 0000000..2336ec0 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/blobpack differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/blobunpack b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/blobunpack new file mode 100755 index 0000000..834cb50 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/blobunpack differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/cpio b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/cpio new file mode 100755 index 0000000..b7e41f1 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/cpio differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/dd b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/dd new file mode 100755 index 0000000..b684139 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/dd differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/dhtbsign b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/dhtbsign new file mode 100755 index 0000000..b3ba0ba Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/dumpimage b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/dumpimage new file mode 100755 index 0000000..917c8ed Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/dumpimage differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/elftool b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/elftool new file mode 100755 index 0000000..27f12be Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/elftool differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/file b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/file new file mode 100755 index 0000000..8024db5 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/file differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/futility b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/futility new file mode 100755 index 0000000..8658249 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/futility differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/libiconv.2.dylib b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/libiconv.2.dylib new file mode 100755 index 0000000..ec61db0 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/libintl.8.dylib b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/libintl.8.dylib new file mode 100755 index 0000000..c297f0a Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/libintl.8.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/liblzma.5.dylib b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/liblzma.5.dylib new file mode 100755 index 0000000..126d338 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/liblzo2.2.dylib b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/liblzo2.2.dylib new file mode 100755 index 0000000..8a24e23 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/libmagic.1.dylib b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/libmagic.1.dylib new file mode 100755 index 0000000..92e6c7f Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/loki_tool b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/loki_tool new file mode 100755 index 0000000..7eecf68 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/loki_tool differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/lz4 b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/lz4 new file mode 100755 index 0000000..43126f8 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/lz4 differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/lzop b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/lzop new file mode 100755 index 0000000..fc3103c Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/lzop differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/mboot b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/mboot new file mode 100755 index 0000000..dfa0d3e Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/mboot differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/mkbootimg b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/mkbootimg new file mode 100755 index 0000000..82f05a9 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/mkimage b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/mkimage new file mode 100755 index 0000000..e760d6e Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/mkimage differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/mkmtkhdr b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/mkmtkhdr new file mode 100755 index 0000000..907ba0f Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/pxa-mkbootimg b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/pxa-mkbootimg new file mode 100755 index 0000000..12f8337 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/pxa-unpackbootimg b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/pxa-unpackbootimg new file mode 100755 index 0000000..2f1fe6c Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/rkcrc b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/rkcrc new file mode 100755 index 0000000..c2b70ce Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/rkcrc differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/sony_dump b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/sony_dump new file mode 100755 index 0000000..2f187e6 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/sony_dump differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/tail b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/tail new file mode 100755 index 0000000..99ee578 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/tail differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/truncate b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/truncate new file mode 100755 index 0000000..26bf16b Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/truncate differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/unpackbootimg b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/unpackbootimg new file mode 100755 index 0000000..e92b74e Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/unpackelf b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/unpackelf new file mode 100755 index 0000000..4ea11d0 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/unpackelf differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/xz b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/xz new file mode 100755 index 0000000..b501c14 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/i386/xz differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/blobpack b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/blobpack new file mode 100755 index 0000000..816fcf2 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/blobpack differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/blobunpack b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/blobunpack new file mode 100755 index 0000000..9241057 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/cpio b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/cpio new file mode 100755 index 0000000..991c5a8 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/cpio differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/dd b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/dd new file mode 100755 index 0000000..e927886 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/dd differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/dhtbsign b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/dhtbsign new file mode 100755 index 0000000..162fa88 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/dumpimage b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/dumpimage new file mode 100755 index 0000000..473538b Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/elftool b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/elftool new file mode 100755 index 0000000..0185019 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/elftool differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/file b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/file new file mode 100755 index 0000000..0b9f24c Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/file differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/futility b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/futility new file mode 100755 index 0000000..a28db4d Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/futility differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/libiconv.2.dylib b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/libiconv.2.dylib new file mode 100755 index 0000000..8f56eed Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/libintl.8.dylib b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/libintl.8.dylib new file mode 100755 index 0000000..f270e89 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/libintl.8.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/liblzma.5.dylib b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/liblzma.5.dylib new file mode 100755 index 0000000..39c6b96 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/liblzo2.2.dylib b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/liblzo2.2.dylib new file mode 100755 index 0000000..a05b7eb Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/libmagic.1.dylib b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/libmagic.1.dylib new file mode 100755 index 0000000..29ad687 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/loki_tool b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/loki_tool new file mode 100755 index 0000000..1b9f062 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/lz4 b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/lz4 new file mode 100755 index 0000000..bcee28d Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/lz4 differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/lzop b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/lzop new file mode 100755 index 0000000..8be71f4 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/lzop differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/mboot b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/mboot new file mode 100755 index 0000000..ad67219 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/mboot differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/mkbootimg b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/mkbootimg new file mode 100755 index 0000000..137aef2 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/mkimage b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/mkimage new file mode 100755 index 0000000..61d5a9c Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/mkimage differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/mkmtkhdr b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/mkmtkhdr new file mode 100755 index 0000000..99949d5 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/pxa-mkbootimg b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..0ec79a3 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..03fc864 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/rkcrc b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/rkcrc new file mode 100755 index 0000000..9b0b94a Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/sony_dump b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/sony_dump new file mode 100755 index 0000000..e219101 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/tail b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/tail new file mode 100755 index 0000000..59692eb Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/tail differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/truncate b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/truncate new file mode 100755 index 0000000..f2ed631 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/truncate differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/unpackbootimg b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/unpackbootimg new file mode 100755 index 0000000..a717c48 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/unpackelf b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/unpackelf new file mode 100755 index 0000000..d6edefa Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/xz b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/xz new file mode 100755 index 0000000..6faedc7 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP-R/bin/macos/x86_64/xz differ diff --git a/Final_Zip/AIK/KSU/TWRP-R/bin/magic b/Final_Zip/AIK/KSU/TWRP-R/bin/magic new file mode 100755 index 0000000..4530761 --- /dev/null +++ b/Final_Zip/AIK/KSU/TWRP-R/bin/magic @@ -0,0 +1,1916 @@ +#------------------------------------------------------------------------------ +# Slimmed down magic file for archives only +#------------------------------------------------------------------------------ +# $File: archive,v 1.145 2021/01/03 20:58:47 christos Exp $ +# archive: file(1) magic for archive formats (see also "msdos" for self- +# extracting compressed archives) +# +# cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc. +# pre-POSIX "tar" archives are also handled in the C code ../../src/is_tar.c. + +# POSIX tar archives +# URL: https://en.wikipedia.org/wiki/Tar_(computing) +# Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current +# header mainly padded with nul bytes +500 quad 0 +!:strength /2 +# filename or extended attribute printable strings in range space null til umlaut ue +>0 ubeshort >0x1F00 +>>0 ubeshort <0xFCFD +# last 4 header bytes often null but tar\0 in gtarfail2.tar gtarfail.tar-bad +# at https://sourceforge.net/projects/s-tar/files/testscripts/ +>>>508 ubelong&0x8B9E8DFF 0 +# nul, space or ascii digit 0-7 at start of mode +>>>>100 ubyte&0xC8 =0 +>>>>>101 ubyte&0xC8 =0 +# nul, space at end of check sum +>>>>>>155 ubyte&0xDF =0 +# space or ascii digit 0 at start of check sum +>>>>>>>148 ubyte&0xEF =0x20 +# minimal check and then display tar archive information which can also be +# embedded inside others like Android Backup, Clam AntiVirus database +>257 string !ustar +# header padded with nuls +>>257 ulong =0 +# GNU tar version 1.29 with non pax format option without refusing +# creates misleading V7 header for Long path, Multi-volume, Volume type +>>>156 ubyte 0x4c GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x4d GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x56 GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 default x tar archive (V7) +!:mime application/x-tar +#!:ext tar +# other stuff in padding +# some implementations add new fields to the blank area at the end of the header record +# created for example by DOS TAR 3.20g 1994 Tim V.Shapore with -j option +>>257 ulong !0 tar archive (old) +!:mime application/x-tar +#!:ext tar +# magic in newer, GNU, posix variants +>257 string =ustar +# 2 last char of magic and UStar version because string expression does not work +# 2 space characters followed by a null for GNU variant +>>261 ubelong =0x72202000 POSIX tar archive (GNU) +!:mime application/x-gtar +#!:ext tar/gtar +# UStar version with ASCII "00" +>>261 ubelong 0x72003030 POSIX +# gLOBAL and ExTENSION type only found in POSIX.1-2001 format +>>>156 ubyte 0x67 \b.1-2001 +>>>156 ubyte 0x78 \b.1-2001 +>>>156 ubyte x tar archive +!:mime application/x-ustar +#!:ext tar/ustar +# version with 2 binary nuls embedded in Android Backup like com.android.settings.ab +>>261 ubelong 0x72000000 tar archive (ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# not seen ustar variant with garbish version +>>261 default x tar archive (unknown ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# type flag of 1st tar archive member +#>156 ubyte x \b, %c-type +>156 ubyte x +>>156 ubyte 0 \b, file +>>156 ubyte 0x30 \b, file +>>156 ubyte 0x31 \b, hard link +>>156 ubyte 0x32 \b, symlink +>>156 ubyte 0x33 \b, char device +>>156 ubyte 0x34 \b, block device +>>156 ubyte 0x35 \b, directory +>>156 ubyte 0x36 \b, fifo +>>156 ubyte 0x37 \b, reserved +>>156 ubyte 0x4c \b, long path +>>156 ubyte 0x4d \b, multi volume +>>156 ubyte 0x56 \b, volume +>>156 ubyte 0x67 \b, global +>>156 ubyte 0x78 \b, extension +>>156 default x \b, type +>>>156 ubyte x '%c' +# name[100] +>0 string >\0 %-.60s +# mode mainly stored as an octal number in ASCII null or space terminated +>100 string >\0 \b, mode %-.7s +# user id mainly as octal numbers in ASCII null or space terminated +>108 string >\0 \b, uid %-.7s +# group id mainly as octal numbers in ASCII null or space terminated +>116 string >\0 \b, gid %-.7s +# size mainly as octal number in ASCII +>124 ubyte <0x38 +>>124 string >\0 \b, size %-.12s +# coding indicated by setting the high-order bit of the leftmost byte +>124 ubyte >0xEF \b, size 0x +>>124 ubyte !0xff \b%2.2x +>>125 ubyte !0xff \b%2.2x +>>126 ubyte !0xff \b%2.2x +>>127 ubyte !0xff \b%2.2x +>>128 ubyte !0xff \b%2.2x +>>129 ubyte !0xff \b%2.2x +>>130 ubyte !0xff \b%2.2x +>>131 ubyte !0xff \b%2.2x +>>132 ubyte !0xff \b%2.2x +>>133 ubyte !0xff \b%2.2x +>>134 ubyte !0xff \b%2.2x +>>135 ubyte !0xff \b%2.2x +# seconds since 0:0:0 1 jan 1970 UTC as octal number mainly in ASCII null or space terminated +>136 string >\0 \b, seconds %-.11s +# header checksum stored as an octal number in ASCII null or space terminated +#>148 string x \b, cksum %.7s +# linkname[100] +>157 string >\0 \b, linkname %-.40s +# additional fields for ustar +>257 string =ustar +# owner user name null terminated +>>265 string >\0 \b, user %-.32s +# group name null terminated +>>297 string >\0 \b, group %-.32s +# device major minor if not zero +>>329 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>329 string x \b, devmaj %-.7s +>>337 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>337 string x \b, devmin %-.7s +# prefix[155] +>>345 string >\0 \b, prefix %-.155s +# old non ustar/POSIX tar +>257 string !ustar +>>508 string =tar\0 +# padding[255] in old star +>>>257 string >\0 \b, padding: %-.40s +>>508 default x +# padding[255] in old tar sometimes comment field +>>>257 string >\0 \b, comment: %-.40s + +# Incremental snapshot gnu-tar format from: +# https://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html +0 string GNU\ tar- GNU tar incremental snapshot data +>&0 regex [0-9]\.[0-9]+-[0-9]+ version %s + +# cpio archives +# +# Yes, the top two "cpio archive" formats *are* supposed to just be "short". +# The idea is to indicate archives produced on machines with the same +# byte order as the machine running "file" with "cpio archive", and +# to indicate archives produced on machines with the opposite byte order +# from the machine running "file" with "cpio byte-swapped archive". +# +# The SVR4 "cpio(4)" hints that there are additional formats, but they +# are defined as "short"s; I think all the new formats are +# character-header formats and thus are strings, not numbers. +0 short 070707 cpio archive +!:mime application/x-cpio +0 short 0143561 cpio byte-swapped archive +!:mime application/x-cpio # encoding: swapped +0 string 070707 cpio ASCII archive (pre-SVR4 or odc) +0 string 070701 cpio ASCII archive (SVR4 with no CRC) +0 string 070702 cpio ASCII archive (SVR4 with CRC) + +# +# Various archive formats used by various versions of the "ar" +# command. +# + +# +# Original UNIX archive formats. +# They were written with binary values in host byte order, and +# the magic number was a host "int", which might have been 16 bits +# or 32 bits. We don't say "PDP-11" or "VAX", as there might have +# been ports to little-endian 16-bit-int or 32-bit-int platforms +# (x86?) using some of those formats; if none existed, feel free +# to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian +# 32-bit. There might have been big-endian ports of that sort as +# well. +# +0 leshort 0177555 very old 16-bit-int little-endian archive +0 beshort 0177555 very old 16-bit-int big-endian archive +0 lelong 0177555 very old 32-bit-int little-endian archive +0 belong 0177555 very old 32-bit-int big-endian archive + +0 leshort 0177545 old 16-bit-int little-endian archive +>2 string __.SYMDEF random library +0 beshort 0177545 old 16-bit-int big-endian archive +>2 string __.SYMDEF random library +0 lelong 0177545 old 32-bit-int little-endian archive +>4 string __.SYMDEF random library +0 belong 0177545 old 32-bit-int big-endian archive +>4 string __.SYMDEF random library + +# +# From "pdp" (but why a 4-byte quantity?) +# +0 lelong 0x39bed PDP-11 old archive +0 lelong 0x39bee PDP-11 4.0 archive + +# +# XXX - what flavor of APL used this, and was it a variant of +# some ar archive format? It's similar to, but not the same +# as, the APL workspace magic numbers in pdp. +# +0 long 0100554 apl workspace + +# +# System V Release 1 portable(?) archive format. +# +0 string = System V Release 1 ar archive +!:mime application/x-archive + +# +# Debian package; it's in the portable archive format, and needs to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "debian". +# +# Update: Joerg Jenderek +# URL: https://en.wikipedia.org/wiki/Deb_(file_format) +0 string =!\ndebian +# https://manpages.debian.org/testing/dpkg/dpkg-split.1.en.html +>14 string -split part of multipart Debian package +!:mime application/vnd.debian.binary-package +# udeb is used for stripped down deb file +#!:ext deb/udeb +>14 string -binary Debian binary package +!:mime application/vnd.debian.binary-package +# For ipk packager see also https://en.wikipedia.org/wiki/Opkg +#!:ext deb/udeb/ipk +# This should not happen +>14 default x Unknown Debian package +# NL terminated version; for most Debian cases this is 2.0 or 2.1 for split +>68 string >\0 (format %s) +#>68 string !2.0\n +#>>68 string x (format %.3s) +>68 string =2.0\n +# 2nd archive name=control archive name like control.tar.gz or control.tar.xz +>>72 string >\0 \b, with %.14s +# look for 3rd archive name=data archive name like data.tar.{gz,xz,bz2,lzma} +>>0 search/0x93e4f data.tar. \b, data compression +# the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised +# for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb +>>>&0 string x %.2s +# skip space (0x20 BSD) and slash (0x2f System V) character marking end of name +>>>&2 ubyte !0x20 +>>>>&-1 ubyte !0x2f +# display 3rd character of file name extension like 2 of bz2 or m of lzma +>>>>>&-1 ubyte x \b%c +>>>>>>&0 ubyte !0x20 +>>>>>>>&-1 ubyte !0x2f +# display 4th character of file name extension like a of lzma +>>>>>>>>&-1 ubyte x \b%c +# split debian package case +>68 string =2.1\n +# dpkg-1.18.25/dpkg-split/info.c +# NL terminated ASCII package name like ckermit +>>&0 string x \b, %s +# NL terminated package version like 302-5.3 +>>>&1 string x %s +# NL terminated MD5 checksum +>>>>&1 string x \b, MD5 %s +# NL terminated original package length +>>>>>&1 string x \b, unsplitted size %s +# NL terminated part length +>>>>>>&1 string x \b, part length %s +# NL terminated package part like n/m +>>>>>>>&1 string x \b, part %s +# NL terminated package architecture like armhf since dpkg 1.16.1 or later +>>>>>>>>&1 string x \b, %s + +# +# MIPS archive; they're in the portable archive format, and need to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "__________E". +# +0 string =!\n__________E MIPS archive +!:mime application/x-archive +>20 string U with MIPS Ucode members +>21 string L with MIPSEL members +>21 string B with MIPSEB members +>19 string L and an EL hash table +>19 string B and an EB hash table +>22 string X -- out of date + +# +# BSD/SVR2-and-later portable archive formats. +# +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/AR +# Reference: https://www.unix.com/man-page/opensolaris/3HEAD/ar.h/ +# Note: Mach-O universal binary in ./cafebabe is dependent +# TODO: unify current ar archive, MIPS archive, Debian package +# distinguish BSD, SVR; 32, 64 bit; HP from other 32-bit SVR; +# *.ar packages from *.a libraries. handle empty archive +0 string =!\n current ar archive +# print first and possibly second ar_name[16] for debugging purpose +#>8 string x \b, 1st "%.16s" +#>68 string x \b, 2nd "%.16s" +!:mime application/x-archive +# a in most case for libraries; lib for Microsoft libraries; ar else cases +#!:ext a/lib/ar +>8 string __.SYMDEF random library +# first member with long marked name __.SYMDEF SORTED implies BSD library +>68 string __.SYMDEF\ SORTED random library +# Reference: https://parisc.wiki.kernel.org/images-parisc/b/b2/Rad_11_0_32.pdf +# "archive file" entry moved from ./hp +# LST header system_id 0210h~PA-RISC 1.1,... identifies the target architecture +# LST header a_magic 0619h~relocatable library +>68 belong 0x020b0619 - PA-RISC1.0 relocatable library +>68 belong 0x02100619 - PA-RISC1.1 relocatable library +>68 belong 0x02110619 - PA-RISC1.2 relocatable library +>68 belong 0x02140619 - PA-RISC2.0 relocatable library +#EOF for common ar archives + +# +# "Thin" archive, as can be produced by GNU ar. +# +0 string =!\n thin archive with +>68 belong 0 no symbol entries +>68 belong 1 %d symbol entry +>68 belong >1 %d symbol entries + +0 search/1 -h- Software Tools format archive text + +# ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com) +# +# The first byte is the magic (0x1a), byte 2 is the compression type for +# the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS +# filename of the first file (null terminated). Since some types collide +# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%), +# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo. +0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000031a ARC archive data, packed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched +!:mime application/x-arc +# [JW] stuff taken from idarc, obviously ARC successors: +0 lelong&0x8080ffff 0x00000a1a PAK archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000141a ARC+ archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000481a HYP archive data +!:mime application/x-arc + +# Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk) +# I can't create either SPARK or ArcFS archives so I have not tested this stuff +# [GRR: the original entries collide with ARC, above; replaced with combined +# version (not tested)] +#0 byte 0x1a RISC OS archive (spark format) +0 string \032archive RISC OS archive (ArcFS format) +0 string Archive\000 RISC OS archive (ArcFS format) + +# All these were taken from idarc, many could not be verified. Unfortunately, +# there were many low-quality sigs, i.e. easy to trigger false positives. +# Please notify me of any real-world fishy/ambiguous signatures and I'll try +# to get my hands on the actual archiver and see if I find something better. [JW] +# probably many can be enhanced by finding some 0-byte or control char near the start + +# idarc calls this Crush/Uncompressed... *shrug* +0 string CRUSH Crush archive data +# Squeeze It (.sqz) +0 string HLSQZ Squeeze It archive data +# SQWEZ +0 string SQWEZ SQWEZ archive data +# HPack (.hpk) +0 string HPAK HPack archive data +# HAP +0 string \x91\x33HF HAP archive data +# MD/MDCD +0 string MDmd MDCD archive data +# LIM +0 string LIM\x1a LIM archive data +# SAR +3 string LH5 SAR archive data +# BSArc/BS2 +0 string \212\3SB\020\0 BSArc/BS2 archive data +# Bethesda Softworks Archive (Oblivion) +0 string BSA\0 BSArc archive data +>4 lelong x version %d +# MAR +2 string =-ah MAR archive data +# ACB +#0 belong&0x00f800ff 0x00800000 ACB archive data +# CPZ +# TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data +# JRC +0 string JRchive JRC archive data +# Quantum +0 string DS\0 Quantum archive data +# ReSOF +0 string PK\3\6 ReSOF archive data +# QuArk +0 string 7\4 QuArk archive data +# YAC +14 string YC YAC archive data +# X1 +0 string X1 X1 archive data +0 string XhDr X1 archive data +# CDC Codec (.dqt) +0 belong&0xffffe000 0x76ff2000 CDC Codec archive data +# AMGC +0 string \xad6" AMGC archive data +# NuLIB +0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data +# PakLeo +0 string LEOLZW PAKLeo archive data +# ChArc +0 string SChF ChArc archive data +# PSA +0 string PSA PSA archive data +# CrossePAC +0 string DSIGDCC CrossePAC archive data +# Freeze +0 string \x1f\x9f\x4a\x10\x0a Freeze archive data +# KBoom +0 string \xc2\xa8MP\xc2\xa8 KBoom archive data +# NSQ, must go after CDC Codec +0 string \x76\xff NSQ archive data +# DPA +0 string Dirk\ Paehl DPA archive data +# BA +# TODO: idarc says "bytes 0-2 == bytes 3-5" +# TTComp +# URL: http://fileformats.archiveteam.org/wiki/TTComp_archive +# Update: Joerg Jenderek +# GRR: line below is too general as it matches also Panorama database "TCDB 2003-10 demo.pan", others +0 string \0\6 +# look for first keyword of Panorama database *.pan +>12 search/261 DESIGN +# skip keyword with low entropy +>12 default x TTComp archive, binary, 4K dictionary +# (version 5.25) labeled the above entry as "TTComp archive data" +# From: Joerg Jenderek +# URL: https://wiki.68kmla.org/DiskCopy_4.2_format_specification +# reference: http://nulib.com/library/FTN.e00005.htm +0x52 ubeshort 0x0100 +# test for disk image size equal or above 400k +>0x40 ubelong >409599 +# test also for disk image size equal or below 1440k to skip +# windows7en.mbr UNICODE.DAT +>>0x40 ubelong <1474561 +# To skip Flags$StringJoiner.class with size 00106A61h test also for only 4 disk image sizes +# 00064000 for 400k GCR disks +# 000c8000 for 800k GCR disks +# 000b4000 for 720k MFM disks +# 00168000 for 1440k MFM disks +>>>0x40 ubelong&0xffE03fFF 0 +# display information of Apple DiskCopy 4.2 floppy image +# image pascal name padded with NULs like Microsoft Mail +>00 pstring/B x Apple DiskCopy 4.2 image %s +#!:mime application/octet-stream +!:mime application/x-dc42-floppy-image +!:apple dCpydImg +#!:ext image/dc42 +# data size in bytes like 409600 +>0x40 ubelong x \b, %u bytes +# for debugging purpose size in hexadecimal +#>0x40 ubelong x (0x%8.8x) +# tag size in bytes +>0x44 ubelong >0 \b, 0x%x tag size +# data checksum +#>0x48 ubelong x \b, 0x%x checksum +# tag checksum +#>0x4c ubelong x \b, 0x%x tag checksum +# disk encoding +>0x50 ubyte 0 \b, GCR CLV ssdd (400k) +>0x50 ubyte 1 \b, GCR CLV dsdd (800k) +>0x50 ubyte 2 \b, MFM CAV dsdd (720k) +>0x50 ubyte 3 \b, MFM CAV dshd (1440k) +>0x50 ubyte >3 \b, 0x%x encoding +# format byte +>0x51 ubyte x \b, 0x%x format +#>0x54 ubequad x \b, data 0x%16.16llx +# ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation? +0 string ESP ESP archive data +# ZPack +0 string \1ZPK\1 ZPack archive data +# Sky +0 string \xbc\x40 Sky archive data +# UFA +0 string UFA UFA archive data +# Dry +0 string =-H2O DRY archive data +# FoxSQZ +0 string FOXSQZ FoxSQZ archive data +# AR7 +0 string ,AR7 AR7 archive data +# PPMZ +0 string PPMZ PPMZ archive data +# MS Compress +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/MS-DOS_installation_compression +# Reference: https://hwiegman.home.xs4all.nl/fileformats/compress/szdd_kwaj_format.html +# Note: use correct version of extracting tool like EXPAND, UNPACK, DECOMP or 7Z +4 string \x88\xf0\x27 +# KWAJ variant +>0 string KWAJ MS Compress archive data, KWAJ variant +!:mime application/x-ms-compress-kwaj +# extension not working in version 5.32 +# magic/Magdir/archive, 284: Warning: EXTENSION type ` ??_' has bad char '?' +# file: line 284: Bad magic entry ' ??_' +#!:ext ??_ +# compression method (0-4) +>>8 uleshort x \b, %u method +# offset of compressed data +>>10 uleshort x \b, 0x%x offset +#>>(10.s) uleshort x +#>>>&-6 string x \b, TEST extension %-.3s +# header flags to mark header extensions +>>12 uleshort >0 \b, 0x%x flags +# 4 bytes: decompressed length of file +>>12 uleshort &0x01 +>>>14 ulelong x \b, original size: %u bytes +# 2 bytes: unknown purpose +# 2 bytes: length of unknown data + mentioned bytes +# 1-9 bytes: null-terminated file name +# 1-4 bytes: null-terminated file extension +>>12 uleshort &0x08 +>>>12 uleshort ^0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>>&16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>&16 string x %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>12 uleshort &0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +# 2 bytes: length of data + mentioned bytes +# +# SZDD variant Haruhiko Okumura's LZSS or 7z type MsLZ +>0 string SZDD MS Compress archive data, SZDD variant +!:mime application/x-ms-compress-szdd +#!:ext ??_ +# The character missing from the end of the filename (0=unknown) +>>9 string >\0 \b, %-.1s is last character of original name +# https://www.betaarchive.com/forum/viewtopic.php?t=26161 +# Compression mode: "A" (0x41) found but sometimes "B" in Windows 3.1 builds 026 and 034e +>>8 string !A \b, %-.1s method +>>10 ulelong >0 \b, original size: %u bytes +# QBasic SZDD variant +3 string \x88\xf0\x27 +>0 string SZ\x20 MS Compress archive data, QBasic variant +!:mime application/x-ms-compress-sz +#!:ext ??$ +>>8 ulelong >0 \b, original size: %u bytes + +# MP3 (archiver, not lossy audio compression) +0 string MP3\x1a MP3-Archiver archive data +# ZET +0 string OZ\xc3\x9d ZET archive data +# TSComp +0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data +# ARQ +0 string gW\4\1 ARQ archive data +# Squash +3 string OctSqu Squash archive data +# Terse +0 string \5\1\1\0 Terse archive data +# PUCrunch +0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data +# UHarc +0 string UHA UHarc archive data +# ABComp +0 string \2AB ABComp archive data +0 string \3AB2 ABComp archive data +# CMP +0 string CO\0 CMP archive data +# Splint +0 string \x93\xb9\x06 Splint archive data +# InstallShield +0 string \x13\x5d\x65\x8c InstallShield Z archive Data +# Gather +1 string GTH Gather archive data +# BOA +0 string BOA BOA archive data +# RAX +0 string ULEB\xa RAX archive data +# Xtreme +0 string ULEB\0 Xtreme archive data +# Pack Magic +0 string @\xc3\xa2\1\0 Pack Magic archive data +# BTS +0 belong&0xfeffffff 0x1a034465 BTS archive data +# ELI 5750 +0 string Ora\ ELI 5750 archive data +# QFC +0 string \x1aFC\x1a QFC archive data +0 string \x1aQF\x1a QFC archive data +# PRO-PACK +0 string RNC PRO-PACK archive data +# 777 +0 string 777 777 archive data +# LZS221 +0 string sTaC LZS221 archive data +# HPA +0 string HPA HPA archive data +# Arhangel +0 string LG Arhangel archive data +# EXP1, uses bzip2 +0 string 0123456789012345BZh EXP1 archive data +# IMP +0 string IMP\xa IMP archive data +# NRV +0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data +# Squish +0 string \x73\xb2\x90\xf4 Squish archive data +# Par +0 string PHILIPP Par archive data +0 string PAR Par archive data +# HIT +0 string UB HIT archive data +# SBX +0 belong&0xfffff000 0x53423000 SBX archive data +# NaShrink +0 string NSK NaShrink archive data +# SAPCAR +0 string #\ CAR\ archive\ header SAPCAR archive data +0 string CAR\ 2.00RG SAPCAR archive data +# Disintegrator +0 string DST Disintegrator archive data +# ASD +0 string ASD ASD archive data +# InstallShield CAB +0 string ISc( InstallShield CAB +# TOP4 +0 string T4\x1a TOP4 archive data +# BatComp left out: sig looks like COM executable +# so TODO: get real 4dos batcomp file and find sig +# BlakHole +0 string BH\5\7 BlakHole archive data +# BIX +0 string BIX0 BIX archive data +# ChiefLZA +0 string ChfLZ ChiefLZA archive data +# Blink +0 string Blink Blink archive data +# Logitech Compress +0 string \xda\xfa Logitech Compress archive data +# ARS-Sfx (FIXME: really a SFX? then goto COM/EXE) +1 string (C)\ STEPANYUK ARS-Sfx archive data +# AKT/AKT32 +0 string AKT32 AKT32 archive data +0 string AKT AKT archive data +# NPack +0 string MSTSM NPack archive data +# PFT +0 string \0\x50\0\x14 PFT archive data +# SemOne +0 string SEM SemOne archive data +# PPMD +0 string \x8f\xaf\xac\x84 PPMD archive data +# FIZ +0 string FIZ FIZ archive data +# MSXiE +0 belong&0xfffff0f0 0x4d530000 MSXiE archive data +# DeepFreezer +0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data +# DC +0 string =2 string \x2\x4 Xpack DiskImage archive data +#!:ext xdi +# XPack Data +# *.xpa updated by Joerg Jenderek Sep 2015 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/ +0 string xpa XPA +#!:ext xpa +# XPA32 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/xpa32.zip +# created by XPA32.EXE version 1.0.2 for Windows +>0 string xpa\0\1 \b32 archive data +# created by XPACK.COM version 1.67m or 1.67r with short 0x1800 +>3 ubeshort !0x0001 \bck archive data +# XPack Single Data +# changed by Joerg Jenderek Sep 2015 back to like in version 5.12 +# letter 'I'+ acute accent is equivalent to \xcd +0 string \xcd\ jm Xpack single archive data +#!:mime application/x-xpa-compressed +#!:ext xpa + +# TODO: missing due to unknown magic/magic at end of file: +#DWC +#ARG +#ZAR +#PC/3270 +#InstallIt +#RKive +#RK +#XPack Diskimage + +# These were inspired by idarc, but actually verified +# Dzip archiver (.dz) +# Update: Joerg Jenderek +# URL: http://speeddemosarchive.com/dzip/ +# reference: http://speeddemosarchive.com/dzip/dz29src.zip/main.c +# GRR: line below is too general as it matches also ASCII texts like Doszip commander help dz.txt +0 string DZ +# latest version is 2.9 dated 7 may 2003 +>2 byte <4 Dzip archive data +!:mime application/x-dzip +#!:ext dz +>>2 byte x \b, version %i +>>3 byte x \b.%i +>>4 ulelong x \b, offset 0x%x +>>8 ulelong x \b, %u files +# ZZip archiver (.zz) +0 string ZZ\ \0\0 ZZip archive data +0 string ZZ0 ZZip archive data +# PAQ archiver (.paq) +0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data +0 string PAQ PAQ archive data +>3 byte&0xf0 0x30 +>>3 byte x (v%c) +# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP) +0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data +0 string JARCS JAR (ARJ Software, Inc.) archive data + +# ARJ archiver (jason@jarthur.Claremont.EDU) +0 leshort 0xea60 ARJ archive data +!:mime application/x-arj +>5 byte x \b, v%d, +>8 byte &0x04 multi-volume, +>8 byte &0x10 slash-switched, +>8 byte &0x20 backup, +>34 string x original name: %s, +>7 byte 0 os: MS-DOS +>7 byte 1 os: PRIMOS +>7 byte 2 os: Unix +>7 byte 3 os: Amiga +>7 byte 4 os: Macintosh +>7 byte 5 os: OS/2 +>7 byte 6 os: Apple ][ GS +>7 byte 7 os: Atari ST +>7 byte 8 os: NeXT +>7 byte 9 os: VAX/VMS +>3 byte >0 %d] +# [JW] idarc says this is also possible +2 leshort 0xea60 ARJ archive data + +# HA archiver (Greg Roelofs, newt@uchicago.edu) +# This is a really bad format. A file containing HAWAII will match this... +#0 string HA HA archive data, +#>2 leshort =1 1 file, +#>2 leshort >1 %hu files, +#>4 byte&0x0f =0 first is type CPY +#>4 byte&0x0f =1 first is type ASC +#>4 byte&0x0f =2 first is type HSC +#>4 byte&0x0f =0x0e first is type DIR +#>4 byte&0x0f =0x0f first is type SPECIAL +# suggestion: at least identify small archives (<1024 files) +0 belong&0xffff00fc 0x48410000 HA archive data +>2 leshort =1 1 file, +>2 leshort >1 %u files, +>4 byte&0x0f =0 first is type CPY +>4 byte&0x0f =1 first is type ASC +>4 byte&0x0f =2 first is type HSC +>4 byte&0x0f =0x0e first is type DIR +>4 byte&0x0f =0x0f first is type SPECIAL + +# HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz) +0 string HPAK HPACK archive data + +# JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net +0 string \351,\001JAM\ JAM archive, +>7 string >\0 version %.4s +>0x26 byte =0x27 - +>>0x2b string >\0 label %.11s, +>>0x27 lelong x serial %08x, +>>0x36 string >\0 fstype %.8s + +# Very old RAR archive +# https://jasonblanks.com/wp-includes/images/papers/KnowyourarchiveRAR.pdf +0 string RE\x7e\x5e RAR archive data (26 string \x8\0\0\0mimetypeapplication/ + +# KOffice / OpenOffice & StarOffice / OpenDocument formats +# From: Abel Cheung + +# KOffice (1.2 or above) formats +# (mimetype contains "application/vnd.kde.") +>>50 string vnd.kde. KOffice (>=1.2) +>>>58 string karbon Karbon document +>>>58 string kchart KChart document +>>>58 string kformula KFormula document +>>>58 string kivio Kivio document +>>>58 string kontour Kontour document +>>>58 string kpresenter KPresenter document +>>>58 string kspread KSpread document +>>>58 string kword KWord document + +# OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) +# (mimetype contains "application/vnd.sun.xml.") +# URL: https://en.wikipedia.org/wiki/OpenOffice.org_XML +# reference: http://fileformats.archiveteam.org/wiki/OpenOffice.org_XML +>>50 string vnd.sun.xml. OpenOffice.org 1.x +>>>62 string writer Writer +>>>>68 byte !0x2e document +!:mime application/vnd.sun.xml.writer +#!:ext sxw +>>>>68 string .template template +!:mime application/vnd.sun.xml.writer.template +#!:ext stw +>>>>68 string .web Web template +!:mime application/vnd.sun.xml.writer.web +#!:ext stw +>>>>68 string .global global document +!:mime application/vnd.sun.xml.writer.global +#!:ext sxg +>>>62 string calc Calc +>>>>66 byte !0x2e spreadsheet +!:mime application/vnd.sun.xml.calc +#!:ext sxc +>>>>66 string .template template +!:mime application/vnd.sun.xml.calc.template +#!:ext stc +>>>62 string draw Draw +>>>>66 byte !0x2e document +!:mime application/vnd.sun.xml.draw +#!:ext sxd +>>>>66 string .template template +!:mime application/vnd.sun.xml.draw.template +#!:ext std +>>>62 string impress Impress +>>>>69 byte !0x2e presentation +!:mime application/vnd.sun.xml.impress +#!:ext sxi +>>>>69 string .template template +!:mime application/vnd.sun.xml.impress.template +#!:ext sti +>>>62 string math Math document +!:mime application/vnd.sun.xml.math +#!:ext sxm +>>>62 string base Database file +!:mime application/vnd.sun.xml.base +#!:ext sdb + +# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) +# URL: http://fileformats.archiveteam.org/wiki/OpenDocument +# https://lists.oasis-open.org/archives/office/200505/msg00006.html +# (mimetype contains "application/vnd.oasis.opendocument.") +>>50 string vnd.oasis.opendocument. OpenDocument +>>>73 string text +>>>>77 byte !0x2d Text +!:mime application/vnd.oasis.opendocument.text +#!:ext odt +>>>>77 string -template Text Template +!:mime application/vnd.oasis.opendocument.text-template +#!:ext ott +>>>>77 string -web HTML Document Template +!:mime application/vnd.oasis.opendocument.text-web +#!:ext oth +>>>>77 string -master Master Document +!:mime application/vnd.oasis.opendocument.text-master +#!:ext odm +>>>73 string graphics +>>>>81 byte !0x2d Drawing +!:mime application/vnd.oasis.opendocument.graphics +#!:ext odg +>>>>81 string -template Drawing Template +!:mime application/vnd.oasis.opendocument.graphics-template +#!:ext otg +>>>73 string presentation +>>>>85 byte !0x2d Presentation +!:mime application/vnd.oasis.opendocument.presentation +#!:ext odp +>>>>85 string -template Presentation Template +!:mime application/vnd.oasis.opendocument.presentation-template +#!:ext otp +>>>73 string spreadsheet +>>>>84 byte !0x2d Spreadsheet +!:mime application/vnd.oasis.opendocument.spreadsheet +#!:ext ods +>>>>84 string -template Spreadsheet Template +!:mime application/vnd.oasis.opendocument.spreadsheet-template +#!:ext ots +>>>73 string chart +>>>>78 byte !0x2d Chart +!:mime application/vnd.oasis.opendocument.chart +#!:ext odc +>>>>78 string -template Chart Template +!:mime application/vnd.oasis.opendocument.chart-template +#!:ext otc +>>>73 string formula +>>>>80 byte !0x2d Formula +!:mime application/vnd.oasis.opendocument.formula +#!:ext odf +>>>>80 string -template Formula Template +!:mime application/vnd.oasis.opendocument.formula-template +#!:ext otf +# https://www.loc.gov/preservation/digital/formats/fdd/fdd000441.shtml +>>>73 string database Database +!:mime application/vnd.oasis.opendocument.database +#!:ext odb +# Valid for LibreOffice Base 6.0.1.1 at least +>>>73 string base Database +# https://bugs.documentfoundation.org/show_bug.cgi?id=45854 +!:mime application/vnd.oasis.opendocument.database +#!:mime application/vnd.oasis.opendocument.base +#!:ext odb +>>>73 string image +>>>>78 byte !0x2d Image +!:mime application/vnd.oasis.opendocument.image +#!:ext odi +>>>>78 string -template Image Template +!:mime application/vnd.oasis.opendocument.image-template +#!:ext oti + +# EPUB (OEBPS) books using OCF (OEBPS Container Format) +# https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. +# From: Ralf Brown +>>50 string epub+zip EPUB document +!:mime application/epub+zip + +# From: Joerg Jenderek +# URL: http://en.wikipedia.org/wiki/CorelDRAW +# NOTE: version; til 2 WL-based; from 3 til 13 by ./riff; from 14 zip based +>>50 string x-vnd.corel. Corel +>>>62 string draw.document+zip Draw drawing, version 14-16 +!:mime application/x-vnd.corel.draw.document+zip +#!:ext cdr +>>>62 string draw.template+zip Draw template, version 14-16 +!:mime application/x-vnd.corel.draw.template+zip +#!:ext cdrt +>>>62 string zcf.draw.document+zip Draw drawing, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.document+zip +#!:ext cdr +>>>62 string zcf.draw.template+zip Draw template, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.template+zip +#!:ext cdt/cdrt +# URL: http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html +>>>62 string zcf.pattern+zip Draw pattern, version 22 +!:mime application/x-vnd.corel.zcf.pattern+zip +#!:ext pat +# URL: https://en.wikipedia.org/wiki/Corel_Designer +# Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer +# Note: called by TrID "Corel DESIGN graphics" +>>>62 string designer.document+zip DESIGNER graphics, version 14-16 +!:mime application/x-vnd.corel.designer.document+zip +#!:ext des +>>>62 string zcf.designer.document+zip DESIGNER graphics, version 17-21 +!:mime application/x-vnd.corel.zcf.designer.document+zip +#!:ext des +# URL: http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/ +# CorelDRAW-Corel-Symbol-Library-CSL.html +>>>62 string symbol.library+zip Symbol Library, version 6-16.3 +!:mime application/x-vnd.corel.symbol.library+zip +#!:ext csl +>>>62 string zcf.symbol.library+zip Symbol Library, version 17-22 +!:mime application/x-vnd.corel.zcf.symbol.library+zip +#!:ext csl + +# Catch other ZIP-with-mimetype formats +# In a ZIP file, the bytes immediately after a member's contents are +# always "PK". The 2 regex rules here print the "mimetype" member's +# contents up to the first 'P'. Luckily, most MIME types don't contain +# any capital 'P's. This is a kludge. +# (mimetype contains "application/") +>>50 default x Zip data +>>>38 regex [!-OQ-~]+ (MIME type "%s"?) +!:mime application/zip +# (mimetype contents other than "application/*") +>26 string \x8\0\0\0mimetype +>>38 string !application/ +>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?) +!:mime application/zip + +# Java Jar files +>(26.s+30) leshort 0xcafe Java archive data (JAR) +!:mime application/java-archive + +# iOS App +>(26.s+30) leshort !0xcafe +>>26 string !\x8\0\0\0mimetype +>>>30 string Payload/ +>>>>38 search/64 .app/ iOS App +!:mime application/x-ios-app + +>30 search/100/b application/epub+zip EPUB document +!:mime application/epub+zip + +# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) +# Next line excludes specialized formats: +>(26.s+30) leshort !0xcafe +>>30 search/100/b !application/epub+zip +>>>26 string !\x8\0\0\0mimetype Zip archive data +!:mime application/zip +>>>>4 beshort x \b, at least +>>>>4 beshort x to extract +>>>>8 beshort x \b, compression method= +>>>>0x161 string WINZIP \b, WinZIP self-extracting + +# StarView Metafile +# From Pierre Ducroquet +0 string VCLMTF StarView MetaFile +>6 beshort x \b, version %d +>8 belong x \b, size %d + +# Zoo archiver +20 lelong 0xfdc4a7dc Zoo archive data +!:mime application/x-zoo +>4 byte >48 \b, v%c. +>>6 byte >47 \b%c +>>>7 byte >47 \b%c +>32 byte >0 \b, modify: v%d +>>33 byte x \b.%d+ +>42 lelong 0xfdc4a7dc \b, +>>70 byte >0 extract: v%d +>>>71 byte x \b.%d+ + +# Shell archives +10 string #\ This\ is\ a\ shell\ archive shell archive text +!:mime application/octet-stream + +# +# LBR. NB: May conflict with the questionable +# "binary Computer Graphics Metafile" format. +# +0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data +# +# From Rafael Laboissiere +# The Project Revision Control System (see +# http://prcs.sourceforge.net) generates a packaged project +# file which is recognized by the following entry: +0 leshort 0xeb81 PRCS packaged project + +# Microsoft cabinets +# by David Necas (Yeti) +#0 string MSCF\0\0\0\0 Microsoft cabinet file data, +#>25 byte x v%d +#>24 byte x \b.%d +# MPi: All CABs have version 1.3, so this is pointless. +# Better magic in debian-additions. + +# GTKtalog catalogs +# by David Necas (Yeti) +4 string gtktalog\ GTKtalog catalog data, +>13 string 3 version 3 +>>14 beshort 0x677a (gzipped) +>>14 beshort !0x677a (not gzipped) +>13 string >3 version %s + +############################################################################ +# Parity archive reconstruction file, the 'par' file format now used on Usenet. +0 string PAR\0 PARity archive data +>48 leshort =0 - Index file +>48 leshort >0 - file number %d + +# Felix von Leitner +0 string d8:announce BitTorrent file +!:mime application/x-bittorrent +# Durval Menezes, +0 string d13:announce-list BitTorrent file +!:mime application/x-bittorrent +0 string d7:comment BitTorrent file +!:mime application/x-bittorrent +0 string d4:info BitTorrent file +!:mime application/x-bittorrent + +# Atari MSA archive - Teemu Hukkanen +0 beshort 0x0e0f Atari MSA archive data +>2 beshort x \b, %d sectors per track +>4 beshort 0 \b, 1 sided +>4 beshort 1 \b, 2 sided +>6 beshort x \b, starting track: %d +>8 beshort x \b, ending track: %d + +# Alternate ZIP string (amc@arwen.cs.berkeley.edu) +0 string PK00PK\003\004 Zip archive data +!:mime application/zip +#!:ext zip/cbz + +# ACE archive (from http://www.wotsit.org/download.asp?f=ace) +# by Stefan `Sec` Zehl +7 string **ACE** ACE archive data +>15 byte >0 version %d +>16 byte =0x00 \b, from MS-DOS +>16 byte =0x01 \b, from OS/2 +>16 byte =0x02 \b, from Win/32 +>16 byte =0x03 \b, from Unix +>16 byte =0x04 \b, from MacOS +>16 byte =0x05 \b, from WinNT +>16 byte =0x06 \b, from Primos +>16 byte =0x07 \b, from AppleGS +>16 byte =0x08 \b, from Atari +>16 byte =0x09 \b, from Vax/VMS +>16 byte =0x0A \b, from Amiga +>16 byte =0x0B \b, from Next +>14 byte x \b, version %d to extract +>5 leshort &0x0080 \b, multiple volumes, +>>17 byte x \b (part %d), +>5 leshort &0x0002 \b, contains comment +>5 leshort &0x0200 \b, sfx +>5 leshort &0x0400 \b, small dictionary +>5 leshort &0x0800 \b, multi-volume +>5 leshort &0x1000 \b, contains AV-String +>>30 string \x16*UNREGISTERED\x20VERSION* (unregistered) +>5 leshort &0x2000 \b, with recovery record +>5 leshort &0x4000 \b, locked +>5 leshort &0x8000 \b, solid +# Date in MS-DOS format (whatever that is) +#>18 lelong x Created on + +# sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann +# +0x1A string sfArk sfArk compressed Soundfont +>0x15 string 2 +>>0x1 string >\0 Version %s +>>0x2A string >\0 : %s + +# DR-DOS 7.03 Packed File *.??_ +# Reference: http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm +# Note: unpacked by PNUNPACK.EXE +0 string Packed\ File\ +# by looking for Control-Z skip ASCII text starting with Packed File +>0x18 ubyte 0x1a Personal NetWare Packed File +!:mime application/x-novell-compress +#!:ext ??_ +>>12 string x \b, was "%.12s" +# 1 or 2 +#>>0x19 ubyte x \b, at 0x19 %u +>>0x1b ulelong x with %u bytes + +# EET archive +# From: Tilman Sauerbeck +0 belong 0x1ee7ff00 EET archive +!:mime application/x-eet + +# rzip archives +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +# From: Joerg Jenderek +# URL: https://help.foxitsoftware.com/kb/install-fzip-file.php +# reference: http://mark0.net/download/triddefs_xml.7z/ +# defs/f/fzip.trid.xml +# Note: unknown compression; No "PK" zip magic; normally in directory like +# "%APPDATA%\Foxit Software\Addon\Foxit Reader\Install" +0 ubequad 0x2506781901010000 Foxit add-on/update +!:mime application/x-fzip +#!:ext fzip + +# From: "Robert Dale" +0 belong 123 dar archive, +>4 belong x label "%.8x +>>8 belong x %.8x +>>>12 beshort x %.4x" +>14 byte 0x54 end slice +>14 beshort 0x4e4e multi-part +>14 beshort 0x4e53 multi-part, with -S + +# Symbian installation files +# https://www.thouky.co.uk/software/psifs/sis.html +# http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf +8 lelong 0x10000419 Symbian installation file +!:mime application/vnd.symbian.install +>4 lelong 0x1000006D (EPOC release 3/4/5) +>4 lelong 0x10003A12 (EPOC release 6) +0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x) +!:mime x-epoc/x-sisx-app + +# From "Nelson A. de Oliveira" +0 string MPQ\032 MoPaQ (MPQ) archive + +# From: "Nelson A. de Oliveira" +# .kgb +0 string KGB_arch KGB Archiver file +>10 string x with compression level %.1s + +# Type: Parity Archive +# From: Daniel van Eeden +0 string PAR2 Parity Archive Volume Set + +# Bacula volume format. (Volumes always start with a block header.) +# URL: https://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html +# From: Adam Buchbinder +12 string BB02 Bacula volume +>20 bedate x \b, started %s + +# ePub is XHTML + XML inside a ZIP archive. The first member of the +# archive must be an uncompressed file called 'mimetype' with contents +# 'application/epub+zip' + + +# From: "Michael Gorny" +# ZPAQ: http://mattmahoney.net/dc/zpaq.html +0 string zPQ ZPAQ stream +>3 byte x \b, level %d +# From: Barry Carter +# https://encode.ru/threads/456-zpaq-updates/page32 +0 string 7kSt ZPAQ file + +# BBeB ebook, unencrypted (LRF format) +# URL: https://www.sven.de/librie/Librie/LrfFormat +# From: Adam Buchbinder +0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted +>8 beshort x \b, version %d +>36 byte 1 \b, front-to-back +>36 byte 16 \b, back-to-front +>42 beshort x \b, (%dx, +>44 beshort x %d) + +# Symantec GHOST image by Joerg Jenderek at May 2014 +# https://us.norton.com/ghost/ +# https://www.garykessler.net/library/file_sigs.html +0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image +# *.GHO +>2 ubyte&0x08 0x00 \b, first file +# *.GHS or *.[0-9] with cns program option +>2 ubyte&0x08 0x08 \b, split file +# part of split index interesting for *.ghs +>>4 ubyte x id=0x%x +# compression tag minus one equals numeric compression command line switch z[1-9] +>3 ubyte 0 \b, no compression +>3 ubyte 2 \b, fast compression (Z1) +>3 ubyte 3 \b, medium compression (Z2) +>3 ubyte >3 +>>3 ubyte <11 \b, compression (Z%d-1) +>2 ubyte&0x08 0x00 +# ~ 30 byte password field only for *.gho +>>12 ubequad !0 \b, password protected +>>44 ubyte !1 +# 1~Image All, sector-by-sector only for *.gho +>>>10 ubyte 1 \b, sector copy +# 1~Image Boot track only for *.gho +>>>43 ubyte 1 \b, boot track +# 1~Image Disc only for *.gho implies Image Boot track and sector copy +>>44 ubyte 1 \b, disc sector copy +# optional image description only *.gho +>>0xff string >\0 "%-.254s" +# look for DOS sector end sequence +>0xE08 search/7776 \x55\xAA +>>&-512 indirect x \b; contains + +# Google Chrome extensions +# https://developer.chrome.com/extensions/crx +# https://developer.chrome.com/extensions/hosting +0 string Cr24 Google Chrome extension +!:mime application/x-chrome-extension +>4 ulong x \b, version %u + +# SeqBox - Sequenced container +# ext: sbx, seqbox +# Marco Pontello marcopon@gmail.com +# reference: https://github.com/MarcoPon/SeqBox +0 string SBx SeqBox, +>3 byte x version %d + +# LyNX archive +56 string USE\040LYNX\040TO\040DISSOLVE\040THIS\040FILE LyNX archive + +# From: Joerg Jenderek +# URL: https://www.acronis.com/ +# Reference: https://en.wikipedia.org/wiki/TIB_(file_format) +# Note: only tested with True Image 2013 Build 5962 and 2019 Build 14110 +0 ubequad 0xce24b9a220000000 Acronis True Image backup +!:mime application/x-acronis-tib +#!:ext tib +# 01000000 +#>20 ubelong x \b, at 20 0x%x +# 20000000 +#>28 ubelong x \b, at 28 0x%x +# strings like "Generic- SD/MMC 1.00" "Unknown Disk" "Msft Virtual Disk 1.0" +# ??? +# strings like "\Device\0000011e" "\Device\0000015a" +#>0 search/0x6852300/cs \\Device\\ +#>>&-1 pstring x \b, %s +# "\Device\HarddiskVolume30" "\Device\HarddiskVolume39" +#>>>&1 search/180/cs \\Device\\ +#>>>>&-1 pstring x \b, %s +#>>>>>&0 search/29/cs \0\0\xc8\0 +# disk label +#>>>>>>&10 lestring16 x \b, disk label %11.11s +#>>>>>>&9 plestring16 x \b, disk label "%11.11s" +#>>>>>>&10 ubequad x %16.16llx + + +# Gentoo XPAK binary package +# by Michal Gorny +# https://gitweb.gentoo.org/proj/portage.git/tree/man/xpak.5 +-4 string STOP +>-16 string XPAKSTOP Gentoo binary package (XPAK) + +# From: Joerg Jenderek +# URL: https://kodi.wiki/view/TexturePacker +# Reference: https://mirrors.kodi.tv/releases/source/17.3-Krypton.tar.gz +# /xbmc-Krypton/xbmc/guilib/XBTF.h +# /xbmc-Krypton/xbmc/guilib/XBTF.cpp +0 string XBTF +# skip ASCII text by looking for terminating \0 of path +>264 ubyte 0 XBMC texture package +!:mime application/x-xbmc-xbt +#!:ext xbt +# XBTF_VERSION 2 +>>4 string !2 \b, version %-.1s +# nofFiles /xbmc-Krypton/xbmc/guilib/XBTFReader.cpp +>>5 ulelong x \b, %u file +# plural s +>>5 ulelong >1 \bs +# path[CXBTFFile[MaximumPathLength=256] +>>9 string x \b, 1st %s + +# ALZIP archive +# by Hyungjun Park , Hajin Jang +# http://kippler.com/win/unalz/ +# https://salsa.debian.org/l10n-korean-team/unalz +0 string ALZ\001 ALZ archive data +#!:ext alz + +# https://cf-aldn.altools.co.kr/setup/EGG_Specification.zip +0 string EGGA EGG archive data, +#!:ext egg +>5 byte x version %u +>4 byte x \b.%u +>>0x0E ulelong =0x08E28222 +>>0x0E ulelong =0x24F5A262 \b, split +>>0x0E ulelong =0x24E5A060 \b, solid +>>0x0E default x \b, unknown + +# PAQ9A archive +# URL: http://mattmahoney.net/dc/#paq9a +# Note: Line 1186 of paq9a.cpp gives the magic bytes +0 string pQ9\001 PAQ9A archive + +#------------------------------------------------------------------------------ +# $File: compress,v 1.80 2021/03/15 17:49:24 christos Exp $ +# compress: file(1) magic for pure-compression formats (no archives) +# +# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. +# +# Formats for various forms of compressed data +# Formats for "compress" proper have been moved into "compress.c", +# because it tries to uncompress it to figure out what's inside. + +# standard unix compress +0 string \037\235 compress'd data +!:mime application/x-compress +!:apple LZIVZIVU +>2 byte&0x80 >0 block compressed +>2 byte&0x1f x %d bits + +# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver) +# URL: https://en.wikipedia.org/wiki/Gzip +# Reference: https://tools.ietf.org/html/rfc1952 +# Update: Joerg Jenderek, Apr 2019 +# Edited by Chris Chittleborough , March 2002 +# * Original filename is only at offset 10 if "extra field" absent +# * Produce shorter output - notably, only report compression methods +# other than 8 ("deflate", the only method defined in RFC 1952). +# Note: find defs -iname '*.trid.xml' -exec grep -q '1F8B08' {} \; -ls +# TODO: +# FBR Blueberry FlashBack screen Record https://www.flashbackrecorder.com/ +# KPR KOffice/Calligra KPresenter application/x-kpresenter +# KPT KOffice/Calligra KPresenter template? application/x-kpresenter +# SAV Diggles Saved Game File http://www.innonics.com +# SAV FarCry (demo) saved game http://www.farcry-thegame.com +# DAT ZOAGZIP game data format http://en.wikipedia.org/wiki/SD_Gundam_Capsule_Fighter +0 string \037\213 +# to display gzip compressed (strength=100=2*50) before other (strength=50)? +#!:strength * 2 +# no FNAME and FCOMMENT bit implies no file name/comment. That means only binary +>3 byte&0x18 =0 +# For binary gzipped no ASCII text should occur +# mcd-monu-cad.trid.xml +>>10 string MCD Monu-Cad Drawing, Component or Font +#>>36 string Created\ with\ MONU-CAD +#!:mime application/octet-stream +# http://fileformats.archiveteam.org/wiki/Monu-CAD +# http://www.monucad.com/downloads/FullDemo-2005.EXE +# /HANDS96.MCC Component +# /DEMO_DD01.MCD Drawing +# /MCALF020.FNT Font +#!:ext mcc/mcd/fnt +# http://www.generalcadd.com +>>10 string GXD General CADD, Drawing or Component +#!:mime application/octet-stream +# /gxc/BUILDINGEDGE.gxc Component +# /gxd/HOCKETT-STPAUL-WRHSE.gxd Drawing +# /gxd/POWERLAND-MILL-ADD-11.gxd Drawing v9.1.06 +#!:ext gxc/gxd +#>>>13 ubyte 0 \b, version 0 +>>>13 string 09 \b, version 9 +# other gzipped binary like gzipped tar, VirtualBox extension package,... +>>10 default x gzip compressed data +!:mime application/gzip +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# gzipped TAR or VirtualBox extension package +#!:mime application/x-compressed-tar +#!:mime application/x-virtualbox-vbox-extpack +# https://www.w3.org/TR/SVG/mimereg.html +#!:mime image/image/svg+xml-compressed +# zlib.3.gz +# microcode-20180312.tgz +# tpz same as tgz +# lua-md5_1.2-1_i386_i486.ipk https://en.wikipedia.org/wiki/Opkg +# Oracle_VM_VirtualBox_Extension_Pack-5.0.12-104815.vbox-extpack +#!:ext gz/tgz/tpz/ipk/vbox-extpack/svgz +# FNAME/FCOMMENT bit implies file name/comment as iso-8859-1 text +>3 byte&0x18 >0 gzip compressed data +!:mime application/gzip +# gzipped tar, gzipped Abiword document +#!:mime application/x-compressed-tar +#!:mime application/x-abiword-compressed +#!:mime image/image/svg+xml-compressed +# kleopatra_splashscreen.svgz gzipped .svg +#!:ext gz/tgz/tpz/zabw/svgz +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# display information of gzip compressed files +#>2 byte x THIS iS GZIP +>2 byte <8 \b, reserved method +>2 byte >8 \b, unknown method +>3 byte &0x01 \b, ASCII +>3 byte &0x02 \b, has CRC +>3 byte &0x04 \b, extra field +>3 byte&0xC =0x08 +>>10 string x \b, was "%s" +>3 byte &0x10 \b, has comment +>3 byte &0x20 \b, encrypted +>4 ledate >0 \b, last modified: %s +>8 byte 2 \b, max compression +>8 byte 4 \b, max speed +>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT) +>9 byte =0x01 \b, from Amiga +>9 byte =0x02 \b, from VMS +>9 byte =0x03 \b, from Unix +>9 byte =0x04 \b, from VM/CMS +>9 byte =0x05 \b, from Atari +>9 byte =0x06 \b, from HPFS filesystem (OS/2, NT) +>9 byte =0x07 \b, from MacOS +>9 byte =0x08 \b, from Z-System +>9 byte =0x09 \b, from CP/M +>9 byte =0x0A \b, from TOPS/20 +>9 byte =0x0B \b, from NTFS filesystem (NT) +>9 byte =0x0C \b, from QDOS +>9 byte =0x0D \b, from Acorn RISCOS +# size of the original (uncompressed) input data modulo 2^32 +#>-4 ulelong x \b, original size modulo 2^32 %u +#ERROR: line 114: non zero offset 1048572 at level 1 + +# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis +0 string \037\036 packed data +!:mime application/octet-stream +>2 belong >1 \b, %d characters originally +>2 belong =1 \b, %d character originally +# +# This magic number is byte-order-independent. +0 short 0x1f1f old packed data +!:mime application/octet-stream + +# XXX - why *two* entries for "compacted data", one of which is +# byte-order independent, and one of which is byte-order dependent? +# +0 short 0x1fff compacted data +!:mime application/octet-stream +# This string is valid for SunOS (BE) and a matching "short" is listed +# in the Ultrix (LE) magic file. +0 string \377\037 compacted data +!:mime application/octet-stream +0 short 0145405 huf output +!:mime application/octet-stream + +# bzip2 +0 string BZh bzip2 compressed data +!:mime application/x-bzip2 +>3 byte >47 \b, block size = %c00k + +# bzip a block-sorting file compressor +# by Julian Seward and others +0 string BZ0 bzip compressed data +!:mime application/x-bzip +>3 byte >47 \b, block size = %c00k + +# lzip +0 string LZIP lzip compressed data +!:mime application/x-lzip +>4 byte x \b, version: %d + +# squeeze and crunch +# Michael Haardt +0 beshort 0x76FF squeezed data, +>4 string x original name %s +0 beshort 0x76FE crunched data, +>2 string x original name %s +0 beshort 0x76FD LZH compressed data, +>2 string x original name %s + +# Freeze +0 string \037\237 frozen file 2.1 +0 string \037\236 frozen file 1.0 (or gzip 0.5) + +# SCO compress -H (LZH) +0 string \037\240 SCO compress -H (LZH) data + +# European GSM 06.10 is a provisional standard for full-rate speech +# transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse +# excitation/long term prediction) coding at 13 kbit/s. +# +# There's only a magic nibble (4 bits); that nibble repeats every 33 +# bytes. This isn't suited for use, but maybe we can use it someday. +# +# This will cause very short GSM files to be declared as data and +# mismatches to be declared as data too! +#0 byte&0xF0 0xd0 data +#>33 byte&0xF0 0xd0 +#>66 byte&0xF0 0xd0 +#>99 byte&0xF0 0xd0 +#>132 byte&0xF0 0xd0 GSM 06.10 compressed audio + +# lzop from +0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data +>9 beshort <0x0940 +>>9 byte&0xf0 =0x00 - version 0. +>>9 beshort&0x0fff x \b%03x, +>>13 byte 1 LZO1X-1, +>>13 byte 2 LZO1X-1(15), +>>13 byte 3 LZO1X-999, +## >>22 bedate >0 last modified: %s, +>>14 byte =0x00 os: MS-DOS +>>14 byte =0x01 os: Amiga +>>14 byte =0x02 os: VMS +>>14 byte =0x03 os: Unix +>>14 byte =0x05 os: Atari +>>14 byte =0x06 os: OS/2 +>>14 byte =0x07 os: MacOS +>>14 byte =0x0A os: Tops/20 +>>14 byte =0x0B os: WinNT +>>14 byte =0x0E os: Win32 +>9 beshort >0x0939 +>>9 byte&0xf0 =0x00 - version 0. +>>9 byte&0xf0 =0x10 - version 1. +>>9 byte&0xf0 =0x20 - version 2. +>>9 beshort&0x0fff x \b%03x, +>>15 byte 1 LZO1X-1, +>>15 byte 2 LZO1X-1(15), +>>15 byte 3 LZO1X-999, +## >>25 bedate >0 last modified: %s, +>>17 byte =0x00 os: MS-DOS +>>17 byte =0x01 os: Amiga +>>17 byte =0x02 os: VMS +>>17 byte =0x03 os: Unix +>>17 byte =0x05 os: Atari +>>17 byte =0x06 os: OS/2 +>>17 byte =0x07 os: MacOS +>>17 byte =0x0A os: Tops/20 +>>17 byte =0x0B os: WinNT +>>17 byte =0x0E os: Win32 + +# 4.3BSD-Quasijarus Strong Compression +# https://minnie.tuhs.org/Quasijarus/compress.html +0 string \037\241 Quasijarus strong compressed data + +# From: Cory Dikkers +0 string XPKF Amiga xpkf.library compressed data +0 string PP11 Power Packer 1.1 compressed data +0 string PP20 Power Packer 2.0 compressed data, +>4 belong 0x09090909 fast compression +>4 belong 0x090A0A0A mediocre compression +>4 belong 0x090A0B0B good compression +>4 belong 0x090A0C0C very good compression +>4 belong 0x090A0C0D best compression + +# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at) +# https://www.7-zip.org or DOC/7zFormat.txt +# +0 string 7z\274\257\047\034 7-zip archive data, +>6 byte x version %d +>7 byte x \b.%d +!:mime application/x-7z-compressed +#!:ext 7z/cb7 + +# Type: LZMA +0 lelong&0xffffff =0x5d +>12 leshort 0xff lzma compressed data, +!:mime application/x-lzma +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld +>12 leshort 0 lzma compressed data, +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld + +# http://tukaani.org/xz/xz-file-format.txt +0 ustring \xFD7zXZ\x00 xz compressed data, checksum +>7 byte&0xf 0x0 NONE +>7 byte&0xf 0x1 CRC32 +>7 byte&0xf 0x4 CRC64 +>7 byte&0xf 0xa SHA-256 + +!:strength * 2 +!:mime application/x-xz + +# https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt +0 string LRZI LRZIP compressed data +>4 byte x - version %d +>5 byte x \b.%d +!:mime application/x-lrzip + +# https://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html +0 lelong 0x184d2204 lz4 compressed data (v1.4+) +!:mime application/x-lz4 +# Added by osm0sis@xda-developers.com +0 lelong 0x184c2103 lz4 compressed data (v1.0-v1.3) +!:mime application/x-lz4 +0 lelong 0x184c2102 lz4-l compressed data (v0.1-v0.9) +!:mime application/x-lz4 + +# Zstandard/LZ4 skippable frames +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong&0xFFFFFFF0 0x184D2A50 +>(4.l+8) indirect x + +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong 0xEC30A437 Zstandard dictionary +!:mime application/x-std-dictionary +>4 lelong x (ID %u) + +# AFX compressed files (Wolfram Kleff) +2 string -afx- AFX compressed file data + +# Supplementary magic data for the file(1) command to support +# rzip(1). The format is described in magic(5). +# +# Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with +# this file. +# +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +0 string ArC\x01 FreeArc archive + +# Type: DACT compressed files +0 long 0x444354C3 DACT compressed data +>4 byte >-1 (version %i. +>5 byte >-1 %i. +>6 byte >-1 %i) +>7 long >0 , original size: %i bytes +>15 long >30 , block size: %i bytes + +# Valve Pack (VPK) files +0 lelong 0x55aa1234 Valve Pak file +>0x4 lelong x \b, version %u +>0x8 lelong x \b, %u entries + +# Snappy framing format +# https://code.google.com/p/snappy/source/browse/trunk/framing_format.txt +0 string \377\006\0\0sNaPpY snappy framed data +!:mime application/x-snappy-framed + +# qpress, https://www.quicklz.com/ +0 string qpress10 qpress compressed data +!:mime application/x-qpress + +# Zlib https://www.ietf.org/rfc/rfc6713.txt +0 string/b x +>0 beshort%31 =0 +>>0 byte&0xf =8 +>>>0 byte&0x80 =0 zlib compressed data +!:mime application/zlib + +# BWC compression +0 string BWC +>3 byte 0 BWC compressed data + +# UCL compression +0 bequad 0x00e955434cff011a UCL compressed data + +# Softlib archive +0 string SLIB Softlib archive +>4 leshort x \b, version %d +>6 leshort x (contains %d files) + +# URL: https://github.com/lzfse/lzfse/blob/master/src/lzfse_internal.h#L276 +# From: Eric Hall +0 string bvx- lzfse encoded, no compression +0 string bvx1 lzfse compressed, uncompressed tables +0 string bvx2 lzfse compressed, compressed tables +0 string bvxn lzfse encoded, lzvn compressed + +# pcxLib.exe compression program +# http://www.shikadi.net/moddingwiki/PCX_Library +0 string/b pcxLib + +#------------------------------------------------------------ +# $File: android,v 1.18 2021/02/23 00:51:10 christos Exp $ +# Various android related magic entries +#------------------------------------------------------------ + +# Dalvik .dex format. http://retrodev.com/android/dexformat.html +# From "Mike Fleming" +# Fixed to avoid regexec 17 errors on some dex files +# From "Tim Strazzere" +0 string dex\n +>0 regex dex\n[0-9]{2}\0 Dalvik dex file +>4 string >000 version %s +0 string dey\n +>0 regex dey\n[0-9]{2}\0 Dalvik dex file (optimized for host) +>4 string >000 version %s + +# Android bootimg format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/mkbootimg/bootimg.h +# https://github.com/djrbliss/loki/blob/master/loki.h#L43 +0 string ANDROID! Android bootimg +>1024 string LOKI \b, LOKI'd +>>1028 lelong 0 \b (boot) +>>1028 lelong 1 \b (recovery) +>8 lelong >0 \b, kernel +>>12 lelong >0 \b (0x%x) +>16 lelong >0 \b, ramdisk +>>20 lelong >0 \b (0x%x) +>24 lelong >0 \b, second stage +>>28 lelong >0 \b (0x%x) +>36 lelong >0 \b, page size: %d +>38 string >0 \b, name: %s +>64 string >0 \b, cmdline (%s) + +# Android sparse img format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/libsparse/sparse_format.h +0 lelong 0xed26ff3a Android sparse image +>4 leshort x \b, version: %d +>6 leshort x \b.%d +>16 lelong x \b, Total of %d +>12 lelong x \b %d-byte output blocks in +>20 lelong x \b %d input chunks. + +# Android binary XML magic +# In include/androidfw/ResourceTypes.h: +# RES_XML_TYPE = 0x0003 followed by the size of the header (ResXMLTree_header), +# which is 8 bytes (2 bytes type + 2 bytes header size + 4 bytes size). +0 lelong 0x00080003 Android binary XML + +# Android cryptfs footer +# From https://android.googlesource.com/\ +# platform/system/vold/+/refs/heads/master/cryptfs.h +0 lelong 0xd0b5b1c4 Android cryptfs footer +>4 leshort x \b, version: %d +>6 leshort x \b.%d + +# Android Vdex format +# From https://android.googlesource.com/\ +# platform/art/+/master/runtime/vdex_file.h +0 string vdex Android vdex file, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d + +# Android Vdex format, dexfile is currently being updated +# by android system +# From https://android.googlesource.com/\ +# platform/art/+/master/dex2oat/dex2oat.cc +0 string wdex Android vdex file, being processed by dex2oat, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d diff --git a/Final_Zip/AIK/KSU/TWRP-R/cleanup.sh b/Final_Zip/AIK/KSU/TWRP-R/cleanup.sh new file mode 100755 index 0000000..d8f1d61 --- /dev/null +++ b/Final_Zip/AIK/KSU/TWRP-R/cleanup.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# AIK-Linux/cleanup: reset working directory +# osm0sis @ xda-developers + +case $1 in + --help) echo "usage: cleanup.sh [--local] [--quiet]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + statarg="-f %Su"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) statarg="-c %U";; +esac; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; + +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + sudo=sudo; +fi; + +$sudo rm -rf ramdisk split_img *new.* || exit 1; + +case $1 in + --quiet) ;; + *) echo "Working directory cleaned.";; +esac; +exit 0; + diff --git a/Final_Zip/AIK/KSU/TWRP-R/repackimg.sh b/Final_Zip/AIK/KSU/TWRP-R/repackimg.sh new file mode 100755 index 0000000..5709f0f --- /dev/null +++ b/Final_Zip/AIK/KSU/TWRP-R/repackimg.sh @@ -0,0 +1,413 @@ +#!/bin/bash +# AIK-Linux/repackimg: repack ramdisk and build image +# osm0sis @ xda-developers + +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: repackimg.sh [--local] [--original] [--origsize] [--level <0-9>] [--avbkey ] [--forceelf]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + + javaver=$(java -version 2>&1 | head -n1 | cut -d\" -f2); + javamaj=$(echo $javaver | cut -d. -f1); + javamin=$(echo $javaver | cut -d. -f2); + if [ "$javamaj" -lt 9 ] && [ "$javamaj" -eq 1 -a "$javamin" -lt 8 ]; then + java() { "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" "$@"; } + fi; + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; +chmod -R 755 "$bin" "$aik/"*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -z "$(ls split_img/* 2>/dev/null)" -o ! -e ramdisk ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +while [ "$1" ]; do + case $1 in + --original) original=1;; + --origsize) origsize=1;; + --forceelf) repackelf=1;; + --level) + case $2 in + ''|*[!0-9]*) ;; + *) level="-$2"; lvltxt=" - Level: $2"; shift;; + esac; + ;; + --avbkey) + if [ "$2" ]; then + for keytest in "$2" "$cur/$2" "$aik/$2"; do + if [ ! -z "$(ls $keytest.pk8 2>/dev/null)" -a ! -z "$(ls $keytest.x509.* 2>/dev/null)" ]; then + avbkey="$keytest"; avbtxt=" - Key: $2"; shift; break; + fi; + done; + fi; + ;; + esac; + shift; +done; + +ramdiskcomp=`cat split_img/*-*ramdiskcomp 2>/dev/null`; +if [ -z "$(ls ramdisk/* 2>/dev/null)" ] && [ ! "$ramdiskcomp" = "empty" -a ! "$original" ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - RepackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +if [ ! -z "$(ls *-new.* 2>/dev/null)" ]; then + echo "Warning: Overwriting existing files!"; + echo " "; +fi; +rm -f "*-new.*"; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" ]; then + sudo=sudo; sumsg=" (as root)"; +else + cpioarg="-R 0:0"; +fi; + +if [ "$original" ]; then + echo "Repacking with original ramdisk..."; +elif [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: Using empty ramdisk for repack!"; + compext=.empty; + touch ramdisk-new.cpio$compext; +else + echo "Packing ramdisk$sumsg..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + if [ -z "$level" ]; then + case $ramdiskcomp in + xz) level=-1;; + lz4*) level=-9;; + esac; + fi; + echo "Using compression: $ramdiskcomp$lvltxt"; + repackcmd="$ramdiskcomp $level"; + compext=$ramdiskcomp; + case $ramdiskcomp in + gzip) compext=gz;; + lzop) compext=lzo;; + xz) repackcmd="xz $level -Ccrc32";; + lzma) repackcmd="xz $level -Flzma";; + bzip2) compext=bz2;; + lz4) repackcmd="$bin/$arch/lz4 $level";; + lz4-l) repackcmd="$bin/$arch/lz4 $level -l"; compext=lz4;; + cpio) repackcmd="cat"; compext="";; + *) abort; exit 1;; + esac; + if [ "$compext" ]; then + compext=.$compext; + fi; + cd ramdisk; + $sudo find . | $sudo $cpio $cpioarg -H newc -o 2>/dev/null | $repackcmd > ../ramdisk-new.cpio$compext; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Getting build information..."; +cd split_img; +imgtype=`cat *-imgtype`; +case $imgtype in + KRNL) ;; + AOSP_VNDR) vendor=vendor_;; + *) + if [ -f *-kernel ]; then + kernel=`ls *-kernel`; echo "kernel = $kernel"; + kernel="split_img/$kernel"; + fi; + ;; +esac; +if [ "$original" ]; then + ramdisk=`ls *-*ramdisk.cpio*`; echo "${vendor}ramdisk = $ramdisk"; + ramdisk="split_img/$ramdisk"; +else + ramdisk="ramdisk-new.cpio$compext"; +fi; +case $imgtype in + KRNL) rsz=$(wc -c < ../"$ramdisk"); echo "ramdisk_size = $rsz";; + OSIP) echo "cmdline = $(cat *-*cmdline)";; + U-Boot) + name=`cat *-name`; echo "name = $name"; + uarch=`cat *-arch`; + os=`cat *-os`; + type=`cat *-type`; + comp=`cat *-comp`; echo "type = $uarch $os $type ($comp)"; + [ "$comp" = "uncompressed" ] && comp=none; + addr=`cat *-addr`; echo "load_addr = $addr"; + ep=`cat *-ep`; echo "entry_point = $ep"; + ;; + *) + if [ -f *-second ]; then + second=`ls *-second`; echo "second = $second"; + second=(--second "split_img/$second"); + fi; + if [ -f *-dtb ]; then + dtb=`ls *-dtb`; echo "dtb = $dtb"; + dtb=(--dtb "split_img/$dtb"); + fi; + if [ -f *-recovery_dtbo ]; then + recoverydtbo=`ls *-recovery_dtbo`; echo "recovery_dtbo = $recoverydtbo"; + recoverydtbo=(--recovery_dtbo "split_img/$recoverydtbo"); + fi; + if [ -f *-*cmdline ]; then + cmdname=`ls *-*cmdline`; + cmdline=`cat *-*cmdline`; echo "${vendor}cmdline = $cmdline"; + cmd=("split_img/$cmdname"@cmdline); + fi; + if [ -f *-board ]; then + board=`cat *-board`; echo "board = $board"; + fi; + if [ -f *-base ]; then + base=`cat *-base`; echo "base = $base"; + fi; + if [ -f *-pagesize ]; then + pagesize=`cat *-pagesize`; echo "pagesize = $pagesize"; + fi; + if [ -f *-kernel_offset ]; then + kerneloff=`cat *-kernel_offset`; echo "kernel_offset = $kerneloff"; + fi; + if [ -f *-ramdisk_offset ]; then + ramdiskoff=`cat *-ramdisk_offset`; echo "ramdisk_offset = $ramdiskoff"; + fi; + if [ -f *-second_offset ]; then + secondoff=`cat *-second_offset`; echo "second_offset = $secondoff"; + fi; + if [ -f *-tags_offset ]; then + tagsoff=`cat *-tags_offset`; echo "tags_offset = $tagsoff"; + fi; + if [ -f *-dtb_offset ]; then + dtboff=`cat *-dtb_offset`; echo "dtb_offset = $dtboff"; + fi; + if [ -f *-os_version ]; then + osver=`cat *-os_version`; echo "os_version = $osver"; + fi; + if [ -f *-os_patch_level ]; then + oslvl=`cat *-os_patch_level`; echo "os_patch_level = $oslvl"; + fi; + if [ -f *-header_version ]; then + hdrver=`cat *-header_version`; echo "header_version = $hdrver"; + fi; + if [ -f *-hashtype ]; then + hashtype=`cat *-hashtype`; echo "hashtype = $hashtype"; + hashtype="--hashtype $hashtype"; + fi; + if [ -f *-dt ]; then + dttype=`cat *-dttype`; + dt=`ls *-dt`; echo "dt = $dt"; + rpm=("split_img/$dt",rpm); + dt=(--dt "split_img/$dt"); + fi; + if [ -f *-unknown ]; then + unknown=`cat *-unknown`; echo "unknown = $unknown"; + fi; + if [ -f *-header ]; then + header=`ls *-header`; + header="split_img/$header"; + fi; + ;; +esac; +cd ..; + +if [ -f split_img/*-mtktype ]; then + mtktype=`cat split_img/*-mtktype`; + echo " "; + echo "Generating MTK headers..."; + echo " "; + echo "Using ramdisk type: $mtktype"; + "$bin/$arch/mkmtkhdr" --kernel "$kernel" --$mtktype "$ramdisk" >/dev/null; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + mv -f "$(basename "$kernel")-mtk" kernel-new.mtk; + mv -f "$(basename "$ramdisk")-mtk" $mtktype-new.mtk; + kernel=kernel-new.mtk; + ramdisk=$mtktype-new.mtk; +fi; + +if [ -f split_img/*-sigtype ]; then + outname=unsigned-new.img; +else + outname=image-new.img; +fi; + +[ "$dttype" = "ELF" ] && repackelf=1; +if [ "$imgtype" = "ELF" ] && [ ! "$header" -o ! "$repackelf" ]; then + imgtype=AOSP; + echo " "; + echo "Warning: ELF format without RPM detected; will be repacked using AOSP format!"; +fi; + +echo " "; +echo "Building image..."; +echo " "; +echo "Using format: $imgtype"; +echo " "; +case $imgtype in + AOSP_VNDR) "$bin/$arch/mkbootimg" --vendor_ramdisk "$ramdisk" "${dtb[@]}" --vendor_cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --tags_offset $tagsoff --dtb_offset $dtboff --os_version "$osver" --os_patch_level "$oslvl" --header_version $hdrver --vendor_boot $outname;; + AOSP) "$bin/$arch/mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" "${dtb[@]}" "${recoverydtbo[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --dtb_offset "$dtboff" --os_version "$osver" --os_patch_level "$oslvl" --header_version "$hdrver" $hashtype "${dt[@]}" -o $outname;; + AOSP-PXA) "$bin/$arch/pxa-mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --unknown $unknown "${dt[@]}" -o $outname;; + ELF) "$bin/$arch/elftool" pack -o $outname header="$header" "$kernel" "$ramdisk",ramdisk "${rpm[@]}" "${cmd[@]}" >/dev/null;; + KRNL) "$bin/$arch/rkcrc" -k "$ramdisk" $outname;; + OSIP) + mkdir split_img/.temp 2>/dev/null; + for i in bootstub cmdline.txt hdr kernel parameter sig; do + cp -f split_img/*-*$(basename $i .txt | sed -e 's/hdr/header/') split_img/.temp/$i 2>/dev/null; + done; + cp -f "$ramdisk" split_img/.temp/ramdisk.cpio.gz; + "$bin/$arch/mboot" -d split_img/.temp -f $outname; + ;; + U-Boot) + part0="$kernel"; + case $type in + Multi) part1=(:"$ramdisk");; + RAMDisk) part0="$ramdisk";; + esac; + "$bin/$arch/mkimage" -A $uarch -O $os -T $type -C $comp -a $addr -e $ep -n "$name" -d "$part0""${part1[@]}" $outname >/dev/null; + ;; + *) echo " "; echo "Unsupported format."; abort; exit 1;; +esac; +if [ ! $? -eq "0" ]; then + abort; + exit 1; +fi; + +rm -rf split_img/.temp; + +if [ -f split_img/*-sigtype ]; then + sigtype=`cat split_img/*-sigtype`; + if [ -f split_img/*-avbtype ]; then + avbtype=`cat split_img/*-avbtype`; + fi; + if [ -f split_img/*-blobtype ]; then + blobtype=`cat split_img/*-blobtype`; + fi; + echo "Signing new image..."; + echo " "; + echo "Using signature: $sigtype $avbtype$avbtxt$blobtype"; + [ ! "$avbkey" ] && avbkey="$bin/avb/verity"; + echo " "; + case $sigtype in + AVBv1) java -jar "$bin/boot_signer.jar" /$avbtype unsigned-new.img "$avbkey.pk8" "$avbkey.x509."* image-new.img 2>/dev/null;; + BLOB) + awk 'BEGIN { printf "-SIGNED-BY-SIGNBLOB-\00\00\00\00\00\00\00\00" }' > image-new.img; + "$bin/$arch/blobpack" blob.tmp $blobtype unsigned-new.img >/dev/null; + cat blob.tmp >> image-new.img; + rm -f blob.tmp; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --pack image-new.img --keyblock "$bin/chromeos/kernel.keyblock" --signprivate "$bin/chromeos/kernel_data_key.vbprivk" --version 1 --vmlinuz unsigned-new.img --bootloader "$bin/chromeos/empty" --config "$bin/chromeos/empty" --arch arm --flags 0x1;; + DHTB) + "$bin/$arch/dhtbsign" -i unsigned-new.img -o image-new.img >/dev/null; + rm -f split_img/*-tailtype 2>/dev/null; + ;; + NOOK*) cat split_img/*-master_boot.key unsigned-new.img > image-new.img;; + esac; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; +fi; + +if [ -f split_img/*-lokitype ]; then + lokitype=`cat split_img/*-lokitype`; + echo "Loki patching new image..."; + echo " "; + echo "Using type: $lokitype"; + echo " "; + mv -f image-new.img unlokied-new.img; + if [ -f aboot.img ]; then + "$bin/$arch/loki_tool" patch $lokitype aboot.img unlokied-new.img image-new.img >/dev/null; + if [ ! $? -eq "0" ]; then + echo "Patching failed."; + abort; + exit 1; + fi; + else + echo "Device aboot.img required in script directory to find Loki patch offset."; + abort; + exit 1; + fi; +elif [ -f split_img/*-microloader.bin ]; then + echo "Amonet patching new image..."; + echo " "; + cp -f image-new.img unamonet-new.img; + cp -f split_img/*-microloader.bin microloader.tmp; + dd bs=1024 count=1 conv=notrunc if=unamonet-new.img of=head.tmp 2>/dev/null; + dd bs=1024 seek=1 conv=notrunc if=head.tmp of=image-new.img 2>/dev/null; + dd conv=notrunc if=microloader.tmp of=image-new.img 2>/dev/null; + rm -f head.tmp microloader.tmp; +fi; + +if [ -f split_img/*-tailtype ]; then + tailtype=`cat split_img/*-tailtype`; + echo "Appending footer..."; + echo " "; + echo "Using type: $tailtype"; + echo " "; + case $tailtype in + Bump) awk 'BEGIN { printf "\x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79" }' >> image-new.img;; + SEAndroid) printf 'SEANDROIDENFORCE' >> image-new.img;; + esac; +fi; + +if [ "$origsize" -a -f split_img/*-origsize ]; then + filesize=`cat split_img/*-origsize`; + echo "Padding to original size..."; + echo " "; + cp -f image-new.img unpadded-new.img; + truncate -s $filesize image-new.img; +fi; + +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/KSU/TWRP-R/unpackimg.sh b/Final_Zip/AIK/KSU/TWRP-R/unpackimg.sh new file mode 100755 index 0000000..6198f2a --- /dev/null +++ b/Final_Zip/AIK/KSU/TWRP-R/unpackimg.sh @@ -0,0 +1,370 @@ +#!/bin/bash +# AIK-Linux/unpackimg: split image and unpack ramdisk +# osm0sis @ xda-developers + +cleanup() { "$aik/cleanup.sh" $local --quiet; } +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: unpackimg.sh [--local] [--nosudo] "; exit 1;; + --local) local="--local"; shift;; +esac; +case $1 in + --nosudo) nosudo=1; shift;; + --sudo) shift;; +esac; +if [ ! "$nosudo" ]; then + sudo=sudo; sumsg=" (as root)"; +fi; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + file() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/file" "$@"; } + lzma() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + tail() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/tail" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +if [ ! "$local" ]; then + cd "$aik"; +fi; +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +img="$1"; +[ -f "$cur/$1" ] && img="$cur/$1"; +if [ ! "$img" ]; then + while IFS= read -r line; do + case $line in + aboot.img|image-new.img|unlokied-new.img|unsigned-new.img) continue;; + esac; + img="$line"; + break; + done < <(ls *.elf *.img *.sin 2>/dev/null); +fi; +img="$(readlink -f "$img")"; +if [ ! -f "$img" ]; then + echo "No image file supplied."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - UnpackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +file=$(basename "$img"); +echo "Supplied image: $file"; +echo " "; + +if [ -d split_img -o -d ramdisk ]; then + if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + rmsumsg=" (as root)"; + fi; + echo "Removing old work folders and files$rmsumsg..."; + echo " "; + cleanup; +fi; + +echo "Setting up work folders..."; +echo " "; +mkdir split_img ramdisk; + +cd split_img; +filesize=$(wc -c < "$img"); +echo "$filesize" > "$file-origsize"; +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "signing" ]; then + echo $imgtest | awk '{ print $1 }' > "$file-sigtype"; + sigtype=$(cat "$file-sigtype"); + echo "Signature with \"$sigtype\" type detected, removing..."; + echo " "; + case $sigtype in + BLOB) + cp -f "$img" "$file"; + "$bin/$arch/blobunpack" "$file" | tail -n+5 | cut -d" " -f2 | dd bs=1 count=3 > "$file-blobtype" 2>/dev/null; + mv -f "$file."* "$file"; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --get-vmlinuz "$img" --vmlinuz-out "$file";; + DHTB) dd bs=4096 skip=512 iflag=skip_bytes conv=notrunc if="$img" of="$file" 2>/dev/null;; + NOOK) + dd bs=1048576 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=1048576 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + NOOKTAB) + dd bs=262144 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=262144 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + SIN*) + "$bin/$arch/sony_dump" . "$img" >/dev/null; + mv -f "$file."* "$file"; + rm -f "$file-sigtype"; + ;; + esac; + img="$file"; +fi; + +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "bootimg" ]; then + [ "$(echo $imgtest | awk '{ print $3 }')" = "PXA" ] && typesuffix=-PXA; + echo "$(echo $imgtest | awk '{ print $1 }')$typesuffix" > "$file-imgtype"; + imgtype=$(cat "$file-imgtype"); +else + cd ..; + cleanup; + echo "Unrecognized format."; + abort; + exit 1; +fi; +echo "Image type: $imgtype"; +echo " "; + +case $imgtype in + AOSP*|ELF|KRNL|OSIP|U-Boot) ;; + *) + cd ..; + cleanup; + echo "Unsupported format."; + abort; + exit 1; + ;; +esac; + +case $(echo $imgtest | awk '{ print $3 }') in + LOKI) + echo $imgtest | awk '{ print $5 }' | cut -d\( -f2 | cut -d\) -f1 > "$file-lokitype"; + lokitype=$(cat "$file-lokitype"); + echo "Loki patch with \"$lokitype\" type detected, reverting..."; + echo " "; + echo "Warning: A dump of your device's aboot.img is required to re-Loki!"; + echo " "; + "$bin/$arch/loki_tool" unlok "$img" "$file" >/dev/null; + img="$file"; + ;; + AMONET) + echo "Amonet patch detected, reverting..."; + echo " "; + dd bs=2048 count=1 conv=notrunc if="$img" of="$file-microloader.bin" 2>/dev/null; + dd bs=1024 skip=1 conv=notrunc if="$file-microloader.bin" of="$file-head" 2>/dev/null; + truncate -s 1024 "$file-microloader.bin"; + truncate -s 2048 "$file-head"; + dd bs=2048 skip=1 conv=notrunc if="$img" of="$file-tail" 2>/dev/null; + cat "$file-head" "$file-tail" > "$file"; + rm -f "$file-head" "$file-tail"; + img="$file"; + ;; +esac; + +tailtest="$(dd if="$img" iflag=skip_bytes skip=$(($(wc -c < "$img") - 8192)) bs=8192 count=1 2>/dev/null | file -m $bin/androidbootimg.magic - 2>/dev/null | cut -d: -f2-)"; +case $tailtest in + *data) tailtest="$(tail -n50 "$img" | file -m "$bin/androidbootimg.magic" - 2>/dev/null | cut -d: -f2-)";; +esac; +tailtype="$(echo $tailtest | awk '{ print $1 }')"; +case $tailtype in + AVB*) + echo "Signature with \"$tailtype\" type detected."; + echo " "; + case $tailtype in + *v1) + echo $tailtype > "$file-sigtype"; + echo $tailtest | awk '{ print $4 }' > "$file-avbtype"; + ;; + esac; + ;; + Bump|SEAndroid) + echo "Footer with \"$tailtype\" type detected."; + echo " "; + echo $tailtype > "$file-tailtype"; + ;; +esac; + +if [ "$imgtype" = "U-Boot" ]; then + imgsize=$(($(printf '%d\n' 0x$(hexdump -n 4 -s 12 -e '16/1 "%02x""\n"' "$img")) + 64)); + if [ ! "$filesize" = "$imgsize" ]; then + echo "Trimming..."; + echo " "; + dd bs=$imgsize count=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + img="$file"; + fi; +fi; + +echo 'Splitting image to "split_img/"...'; +case $imgtype in + AOSP_VNDR) vendor=vendor_;; +esac; +case $imgtype in + AOSP|AOSP_VNDR) "$bin/$arch/unpackbootimg" -i "$img";; + AOSP-PXA) "$bin/$arch/pxa-unpackbootimg" -i "$img";; + ELF) + mkdir elftool_out; + "$bin/$arch/elftool" unpack -i "$img" -o elftool_out >/dev/null; + mv -f elftool_out/header "$file-header" 2>/dev/null; + rm -rf elftool_out; + "$bin/$arch/unpackelf" -i "$img"; + ;; + KRNL) dd bs=4096 skip=8 iflag=skip_bytes conv=notrunc if="$img" of="$file-ramdisk" 2>&1 | tail -n+3 | cut -d" " -f1-2;; + OSIP) + "$bin/$arch/mboot" -u -f "$img"; + [ ! $? -eq "0" ] && error=1; + for i in bootstub cmdline.txt hdr kernel parameter ramdisk.cpio.gz sig; do + mv -f $i "$file-$(basename $i .txt | sed -e 's/hdr/header/' -e 's/ramdisk.cpio.gz/ramdisk/')" 2>/dev/null || true; + done; + ;; + U-Boot) + "$bin/$arch/dumpimage" -l "$img"; + "$bin/$arch/dumpimage" -l "$img" > "$file-header"; + grep "Name:" "$file-header" | cut -c15- > "$file-name"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f1 > "$file-arch"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f2 > "$file-os"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f3 | cut -d- -f1 > "$file-type"; + grep "Type:" "$file-header" | cut -d\( -f2 | cut -d\) -f1 | cut -d" " -f1 | cut -d- -f1 > "$file-comp"; + grep "Address:" "$file-header" | cut -c15- > "$file-addr"; + grep "Point:" "$file-header" | cut -c15- > "$file-ep"; + rm -f "$file-header"; + "$bin/$arch/dumpimage" -p 0 -o "$file-kernel" "$img"; + [ ! $? -eq "0" ] && error=1; + case $(cat "$file-type") in + Multi) "$bin/$arch/dumpimage" -p 1 -o "$file-ramdisk" "$img";; + RAMDisk) mv -f "$file-kernel" "$file-ramdisk";; + *) touch "$file-ramdisk";; + esac; + ;; +esac; +if [ ! $? -eq "0" -o "$error" ]; then + cd ..; + cleanup; + abort; + exit 1; +fi; + +if [ -f *-kernel ] && [ "$(file -m "$bin/androidbootimg.magic" *-kernel 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')" = "MTK" ]; then + mtk=1; + echo " "; + echo "MTK header found in kernel, removing..."; + dd bs=512 skip=1 conv=notrunc if="$file-kernel" of=tempkern 2>/dev/null; + mv -f tempkern "$file-kernel"; +fi; +mtktest="$(file -m "$bin/androidbootimg.magic" *-*ramdisk 2>/dev/null | cut -d: -f2-)"; +mtktype=$(echo $mtktest | awk '{ print $3 }'); +if [ "$(echo $mtktest | awk '{ print $1 }')" = "MTK" ]; then + if [ ! "$mtk" ]; then + echo " "; + echo "Warning: No MTK header found in kernel!"; + mtk=1; + fi; + echo "MTK header found in \"$mtktype\" type ramdisk, removing..."; + dd bs=512 skip=1 conv=notrunc if="$(ls *-*ramdisk)" of=temprd 2>/dev/null; + mv -f temprd "$(ls *-*ramdisk)"; +else + if [ "$mtk" ]; then + if [ ! "$mtktype" ]; then + echo 'Warning: No MTK header found in ramdisk, assuming "rootfs" type!'; + mtktype="rootfs"; + fi; + fi; +fi; +[ "$mtk" ] && echo $mtktype > "$file-mtktype"; + +if [ -f *-dt ]; then + dttest="$(file -m "$bin/androidbootimg.magic" *-dt 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')"; + echo $dttest > "$file-dttype"; + if [ "$imgtype" = "ELF" ]; then + case $dttest in + QCDT|ELF) ;; + *) echo " "; + echo "Non-QC DTB found, packing kernel and appending..."; + gzip --no-name -9 "$file-kernel"; + mv -f "$file-kernel.gz" "$file-kernel"; + cat "$file-dt" >> "$file-kernel"; + rm -f "$file-dt"*;; + esac; + fi; +fi; + +file -m "$bin/magic" *-*ramdisk 2>/dev/null | cut -d: -f2 | awk '{ print $1 }' > "$file-${vendor}ramdiskcomp"; +ramdiskcomp=`cat *-*ramdiskcomp`; +unpackcmd="$ramdiskcomp -dc"; +compext=$ramdiskcomp; +case $ramdiskcomp in + gzip) unpackcmd="gzip -dcq"; compext=gz;; + lzop) compext=lzo;; + xz) ;; + lzma) ;; + bzip2) compext=bz2;; + lz4) unpackcmd="$bin/$arch/lz4 -dcq";; + lz4-l) unpackcmd="$bin/$arch/lz4 -dcq"; compext=lz4;; + cpio) unpackcmd="cat"; compext="";; + empty) compext=empty;; + *) compext="";; +esac; +if [ "$compext" ]; then + compext=.$compext; +fi; +mv -f "$(ls *-*ramdisk)" "$file-${vendor}ramdisk.cpio$compext" 2>/dev/null; +cd ..; +if [ "$ramdiskcomp" = "data" ]; then + echo "Unrecognized format."; + abort; + exit 1; +fi; + +echo " "; +if [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: No ramdisk found to be unpacked!"; +else + echo "Unpacking ramdisk$sumsg to \"ramdisk/\"..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + echo "Compression used: $ramdiskcomp"; + if [ ! "$compext" -a ! "$ramdiskcomp" = "cpio" ]; then + echo "Unsupported format."; + abort; + exit 1; + fi; + $sudo chown 0:0 ramdisk 2>/dev/null; + cd ramdisk; + $unpackcmd "../split_img/$file-${vendor}ramdisk.cpio$compext" | $sudo $cpio -i -d --no-absolute-filenames; + if [ ! $? -eq "0" ]; then + [ "$nosudo" ] && echo "Unpacking failed, try without --nosudo."; + cd ..; + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/KSU/TWRP/bin/androidbootimg.magic b/Final_Zip/AIK/KSU/TWRP/bin/androidbootimg.magic new file mode 100755 index 0000000..4e7a106 --- /dev/null +++ b/Final_Zip/AIK/KSU/TWRP/bin/androidbootimg.magic @@ -0,0 +1,111 @@ +#------------------------------------------------------------------------------ +# Various Android OEM non-standard boot image related magic entries +# osm0sis @ xda-developers +#------------------------------------------------------------------------------ + +# ASUS Blob Signature +0 string -SIGNED-BY-SIGNBLOB- BLOB signing + +# Barnes & Noble Nook Signature +64 string Red\x20Loader NOOK signing (red loader) +64 string Green\x20Loader NOOK signing (green loader) +64 string Green\x20Recovery NOOK signing (green recovery) +64 string eMMC\x20boot.img+secondloader NOOK signing (emmc boot) +64 string eMMC\x20recovery.img+secondloader NOOK signing (emmc recovery) +48 string BauwksBoot NOOKTAB signing (bauwks) + +# Google ChromeOS Signature +0 string CHROMEOS CHROMEOS signing + +# Samsung/Spreadtrum DHTB Signature +0 string DHTB\x01\x00\x00 DHTB signing + +# Sony SIN Packaging/Signature +0 string \x01\x00\x00\x00 SINv1 signing +0 string \x02\x00\x00\x00 SINv2 signing +0 string \x03SIN SINv3 signing + +# Google Pixel/Nexus/AOSP Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search ANDROID! AOSP bootimg +>>36 string \x00\x00\x00\x02 \b, PXA variant (020) +>>36 string \x00\x00\x80\x02 \b, PXA variant (028) +>>36 string \x00\x00\x00\x03 \b, PXA variant (030) +>>96 search microloader +>>>1024 string ANDROID! \b, AMONET header +>>1024 string LOKI \b, LOKI header +>>>1028 string \x00 \b (boot) +>>>1028 string \x01 \b (recovery) +>>2048 search \x88\x16\x88\x58 \b, MTK headers +!:strength * 3 + +# Google Pixel/AOSP Vendor Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search VNDRBOOT AOSP_VNDR bootimg +!:strength * 3 + +# DENX U-Boot +0 string \x27\x05\x19\x56 U-Boot bootimg + +# Intel OSIP +1000 search \xFC\xFA\xBC\x00 OSIP bootimg (headerless) +!:strength / 15 +0 string $OS$\x00\x00\x01 OSIP bootimg +>52 string \x00\x00\x00\x00 \b, boot (signed) +>52 string \x01\x00\x00\x00 \b, boot (unsigned) +>52 string \x0C\x00\x00\x00 \b, recovery (signed) +>52 string \x0D\x00\x00\x00 \b, recovery (unsigned) + +# Rockchip KRNL +0 string KRNL KRNL bootimg + +# Sony ELF +0 string \x7FELF ELF +>5 string \x01\x01\x61 bootimg +>18 string \x28 (ARM +>18 string \x03 (x86_ +>18 string \x08 (MIPS +>4 string \x01 \b) +>4 string \x02 \b64) +>0 search \x88\x16\x88\x58 \b, MTK headers + +# MediaTek MTK +# [for detection after boot image has already been split] +0 search \x88\x16\x88\x58 MTK header +>0 search KERNEL \b, kernel type +>0 search ROOTFS \b, rootfs type +>0 search RECOVERY \b, recovery type +!:strength / 20 + +# Qualcomm Device Tree +# [for detection after boot image has already been split] +0 string QCDT QCDT header +!:strength / 20 + +# Google Android Verified Boot 1.0 Signature +# [for detection with the tail of the boot image] +0 search \x02\x01\x01\x30\x82 AVBv1 signing footer +>0 search /boot \b, boot type +>0 search /recovery \b, recovery type +!:strength / 20 + +# Google Android Verified Boot 2.0 Signature +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search AVBf AVBv2 signing footer +!:strength / 20 + +# LG Bump +# [for detection with the tail of the boot image] +0 search \x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79 Bump footer +!:strength / 20 + +# Samsung SEAndroid +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search SEANDROIDENFORCE SEAndroid footer +!:strength / 20 diff --git a/Final_Zip/AIK/KSU/TWRP/bin/avb/verity.pk8 b/Final_Zip/AIK/KSU/TWRP/bin/avb/verity.pk8 new file mode 100755 index 0000000..bebf216 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/avb/verity.pk8 differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/avb/verity.x509.pem b/Final_Zip/AIK/KSU/TWRP/bin/avb/verity.x509.pem new file mode 100755 index 0000000..86399c3 --- /dev/null +++ b/Final_Zip/AIK/KSU/TWRP/bin/avb/verity.x509.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIID/TCCAuWgAwIBAgIJAJcPmDkJqolJMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g +VmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UE +AwwHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe +Fw0xNDExMDYxOTA3NDBaFw00MjAzMjQxOTA3NDBaMIGUMQswCQYDVQQGEwJVUzET +MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEQMA4G +A1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UEAwwHQW5kcm9p +ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAOjreE0vTVSRenuzO9vnaWfk0eQzYab0gqpi +6xAzi6dmD+ugoEKJmbPiuE5Dwf21isZ9uhUUu0dQM46dK4ocKxMRrcnmGxydFn6o +fs3ODJMXOkv2gKXL/FdbEPdDbxzdu8z3yk+W67udM/fW7WbaQ3DO0knu+izKak/3 +T41c5uoXmQ81UNtAzRGzGchNVXMmWuTGOkg6U+0I2Td7K8yvUMWhAWPPpKLtVH9r +AL5TzjYNR92izdKcz3AjRsI3CTjtpiVABGeX0TcjRSuZB7K9EK56HV+OFNS6I1NP +jdD7FIShyGlqqZdUOkAUZYanbpgeT5N7QL6uuqcGpoTOkalu6kkCAwEAAaNQME4w +HQYDVR0OBBYEFH5DM/m7oArf4O3peeKO0ZIEkrQPMB8GA1UdIwQYMBaAFH5DM/m7 +oArf4O3peeKO0ZIEkrQPMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB +AHO3NSvDE5jFvMehGGtS8BnFYdFKRIglDMc4niWSzhzOVYRH4WajxdtBWc5fx0ix +NF/+hVKVhP6AIOQa+++sk+HIi7RvioPPbhjcsVlZe7cUEGrLSSveGouQyc+j0+m6 +JF84kszIl5GGNMTnx0XRPO+g8t6h5LWfnVydgZfpGRRg+WHewk1U2HlvTjIceb0N +dcoJ8WKJAFWdcuE7VIm4w+vF/DYX/A2Oyzr2+QRhmYSv1cusgAeC1tvH4ap+J1Lg +UnOu5Kh/FqPLLSwNVQp4Bu7b9QFfqK8Moj84bj88NqRGZgDyqzuTrFxn6FW7dmyA +yttuAJAEAymk1mipd9+zp38= +-----END CERTIFICATE----- diff --git a/Final_Zip/AIK/KSU/TWRP/bin/boot_signer.jar b/Final_Zip/AIK/KSU/TWRP/bin/boot_signer.jar new file mode 100755 index 0000000..dd96a3e Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/boot_signer.jar differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/chromeos/empty b/Final_Zip/AIK/KSU/TWRP/bin/chromeos/empty new file mode 100755 index 0000000..8b13789 --- /dev/null +++ b/Final_Zip/AIK/KSU/TWRP/bin/chromeos/empty @@ -0,0 +1 @@ + diff --git a/Final_Zip/AIK/KSU/TWRP/bin/chromeos/kernel.keyblock b/Final_Zip/AIK/KSU/TWRP/bin/chromeos/kernel.keyblock new file mode 100755 index 0000000..9740be4 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/chromeos/kernel.keyblock differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/chromeos/kernel_data_key.vbprivk b/Final_Zip/AIK/KSU/TWRP/bin/chromeos/kernel_data_key.vbprivk new file mode 100755 index 0000000..8d392fb Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/chromeos/kernel_data_key.vbprivk differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/blobpack b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/blobpack new file mode 100755 index 0000000..685c6c0 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/blobpack differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/blobunpack b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/blobunpack new file mode 100755 index 0000000..2d96696 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/blobunpack differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/dhtbsign b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/dhtbsign new file mode 100755 index 0000000..f117b88 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/dumpimage b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/dumpimage new file mode 100755 index 0000000..8ba15d3 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/dumpimage differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/elftool b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/elftool new file mode 100755 index 0000000..b25dd56 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/elftool differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/futility b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/futility new file mode 100755 index 0000000..c830e31 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/futility differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/loki_tool b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/loki_tool new file mode 100755 index 0000000..d305760 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/loki_tool differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/lz4 b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/lz4 new file mode 100755 index 0000000..801bad4 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/lz4 differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/mboot b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/mboot new file mode 100755 index 0000000..023eab0 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/mboot differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/mkbootimg b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/mkbootimg new file mode 100755 index 0000000..ed68c2d Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/mkimage b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/mkimage new file mode 100755 index 0000000..8e97c0c Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/mkimage differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/mkmtkhdr b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/mkmtkhdr new file mode 100755 index 0000000..d71db24 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/pxa-mkbootimg b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/pxa-mkbootimg new file mode 100755 index 0000000..0636873 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/pxa-unpackbootimg b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/pxa-unpackbootimg new file mode 100755 index 0000000..8dbdecf Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/rkcrc b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/rkcrc new file mode 100755 index 0000000..45027f3 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/rkcrc differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/sony_dump b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/sony_dump new file mode 100755 index 0000000..2563e25 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/sony_dump differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/unpackbootimg b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/unpackbootimg new file mode 100755 index 0000000..b70aed5 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/unpackelf b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/unpackelf new file mode 100755 index 0000000..12e9057 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/i686/unpackelf differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/blobpack b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/blobpack new file mode 100755 index 0000000..90256d4 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/blobpack differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/blobunpack b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/blobunpack new file mode 100755 index 0000000..53374ff Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/dhtbsign b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/dhtbsign new file mode 100755 index 0000000..ccb7a67 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/dumpimage b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/dumpimage new file mode 100755 index 0000000..861bd68 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/elftool b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/elftool new file mode 100755 index 0000000..07a520d Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/elftool differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/futility b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/futility new file mode 100755 index 0000000..4d56ec3 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/futility differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/loki_tool b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/loki_tool new file mode 100755 index 0000000..4a1b74a Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/lz4 b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/lz4 new file mode 100755 index 0000000..8a4136b Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/lz4 differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/mboot b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/mboot new file mode 100755 index 0000000..8bf92d4 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/mboot differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/mkbootimg b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/mkbootimg new file mode 100755 index 0000000..2b628c3 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/mkimage b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/mkimage new file mode 100755 index 0000000..6419ea3 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/mkimage differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/mkmtkhdr b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/mkmtkhdr new file mode 100755 index 0000000..1ab256f Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/pxa-mkbootimg b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..5885720 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..d7b1b7d Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/rkcrc b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/rkcrc new file mode 100755 index 0000000..f218228 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/sony_dump b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/sony_dump new file mode 100755 index 0000000..6fc3696 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/unpackbootimg b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/unpackbootimg new file mode 100755 index 0000000..8f4fccf Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/unpackelf b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/unpackelf new file mode 100755 index 0000000..477e25d Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/linux/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/blobpack b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/blobpack new file mode 100755 index 0000000..2336ec0 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/blobpack differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/blobunpack b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/blobunpack new file mode 100755 index 0000000..834cb50 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/blobunpack differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/cpio b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/cpio new file mode 100755 index 0000000..b7e41f1 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/cpio differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/dd b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/dd new file mode 100755 index 0000000..b684139 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/dd differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/dhtbsign b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/dhtbsign new file mode 100755 index 0000000..b3ba0ba Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/dumpimage b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/dumpimage new file mode 100755 index 0000000..917c8ed Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/dumpimage differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/elftool b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/elftool new file mode 100755 index 0000000..27f12be Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/elftool differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/file b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/file new file mode 100755 index 0000000..8024db5 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/file differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/futility b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/futility new file mode 100755 index 0000000..8658249 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/futility differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/libiconv.2.dylib b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/libiconv.2.dylib new file mode 100755 index 0000000..ec61db0 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/libintl.8.dylib b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/libintl.8.dylib new file mode 100755 index 0000000..c297f0a Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/libintl.8.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/liblzma.5.dylib b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/liblzma.5.dylib new file mode 100755 index 0000000..126d338 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/liblzo2.2.dylib b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/liblzo2.2.dylib new file mode 100755 index 0000000..8a24e23 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/libmagic.1.dylib b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/libmagic.1.dylib new file mode 100755 index 0000000..92e6c7f Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/loki_tool b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/loki_tool new file mode 100755 index 0000000..7eecf68 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/loki_tool differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/lz4 b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/lz4 new file mode 100755 index 0000000..43126f8 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/lz4 differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/lzop b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/lzop new file mode 100755 index 0000000..fc3103c Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/lzop differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/mboot b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/mboot new file mode 100755 index 0000000..dfa0d3e Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/mboot differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/mkbootimg b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/mkbootimg new file mode 100755 index 0000000..82f05a9 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/mkimage b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/mkimage new file mode 100755 index 0000000..e760d6e Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/mkimage differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/mkmtkhdr b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/mkmtkhdr new file mode 100755 index 0000000..907ba0f Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/pxa-mkbootimg b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/pxa-mkbootimg new file mode 100755 index 0000000..12f8337 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/pxa-unpackbootimg b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/pxa-unpackbootimg new file mode 100755 index 0000000..2f1fe6c Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/rkcrc b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/rkcrc new file mode 100755 index 0000000..c2b70ce Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/rkcrc differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/sony_dump b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/sony_dump new file mode 100755 index 0000000..2f187e6 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/sony_dump differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/tail b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/tail new file mode 100755 index 0000000..99ee578 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/tail differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/truncate b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/truncate new file mode 100755 index 0000000..26bf16b Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/truncate differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/unpackbootimg b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/unpackbootimg new file mode 100755 index 0000000..e92b74e Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/unpackelf b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/unpackelf new file mode 100755 index 0000000..4ea11d0 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/unpackelf differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/xz b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/xz new file mode 100755 index 0000000..b501c14 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/i386/xz differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/blobpack b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/blobpack new file mode 100755 index 0000000..816fcf2 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/blobpack differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/blobunpack b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/blobunpack new file mode 100755 index 0000000..9241057 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/cpio b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/cpio new file mode 100755 index 0000000..991c5a8 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/cpio differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/dd b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/dd new file mode 100755 index 0000000..e927886 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/dd differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/dhtbsign b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/dhtbsign new file mode 100755 index 0000000..162fa88 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/dumpimage b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/dumpimage new file mode 100755 index 0000000..473538b Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/elftool b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/elftool new file mode 100755 index 0000000..0185019 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/elftool differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/file b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/file new file mode 100755 index 0000000..0b9f24c Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/file differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/futility b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/futility new file mode 100755 index 0000000..a28db4d Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/futility differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/libiconv.2.dylib b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/libiconv.2.dylib new file mode 100755 index 0000000..8f56eed Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/libintl.8.dylib b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/libintl.8.dylib new file mode 100755 index 0000000..f270e89 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/libintl.8.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/liblzma.5.dylib b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/liblzma.5.dylib new file mode 100755 index 0000000..39c6b96 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/liblzo2.2.dylib b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/liblzo2.2.dylib new file mode 100755 index 0000000..a05b7eb Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/libmagic.1.dylib b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/libmagic.1.dylib new file mode 100755 index 0000000..29ad687 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/loki_tool b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/loki_tool new file mode 100755 index 0000000..1b9f062 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/lz4 b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/lz4 new file mode 100755 index 0000000..bcee28d Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/lz4 differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/lzop b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/lzop new file mode 100755 index 0000000..8be71f4 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/lzop differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/mboot b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/mboot new file mode 100755 index 0000000..ad67219 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/mboot differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/mkbootimg b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/mkbootimg new file mode 100755 index 0000000..137aef2 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/mkimage b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/mkimage new file mode 100755 index 0000000..61d5a9c Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/mkimage differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/mkmtkhdr b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/mkmtkhdr new file mode 100755 index 0000000..99949d5 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/pxa-mkbootimg b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..0ec79a3 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..03fc864 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/rkcrc b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/rkcrc new file mode 100755 index 0000000..9b0b94a Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/sony_dump b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/sony_dump new file mode 100755 index 0000000..e219101 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/tail b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/tail new file mode 100755 index 0000000..59692eb Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/tail differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/truncate b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/truncate new file mode 100755 index 0000000..f2ed631 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/truncate differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/unpackbootimg b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/unpackbootimg new file mode 100755 index 0000000..a717c48 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/unpackelf b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/unpackelf new file mode 100755 index 0000000..d6edefa Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/xz b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/xz new file mode 100755 index 0000000..6faedc7 Binary files /dev/null and b/Final_Zip/AIK/KSU/TWRP/bin/macos/x86_64/xz differ diff --git a/Final_Zip/AIK/KSU/TWRP/bin/magic b/Final_Zip/AIK/KSU/TWRP/bin/magic new file mode 100755 index 0000000..4530761 --- /dev/null +++ b/Final_Zip/AIK/KSU/TWRP/bin/magic @@ -0,0 +1,1916 @@ +#------------------------------------------------------------------------------ +# Slimmed down magic file for archives only +#------------------------------------------------------------------------------ +# $File: archive,v 1.145 2021/01/03 20:58:47 christos Exp $ +# archive: file(1) magic for archive formats (see also "msdos" for self- +# extracting compressed archives) +# +# cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc. +# pre-POSIX "tar" archives are also handled in the C code ../../src/is_tar.c. + +# POSIX tar archives +# URL: https://en.wikipedia.org/wiki/Tar_(computing) +# Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current +# header mainly padded with nul bytes +500 quad 0 +!:strength /2 +# filename or extended attribute printable strings in range space null til umlaut ue +>0 ubeshort >0x1F00 +>>0 ubeshort <0xFCFD +# last 4 header bytes often null but tar\0 in gtarfail2.tar gtarfail.tar-bad +# at https://sourceforge.net/projects/s-tar/files/testscripts/ +>>>508 ubelong&0x8B9E8DFF 0 +# nul, space or ascii digit 0-7 at start of mode +>>>>100 ubyte&0xC8 =0 +>>>>>101 ubyte&0xC8 =0 +# nul, space at end of check sum +>>>>>>155 ubyte&0xDF =0 +# space or ascii digit 0 at start of check sum +>>>>>>>148 ubyte&0xEF =0x20 +# minimal check and then display tar archive information which can also be +# embedded inside others like Android Backup, Clam AntiVirus database +>257 string !ustar +# header padded with nuls +>>257 ulong =0 +# GNU tar version 1.29 with non pax format option without refusing +# creates misleading V7 header for Long path, Multi-volume, Volume type +>>>156 ubyte 0x4c GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x4d GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x56 GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 default x tar archive (V7) +!:mime application/x-tar +#!:ext tar +# other stuff in padding +# some implementations add new fields to the blank area at the end of the header record +# created for example by DOS TAR 3.20g 1994 Tim V.Shapore with -j option +>>257 ulong !0 tar archive (old) +!:mime application/x-tar +#!:ext tar +# magic in newer, GNU, posix variants +>257 string =ustar +# 2 last char of magic and UStar version because string expression does not work +# 2 space characters followed by a null for GNU variant +>>261 ubelong =0x72202000 POSIX tar archive (GNU) +!:mime application/x-gtar +#!:ext tar/gtar +# UStar version with ASCII "00" +>>261 ubelong 0x72003030 POSIX +# gLOBAL and ExTENSION type only found in POSIX.1-2001 format +>>>156 ubyte 0x67 \b.1-2001 +>>>156 ubyte 0x78 \b.1-2001 +>>>156 ubyte x tar archive +!:mime application/x-ustar +#!:ext tar/ustar +# version with 2 binary nuls embedded in Android Backup like com.android.settings.ab +>>261 ubelong 0x72000000 tar archive (ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# not seen ustar variant with garbish version +>>261 default x tar archive (unknown ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# type flag of 1st tar archive member +#>156 ubyte x \b, %c-type +>156 ubyte x +>>156 ubyte 0 \b, file +>>156 ubyte 0x30 \b, file +>>156 ubyte 0x31 \b, hard link +>>156 ubyte 0x32 \b, symlink +>>156 ubyte 0x33 \b, char device +>>156 ubyte 0x34 \b, block device +>>156 ubyte 0x35 \b, directory +>>156 ubyte 0x36 \b, fifo +>>156 ubyte 0x37 \b, reserved +>>156 ubyte 0x4c \b, long path +>>156 ubyte 0x4d \b, multi volume +>>156 ubyte 0x56 \b, volume +>>156 ubyte 0x67 \b, global +>>156 ubyte 0x78 \b, extension +>>156 default x \b, type +>>>156 ubyte x '%c' +# name[100] +>0 string >\0 %-.60s +# mode mainly stored as an octal number in ASCII null or space terminated +>100 string >\0 \b, mode %-.7s +# user id mainly as octal numbers in ASCII null or space terminated +>108 string >\0 \b, uid %-.7s +# group id mainly as octal numbers in ASCII null or space terminated +>116 string >\0 \b, gid %-.7s +# size mainly as octal number in ASCII +>124 ubyte <0x38 +>>124 string >\0 \b, size %-.12s +# coding indicated by setting the high-order bit of the leftmost byte +>124 ubyte >0xEF \b, size 0x +>>124 ubyte !0xff \b%2.2x +>>125 ubyte !0xff \b%2.2x +>>126 ubyte !0xff \b%2.2x +>>127 ubyte !0xff \b%2.2x +>>128 ubyte !0xff \b%2.2x +>>129 ubyte !0xff \b%2.2x +>>130 ubyte !0xff \b%2.2x +>>131 ubyte !0xff \b%2.2x +>>132 ubyte !0xff \b%2.2x +>>133 ubyte !0xff \b%2.2x +>>134 ubyte !0xff \b%2.2x +>>135 ubyte !0xff \b%2.2x +# seconds since 0:0:0 1 jan 1970 UTC as octal number mainly in ASCII null or space terminated +>136 string >\0 \b, seconds %-.11s +# header checksum stored as an octal number in ASCII null or space terminated +#>148 string x \b, cksum %.7s +# linkname[100] +>157 string >\0 \b, linkname %-.40s +# additional fields for ustar +>257 string =ustar +# owner user name null terminated +>>265 string >\0 \b, user %-.32s +# group name null terminated +>>297 string >\0 \b, group %-.32s +# device major minor if not zero +>>329 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>329 string x \b, devmaj %-.7s +>>337 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>337 string x \b, devmin %-.7s +# prefix[155] +>>345 string >\0 \b, prefix %-.155s +# old non ustar/POSIX tar +>257 string !ustar +>>508 string =tar\0 +# padding[255] in old star +>>>257 string >\0 \b, padding: %-.40s +>>508 default x +# padding[255] in old tar sometimes comment field +>>>257 string >\0 \b, comment: %-.40s + +# Incremental snapshot gnu-tar format from: +# https://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html +0 string GNU\ tar- GNU tar incremental snapshot data +>&0 regex [0-9]\.[0-9]+-[0-9]+ version %s + +# cpio archives +# +# Yes, the top two "cpio archive" formats *are* supposed to just be "short". +# The idea is to indicate archives produced on machines with the same +# byte order as the machine running "file" with "cpio archive", and +# to indicate archives produced on machines with the opposite byte order +# from the machine running "file" with "cpio byte-swapped archive". +# +# The SVR4 "cpio(4)" hints that there are additional formats, but they +# are defined as "short"s; I think all the new formats are +# character-header formats and thus are strings, not numbers. +0 short 070707 cpio archive +!:mime application/x-cpio +0 short 0143561 cpio byte-swapped archive +!:mime application/x-cpio # encoding: swapped +0 string 070707 cpio ASCII archive (pre-SVR4 or odc) +0 string 070701 cpio ASCII archive (SVR4 with no CRC) +0 string 070702 cpio ASCII archive (SVR4 with CRC) + +# +# Various archive formats used by various versions of the "ar" +# command. +# + +# +# Original UNIX archive formats. +# They were written with binary values in host byte order, and +# the magic number was a host "int", which might have been 16 bits +# or 32 bits. We don't say "PDP-11" or "VAX", as there might have +# been ports to little-endian 16-bit-int or 32-bit-int platforms +# (x86?) using some of those formats; if none existed, feel free +# to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian +# 32-bit. There might have been big-endian ports of that sort as +# well. +# +0 leshort 0177555 very old 16-bit-int little-endian archive +0 beshort 0177555 very old 16-bit-int big-endian archive +0 lelong 0177555 very old 32-bit-int little-endian archive +0 belong 0177555 very old 32-bit-int big-endian archive + +0 leshort 0177545 old 16-bit-int little-endian archive +>2 string __.SYMDEF random library +0 beshort 0177545 old 16-bit-int big-endian archive +>2 string __.SYMDEF random library +0 lelong 0177545 old 32-bit-int little-endian archive +>4 string __.SYMDEF random library +0 belong 0177545 old 32-bit-int big-endian archive +>4 string __.SYMDEF random library + +# +# From "pdp" (but why a 4-byte quantity?) +# +0 lelong 0x39bed PDP-11 old archive +0 lelong 0x39bee PDP-11 4.0 archive + +# +# XXX - what flavor of APL used this, and was it a variant of +# some ar archive format? It's similar to, but not the same +# as, the APL workspace magic numbers in pdp. +# +0 long 0100554 apl workspace + +# +# System V Release 1 portable(?) archive format. +# +0 string = System V Release 1 ar archive +!:mime application/x-archive + +# +# Debian package; it's in the portable archive format, and needs to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "debian". +# +# Update: Joerg Jenderek +# URL: https://en.wikipedia.org/wiki/Deb_(file_format) +0 string =!\ndebian +# https://manpages.debian.org/testing/dpkg/dpkg-split.1.en.html +>14 string -split part of multipart Debian package +!:mime application/vnd.debian.binary-package +# udeb is used for stripped down deb file +#!:ext deb/udeb +>14 string -binary Debian binary package +!:mime application/vnd.debian.binary-package +# For ipk packager see also https://en.wikipedia.org/wiki/Opkg +#!:ext deb/udeb/ipk +# This should not happen +>14 default x Unknown Debian package +# NL terminated version; for most Debian cases this is 2.0 or 2.1 for split +>68 string >\0 (format %s) +#>68 string !2.0\n +#>>68 string x (format %.3s) +>68 string =2.0\n +# 2nd archive name=control archive name like control.tar.gz or control.tar.xz +>>72 string >\0 \b, with %.14s +# look for 3rd archive name=data archive name like data.tar.{gz,xz,bz2,lzma} +>>0 search/0x93e4f data.tar. \b, data compression +# the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised +# for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb +>>>&0 string x %.2s +# skip space (0x20 BSD) and slash (0x2f System V) character marking end of name +>>>&2 ubyte !0x20 +>>>>&-1 ubyte !0x2f +# display 3rd character of file name extension like 2 of bz2 or m of lzma +>>>>>&-1 ubyte x \b%c +>>>>>>&0 ubyte !0x20 +>>>>>>>&-1 ubyte !0x2f +# display 4th character of file name extension like a of lzma +>>>>>>>>&-1 ubyte x \b%c +# split debian package case +>68 string =2.1\n +# dpkg-1.18.25/dpkg-split/info.c +# NL terminated ASCII package name like ckermit +>>&0 string x \b, %s +# NL terminated package version like 302-5.3 +>>>&1 string x %s +# NL terminated MD5 checksum +>>>>&1 string x \b, MD5 %s +# NL terminated original package length +>>>>>&1 string x \b, unsplitted size %s +# NL terminated part length +>>>>>>&1 string x \b, part length %s +# NL terminated package part like n/m +>>>>>>>&1 string x \b, part %s +# NL terminated package architecture like armhf since dpkg 1.16.1 or later +>>>>>>>>&1 string x \b, %s + +# +# MIPS archive; they're in the portable archive format, and need to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "__________E". +# +0 string =!\n__________E MIPS archive +!:mime application/x-archive +>20 string U with MIPS Ucode members +>21 string L with MIPSEL members +>21 string B with MIPSEB members +>19 string L and an EL hash table +>19 string B and an EB hash table +>22 string X -- out of date + +# +# BSD/SVR2-and-later portable archive formats. +# +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/AR +# Reference: https://www.unix.com/man-page/opensolaris/3HEAD/ar.h/ +# Note: Mach-O universal binary in ./cafebabe is dependent +# TODO: unify current ar archive, MIPS archive, Debian package +# distinguish BSD, SVR; 32, 64 bit; HP from other 32-bit SVR; +# *.ar packages from *.a libraries. handle empty archive +0 string =!\n current ar archive +# print first and possibly second ar_name[16] for debugging purpose +#>8 string x \b, 1st "%.16s" +#>68 string x \b, 2nd "%.16s" +!:mime application/x-archive +# a in most case for libraries; lib for Microsoft libraries; ar else cases +#!:ext a/lib/ar +>8 string __.SYMDEF random library +# first member with long marked name __.SYMDEF SORTED implies BSD library +>68 string __.SYMDEF\ SORTED random library +# Reference: https://parisc.wiki.kernel.org/images-parisc/b/b2/Rad_11_0_32.pdf +# "archive file" entry moved from ./hp +# LST header system_id 0210h~PA-RISC 1.1,... identifies the target architecture +# LST header a_magic 0619h~relocatable library +>68 belong 0x020b0619 - PA-RISC1.0 relocatable library +>68 belong 0x02100619 - PA-RISC1.1 relocatable library +>68 belong 0x02110619 - PA-RISC1.2 relocatable library +>68 belong 0x02140619 - PA-RISC2.0 relocatable library +#EOF for common ar archives + +# +# "Thin" archive, as can be produced by GNU ar. +# +0 string =!\n thin archive with +>68 belong 0 no symbol entries +>68 belong 1 %d symbol entry +>68 belong >1 %d symbol entries + +0 search/1 -h- Software Tools format archive text + +# ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com) +# +# The first byte is the magic (0x1a), byte 2 is the compression type for +# the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS +# filename of the first file (null terminated). Since some types collide +# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%), +# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo. +0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000031a ARC archive data, packed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched +!:mime application/x-arc +# [JW] stuff taken from idarc, obviously ARC successors: +0 lelong&0x8080ffff 0x00000a1a PAK archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000141a ARC+ archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000481a HYP archive data +!:mime application/x-arc + +# Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk) +# I can't create either SPARK or ArcFS archives so I have not tested this stuff +# [GRR: the original entries collide with ARC, above; replaced with combined +# version (not tested)] +#0 byte 0x1a RISC OS archive (spark format) +0 string \032archive RISC OS archive (ArcFS format) +0 string Archive\000 RISC OS archive (ArcFS format) + +# All these were taken from idarc, many could not be verified. Unfortunately, +# there were many low-quality sigs, i.e. easy to trigger false positives. +# Please notify me of any real-world fishy/ambiguous signatures and I'll try +# to get my hands on the actual archiver and see if I find something better. [JW] +# probably many can be enhanced by finding some 0-byte or control char near the start + +# idarc calls this Crush/Uncompressed... *shrug* +0 string CRUSH Crush archive data +# Squeeze It (.sqz) +0 string HLSQZ Squeeze It archive data +# SQWEZ +0 string SQWEZ SQWEZ archive data +# HPack (.hpk) +0 string HPAK HPack archive data +# HAP +0 string \x91\x33HF HAP archive data +# MD/MDCD +0 string MDmd MDCD archive data +# LIM +0 string LIM\x1a LIM archive data +# SAR +3 string LH5 SAR archive data +# BSArc/BS2 +0 string \212\3SB\020\0 BSArc/BS2 archive data +# Bethesda Softworks Archive (Oblivion) +0 string BSA\0 BSArc archive data +>4 lelong x version %d +# MAR +2 string =-ah MAR archive data +# ACB +#0 belong&0x00f800ff 0x00800000 ACB archive data +# CPZ +# TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data +# JRC +0 string JRchive JRC archive data +# Quantum +0 string DS\0 Quantum archive data +# ReSOF +0 string PK\3\6 ReSOF archive data +# QuArk +0 string 7\4 QuArk archive data +# YAC +14 string YC YAC archive data +# X1 +0 string X1 X1 archive data +0 string XhDr X1 archive data +# CDC Codec (.dqt) +0 belong&0xffffe000 0x76ff2000 CDC Codec archive data +# AMGC +0 string \xad6" AMGC archive data +# NuLIB +0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data +# PakLeo +0 string LEOLZW PAKLeo archive data +# ChArc +0 string SChF ChArc archive data +# PSA +0 string PSA PSA archive data +# CrossePAC +0 string DSIGDCC CrossePAC archive data +# Freeze +0 string \x1f\x9f\x4a\x10\x0a Freeze archive data +# KBoom +0 string \xc2\xa8MP\xc2\xa8 KBoom archive data +# NSQ, must go after CDC Codec +0 string \x76\xff NSQ archive data +# DPA +0 string Dirk\ Paehl DPA archive data +# BA +# TODO: idarc says "bytes 0-2 == bytes 3-5" +# TTComp +# URL: http://fileformats.archiveteam.org/wiki/TTComp_archive +# Update: Joerg Jenderek +# GRR: line below is too general as it matches also Panorama database "TCDB 2003-10 demo.pan", others +0 string \0\6 +# look for first keyword of Panorama database *.pan +>12 search/261 DESIGN +# skip keyword with low entropy +>12 default x TTComp archive, binary, 4K dictionary +# (version 5.25) labeled the above entry as "TTComp archive data" +# From: Joerg Jenderek +# URL: https://wiki.68kmla.org/DiskCopy_4.2_format_specification +# reference: http://nulib.com/library/FTN.e00005.htm +0x52 ubeshort 0x0100 +# test for disk image size equal or above 400k +>0x40 ubelong >409599 +# test also for disk image size equal or below 1440k to skip +# windows7en.mbr UNICODE.DAT +>>0x40 ubelong <1474561 +# To skip Flags$StringJoiner.class with size 00106A61h test also for only 4 disk image sizes +# 00064000 for 400k GCR disks +# 000c8000 for 800k GCR disks +# 000b4000 for 720k MFM disks +# 00168000 for 1440k MFM disks +>>>0x40 ubelong&0xffE03fFF 0 +# display information of Apple DiskCopy 4.2 floppy image +# image pascal name padded with NULs like Microsoft Mail +>00 pstring/B x Apple DiskCopy 4.2 image %s +#!:mime application/octet-stream +!:mime application/x-dc42-floppy-image +!:apple dCpydImg +#!:ext image/dc42 +# data size in bytes like 409600 +>0x40 ubelong x \b, %u bytes +# for debugging purpose size in hexadecimal +#>0x40 ubelong x (0x%8.8x) +# tag size in bytes +>0x44 ubelong >0 \b, 0x%x tag size +# data checksum +#>0x48 ubelong x \b, 0x%x checksum +# tag checksum +#>0x4c ubelong x \b, 0x%x tag checksum +# disk encoding +>0x50 ubyte 0 \b, GCR CLV ssdd (400k) +>0x50 ubyte 1 \b, GCR CLV dsdd (800k) +>0x50 ubyte 2 \b, MFM CAV dsdd (720k) +>0x50 ubyte 3 \b, MFM CAV dshd (1440k) +>0x50 ubyte >3 \b, 0x%x encoding +# format byte +>0x51 ubyte x \b, 0x%x format +#>0x54 ubequad x \b, data 0x%16.16llx +# ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation? +0 string ESP ESP archive data +# ZPack +0 string \1ZPK\1 ZPack archive data +# Sky +0 string \xbc\x40 Sky archive data +# UFA +0 string UFA UFA archive data +# Dry +0 string =-H2O DRY archive data +# FoxSQZ +0 string FOXSQZ FoxSQZ archive data +# AR7 +0 string ,AR7 AR7 archive data +# PPMZ +0 string PPMZ PPMZ archive data +# MS Compress +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/MS-DOS_installation_compression +# Reference: https://hwiegman.home.xs4all.nl/fileformats/compress/szdd_kwaj_format.html +# Note: use correct version of extracting tool like EXPAND, UNPACK, DECOMP or 7Z +4 string \x88\xf0\x27 +# KWAJ variant +>0 string KWAJ MS Compress archive data, KWAJ variant +!:mime application/x-ms-compress-kwaj +# extension not working in version 5.32 +# magic/Magdir/archive, 284: Warning: EXTENSION type ` ??_' has bad char '?' +# file: line 284: Bad magic entry ' ??_' +#!:ext ??_ +# compression method (0-4) +>>8 uleshort x \b, %u method +# offset of compressed data +>>10 uleshort x \b, 0x%x offset +#>>(10.s) uleshort x +#>>>&-6 string x \b, TEST extension %-.3s +# header flags to mark header extensions +>>12 uleshort >0 \b, 0x%x flags +# 4 bytes: decompressed length of file +>>12 uleshort &0x01 +>>>14 ulelong x \b, original size: %u bytes +# 2 bytes: unknown purpose +# 2 bytes: length of unknown data + mentioned bytes +# 1-9 bytes: null-terminated file name +# 1-4 bytes: null-terminated file extension +>>12 uleshort &0x08 +>>>12 uleshort ^0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>>&16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>&16 string x %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>12 uleshort &0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +# 2 bytes: length of data + mentioned bytes +# +# SZDD variant Haruhiko Okumura's LZSS or 7z type MsLZ +>0 string SZDD MS Compress archive data, SZDD variant +!:mime application/x-ms-compress-szdd +#!:ext ??_ +# The character missing from the end of the filename (0=unknown) +>>9 string >\0 \b, %-.1s is last character of original name +# https://www.betaarchive.com/forum/viewtopic.php?t=26161 +# Compression mode: "A" (0x41) found but sometimes "B" in Windows 3.1 builds 026 and 034e +>>8 string !A \b, %-.1s method +>>10 ulelong >0 \b, original size: %u bytes +# QBasic SZDD variant +3 string \x88\xf0\x27 +>0 string SZ\x20 MS Compress archive data, QBasic variant +!:mime application/x-ms-compress-sz +#!:ext ??$ +>>8 ulelong >0 \b, original size: %u bytes + +# MP3 (archiver, not lossy audio compression) +0 string MP3\x1a MP3-Archiver archive data +# ZET +0 string OZ\xc3\x9d ZET archive data +# TSComp +0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data +# ARQ +0 string gW\4\1 ARQ archive data +# Squash +3 string OctSqu Squash archive data +# Terse +0 string \5\1\1\0 Terse archive data +# PUCrunch +0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data +# UHarc +0 string UHA UHarc archive data +# ABComp +0 string \2AB ABComp archive data +0 string \3AB2 ABComp archive data +# CMP +0 string CO\0 CMP archive data +# Splint +0 string \x93\xb9\x06 Splint archive data +# InstallShield +0 string \x13\x5d\x65\x8c InstallShield Z archive Data +# Gather +1 string GTH Gather archive data +# BOA +0 string BOA BOA archive data +# RAX +0 string ULEB\xa RAX archive data +# Xtreme +0 string ULEB\0 Xtreme archive data +# Pack Magic +0 string @\xc3\xa2\1\0 Pack Magic archive data +# BTS +0 belong&0xfeffffff 0x1a034465 BTS archive data +# ELI 5750 +0 string Ora\ ELI 5750 archive data +# QFC +0 string \x1aFC\x1a QFC archive data +0 string \x1aQF\x1a QFC archive data +# PRO-PACK +0 string RNC PRO-PACK archive data +# 777 +0 string 777 777 archive data +# LZS221 +0 string sTaC LZS221 archive data +# HPA +0 string HPA HPA archive data +# Arhangel +0 string LG Arhangel archive data +# EXP1, uses bzip2 +0 string 0123456789012345BZh EXP1 archive data +# IMP +0 string IMP\xa IMP archive data +# NRV +0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data +# Squish +0 string \x73\xb2\x90\xf4 Squish archive data +# Par +0 string PHILIPP Par archive data +0 string PAR Par archive data +# HIT +0 string UB HIT archive data +# SBX +0 belong&0xfffff000 0x53423000 SBX archive data +# NaShrink +0 string NSK NaShrink archive data +# SAPCAR +0 string #\ CAR\ archive\ header SAPCAR archive data +0 string CAR\ 2.00RG SAPCAR archive data +# Disintegrator +0 string DST Disintegrator archive data +# ASD +0 string ASD ASD archive data +# InstallShield CAB +0 string ISc( InstallShield CAB +# TOP4 +0 string T4\x1a TOP4 archive data +# BatComp left out: sig looks like COM executable +# so TODO: get real 4dos batcomp file and find sig +# BlakHole +0 string BH\5\7 BlakHole archive data +# BIX +0 string BIX0 BIX archive data +# ChiefLZA +0 string ChfLZ ChiefLZA archive data +# Blink +0 string Blink Blink archive data +# Logitech Compress +0 string \xda\xfa Logitech Compress archive data +# ARS-Sfx (FIXME: really a SFX? then goto COM/EXE) +1 string (C)\ STEPANYUK ARS-Sfx archive data +# AKT/AKT32 +0 string AKT32 AKT32 archive data +0 string AKT AKT archive data +# NPack +0 string MSTSM NPack archive data +# PFT +0 string \0\x50\0\x14 PFT archive data +# SemOne +0 string SEM SemOne archive data +# PPMD +0 string \x8f\xaf\xac\x84 PPMD archive data +# FIZ +0 string FIZ FIZ archive data +# MSXiE +0 belong&0xfffff0f0 0x4d530000 MSXiE archive data +# DeepFreezer +0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data +# DC +0 string =2 string \x2\x4 Xpack DiskImage archive data +#!:ext xdi +# XPack Data +# *.xpa updated by Joerg Jenderek Sep 2015 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/ +0 string xpa XPA +#!:ext xpa +# XPA32 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/xpa32.zip +# created by XPA32.EXE version 1.0.2 for Windows +>0 string xpa\0\1 \b32 archive data +# created by XPACK.COM version 1.67m or 1.67r with short 0x1800 +>3 ubeshort !0x0001 \bck archive data +# XPack Single Data +# changed by Joerg Jenderek Sep 2015 back to like in version 5.12 +# letter 'I'+ acute accent is equivalent to \xcd +0 string \xcd\ jm Xpack single archive data +#!:mime application/x-xpa-compressed +#!:ext xpa + +# TODO: missing due to unknown magic/magic at end of file: +#DWC +#ARG +#ZAR +#PC/3270 +#InstallIt +#RKive +#RK +#XPack Diskimage + +# These were inspired by idarc, but actually verified +# Dzip archiver (.dz) +# Update: Joerg Jenderek +# URL: http://speeddemosarchive.com/dzip/ +# reference: http://speeddemosarchive.com/dzip/dz29src.zip/main.c +# GRR: line below is too general as it matches also ASCII texts like Doszip commander help dz.txt +0 string DZ +# latest version is 2.9 dated 7 may 2003 +>2 byte <4 Dzip archive data +!:mime application/x-dzip +#!:ext dz +>>2 byte x \b, version %i +>>3 byte x \b.%i +>>4 ulelong x \b, offset 0x%x +>>8 ulelong x \b, %u files +# ZZip archiver (.zz) +0 string ZZ\ \0\0 ZZip archive data +0 string ZZ0 ZZip archive data +# PAQ archiver (.paq) +0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data +0 string PAQ PAQ archive data +>3 byte&0xf0 0x30 +>>3 byte x (v%c) +# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP) +0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data +0 string JARCS JAR (ARJ Software, Inc.) archive data + +# ARJ archiver (jason@jarthur.Claremont.EDU) +0 leshort 0xea60 ARJ archive data +!:mime application/x-arj +>5 byte x \b, v%d, +>8 byte &0x04 multi-volume, +>8 byte &0x10 slash-switched, +>8 byte &0x20 backup, +>34 string x original name: %s, +>7 byte 0 os: MS-DOS +>7 byte 1 os: PRIMOS +>7 byte 2 os: Unix +>7 byte 3 os: Amiga +>7 byte 4 os: Macintosh +>7 byte 5 os: OS/2 +>7 byte 6 os: Apple ][ GS +>7 byte 7 os: Atari ST +>7 byte 8 os: NeXT +>7 byte 9 os: VAX/VMS +>3 byte >0 %d] +# [JW] idarc says this is also possible +2 leshort 0xea60 ARJ archive data + +# HA archiver (Greg Roelofs, newt@uchicago.edu) +# This is a really bad format. A file containing HAWAII will match this... +#0 string HA HA archive data, +#>2 leshort =1 1 file, +#>2 leshort >1 %hu files, +#>4 byte&0x0f =0 first is type CPY +#>4 byte&0x0f =1 first is type ASC +#>4 byte&0x0f =2 first is type HSC +#>4 byte&0x0f =0x0e first is type DIR +#>4 byte&0x0f =0x0f first is type SPECIAL +# suggestion: at least identify small archives (<1024 files) +0 belong&0xffff00fc 0x48410000 HA archive data +>2 leshort =1 1 file, +>2 leshort >1 %u files, +>4 byte&0x0f =0 first is type CPY +>4 byte&0x0f =1 first is type ASC +>4 byte&0x0f =2 first is type HSC +>4 byte&0x0f =0x0e first is type DIR +>4 byte&0x0f =0x0f first is type SPECIAL + +# HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz) +0 string HPAK HPACK archive data + +# JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net +0 string \351,\001JAM\ JAM archive, +>7 string >\0 version %.4s +>0x26 byte =0x27 - +>>0x2b string >\0 label %.11s, +>>0x27 lelong x serial %08x, +>>0x36 string >\0 fstype %.8s + +# Very old RAR archive +# https://jasonblanks.com/wp-includes/images/papers/KnowyourarchiveRAR.pdf +0 string RE\x7e\x5e RAR archive data (26 string \x8\0\0\0mimetypeapplication/ + +# KOffice / OpenOffice & StarOffice / OpenDocument formats +# From: Abel Cheung + +# KOffice (1.2 or above) formats +# (mimetype contains "application/vnd.kde.") +>>50 string vnd.kde. KOffice (>=1.2) +>>>58 string karbon Karbon document +>>>58 string kchart KChart document +>>>58 string kformula KFormula document +>>>58 string kivio Kivio document +>>>58 string kontour Kontour document +>>>58 string kpresenter KPresenter document +>>>58 string kspread KSpread document +>>>58 string kword KWord document + +# OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) +# (mimetype contains "application/vnd.sun.xml.") +# URL: https://en.wikipedia.org/wiki/OpenOffice.org_XML +# reference: http://fileformats.archiveteam.org/wiki/OpenOffice.org_XML +>>50 string vnd.sun.xml. OpenOffice.org 1.x +>>>62 string writer Writer +>>>>68 byte !0x2e document +!:mime application/vnd.sun.xml.writer +#!:ext sxw +>>>>68 string .template template +!:mime application/vnd.sun.xml.writer.template +#!:ext stw +>>>>68 string .web Web template +!:mime application/vnd.sun.xml.writer.web +#!:ext stw +>>>>68 string .global global document +!:mime application/vnd.sun.xml.writer.global +#!:ext sxg +>>>62 string calc Calc +>>>>66 byte !0x2e spreadsheet +!:mime application/vnd.sun.xml.calc +#!:ext sxc +>>>>66 string .template template +!:mime application/vnd.sun.xml.calc.template +#!:ext stc +>>>62 string draw Draw +>>>>66 byte !0x2e document +!:mime application/vnd.sun.xml.draw +#!:ext sxd +>>>>66 string .template template +!:mime application/vnd.sun.xml.draw.template +#!:ext std +>>>62 string impress Impress +>>>>69 byte !0x2e presentation +!:mime application/vnd.sun.xml.impress +#!:ext sxi +>>>>69 string .template template +!:mime application/vnd.sun.xml.impress.template +#!:ext sti +>>>62 string math Math document +!:mime application/vnd.sun.xml.math +#!:ext sxm +>>>62 string base Database file +!:mime application/vnd.sun.xml.base +#!:ext sdb + +# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) +# URL: http://fileformats.archiveteam.org/wiki/OpenDocument +# https://lists.oasis-open.org/archives/office/200505/msg00006.html +# (mimetype contains "application/vnd.oasis.opendocument.") +>>50 string vnd.oasis.opendocument. OpenDocument +>>>73 string text +>>>>77 byte !0x2d Text +!:mime application/vnd.oasis.opendocument.text +#!:ext odt +>>>>77 string -template Text Template +!:mime application/vnd.oasis.opendocument.text-template +#!:ext ott +>>>>77 string -web HTML Document Template +!:mime application/vnd.oasis.opendocument.text-web +#!:ext oth +>>>>77 string -master Master Document +!:mime application/vnd.oasis.opendocument.text-master +#!:ext odm +>>>73 string graphics +>>>>81 byte !0x2d Drawing +!:mime application/vnd.oasis.opendocument.graphics +#!:ext odg +>>>>81 string -template Drawing Template +!:mime application/vnd.oasis.opendocument.graphics-template +#!:ext otg +>>>73 string presentation +>>>>85 byte !0x2d Presentation +!:mime application/vnd.oasis.opendocument.presentation +#!:ext odp +>>>>85 string -template Presentation Template +!:mime application/vnd.oasis.opendocument.presentation-template +#!:ext otp +>>>73 string spreadsheet +>>>>84 byte !0x2d Spreadsheet +!:mime application/vnd.oasis.opendocument.spreadsheet +#!:ext ods +>>>>84 string -template Spreadsheet Template +!:mime application/vnd.oasis.opendocument.spreadsheet-template +#!:ext ots +>>>73 string chart +>>>>78 byte !0x2d Chart +!:mime application/vnd.oasis.opendocument.chart +#!:ext odc +>>>>78 string -template Chart Template +!:mime application/vnd.oasis.opendocument.chart-template +#!:ext otc +>>>73 string formula +>>>>80 byte !0x2d Formula +!:mime application/vnd.oasis.opendocument.formula +#!:ext odf +>>>>80 string -template Formula Template +!:mime application/vnd.oasis.opendocument.formula-template +#!:ext otf +# https://www.loc.gov/preservation/digital/formats/fdd/fdd000441.shtml +>>>73 string database Database +!:mime application/vnd.oasis.opendocument.database +#!:ext odb +# Valid for LibreOffice Base 6.0.1.1 at least +>>>73 string base Database +# https://bugs.documentfoundation.org/show_bug.cgi?id=45854 +!:mime application/vnd.oasis.opendocument.database +#!:mime application/vnd.oasis.opendocument.base +#!:ext odb +>>>73 string image +>>>>78 byte !0x2d Image +!:mime application/vnd.oasis.opendocument.image +#!:ext odi +>>>>78 string -template Image Template +!:mime application/vnd.oasis.opendocument.image-template +#!:ext oti + +# EPUB (OEBPS) books using OCF (OEBPS Container Format) +# https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. +# From: Ralf Brown +>>50 string epub+zip EPUB document +!:mime application/epub+zip + +# From: Joerg Jenderek +# URL: http://en.wikipedia.org/wiki/CorelDRAW +# NOTE: version; til 2 WL-based; from 3 til 13 by ./riff; from 14 zip based +>>50 string x-vnd.corel. Corel +>>>62 string draw.document+zip Draw drawing, version 14-16 +!:mime application/x-vnd.corel.draw.document+zip +#!:ext cdr +>>>62 string draw.template+zip Draw template, version 14-16 +!:mime application/x-vnd.corel.draw.template+zip +#!:ext cdrt +>>>62 string zcf.draw.document+zip Draw drawing, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.document+zip +#!:ext cdr +>>>62 string zcf.draw.template+zip Draw template, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.template+zip +#!:ext cdt/cdrt +# URL: http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html +>>>62 string zcf.pattern+zip Draw pattern, version 22 +!:mime application/x-vnd.corel.zcf.pattern+zip +#!:ext pat +# URL: https://en.wikipedia.org/wiki/Corel_Designer +# Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer +# Note: called by TrID "Corel DESIGN graphics" +>>>62 string designer.document+zip DESIGNER graphics, version 14-16 +!:mime application/x-vnd.corel.designer.document+zip +#!:ext des +>>>62 string zcf.designer.document+zip DESIGNER graphics, version 17-21 +!:mime application/x-vnd.corel.zcf.designer.document+zip +#!:ext des +# URL: http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/ +# CorelDRAW-Corel-Symbol-Library-CSL.html +>>>62 string symbol.library+zip Symbol Library, version 6-16.3 +!:mime application/x-vnd.corel.symbol.library+zip +#!:ext csl +>>>62 string zcf.symbol.library+zip Symbol Library, version 17-22 +!:mime application/x-vnd.corel.zcf.symbol.library+zip +#!:ext csl + +# Catch other ZIP-with-mimetype formats +# In a ZIP file, the bytes immediately after a member's contents are +# always "PK". The 2 regex rules here print the "mimetype" member's +# contents up to the first 'P'. Luckily, most MIME types don't contain +# any capital 'P's. This is a kludge. +# (mimetype contains "application/") +>>50 default x Zip data +>>>38 regex [!-OQ-~]+ (MIME type "%s"?) +!:mime application/zip +# (mimetype contents other than "application/*") +>26 string \x8\0\0\0mimetype +>>38 string !application/ +>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?) +!:mime application/zip + +# Java Jar files +>(26.s+30) leshort 0xcafe Java archive data (JAR) +!:mime application/java-archive + +# iOS App +>(26.s+30) leshort !0xcafe +>>26 string !\x8\0\0\0mimetype +>>>30 string Payload/ +>>>>38 search/64 .app/ iOS App +!:mime application/x-ios-app + +>30 search/100/b application/epub+zip EPUB document +!:mime application/epub+zip + +# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) +# Next line excludes specialized formats: +>(26.s+30) leshort !0xcafe +>>30 search/100/b !application/epub+zip +>>>26 string !\x8\0\0\0mimetype Zip archive data +!:mime application/zip +>>>>4 beshort x \b, at least +>>>>4 beshort x to extract +>>>>8 beshort x \b, compression method= +>>>>0x161 string WINZIP \b, WinZIP self-extracting + +# StarView Metafile +# From Pierre Ducroquet +0 string VCLMTF StarView MetaFile +>6 beshort x \b, version %d +>8 belong x \b, size %d + +# Zoo archiver +20 lelong 0xfdc4a7dc Zoo archive data +!:mime application/x-zoo +>4 byte >48 \b, v%c. +>>6 byte >47 \b%c +>>>7 byte >47 \b%c +>32 byte >0 \b, modify: v%d +>>33 byte x \b.%d+ +>42 lelong 0xfdc4a7dc \b, +>>70 byte >0 extract: v%d +>>>71 byte x \b.%d+ + +# Shell archives +10 string #\ This\ is\ a\ shell\ archive shell archive text +!:mime application/octet-stream + +# +# LBR. NB: May conflict with the questionable +# "binary Computer Graphics Metafile" format. +# +0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data +# +# From Rafael Laboissiere +# The Project Revision Control System (see +# http://prcs.sourceforge.net) generates a packaged project +# file which is recognized by the following entry: +0 leshort 0xeb81 PRCS packaged project + +# Microsoft cabinets +# by David Necas (Yeti) +#0 string MSCF\0\0\0\0 Microsoft cabinet file data, +#>25 byte x v%d +#>24 byte x \b.%d +# MPi: All CABs have version 1.3, so this is pointless. +# Better magic in debian-additions. + +# GTKtalog catalogs +# by David Necas (Yeti) +4 string gtktalog\ GTKtalog catalog data, +>13 string 3 version 3 +>>14 beshort 0x677a (gzipped) +>>14 beshort !0x677a (not gzipped) +>13 string >3 version %s + +############################################################################ +# Parity archive reconstruction file, the 'par' file format now used on Usenet. +0 string PAR\0 PARity archive data +>48 leshort =0 - Index file +>48 leshort >0 - file number %d + +# Felix von Leitner +0 string d8:announce BitTorrent file +!:mime application/x-bittorrent +# Durval Menezes, +0 string d13:announce-list BitTorrent file +!:mime application/x-bittorrent +0 string d7:comment BitTorrent file +!:mime application/x-bittorrent +0 string d4:info BitTorrent file +!:mime application/x-bittorrent + +# Atari MSA archive - Teemu Hukkanen +0 beshort 0x0e0f Atari MSA archive data +>2 beshort x \b, %d sectors per track +>4 beshort 0 \b, 1 sided +>4 beshort 1 \b, 2 sided +>6 beshort x \b, starting track: %d +>8 beshort x \b, ending track: %d + +# Alternate ZIP string (amc@arwen.cs.berkeley.edu) +0 string PK00PK\003\004 Zip archive data +!:mime application/zip +#!:ext zip/cbz + +# ACE archive (from http://www.wotsit.org/download.asp?f=ace) +# by Stefan `Sec` Zehl +7 string **ACE** ACE archive data +>15 byte >0 version %d +>16 byte =0x00 \b, from MS-DOS +>16 byte =0x01 \b, from OS/2 +>16 byte =0x02 \b, from Win/32 +>16 byte =0x03 \b, from Unix +>16 byte =0x04 \b, from MacOS +>16 byte =0x05 \b, from WinNT +>16 byte =0x06 \b, from Primos +>16 byte =0x07 \b, from AppleGS +>16 byte =0x08 \b, from Atari +>16 byte =0x09 \b, from Vax/VMS +>16 byte =0x0A \b, from Amiga +>16 byte =0x0B \b, from Next +>14 byte x \b, version %d to extract +>5 leshort &0x0080 \b, multiple volumes, +>>17 byte x \b (part %d), +>5 leshort &0x0002 \b, contains comment +>5 leshort &0x0200 \b, sfx +>5 leshort &0x0400 \b, small dictionary +>5 leshort &0x0800 \b, multi-volume +>5 leshort &0x1000 \b, contains AV-String +>>30 string \x16*UNREGISTERED\x20VERSION* (unregistered) +>5 leshort &0x2000 \b, with recovery record +>5 leshort &0x4000 \b, locked +>5 leshort &0x8000 \b, solid +# Date in MS-DOS format (whatever that is) +#>18 lelong x Created on + +# sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann +# +0x1A string sfArk sfArk compressed Soundfont +>0x15 string 2 +>>0x1 string >\0 Version %s +>>0x2A string >\0 : %s + +# DR-DOS 7.03 Packed File *.??_ +# Reference: http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm +# Note: unpacked by PNUNPACK.EXE +0 string Packed\ File\ +# by looking for Control-Z skip ASCII text starting with Packed File +>0x18 ubyte 0x1a Personal NetWare Packed File +!:mime application/x-novell-compress +#!:ext ??_ +>>12 string x \b, was "%.12s" +# 1 or 2 +#>>0x19 ubyte x \b, at 0x19 %u +>>0x1b ulelong x with %u bytes + +# EET archive +# From: Tilman Sauerbeck +0 belong 0x1ee7ff00 EET archive +!:mime application/x-eet + +# rzip archives +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +# From: Joerg Jenderek +# URL: https://help.foxitsoftware.com/kb/install-fzip-file.php +# reference: http://mark0.net/download/triddefs_xml.7z/ +# defs/f/fzip.trid.xml +# Note: unknown compression; No "PK" zip magic; normally in directory like +# "%APPDATA%\Foxit Software\Addon\Foxit Reader\Install" +0 ubequad 0x2506781901010000 Foxit add-on/update +!:mime application/x-fzip +#!:ext fzip + +# From: "Robert Dale" +0 belong 123 dar archive, +>4 belong x label "%.8x +>>8 belong x %.8x +>>>12 beshort x %.4x" +>14 byte 0x54 end slice +>14 beshort 0x4e4e multi-part +>14 beshort 0x4e53 multi-part, with -S + +# Symbian installation files +# https://www.thouky.co.uk/software/psifs/sis.html +# http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf +8 lelong 0x10000419 Symbian installation file +!:mime application/vnd.symbian.install +>4 lelong 0x1000006D (EPOC release 3/4/5) +>4 lelong 0x10003A12 (EPOC release 6) +0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x) +!:mime x-epoc/x-sisx-app + +# From "Nelson A. de Oliveira" +0 string MPQ\032 MoPaQ (MPQ) archive + +# From: "Nelson A. de Oliveira" +# .kgb +0 string KGB_arch KGB Archiver file +>10 string x with compression level %.1s + +# Type: Parity Archive +# From: Daniel van Eeden +0 string PAR2 Parity Archive Volume Set + +# Bacula volume format. (Volumes always start with a block header.) +# URL: https://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html +# From: Adam Buchbinder +12 string BB02 Bacula volume +>20 bedate x \b, started %s + +# ePub is XHTML + XML inside a ZIP archive. The first member of the +# archive must be an uncompressed file called 'mimetype' with contents +# 'application/epub+zip' + + +# From: "Michael Gorny" +# ZPAQ: http://mattmahoney.net/dc/zpaq.html +0 string zPQ ZPAQ stream +>3 byte x \b, level %d +# From: Barry Carter +# https://encode.ru/threads/456-zpaq-updates/page32 +0 string 7kSt ZPAQ file + +# BBeB ebook, unencrypted (LRF format) +# URL: https://www.sven.de/librie/Librie/LrfFormat +# From: Adam Buchbinder +0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted +>8 beshort x \b, version %d +>36 byte 1 \b, front-to-back +>36 byte 16 \b, back-to-front +>42 beshort x \b, (%dx, +>44 beshort x %d) + +# Symantec GHOST image by Joerg Jenderek at May 2014 +# https://us.norton.com/ghost/ +# https://www.garykessler.net/library/file_sigs.html +0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image +# *.GHO +>2 ubyte&0x08 0x00 \b, first file +# *.GHS or *.[0-9] with cns program option +>2 ubyte&0x08 0x08 \b, split file +# part of split index interesting for *.ghs +>>4 ubyte x id=0x%x +# compression tag minus one equals numeric compression command line switch z[1-9] +>3 ubyte 0 \b, no compression +>3 ubyte 2 \b, fast compression (Z1) +>3 ubyte 3 \b, medium compression (Z2) +>3 ubyte >3 +>>3 ubyte <11 \b, compression (Z%d-1) +>2 ubyte&0x08 0x00 +# ~ 30 byte password field only for *.gho +>>12 ubequad !0 \b, password protected +>>44 ubyte !1 +# 1~Image All, sector-by-sector only for *.gho +>>>10 ubyte 1 \b, sector copy +# 1~Image Boot track only for *.gho +>>>43 ubyte 1 \b, boot track +# 1~Image Disc only for *.gho implies Image Boot track and sector copy +>>44 ubyte 1 \b, disc sector copy +# optional image description only *.gho +>>0xff string >\0 "%-.254s" +# look for DOS sector end sequence +>0xE08 search/7776 \x55\xAA +>>&-512 indirect x \b; contains + +# Google Chrome extensions +# https://developer.chrome.com/extensions/crx +# https://developer.chrome.com/extensions/hosting +0 string Cr24 Google Chrome extension +!:mime application/x-chrome-extension +>4 ulong x \b, version %u + +# SeqBox - Sequenced container +# ext: sbx, seqbox +# Marco Pontello marcopon@gmail.com +# reference: https://github.com/MarcoPon/SeqBox +0 string SBx SeqBox, +>3 byte x version %d + +# LyNX archive +56 string USE\040LYNX\040TO\040DISSOLVE\040THIS\040FILE LyNX archive + +# From: Joerg Jenderek +# URL: https://www.acronis.com/ +# Reference: https://en.wikipedia.org/wiki/TIB_(file_format) +# Note: only tested with True Image 2013 Build 5962 and 2019 Build 14110 +0 ubequad 0xce24b9a220000000 Acronis True Image backup +!:mime application/x-acronis-tib +#!:ext tib +# 01000000 +#>20 ubelong x \b, at 20 0x%x +# 20000000 +#>28 ubelong x \b, at 28 0x%x +# strings like "Generic- SD/MMC 1.00" "Unknown Disk" "Msft Virtual Disk 1.0" +# ??? +# strings like "\Device\0000011e" "\Device\0000015a" +#>0 search/0x6852300/cs \\Device\\ +#>>&-1 pstring x \b, %s +# "\Device\HarddiskVolume30" "\Device\HarddiskVolume39" +#>>>&1 search/180/cs \\Device\\ +#>>>>&-1 pstring x \b, %s +#>>>>>&0 search/29/cs \0\0\xc8\0 +# disk label +#>>>>>>&10 lestring16 x \b, disk label %11.11s +#>>>>>>&9 plestring16 x \b, disk label "%11.11s" +#>>>>>>&10 ubequad x %16.16llx + + +# Gentoo XPAK binary package +# by Michal Gorny +# https://gitweb.gentoo.org/proj/portage.git/tree/man/xpak.5 +-4 string STOP +>-16 string XPAKSTOP Gentoo binary package (XPAK) + +# From: Joerg Jenderek +# URL: https://kodi.wiki/view/TexturePacker +# Reference: https://mirrors.kodi.tv/releases/source/17.3-Krypton.tar.gz +# /xbmc-Krypton/xbmc/guilib/XBTF.h +# /xbmc-Krypton/xbmc/guilib/XBTF.cpp +0 string XBTF +# skip ASCII text by looking for terminating \0 of path +>264 ubyte 0 XBMC texture package +!:mime application/x-xbmc-xbt +#!:ext xbt +# XBTF_VERSION 2 +>>4 string !2 \b, version %-.1s +# nofFiles /xbmc-Krypton/xbmc/guilib/XBTFReader.cpp +>>5 ulelong x \b, %u file +# plural s +>>5 ulelong >1 \bs +# path[CXBTFFile[MaximumPathLength=256] +>>9 string x \b, 1st %s + +# ALZIP archive +# by Hyungjun Park , Hajin Jang +# http://kippler.com/win/unalz/ +# https://salsa.debian.org/l10n-korean-team/unalz +0 string ALZ\001 ALZ archive data +#!:ext alz + +# https://cf-aldn.altools.co.kr/setup/EGG_Specification.zip +0 string EGGA EGG archive data, +#!:ext egg +>5 byte x version %u +>4 byte x \b.%u +>>0x0E ulelong =0x08E28222 +>>0x0E ulelong =0x24F5A262 \b, split +>>0x0E ulelong =0x24E5A060 \b, solid +>>0x0E default x \b, unknown + +# PAQ9A archive +# URL: http://mattmahoney.net/dc/#paq9a +# Note: Line 1186 of paq9a.cpp gives the magic bytes +0 string pQ9\001 PAQ9A archive + +#------------------------------------------------------------------------------ +# $File: compress,v 1.80 2021/03/15 17:49:24 christos Exp $ +# compress: file(1) magic for pure-compression formats (no archives) +# +# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. +# +# Formats for various forms of compressed data +# Formats for "compress" proper have been moved into "compress.c", +# because it tries to uncompress it to figure out what's inside. + +# standard unix compress +0 string \037\235 compress'd data +!:mime application/x-compress +!:apple LZIVZIVU +>2 byte&0x80 >0 block compressed +>2 byte&0x1f x %d bits + +# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver) +# URL: https://en.wikipedia.org/wiki/Gzip +# Reference: https://tools.ietf.org/html/rfc1952 +# Update: Joerg Jenderek, Apr 2019 +# Edited by Chris Chittleborough , March 2002 +# * Original filename is only at offset 10 if "extra field" absent +# * Produce shorter output - notably, only report compression methods +# other than 8 ("deflate", the only method defined in RFC 1952). +# Note: find defs -iname '*.trid.xml' -exec grep -q '1F8B08' {} \; -ls +# TODO: +# FBR Blueberry FlashBack screen Record https://www.flashbackrecorder.com/ +# KPR KOffice/Calligra KPresenter application/x-kpresenter +# KPT KOffice/Calligra KPresenter template? application/x-kpresenter +# SAV Diggles Saved Game File http://www.innonics.com +# SAV FarCry (demo) saved game http://www.farcry-thegame.com +# DAT ZOAGZIP game data format http://en.wikipedia.org/wiki/SD_Gundam_Capsule_Fighter +0 string \037\213 +# to display gzip compressed (strength=100=2*50) before other (strength=50)? +#!:strength * 2 +# no FNAME and FCOMMENT bit implies no file name/comment. That means only binary +>3 byte&0x18 =0 +# For binary gzipped no ASCII text should occur +# mcd-monu-cad.trid.xml +>>10 string MCD Monu-Cad Drawing, Component or Font +#>>36 string Created\ with\ MONU-CAD +#!:mime application/octet-stream +# http://fileformats.archiveteam.org/wiki/Monu-CAD +# http://www.monucad.com/downloads/FullDemo-2005.EXE +# /HANDS96.MCC Component +# /DEMO_DD01.MCD Drawing +# /MCALF020.FNT Font +#!:ext mcc/mcd/fnt +# http://www.generalcadd.com +>>10 string GXD General CADD, Drawing or Component +#!:mime application/octet-stream +# /gxc/BUILDINGEDGE.gxc Component +# /gxd/HOCKETT-STPAUL-WRHSE.gxd Drawing +# /gxd/POWERLAND-MILL-ADD-11.gxd Drawing v9.1.06 +#!:ext gxc/gxd +#>>>13 ubyte 0 \b, version 0 +>>>13 string 09 \b, version 9 +# other gzipped binary like gzipped tar, VirtualBox extension package,... +>>10 default x gzip compressed data +!:mime application/gzip +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# gzipped TAR or VirtualBox extension package +#!:mime application/x-compressed-tar +#!:mime application/x-virtualbox-vbox-extpack +# https://www.w3.org/TR/SVG/mimereg.html +#!:mime image/image/svg+xml-compressed +# zlib.3.gz +# microcode-20180312.tgz +# tpz same as tgz +# lua-md5_1.2-1_i386_i486.ipk https://en.wikipedia.org/wiki/Opkg +# Oracle_VM_VirtualBox_Extension_Pack-5.0.12-104815.vbox-extpack +#!:ext gz/tgz/tpz/ipk/vbox-extpack/svgz +# FNAME/FCOMMENT bit implies file name/comment as iso-8859-1 text +>3 byte&0x18 >0 gzip compressed data +!:mime application/gzip +# gzipped tar, gzipped Abiword document +#!:mime application/x-compressed-tar +#!:mime application/x-abiword-compressed +#!:mime image/image/svg+xml-compressed +# kleopatra_splashscreen.svgz gzipped .svg +#!:ext gz/tgz/tpz/zabw/svgz +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# display information of gzip compressed files +#>2 byte x THIS iS GZIP +>2 byte <8 \b, reserved method +>2 byte >8 \b, unknown method +>3 byte &0x01 \b, ASCII +>3 byte &0x02 \b, has CRC +>3 byte &0x04 \b, extra field +>3 byte&0xC =0x08 +>>10 string x \b, was "%s" +>3 byte &0x10 \b, has comment +>3 byte &0x20 \b, encrypted +>4 ledate >0 \b, last modified: %s +>8 byte 2 \b, max compression +>8 byte 4 \b, max speed +>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT) +>9 byte =0x01 \b, from Amiga +>9 byte =0x02 \b, from VMS +>9 byte =0x03 \b, from Unix +>9 byte =0x04 \b, from VM/CMS +>9 byte =0x05 \b, from Atari +>9 byte =0x06 \b, from HPFS filesystem (OS/2, NT) +>9 byte =0x07 \b, from MacOS +>9 byte =0x08 \b, from Z-System +>9 byte =0x09 \b, from CP/M +>9 byte =0x0A \b, from TOPS/20 +>9 byte =0x0B \b, from NTFS filesystem (NT) +>9 byte =0x0C \b, from QDOS +>9 byte =0x0D \b, from Acorn RISCOS +# size of the original (uncompressed) input data modulo 2^32 +#>-4 ulelong x \b, original size modulo 2^32 %u +#ERROR: line 114: non zero offset 1048572 at level 1 + +# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis +0 string \037\036 packed data +!:mime application/octet-stream +>2 belong >1 \b, %d characters originally +>2 belong =1 \b, %d character originally +# +# This magic number is byte-order-independent. +0 short 0x1f1f old packed data +!:mime application/octet-stream + +# XXX - why *two* entries for "compacted data", one of which is +# byte-order independent, and one of which is byte-order dependent? +# +0 short 0x1fff compacted data +!:mime application/octet-stream +# This string is valid for SunOS (BE) and a matching "short" is listed +# in the Ultrix (LE) magic file. +0 string \377\037 compacted data +!:mime application/octet-stream +0 short 0145405 huf output +!:mime application/octet-stream + +# bzip2 +0 string BZh bzip2 compressed data +!:mime application/x-bzip2 +>3 byte >47 \b, block size = %c00k + +# bzip a block-sorting file compressor +# by Julian Seward and others +0 string BZ0 bzip compressed data +!:mime application/x-bzip +>3 byte >47 \b, block size = %c00k + +# lzip +0 string LZIP lzip compressed data +!:mime application/x-lzip +>4 byte x \b, version: %d + +# squeeze and crunch +# Michael Haardt +0 beshort 0x76FF squeezed data, +>4 string x original name %s +0 beshort 0x76FE crunched data, +>2 string x original name %s +0 beshort 0x76FD LZH compressed data, +>2 string x original name %s + +# Freeze +0 string \037\237 frozen file 2.1 +0 string \037\236 frozen file 1.0 (or gzip 0.5) + +# SCO compress -H (LZH) +0 string \037\240 SCO compress -H (LZH) data + +# European GSM 06.10 is a provisional standard for full-rate speech +# transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse +# excitation/long term prediction) coding at 13 kbit/s. +# +# There's only a magic nibble (4 bits); that nibble repeats every 33 +# bytes. This isn't suited for use, but maybe we can use it someday. +# +# This will cause very short GSM files to be declared as data and +# mismatches to be declared as data too! +#0 byte&0xF0 0xd0 data +#>33 byte&0xF0 0xd0 +#>66 byte&0xF0 0xd0 +#>99 byte&0xF0 0xd0 +#>132 byte&0xF0 0xd0 GSM 06.10 compressed audio + +# lzop from +0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data +>9 beshort <0x0940 +>>9 byte&0xf0 =0x00 - version 0. +>>9 beshort&0x0fff x \b%03x, +>>13 byte 1 LZO1X-1, +>>13 byte 2 LZO1X-1(15), +>>13 byte 3 LZO1X-999, +## >>22 bedate >0 last modified: %s, +>>14 byte =0x00 os: MS-DOS +>>14 byte =0x01 os: Amiga +>>14 byte =0x02 os: VMS +>>14 byte =0x03 os: Unix +>>14 byte =0x05 os: Atari +>>14 byte =0x06 os: OS/2 +>>14 byte =0x07 os: MacOS +>>14 byte =0x0A os: Tops/20 +>>14 byte =0x0B os: WinNT +>>14 byte =0x0E os: Win32 +>9 beshort >0x0939 +>>9 byte&0xf0 =0x00 - version 0. +>>9 byte&0xf0 =0x10 - version 1. +>>9 byte&0xf0 =0x20 - version 2. +>>9 beshort&0x0fff x \b%03x, +>>15 byte 1 LZO1X-1, +>>15 byte 2 LZO1X-1(15), +>>15 byte 3 LZO1X-999, +## >>25 bedate >0 last modified: %s, +>>17 byte =0x00 os: MS-DOS +>>17 byte =0x01 os: Amiga +>>17 byte =0x02 os: VMS +>>17 byte =0x03 os: Unix +>>17 byte =0x05 os: Atari +>>17 byte =0x06 os: OS/2 +>>17 byte =0x07 os: MacOS +>>17 byte =0x0A os: Tops/20 +>>17 byte =0x0B os: WinNT +>>17 byte =0x0E os: Win32 + +# 4.3BSD-Quasijarus Strong Compression +# https://minnie.tuhs.org/Quasijarus/compress.html +0 string \037\241 Quasijarus strong compressed data + +# From: Cory Dikkers +0 string XPKF Amiga xpkf.library compressed data +0 string PP11 Power Packer 1.1 compressed data +0 string PP20 Power Packer 2.0 compressed data, +>4 belong 0x09090909 fast compression +>4 belong 0x090A0A0A mediocre compression +>4 belong 0x090A0B0B good compression +>4 belong 0x090A0C0C very good compression +>4 belong 0x090A0C0D best compression + +# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at) +# https://www.7-zip.org or DOC/7zFormat.txt +# +0 string 7z\274\257\047\034 7-zip archive data, +>6 byte x version %d +>7 byte x \b.%d +!:mime application/x-7z-compressed +#!:ext 7z/cb7 + +# Type: LZMA +0 lelong&0xffffff =0x5d +>12 leshort 0xff lzma compressed data, +!:mime application/x-lzma +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld +>12 leshort 0 lzma compressed data, +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld + +# http://tukaani.org/xz/xz-file-format.txt +0 ustring \xFD7zXZ\x00 xz compressed data, checksum +>7 byte&0xf 0x0 NONE +>7 byte&0xf 0x1 CRC32 +>7 byte&0xf 0x4 CRC64 +>7 byte&0xf 0xa SHA-256 + +!:strength * 2 +!:mime application/x-xz + +# https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt +0 string LRZI LRZIP compressed data +>4 byte x - version %d +>5 byte x \b.%d +!:mime application/x-lrzip + +# https://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html +0 lelong 0x184d2204 lz4 compressed data (v1.4+) +!:mime application/x-lz4 +# Added by osm0sis@xda-developers.com +0 lelong 0x184c2103 lz4 compressed data (v1.0-v1.3) +!:mime application/x-lz4 +0 lelong 0x184c2102 lz4-l compressed data (v0.1-v0.9) +!:mime application/x-lz4 + +# Zstandard/LZ4 skippable frames +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong&0xFFFFFFF0 0x184D2A50 +>(4.l+8) indirect x + +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong 0xEC30A437 Zstandard dictionary +!:mime application/x-std-dictionary +>4 lelong x (ID %u) + +# AFX compressed files (Wolfram Kleff) +2 string -afx- AFX compressed file data + +# Supplementary magic data for the file(1) command to support +# rzip(1). The format is described in magic(5). +# +# Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with +# this file. +# +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +0 string ArC\x01 FreeArc archive + +# Type: DACT compressed files +0 long 0x444354C3 DACT compressed data +>4 byte >-1 (version %i. +>5 byte >-1 %i. +>6 byte >-1 %i) +>7 long >0 , original size: %i bytes +>15 long >30 , block size: %i bytes + +# Valve Pack (VPK) files +0 lelong 0x55aa1234 Valve Pak file +>0x4 lelong x \b, version %u +>0x8 lelong x \b, %u entries + +# Snappy framing format +# https://code.google.com/p/snappy/source/browse/trunk/framing_format.txt +0 string \377\006\0\0sNaPpY snappy framed data +!:mime application/x-snappy-framed + +# qpress, https://www.quicklz.com/ +0 string qpress10 qpress compressed data +!:mime application/x-qpress + +# Zlib https://www.ietf.org/rfc/rfc6713.txt +0 string/b x +>0 beshort%31 =0 +>>0 byte&0xf =8 +>>>0 byte&0x80 =0 zlib compressed data +!:mime application/zlib + +# BWC compression +0 string BWC +>3 byte 0 BWC compressed data + +# UCL compression +0 bequad 0x00e955434cff011a UCL compressed data + +# Softlib archive +0 string SLIB Softlib archive +>4 leshort x \b, version %d +>6 leshort x (contains %d files) + +# URL: https://github.com/lzfse/lzfse/blob/master/src/lzfse_internal.h#L276 +# From: Eric Hall +0 string bvx- lzfse encoded, no compression +0 string bvx1 lzfse compressed, uncompressed tables +0 string bvx2 lzfse compressed, compressed tables +0 string bvxn lzfse encoded, lzvn compressed + +# pcxLib.exe compression program +# http://www.shikadi.net/moddingwiki/PCX_Library +0 string/b pcxLib + +#------------------------------------------------------------ +# $File: android,v 1.18 2021/02/23 00:51:10 christos Exp $ +# Various android related magic entries +#------------------------------------------------------------ + +# Dalvik .dex format. http://retrodev.com/android/dexformat.html +# From "Mike Fleming" +# Fixed to avoid regexec 17 errors on some dex files +# From "Tim Strazzere" +0 string dex\n +>0 regex dex\n[0-9]{2}\0 Dalvik dex file +>4 string >000 version %s +0 string dey\n +>0 regex dey\n[0-9]{2}\0 Dalvik dex file (optimized for host) +>4 string >000 version %s + +# Android bootimg format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/mkbootimg/bootimg.h +# https://github.com/djrbliss/loki/blob/master/loki.h#L43 +0 string ANDROID! Android bootimg +>1024 string LOKI \b, LOKI'd +>>1028 lelong 0 \b (boot) +>>1028 lelong 1 \b (recovery) +>8 lelong >0 \b, kernel +>>12 lelong >0 \b (0x%x) +>16 lelong >0 \b, ramdisk +>>20 lelong >0 \b (0x%x) +>24 lelong >0 \b, second stage +>>28 lelong >0 \b (0x%x) +>36 lelong >0 \b, page size: %d +>38 string >0 \b, name: %s +>64 string >0 \b, cmdline (%s) + +# Android sparse img format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/libsparse/sparse_format.h +0 lelong 0xed26ff3a Android sparse image +>4 leshort x \b, version: %d +>6 leshort x \b.%d +>16 lelong x \b, Total of %d +>12 lelong x \b %d-byte output blocks in +>20 lelong x \b %d input chunks. + +# Android binary XML magic +# In include/androidfw/ResourceTypes.h: +# RES_XML_TYPE = 0x0003 followed by the size of the header (ResXMLTree_header), +# which is 8 bytes (2 bytes type + 2 bytes header size + 4 bytes size). +0 lelong 0x00080003 Android binary XML + +# Android cryptfs footer +# From https://android.googlesource.com/\ +# platform/system/vold/+/refs/heads/master/cryptfs.h +0 lelong 0xd0b5b1c4 Android cryptfs footer +>4 leshort x \b, version: %d +>6 leshort x \b.%d + +# Android Vdex format +# From https://android.googlesource.com/\ +# platform/art/+/master/runtime/vdex_file.h +0 string vdex Android vdex file, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d + +# Android Vdex format, dexfile is currently being updated +# by android system +# From https://android.googlesource.com/\ +# platform/art/+/master/dex2oat/dex2oat.cc +0 string wdex Android vdex file, being processed by dex2oat, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d diff --git a/Final_Zip/AIK/KSU/TWRP/cleanup.sh b/Final_Zip/AIK/KSU/TWRP/cleanup.sh new file mode 100755 index 0000000..d8f1d61 --- /dev/null +++ b/Final_Zip/AIK/KSU/TWRP/cleanup.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# AIK-Linux/cleanup: reset working directory +# osm0sis @ xda-developers + +case $1 in + --help) echo "usage: cleanup.sh [--local] [--quiet]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + statarg="-f %Su"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) statarg="-c %U";; +esac; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; + +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + sudo=sudo; +fi; + +$sudo rm -rf ramdisk split_img *new.* || exit 1; + +case $1 in + --quiet) ;; + *) echo "Working directory cleaned.";; +esac; +exit 0; + diff --git a/Final_Zip/AIK/KSU/TWRP/repackimg.sh b/Final_Zip/AIK/KSU/TWRP/repackimg.sh new file mode 100755 index 0000000..5709f0f --- /dev/null +++ b/Final_Zip/AIK/KSU/TWRP/repackimg.sh @@ -0,0 +1,413 @@ +#!/bin/bash +# AIK-Linux/repackimg: repack ramdisk and build image +# osm0sis @ xda-developers + +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: repackimg.sh [--local] [--original] [--origsize] [--level <0-9>] [--avbkey ] [--forceelf]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + + javaver=$(java -version 2>&1 | head -n1 | cut -d\" -f2); + javamaj=$(echo $javaver | cut -d. -f1); + javamin=$(echo $javaver | cut -d. -f2); + if [ "$javamaj" -lt 9 ] && [ "$javamaj" -eq 1 -a "$javamin" -lt 8 ]; then + java() { "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" "$@"; } + fi; + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; +chmod -R 755 "$bin" "$aik/"*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -z "$(ls split_img/* 2>/dev/null)" -o ! -e ramdisk ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +while [ "$1" ]; do + case $1 in + --original) original=1;; + --origsize) origsize=1;; + --forceelf) repackelf=1;; + --level) + case $2 in + ''|*[!0-9]*) ;; + *) level="-$2"; lvltxt=" - Level: $2"; shift;; + esac; + ;; + --avbkey) + if [ "$2" ]; then + for keytest in "$2" "$cur/$2" "$aik/$2"; do + if [ ! -z "$(ls $keytest.pk8 2>/dev/null)" -a ! -z "$(ls $keytest.x509.* 2>/dev/null)" ]; then + avbkey="$keytest"; avbtxt=" - Key: $2"; shift; break; + fi; + done; + fi; + ;; + esac; + shift; +done; + +ramdiskcomp=`cat split_img/*-*ramdiskcomp 2>/dev/null`; +if [ -z "$(ls ramdisk/* 2>/dev/null)" ] && [ ! "$ramdiskcomp" = "empty" -a ! "$original" ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - RepackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +if [ ! -z "$(ls *-new.* 2>/dev/null)" ]; then + echo "Warning: Overwriting existing files!"; + echo " "; +fi; +rm -f "*-new.*"; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" ]; then + sudo=sudo; sumsg=" (as root)"; +else + cpioarg="-R 0:0"; +fi; + +if [ "$original" ]; then + echo "Repacking with original ramdisk..."; +elif [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: Using empty ramdisk for repack!"; + compext=.empty; + touch ramdisk-new.cpio$compext; +else + echo "Packing ramdisk$sumsg..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + if [ -z "$level" ]; then + case $ramdiskcomp in + xz) level=-1;; + lz4*) level=-9;; + esac; + fi; + echo "Using compression: $ramdiskcomp$lvltxt"; + repackcmd="$ramdiskcomp $level"; + compext=$ramdiskcomp; + case $ramdiskcomp in + gzip) compext=gz;; + lzop) compext=lzo;; + xz) repackcmd="xz $level -Ccrc32";; + lzma) repackcmd="xz $level -Flzma";; + bzip2) compext=bz2;; + lz4) repackcmd="$bin/$arch/lz4 $level";; + lz4-l) repackcmd="$bin/$arch/lz4 $level -l"; compext=lz4;; + cpio) repackcmd="cat"; compext="";; + *) abort; exit 1;; + esac; + if [ "$compext" ]; then + compext=.$compext; + fi; + cd ramdisk; + $sudo find . | $sudo $cpio $cpioarg -H newc -o 2>/dev/null | $repackcmd > ../ramdisk-new.cpio$compext; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Getting build information..."; +cd split_img; +imgtype=`cat *-imgtype`; +case $imgtype in + KRNL) ;; + AOSP_VNDR) vendor=vendor_;; + *) + if [ -f *-kernel ]; then + kernel=`ls *-kernel`; echo "kernel = $kernel"; + kernel="split_img/$kernel"; + fi; + ;; +esac; +if [ "$original" ]; then + ramdisk=`ls *-*ramdisk.cpio*`; echo "${vendor}ramdisk = $ramdisk"; + ramdisk="split_img/$ramdisk"; +else + ramdisk="ramdisk-new.cpio$compext"; +fi; +case $imgtype in + KRNL) rsz=$(wc -c < ../"$ramdisk"); echo "ramdisk_size = $rsz";; + OSIP) echo "cmdline = $(cat *-*cmdline)";; + U-Boot) + name=`cat *-name`; echo "name = $name"; + uarch=`cat *-arch`; + os=`cat *-os`; + type=`cat *-type`; + comp=`cat *-comp`; echo "type = $uarch $os $type ($comp)"; + [ "$comp" = "uncompressed" ] && comp=none; + addr=`cat *-addr`; echo "load_addr = $addr"; + ep=`cat *-ep`; echo "entry_point = $ep"; + ;; + *) + if [ -f *-second ]; then + second=`ls *-second`; echo "second = $second"; + second=(--second "split_img/$second"); + fi; + if [ -f *-dtb ]; then + dtb=`ls *-dtb`; echo "dtb = $dtb"; + dtb=(--dtb "split_img/$dtb"); + fi; + if [ -f *-recovery_dtbo ]; then + recoverydtbo=`ls *-recovery_dtbo`; echo "recovery_dtbo = $recoverydtbo"; + recoverydtbo=(--recovery_dtbo "split_img/$recoverydtbo"); + fi; + if [ -f *-*cmdline ]; then + cmdname=`ls *-*cmdline`; + cmdline=`cat *-*cmdline`; echo "${vendor}cmdline = $cmdline"; + cmd=("split_img/$cmdname"@cmdline); + fi; + if [ -f *-board ]; then + board=`cat *-board`; echo "board = $board"; + fi; + if [ -f *-base ]; then + base=`cat *-base`; echo "base = $base"; + fi; + if [ -f *-pagesize ]; then + pagesize=`cat *-pagesize`; echo "pagesize = $pagesize"; + fi; + if [ -f *-kernel_offset ]; then + kerneloff=`cat *-kernel_offset`; echo "kernel_offset = $kerneloff"; + fi; + if [ -f *-ramdisk_offset ]; then + ramdiskoff=`cat *-ramdisk_offset`; echo "ramdisk_offset = $ramdiskoff"; + fi; + if [ -f *-second_offset ]; then + secondoff=`cat *-second_offset`; echo "second_offset = $secondoff"; + fi; + if [ -f *-tags_offset ]; then + tagsoff=`cat *-tags_offset`; echo "tags_offset = $tagsoff"; + fi; + if [ -f *-dtb_offset ]; then + dtboff=`cat *-dtb_offset`; echo "dtb_offset = $dtboff"; + fi; + if [ -f *-os_version ]; then + osver=`cat *-os_version`; echo "os_version = $osver"; + fi; + if [ -f *-os_patch_level ]; then + oslvl=`cat *-os_patch_level`; echo "os_patch_level = $oslvl"; + fi; + if [ -f *-header_version ]; then + hdrver=`cat *-header_version`; echo "header_version = $hdrver"; + fi; + if [ -f *-hashtype ]; then + hashtype=`cat *-hashtype`; echo "hashtype = $hashtype"; + hashtype="--hashtype $hashtype"; + fi; + if [ -f *-dt ]; then + dttype=`cat *-dttype`; + dt=`ls *-dt`; echo "dt = $dt"; + rpm=("split_img/$dt",rpm); + dt=(--dt "split_img/$dt"); + fi; + if [ -f *-unknown ]; then + unknown=`cat *-unknown`; echo "unknown = $unknown"; + fi; + if [ -f *-header ]; then + header=`ls *-header`; + header="split_img/$header"; + fi; + ;; +esac; +cd ..; + +if [ -f split_img/*-mtktype ]; then + mtktype=`cat split_img/*-mtktype`; + echo " "; + echo "Generating MTK headers..."; + echo " "; + echo "Using ramdisk type: $mtktype"; + "$bin/$arch/mkmtkhdr" --kernel "$kernel" --$mtktype "$ramdisk" >/dev/null; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + mv -f "$(basename "$kernel")-mtk" kernel-new.mtk; + mv -f "$(basename "$ramdisk")-mtk" $mtktype-new.mtk; + kernel=kernel-new.mtk; + ramdisk=$mtktype-new.mtk; +fi; + +if [ -f split_img/*-sigtype ]; then + outname=unsigned-new.img; +else + outname=image-new.img; +fi; + +[ "$dttype" = "ELF" ] && repackelf=1; +if [ "$imgtype" = "ELF" ] && [ ! "$header" -o ! "$repackelf" ]; then + imgtype=AOSP; + echo " "; + echo "Warning: ELF format without RPM detected; will be repacked using AOSP format!"; +fi; + +echo " "; +echo "Building image..."; +echo " "; +echo "Using format: $imgtype"; +echo " "; +case $imgtype in + AOSP_VNDR) "$bin/$arch/mkbootimg" --vendor_ramdisk "$ramdisk" "${dtb[@]}" --vendor_cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --tags_offset $tagsoff --dtb_offset $dtboff --os_version "$osver" --os_patch_level "$oslvl" --header_version $hdrver --vendor_boot $outname;; + AOSP) "$bin/$arch/mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" "${dtb[@]}" "${recoverydtbo[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --dtb_offset "$dtboff" --os_version "$osver" --os_patch_level "$oslvl" --header_version "$hdrver" $hashtype "${dt[@]}" -o $outname;; + AOSP-PXA) "$bin/$arch/pxa-mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --unknown $unknown "${dt[@]}" -o $outname;; + ELF) "$bin/$arch/elftool" pack -o $outname header="$header" "$kernel" "$ramdisk",ramdisk "${rpm[@]}" "${cmd[@]}" >/dev/null;; + KRNL) "$bin/$arch/rkcrc" -k "$ramdisk" $outname;; + OSIP) + mkdir split_img/.temp 2>/dev/null; + for i in bootstub cmdline.txt hdr kernel parameter sig; do + cp -f split_img/*-*$(basename $i .txt | sed -e 's/hdr/header/') split_img/.temp/$i 2>/dev/null; + done; + cp -f "$ramdisk" split_img/.temp/ramdisk.cpio.gz; + "$bin/$arch/mboot" -d split_img/.temp -f $outname; + ;; + U-Boot) + part0="$kernel"; + case $type in + Multi) part1=(:"$ramdisk");; + RAMDisk) part0="$ramdisk";; + esac; + "$bin/$arch/mkimage" -A $uarch -O $os -T $type -C $comp -a $addr -e $ep -n "$name" -d "$part0""${part1[@]}" $outname >/dev/null; + ;; + *) echo " "; echo "Unsupported format."; abort; exit 1;; +esac; +if [ ! $? -eq "0" ]; then + abort; + exit 1; +fi; + +rm -rf split_img/.temp; + +if [ -f split_img/*-sigtype ]; then + sigtype=`cat split_img/*-sigtype`; + if [ -f split_img/*-avbtype ]; then + avbtype=`cat split_img/*-avbtype`; + fi; + if [ -f split_img/*-blobtype ]; then + blobtype=`cat split_img/*-blobtype`; + fi; + echo "Signing new image..."; + echo " "; + echo "Using signature: $sigtype $avbtype$avbtxt$blobtype"; + [ ! "$avbkey" ] && avbkey="$bin/avb/verity"; + echo " "; + case $sigtype in + AVBv1) java -jar "$bin/boot_signer.jar" /$avbtype unsigned-new.img "$avbkey.pk8" "$avbkey.x509."* image-new.img 2>/dev/null;; + BLOB) + awk 'BEGIN { printf "-SIGNED-BY-SIGNBLOB-\00\00\00\00\00\00\00\00" }' > image-new.img; + "$bin/$arch/blobpack" blob.tmp $blobtype unsigned-new.img >/dev/null; + cat blob.tmp >> image-new.img; + rm -f blob.tmp; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --pack image-new.img --keyblock "$bin/chromeos/kernel.keyblock" --signprivate "$bin/chromeos/kernel_data_key.vbprivk" --version 1 --vmlinuz unsigned-new.img --bootloader "$bin/chromeos/empty" --config "$bin/chromeos/empty" --arch arm --flags 0x1;; + DHTB) + "$bin/$arch/dhtbsign" -i unsigned-new.img -o image-new.img >/dev/null; + rm -f split_img/*-tailtype 2>/dev/null; + ;; + NOOK*) cat split_img/*-master_boot.key unsigned-new.img > image-new.img;; + esac; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; +fi; + +if [ -f split_img/*-lokitype ]; then + lokitype=`cat split_img/*-lokitype`; + echo "Loki patching new image..."; + echo " "; + echo "Using type: $lokitype"; + echo " "; + mv -f image-new.img unlokied-new.img; + if [ -f aboot.img ]; then + "$bin/$arch/loki_tool" patch $lokitype aboot.img unlokied-new.img image-new.img >/dev/null; + if [ ! $? -eq "0" ]; then + echo "Patching failed."; + abort; + exit 1; + fi; + else + echo "Device aboot.img required in script directory to find Loki patch offset."; + abort; + exit 1; + fi; +elif [ -f split_img/*-microloader.bin ]; then + echo "Amonet patching new image..."; + echo " "; + cp -f image-new.img unamonet-new.img; + cp -f split_img/*-microloader.bin microloader.tmp; + dd bs=1024 count=1 conv=notrunc if=unamonet-new.img of=head.tmp 2>/dev/null; + dd bs=1024 seek=1 conv=notrunc if=head.tmp of=image-new.img 2>/dev/null; + dd conv=notrunc if=microloader.tmp of=image-new.img 2>/dev/null; + rm -f head.tmp microloader.tmp; +fi; + +if [ -f split_img/*-tailtype ]; then + tailtype=`cat split_img/*-tailtype`; + echo "Appending footer..."; + echo " "; + echo "Using type: $tailtype"; + echo " "; + case $tailtype in + Bump) awk 'BEGIN { printf "\x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79" }' >> image-new.img;; + SEAndroid) printf 'SEANDROIDENFORCE' >> image-new.img;; + esac; +fi; + +if [ "$origsize" -a -f split_img/*-origsize ]; then + filesize=`cat split_img/*-origsize`; + echo "Padding to original size..."; + echo " "; + cp -f image-new.img unpadded-new.img; + truncate -s $filesize image-new.img; +fi; + +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/KSU/TWRP/unpackimg.sh b/Final_Zip/AIK/KSU/TWRP/unpackimg.sh new file mode 100755 index 0000000..6198f2a --- /dev/null +++ b/Final_Zip/AIK/KSU/TWRP/unpackimg.sh @@ -0,0 +1,370 @@ +#!/bin/bash +# AIK-Linux/unpackimg: split image and unpack ramdisk +# osm0sis @ xda-developers + +cleanup() { "$aik/cleanup.sh" $local --quiet; } +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: unpackimg.sh [--local] [--nosudo] "; exit 1;; + --local) local="--local"; shift;; +esac; +case $1 in + --nosudo) nosudo=1; shift;; + --sudo) shift;; +esac; +if [ ! "$nosudo" ]; then + sudo=sudo; sumsg=" (as root)"; +fi; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + file() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/file" "$@"; } + lzma() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + tail() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/tail" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +if [ ! "$local" ]; then + cd "$aik"; +fi; +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +img="$1"; +[ -f "$cur/$1" ] && img="$cur/$1"; +if [ ! "$img" ]; then + while IFS= read -r line; do + case $line in + aboot.img|image-new.img|unlokied-new.img|unsigned-new.img) continue;; + esac; + img="$line"; + break; + done < <(ls *.elf *.img *.sin 2>/dev/null); +fi; +img="$(readlink -f "$img")"; +if [ ! -f "$img" ]; then + echo "No image file supplied."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - UnpackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +file=$(basename "$img"); +echo "Supplied image: $file"; +echo " "; + +if [ -d split_img -o -d ramdisk ]; then + if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + rmsumsg=" (as root)"; + fi; + echo "Removing old work folders and files$rmsumsg..."; + echo " "; + cleanup; +fi; + +echo "Setting up work folders..."; +echo " "; +mkdir split_img ramdisk; + +cd split_img; +filesize=$(wc -c < "$img"); +echo "$filesize" > "$file-origsize"; +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "signing" ]; then + echo $imgtest | awk '{ print $1 }' > "$file-sigtype"; + sigtype=$(cat "$file-sigtype"); + echo "Signature with \"$sigtype\" type detected, removing..."; + echo " "; + case $sigtype in + BLOB) + cp -f "$img" "$file"; + "$bin/$arch/blobunpack" "$file" | tail -n+5 | cut -d" " -f2 | dd bs=1 count=3 > "$file-blobtype" 2>/dev/null; + mv -f "$file."* "$file"; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --get-vmlinuz "$img" --vmlinuz-out "$file";; + DHTB) dd bs=4096 skip=512 iflag=skip_bytes conv=notrunc if="$img" of="$file" 2>/dev/null;; + NOOK) + dd bs=1048576 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=1048576 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + NOOKTAB) + dd bs=262144 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=262144 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + SIN*) + "$bin/$arch/sony_dump" . "$img" >/dev/null; + mv -f "$file."* "$file"; + rm -f "$file-sigtype"; + ;; + esac; + img="$file"; +fi; + +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "bootimg" ]; then + [ "$(echo $imgtest | awk '{ print $3 }')" = "PXA" ] && typesuffix=-PXA; + echo "$(echo $imgtest | awk '{ print $1 }')$typesuffix" > "$file-imgtype"; + imgtype=$(cat "$file-imgtype"); +else + cd ..; + cleanup; + echo "Unrecognized format."; + abort; + exit 1; +fi; +echo "Image type: $imgtype"; +echo " "; + +case $imgtype in + AOSP*|ELF|KRNL|OSIP|U-Boot) ;; + *) + cd ..; + cleanup; + echo "Unsupported format."; + abort; + exit 1; + ;; +esac; + +case $(echo $imgtest | awk '{ print $3 }') in + LOKI) + echo $imgtest | awk '{ print $5 }' | cut -d\( -f2 | cut -d\) -f1 > "$file-lokitype"; + lokitype=$(cat "$file-lokitype"); + echo "Loki patch with \"$lokitype\" type detected, reverting..."; + echo " "; + echo "Warning: A dump of your device's aboot.img is required to re-Loki!"; + echo " "; + "$bin/$arch/loki_tool" unlok "$img" "$file" >/dev/null; + img="$file"; + ;; + AMONET) + echo "Amonet patch detected, reverting..."; + echo " "; + dd bs=2048 count=1 conv=notrunc if="$img" of="$file-microloader.bin" 2>/dev/null; + dd bs=1024 skip=1 conv=notrunc if="$file-microloader.bin" of="$file-head" 2>/dev/null; + truncate -s 1024 "$file-microloader.bin"; + truncate -s 2048 "$file-head"; + dd bs=2048 skip=1 conv=notrunc if="$img" of="$file-tail" 2>/dev/null; + cat "$file-head" "$file-tail" > "$file"; + rm -f "$file-head" "$file-tail"; + img="$file"; + ;; +esac; + +tailtest="$(dd if="$img" iflag=skip_bytes skip=$(($(wc -c < "$img") - 8192)) bs=8192 count=1 2>/dev/null | file -m $bin/androidbootimg.magic - 2>/dev/null | cut -d: -f2-)"; +case $tailtest in + *data) tailtest="$(tail -n50 "$img" | file -m "$bin/androidbootimg.magic" - 2>/dev/null | cut -d: -f2-)";; +esac; +tailtype="$(echo $tailtest | awk '{ print $1 }')"; +case $tailtype in + AVB*) + echo "Signature with \"$tailtype\" type detected."; + echo " "; + case $tailtype in + *v1) + echo $tailtype > "$file-sigtype"; + echo $tailtest | awk '{ print $4 }' > "$file-avbtype"; + ;; + esac; + ;; + Bump|SEAndroid) + echo "Footer with \"$tailtype\" type detected."; + echo " "; + echo $tailtype > "$file-tailtype"; + ;; +esac; + +if [ "$imgtype" = "U-Boot" ]; then + imgsize=$(($(printf '%d\n' 0x$(hexdump -n 4 -s 12 -e '16/1 "%02x""\n"' "$img")) + 64)); + if [ ! "$filesize" = "$imgsize" ]; then + echo "Trimming..."; + echo " "; + dd bs=$imgsize count=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + img="$file"; + fi; +fi; + +echo 'Splitting image to "split_img/"...'; +case $imgtype in + AOSP_VNDR) vendor=vendor_;; +esac; +case $imgtype in + AOSP|AOSP_VNDR) "$bin/$arch/unpackbootimg" -i "$img";; + AOSP-PXA) "$bin/$arch/pxa-unpackbootimg" -i "$img";; + ELF) + mkdir elftool_out; + "$bin/$arch/elftool" unpack -i "$img" -o elftool_out >/dev/null; + mv -f elftool_out/header "$file-header" 2>/dev/null; + rm -rf elftool_out; + "$bin/$arch/unpackelf" -i "$img"; + ;; + KRNL) dd bs=4096 skip=8 iflag=skip_bytes conv=notrunc if="$img" of="$file-ramdisk" 2>&1 | tail -n+3 | cut -d" " -f1-2;; + OSIP) + "$bin/$arch/mboot" -u -f "$img"; + [ ! $? -eq "0" ] && error=1; + for i in bootstub cmdline.txt hdr kernel parameter ramdisk.cpio.gz sig; do + mv -f $i "$file-$(basename $i .txt | sed -e 's/hdr/header/' -e 's/ramdisk.cpio.gz/ramdisk/')" 2>/dev/null || true; + done; + ;; + U-Boot) + "$bin/$arch/dumpimage" -l "$img"; + "$bin/$arch/dumpimage" -l "$img" > "$file-header"; + grep "Name:" "$file-header" | cut -c15- > "$file-name"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f1 > "$file-arch"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f2 > "$file-os"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f3 | cut -d- -f1 > "$file-type"; + grep "Type:" "$file-header" | cut -d\( -f2 | cut -d\) -f1 | cut -d" " -f1 | cut -d- -f1 > "$file-comp"; + grep "Address:" "$file-header" | cut -c15- > "$file-addr"; + grep "Point:" "$file-header" | cut -c15- > "$file-ep"; + rm -f "$file-header"; + "$bin/$arch/dumpimage" -p 0 -o "$file-kernel" "$img"; + [ ! $? -eq "0" ] && error=1; + case $(cat "$file-type") in + Multi) "$bin/$arch/dumpimage" -p 1 -o "$file-ramdisk" "$img";; + RAMDisk) mv -f "$file-kernel" "$file-ramdisk";; + *) touch "$file-ramdisk";; + esac; + ;; +esac; +if [ ! $? -eq "0" -o "$error" ]; then + cd ..; + cleanup; + abort; + exit 1; +fi; + +if [ -f *-kernel ] && [ "$(file -m "$bin/androidbootimg.magic" *-kernel 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')" = "MTK" ]; then + mtk=1; + echo " "; + echo "MTK header found in kernel, removing..."; + dd bs=512 skip=1 conv=notrunc if="$file-kernel" of=tempkern 2>/dev/null; + mv -f tempkern "$file-kernel"; +fi; +mtktest="$(file -m "$bin/androidbootimg.magic" *-*ramdisk 2>/dev/null | cut -d: -f2-)"; +mtktype=$(echo $mtktest | awk '{ print $3 }'); +if [ "$(echo $mtktest | awk '{ print $1 }')" = "MTK" ]; then + if [ ! "$mtk" ]; then + echo " "; + echo "Warning: No MTK header found in kernel!"; + mtk=1; + fi; + echo "MTK header found in \"$mtktype\" type ramdisk, removing..."; + dd bs=512 skip=1 conv=notrunc if="$(ls *-*ramdisk)" of=temprd 2>/dev/null; + mv -f temprd "$(ls *-*ramdisk)"; +else + if [ "$mtk" ]; then + if [ ! "$mtktype" ]; then + echo 'Warning: No MTK header found in ramdisk, assuming "rootfs" type!'; + mtktype="rootfs"; + fi; + fi; +fi; +[ "$mtk" ] && echo $mtktype > "$file-mtktype"; + +if [ -f *-dt ]; then + dttest="$(file -m "$bin/androidbootimg.magic" *-dt 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')"; + echo $dttest > "$file-dttype"; + if [ "$imgtype" = "ELF" ]; then + case $dttest in + QCDT|ELF) ;; + *) echo " "; + echo "Non-QC DTB found, packing kernel and appending..."; + gzip --no-name -9 "$file-kernel"; + mv -f "$file-kernel.gz" "$file-kernel"; + cat "$file-dt" >> "$file-kernel"; + rm -f "$file-dt"*;; + esac; + fi; +fi; + +file -m "$bin/magic" *-*ramdisk 2>/dev/null | cut -d: -f2 | awk '{ print $1 }' > "$file-${vendor}ramdiskcomp"; +ramdiskcomp=`cat *-*ramdiskcomp`; +unpackcmd="$ramdiskcomp -dc"; +compext=$ramdiskcomp; +case $ramdiskcomp in + gzip) unpackcmd="gzip -dcq"; compext=gz;; + lzop) compext=lzo;; + xz) ;; + lzma) ;; + bzip2) compext=bz2;; + lz4) unpackcmd="$bin/$arch/lz4 -dcq";; + lz4-l) unpackcmd="$bin/$arch/lz4 -dcq"; compext=lz4;; + cpio) unpackcmd="cat"; compext="";; + empty) compext=empty;; + *) compext="";; +esac; +if [ "$compext" ]; then + compext=.$compext; +fi; +mv -f "$(ls *-*ramdisk)" "$file-${vendor}ramdisk.cpio$compext" 2>/dev/null; +cd ..; +if [ "$ramdiskcomp" = "data" ]; then + echo "Unrecognized format."; + abort; + exit 1; +fi; + +echo " "; +if [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: No ramdisk found to be unpacked!"; +else + echo "Unpacking ramdisk$sumsg to \"ramdisk/\"..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + echo "Compression used: $ramdiskcomp"; + if [ ! "$compext" -a ! "$ramdiskcomp" = "cpio" ]; then + echo "Unsupported format."; + abort; + exit 1; + fi; + $sudo chown 0:0 ramdisk 2>/dev/null; + cd ramdisk; + $unpackcmd "../split_img/$file-${vendor}ramdisk.cpio$compext" | $sudo $cpio -i -d --no-absolute-filenames; + if [ ! $? -eq "0" ]; then + [ "$nosudo" ] && echo "Unpacking failed, try without --nosudo."; + cd ..; + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/OFRP-R/bin/androidbootimg.magic b/Final_Zip/AIK/OFRP-R/bin/androidbootimg.magic new file mode 100755 index 0000000..4e7a106 --- /dev/null +++ b/Final_Zip/AIK/OFRP-R/bin/androidbootimg.magic @@ -0,0 +1,111 @@ +#------------------------------------------------------------------------------ +# Various Android OEM non-standard boot image related magic entries +# osm0sis @ xda-developers +#------------------------------------------------------------------------------ + +# ASUS Blob Signature +0 string -SIGNED-BY-SIGNBLOB- BLOB signing + +# Barnes & Noble Nook Signature +64 string Red\x20Loader NOOK signing (red loader) +64 string Green\x20Loader NOOK signing (green loader) +64 string Green\x20Recovery NOOK signing (green recovery) +64 string eMMC\x20boot.img+secondloader NOOK signing (emmc boot) +64 string eMMC\x20recovery.img+secondloader NOOK signing (emmc recovery) +48 string BauwksBoot NOOKTAB signing (bauwks) + +# Google ChromeOS Signature +0 string CHROMEOS CHROMEOS signing + +# Samsung/Spreadtrum DHTB Signature +0 string DHTB\x01\x00\x00 DHTB signing + +# Sony SIN Packaging/Signature +0 string \x01\x00\x00\x00 SINv1 signing +0 string \x02\x00\x00\x00 SINv2 signing +0 string \x03SIN SINv3 signing + +# Google Pixel/Nexus/AOSP Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search ANDROID! AOSP bootimg +>>36 string \x00\x00\x00\x02 \b, PXA variant (020) +>>36 string \x00\x00\x80\x02 \b, PXA variant (028) +>>36 string \x00\x00\x00\x03 \b, PXA variant (030) +>>96 search microloader +>>>1024 string ANDROID! \b, AMONET header +>>1024 string LOKI \b, LOKI header +>>>1028 string \x00 \b (boot) +>>>1028 string \x01 \b (recovery) +>>2048 search \x88\x16\x88\x58 \b, MTK headers +!:strength * 3 + +# Google Pixel/AOSP Vendor Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search VNDRBOOT AOSP_VNDR bootimg +!:strength * 3 + +# DENX U-Boot +0 string \x27\x05\x19\x56 U-Boot bootimg + +# Intel OSIP +1000 search \xFC\xFA\xBC\x00 OSIP bootimg (headerless) +!:strength / 15 +0 string $OS$\x00\x00\x01 OSIP bootimg +>52 string \x00\x00\x00\x00 \b, boot (signed) +>52 string \x01\x00\x00\x00 \b, boot (unsigned) +>52 string \x0C\x00\x00\x00 \b, recovery (signed) +>52 string \x0D\x00\x00\x00 \b, recovery (unsigned) + +# Rockchip KRNL +0 string KRNL KRNL bootimg + +# Sony ELF +0 string \x7FELF ELF +>5 string \x01\x01\x61 bootimg +>18 string \x28 (ARM +>18 string \x03 (x86_ +>18 string \x08 (MIPS +>4 string \x01 \b) +>4 string \x02 \b64) +>0 search \x88\x16\x88\x58 \b, MTK headers + +# MediaTek MTK +# [for detection after boot image has already been split] +0 search \x88\x16\x88\x58 MTK header +>0 search KERNEL \b, kernel type +>0 search ROOTFS \b, rootfs type +>0 search RECOVERY \b, recovery type +!:strength / 20 + +# Qualcomm Device Tree +# [for detection after boot image has already been split] +0 string QCDT QCDT header +!:strength / 20 + +# Google Android Verified Boot 1.0 Signature +# [for detection with the tail of the boot image] +0 search \x02\x01\x01\x30\x82 AVBv1 signing footer +>0 search /boot \b, boot type +>0 search /recovery \b, recovery type +!:strength / 20 + +# Google Android Verified Boot 2.0 Signature +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search AVBf AVBv2 signing footer +!:strength / 20 + +# LG Bump +# [for detection with the tail of the boot image] +0 search \x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79 Bump footer +!:strength / 20 + +# Samsung SEAndroid +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search SEANDROIDENFORCE SEAndroid footer +!:strength / 20 diff --git a/Final_Zip/AIK/OFRP-R/bin/avb/verity.pk8 b/Final_Zip/AIK/OFRP-R/bin/avb/verity.pk8 new file mode 100755 index 0000000..bebf216 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/avb/verity.pk8 differ diff --git a/Final_Zip/AIK/OFRP-R/bin/avb/verity.x509.pem b/Final_Zip/AIK/OFRP-R/bin/avb/verity.x509.pem new file mode 100755 index 0000000..86399c3 --- /dev/null +++ b/Final_Zip/AIK/OFRP-R/bin/avb/verity.x509.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIID/TCCAuWgAwIBAgIJAJcPmDkJqolJMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g +VmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UE +AwwHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe +Fw0xNDExMDYxOTA3NDBaFw00MjAzMjQxOTA3NDBaMIGUMQswCQYDVQQGEwJVUzET +MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEQMA4G +A1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UEAwwHQW5kcm9p +ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAOjreE0vTVSRenuzO9vnaWfk0eQzYab0gqpi +6xAzi6dmD+ugoEKJmbPiuE5Dwf21isZ9uhUUu0dQM46dK4ocKxMRrcnmGxydFn6o +fs3ODJMXOkv2gKXL/FdbEPdDbxzdu8z3yk+W67udM/fW7WbaQ3DO0knu+izKak/3 +T41c5uoXmQ81UNtAzRGzGchNVXMmWuTGOkg6U+0I2Td7K8yvUMWhAWPPpKLtVH9r +AL5TzjYNR92izdKcz3AjRsI3CTjtpiVABGeX0TcjRSuZB7K9EK56HV+OFNS6I1NP +jdD7FIShyGlqqZdUOkAUZYanbpgeT5N7QL6uuqcGpoTOkalu6kkCAwEAAaNQME4w +HQYDVR0OBBYEFH5DM/m7oArf4O3peeKO0ZIEkrQPMB8GA1UdIwQYMBaAFH5DM/m7 +oArf4O3peeKO0ZIEkrQPMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB +AHO3NSvDE5jFvMehGGtS8BnFYdFKRIglDMc4niWSzhzOVYRH4WajxdtBWc5fx0ix +NF/+hVKVhP6AIOQa+++sk+HIi7RvioPPbhjcsVlZe7cUEGrLSSveGouQyc+j0+m6 +JF84kszIl5GGNMTnx0XRPO+g8t6h5LWfnVydgZfpGRRg+WHewk1U2HlvTjIceb0N +dcoJ8WKJAFWdcuE7VIm4w+vF/DYX/A2Oyzr2+QRhmYSv1cusgAeC1tvH4ap+J1Lg +UnOu5Kh/FqPLLSwNVQp4Bu7b9QFfqK8Moj84bj88NqRGZgDyqzuTrFxn6FW7dmyA +yttuAJAEAymk1mipd9+zp38= +-----END CERTIFICATE----- diff --git a/Final_Zip/AIK/OFRP-R/bin/boot_signer.jar b/Final_Zip/AIK/OFRP-R/bin/boot_signer.jar new file mode 100755 index 0000000..dd96a3e Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/boot_signer.jar differ diff --git a/Final_Zip/AIK/OFRP-R/bin/chromeos/empty b/Final_Zip/AIK/OFRP-R/bin/chromeos/empty new file mode 100755 index 0000000..8b13789 --- /dev/null +++ b/Final_Zip/AIK/OFRP-R/bin/chromeos/empty @@ -0,0 +1 @@ + diff --git a/Final_Zip/AIK/OFRP-R/bin/chromeos/kernel.keyblock b/Final_Zip/AIK/OFRP-R/bin/chromeos/kernel.keyblock new file mode 100755 index 0000000..9740be4 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/chromeos/kernel.keyblock differ diff --git a/Final_Zip/AIK/OFRP-R/bin/chromeos/kernel_data_key.vbprivk b/Final_Zip/AIK/OFRP-R/bin/chromeos/kernel_data_key.vbprivk new file mode 100755 index 0000000..8d392fb Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/chromeos/kernel_data_key.vbprivk differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/blobpack b/Final_Zip/AIK/OFRP-R/bin/linux/i686/blobpack new file mode 100755 index 0000000..685c6c0 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/blobpack differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/blobunpack b/Final_Zip/AIK/OFRP-R/bin/linux/i686/blobunpack new file mode 100755 index 0000000..2d96696 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/blobunpack differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/dhtbsign b/Final_Zip/AIK/OFRP-R/bin/linux/i686/dhtbsign new file mode 100755 index 0000000..f117b88 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/dhtbsign differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/dumpimage b/Final_Zip/AIK/OFRP-R/bin/linux/i686/dumpimage new file mode 100755 index 0000000..8ba15d3 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/dumpimage differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/elftool b/Final_Zip/AIK/OFRP-R/bin/linux/i686/elftool new file mode 100755 index 0000000..b25dd56 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/elftool differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/futility b/Final_Zip/AIK/OFRP-R/bin/linux/i686/futility new file mode 100755 index 0000000..c830e31 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/futility differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/loki_tool b/Final_Zip/AIK/OFRP-R/bin/linux/i686/loki_tool new file mode 100755 index 0000000..d305760 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/loki_tool differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/lz4 b/Final_Zip/AIK/OFRP-R/bin/linux/i686/lz4 new file mode 100755 index 0000000..801bad4 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/lz4 differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/mboot b/Final_Zip/AIK/OFRP-R/bin/linux/i686/mboot new file mode 100755 index 0000000..023eab0 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/mboot differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/mkbootimg b/Final_Zip/AIK/OFRP-R/bin/linux/i686/mkbootimg new file mode 100755 index 0000000..ed68c2d Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/mkbootimg differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/mkimage b/Final_Zip/AIK/OFRP-R/bin/linux/i686/mkimage new file mode 100755 index 0000000..8e97c0c Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/mkimage differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/mkmtkhdr b/Final_Zip/AIK/OFRP-R/bin/linux/i686/mkmtkhdr new file mode 100755 index 0000000..d71db24 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/mkmtkhdr differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/pxa-mkbootimg b/Final_Zip/AIK/OFRP-R/bin/linux/i686/pxa-mkbootimg new file mode 100755 index 0000000..0636873 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/pxa-unpackbootimg b/Final_Zip/AIK/OFRP-R/bin/linux/i686/pxa-unpackbootimg new file mode 100755 index 0000000..8dbdecf Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/rkcrc b/Final_Zip/AIK/OFRP-R/bin/linux/i686/rkcrc new file mode 100755 index 0000000..45027f3 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/rkcrc differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/sony_dump b/Final_Zip/AIK/OFRP-R/bin/linux/i686/sony_dump new file mode 100755 index 0000000..2563e25 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/sony_dump differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/unpackbootimg b/Final_Zip/AIK/OFRP-R/bin/linux/i686/unpackbootimg new file mode 100755 index 0000000..b70aed5 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/unpackbootimg differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/i686/unpackelf b/Final_Zip/AIK/OFRP-R/bin/linux/i686/unpackelf new file mode 100755 index 0000000..12e9057 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/i686/unpackelf differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/blobpack b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/blobpack new file mode 100755 index 0000000..90256d4 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/blobpack differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/blobunpack b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/blobunpack new file mode 100755 index 0000000..53374ff Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/dhtbsign b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/dhtbsign new file mode 100755 index 0000000..ccb7a67 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/dumpimage b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/dumpimage new file mode 100755 index 0000000..861bd68 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/elftool b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/elftool new file mode 100755 index 0000000..07a520d Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/elftool differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/futility b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/futility new file mode 100755 index 0000000..4d56ec3 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/futility differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/loki_tool b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/loki_tool new file mode 100755 index 0000000..4a1b74a Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/lz4 b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/lz4 new file mode 100755 index 0000000..8a4136b Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/lz4 differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/mboot b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/mboot new file mode 100755 index 0000000..8bf92d4 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/mboot differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/mkbootimg b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/mkbootimg new file mode 100755 index 0000000..2b628c3 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/mkimage b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/mkimage new file mode 100755 index 0000000..6419ea3 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/mkimage differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/mkmtkhdr b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/mkmtkhdr new file mode 100755 index 0000000..1ab256f Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/pxa-mkbootimg b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..5885720 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..d7b1b7d Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/rkcrc b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/rkcrc new file mode 100755 index 0000000..f218228 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/sony_dump b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/sony_dump new file mode 100755 index 0000000..6fc3696 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/unpackbootimg b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/unpackbootimg new file mode 100755 index 0000000..8f4fccf Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/unpackelf b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/unpackelf new file mode 100755 index 0000000..477e25d Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/linux/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/blobpack b/Final_Zip/AIK/OFRP-R/bin/macos/i386/blobpack new file mode 100755 index 0000000..2336ec0 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/blobpack differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/blobunpack b/Final_Zip/AIK/OFRP-R/bin/macos/i386/blobunpack new file mode 100755 index 0000000..834cb50 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/blobunpack differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/cpio b/Final_Zip/AIK/OFRP-R/bin/macos/i386/cpio new file mode 100755 index 0000000..b7e41f1 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/cpio differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/dd b/Final_Zip/AIK/OFRP-R/bin/macos/i386/dd new file mode 100755 index 0000000..b684139 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/dd differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/dhtbsign b/Final_Zip/AIK/OFRP-R/bin/macos/i386/dhtbsign new file mode 100755 index 0000000..b3ba0ba Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/dhtbsign differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/dumpimage b/Final_Zip/AIK/OFRP-R/bin/macos/i386/dumpimage new file mode 100755 index 0000000..917c8ed Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/dumpimage differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/elftool b/Final_Zip/AIK/OFRP-R/bin/macos/i386/elftool new file mode 100755 index 0000000..27f12be Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/elftool differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/file b/Final_Zip/AIK/OFRP-R/bin/macos/i386/file new file mode 100755 index 0000000..8024db5 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/file differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/futility b/Final_Zip/AIK/OFRP-R/bin/macos/i386/futility new file mode 100755 index 0000000..8658249 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/futility differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/libiconv.2.dylib b/Final_Zip/AIK/OFRP-R/bin/macos/i386/libiconv.2.dylib new file mode 100755 index 0000000..ec61db0 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/libintl.8.dylib b/Final_Zip/AIK/OFRP-R/bin/macos/i386/libintl.8.dylib new file mode 100755 index 0000000..c297f0a Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/libintl.8.dylib differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/liblzma.5.dylib b/Final_Zip/AIK/OFRP-R/bin/macos/i386/liblzma.5.dylib new file mode 100755 index 0000000..126d338 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/liblzo2.2.dylib b/Final_Zip/AIK/OFRP-R/bin/macos/i386/liblzo2.2.dylib new file mode 100755 index 0000000..8a24e23 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/libmagic.1.dylib b/Final_Zip/AIK/OFRP-R/bin/macos/i386/libmagic.1.dylib new file mode 100755 index 0000000..92e6c7f Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/loki_tool b/Final_Zip/AIK/OFRP-R/bin/macos/i386/loki_tool new file mode 100755 index 0000000..7eecf68 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/loki_tool differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/lz4 b/Final_Zip/AIK/OFRP-R/bin/macos/i386/lz4 new file mode 100755 index 0000000..43126f8 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/lz4 differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/lzop b/Final_Zip/AIK/OFRP-R/bin/macos/i386/lzop new file mode 100755 index 0000000..fc3103c Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/lzop differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/mboot b/Final_Zip/AIK/OFRP-R/bin/macos/i386/mboot new file mode 100755 index 0000000..dfa0d3e Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/mboot differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/mkbootimg b/Final_Zip/AIK/OFRP-R/bin/macos/i386/mkbootimg new file mode 100755 index 0000000..82f05a9 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/mkbootimg differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/mkimage b/Final_Zip/AIK/OFRP-R/bin/macos/i386/mkimage new file mode 100755 index 0000000..e760d6e Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/mkimage differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/mkmtkhdr b/Final_Zip/AIK/OFRP-R/bin/macos/i386/mkmtkhdr new file mode 100755 index 0000000..907ba0f Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/mkmtkhdr differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/pxa-mkbootimg b/Final_Zip/AIK/OFRP-R/bin/macos/i386/pxa-mkbootimg new file mode 100755 index 0000000..12f8337 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/pxa-unpackbootimg b/Final_Zip/AIK/OFRP-R/bin/macos/i386/pxa-unpackbootimg new file mode 100755 index 0000000..2f1fe6c Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/rkcrc b/Final_Zip/AIK/OFRP-R/bin/macos/i386/rkcrc new file mode 100755 index 0000000..c2b70ce Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/rkcrc differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/sony_dump b/Final_Zip/AIK/OFRP-R/bin/macos/i386/sony_dump new file mode 100755 index 0000000..2f187e6 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/sony_dump differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/tail b/Final_Zip/AIK/OFRP-R/bin/macos/i386/tail new file mode 100755 index 0000000..99ee578 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/tail differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/truncate b/Final_Zip/AIK/OFRP-R/bin/macos/i386/truncate new file mode 100755 index 0000000..26bf16b Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/truncate differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/unpackbootimg b/Final_Zip/AIK/OFRP-R/bin/macos/i386/unpackbootimg new file mode 100755 index 0000000..e92b74e Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/unpackbootimg differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/unpackelf b/Final_Zip/AIK/OFRP-R/bin/macos/i386/unpackelf new file mode 100755 index 0000000..4ea11d0 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/unpackelf differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/i386/xz b/Final_Zip/AIK/OFRP-R/bin/macos/i386/xz new file mode 100755 index 0000000..b501c14 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/i386/xz differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/blobpack b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/blobpack new file mode 100755 index 0000000..816fcf2 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/blobpack differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/blobunpack b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/blobunpack new file mode 100755 index 0000000..9241057 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/cpio b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/cpio new file mode 100755 index 0000000..991c5a8 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/cpio differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/dd b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/dd new file mode 100755 index 0000000..e927886 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/dd differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/dhtbsign b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/dhtbsign new file mode 100755 index 0000000..162fa88 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/dumpimage b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/dumpimage new file mode 100755 index 0000000..473538b Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/elftool b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/elftool new file mode 100755 index 0000000..0185019 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/elftool differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/file b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/file new file mode 100755 index 0000000..0b9f24c Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/file differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/futility b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/futility new file mode 100755 index 0000000..a28db4d Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/futility differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/libiconv.2.dylib b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/libiconv.2.dylib new file mode 100755 index 0000000..8f56eed Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/libintl.8.dylib b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/libintl.8.dylib new file mode 100755 index 0000000..f270e89 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/libintl.8.dylib differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/liblzma.5.dylib b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/liblzma.5.dylib new file mode 100755 index 0000000..39c6b96 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/liblzo2.2.dylib b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/liblzo2.2.dylib new file mode 100755 index 0000000..a05b7eb Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/libmagic.1.dylib b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/libmagic.1.dylib new file mode 100755 index 0000000..29ad687 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/loki_tool b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/loki_tool new file mode 100755 index 0000000..1b9f062 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/lz4 b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/lz4 new file mode 100755 index 0000000..bcee28d Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/lz4 differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/lzop b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/lzop new file mode 100755 index 0000000..8be71f4 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/lzop differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/mboot b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/mboot new file mode 100755 index 0000000..ad67219 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/mboot differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/mkbootimg b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/mkbootimg new file mode 100755 index 0000000..137aef2 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/mkimage b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/mkimage new file mode 100755 index 0000000..61d5a9c Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/mkimage differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/mkmtkhdr b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/mkmtkhdr new file mode 100755 index 0000000..99949d5 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/pxa-mkbootimg b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..0ec79a3 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..03fc864 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/rkcrc b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/rkcrc new file mode 100755 index 0000000..9b0b94a Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/sony_dump b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/sony_dump new file mode 100755 index 0000000..e219101 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/tail b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/tail new file mode 100755 index 0000000..59692eb Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/tail differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/truncate b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/truncate new file mode 100755 index 0000000..f2ed631 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/truncate differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/unpackbootimg b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/unpackbootimg new file mode 100755 index 0000000..a717c48 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/unpackelf b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/unpackelf new file mode 100755 index 0000000..d6edefa Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/xz b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/xz new file mode 100755 index 0000000..6faedc7 Binary files /dev/null and b/Final_Zip/AIK/OFRP-R/bin/macos/x86_64/xz differ diff --git a/Final_Zip/AIK/OFRP-R/bin/magic b/Final_Zip/AIK/OFRP-R/bin/magic new file mode 100755 index 0000000..4530761 --- /dev/null +++ b/Final_Zip/AIK/OFRP-R/bin/magic @@ -0,0 +1,1916 @@ +#------------------------------------------------------------------------------ +# Slimmed down magic file for archives only +#------------------------------------------------------------------------------ +# $File: archive,v 1.145 2021/01/03 20:58:47 christos Exp $ +# archive: file(1) magic for archive formats (see also "msdos" for self- +# extracting compressed archives) +# +# cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc. +# pre-POSIX "tar" archives are also handled in the C code ../../src/is_tar.c. + +# POSIX tar archives +# URL: https://en.wikipedia.org/wiki/Tar_(computing) +# Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current +# header mainly padded with nul bytes +500 quad 0 +!:strength /2 +# filename or extended attribute printable strings in range space null til umlaut ue +>0 ubeshort >0x1F00 +>>0 ubeshort <0xFCFD +# last 4 header bytes often null but tar\0 in gtarfail2.tar gtarfail.tar-bad +# at https://sourceforge.net/projects/s-tar/files/testscripts/ +>>>508 ubelong&0x8B9E8DFF 0 +# nul, space or ascii digit 0-7 at start of mode +>>>>100 ubyte&0xC8 =0 +>>>>>101 ubyte&0xC8 =0 +# nul, space at end of check sum +>>>>>>155 ubyte&0xDF =0 +# space or ascii digit 0 at start of check sum +>>>>>>>148 ubyte&0xEF =0x20 +# minimal check and then display tar archive information which can also be +# embedded inside others like Android Backup, Clam AntiVirus database +>257 string !ustar +# header padded with nuls +>>257 ulong =0 +# GNU tar version 1.29 with non pax format option without refusing +# creates misleading V7 header for Long path, Multi-volume, Volume type +>>>156 ubyte 0x4c GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x4d GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x56 GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 default x tar archive (V7) +!:mime application/x-tar +#!:ext tar +# other stuff in padding +# some implementations add new fields to the blank area at the end of the header record +# created for example by DOS TAR 3.20g 1994 Tim V.Shapore with -j option +>>257 ulong !0 tar archive (old) +!:mime application/x-tar +#!:ext tar +# magic in newer, GNU, posix variants +>257 string =ustar +# 2 last char of magic and UStar version because string expression does not work +# 2 space characters followed by a null for GNU variant +>>261 ubelong =0x72202000 POSIX tar archive (GNU) +!:mime application/x-gtar +#!:ext tar/gtar +# UStar version with ASCII "00" +>>261 ubelong 0x72003030 POSIX +# gLOBAL and ExTENSION type only found in POSIX.1-2001 format +>>>156 ubyte 0x67 \b.1-2001 +>>>156 ubyte 0x78 \b.1-2001 +>>>156 ubyte x tar archive +!:mime application/x-ustar +#!:ext tar/ustar +# version with 2 binary nuls embedded in Android Backup like com.android.settings.ab +>>261 ubelong 0x72000000 tar archive (ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# not seen ustar variant with garbish version +>>261 default x tar archive (unknown ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# type flag of 1st tar archive member +#>156 ubyte x \b, %c-type +>156 ubyte x +>>156 ubyte 0 \b, file +>>156 ubyte 0x30 \b, file +>>156 ubyte 0x31 \b, hard link +>>156 ubyte 0x32 \b, symlink +>>156 ubyte 0x33 \b, char device +>>156 ubyte 0x34 \b, block device +>>156 ubyte 0x35 \b, directory +>>156 ubyte 0x36 \b, fifo +>>156 ubyte 0x37 \b, reserved +>>156 ubyte 0x4c \b, long path +>>156 ubyte 0x4d \b, multi volume +>>156 ubyte 0x56 \b, volume +>>156 ubyte 0x67 \b, global +>>156 ubyte 0x78 \b, extension +>>156 default x \b, type +>>>156 ubyte x '%c' +# name[100] +>0 string >\0 %-.60s +# mode mainly stored as an octal number in ASCII null or space terminated +>100 string >\0 \b, mode %-.7s +# user id mainly as octal numbers in ASCII null or space terminated +>108 string >\0 \b, uid %-.7s +# group id mainly as octal numbers in ASCII null or space terminated +>116 string >\0 \b, gid %-.7s +# size mainly as octal number in ASCII +>124 ubyte <0x38 +>>124 string >\0 \b, size %-.12s +# coding indicated by setting the high-order bit of the leftmost byte +>124 ubyte >0xEF \b, size 0x +>>124 ubyte !0xff \b%2.2x +>>125 ubyte !0xff \b%2.2x +>>126 ubyte !0xff \b%2.2x +>>127 ubyte !0xff \b%2.2x +>>128 ubyte !0xff \b%2.2x +>>129 ubyte !0xff \b%2.2x +>>130 ubyte !0xff \b%2.2x +>>131 ubyte !0xff \b%2.2x +>>132 ubyte !0xff \b%2.2x +>>133 ubyte !0xff \b%2.2x +>>134 ubyte !0xff \b%2.2x +>>135 ubyte !0xff \b%2.2x +# seconds since 0:0:0 1 jan 1970 UTC as octal number mainly in ASCII null or space terminated +>136 string >\0 \b, seconds %-.11s +# header checksum stored as an octal number in ASCII null or space terminated +#>148 string x \b, cksum %.7s +# linkname[100] +>157 string >\0 \b, linkname %-.40s +# additional fields for ustar +>257 string =ustar +# owner user name null terminated +>>265 string >\0 \b, user %-.32s +# group name null terminated +>>297 string >\0 \b, group %-.32s +# device major minor if not zero +>>329 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>329 string x \b, devmaj %-.7s +>>337 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>337 string x \b, devmin %-.7s +# prefix[155] +>>345 string >\0 \b, prefix %-.155s +# old non ustar/POSIX tar +>257 string !ustar +>>508 string =tar\0 +# padding[255] in old star +>>>257 string >\0 \b, padding: %-.40s +>>508 default x +# padding[255] in old tar sometimes comment field +>>>257 string >\0 \b, comment: %-.40s + +# Incremental snapshot gnu-tar format from: +# https://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html +0 string GNU\ tar- GNU tar incremental snapshot data +>&0 regex [0-9]\.[0-9]+-[0-9]+ version %s + +# cpio archives +# +# Yes, the top two "cpio archive" formats *are* supposed to just be "short". +# The idea is to indicate archives produced on machines with the same +# byte order as the machine running "file" with "cpio archive", and +# to indicate archives produced on machines with the opposite byte order +# from the machine running "file" with "cpio byte-swapped archive". +# +# The SVR4 "cpio(4)" hints that there are additional formats, but they +# are defined as "short"s; I think all the new formats are +# character-header formats and thus are strings, not numbers. +0 short 070707 cpio archive +!:mime application/x-cpio +0 short 0143561 cpio byte-swapped archive +!:mime application/x-cpio # encoding: swapped +0 string 070707 cpio ASCII archive (pre-SVR4 or odc) +0 string 070701 cpio ASCII archive (SVR4 with no CRC) +0 string 070702 cpio ASCII archive (SVR4 with CRC) + +# +# Various archive formats used by various versions of the "ar" +# command. +# + +# +# Original UNIX archive formats. +# They were written with binary values in host byte order, and +# the magic number was a host "int", which might have been 16 bits +# or 32 bits. We don't say "PDP-11" or "VAX", as there might have +# been ports to little-endian 16-bit-int or 32-bit-int platforms +# (x86?) using some of those formats; if none existed, feel free +# to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian +# 32-bit. There might have been big-endian ports of that sort as +# well. +# +0 leshort 0177555 very old 16-bit-int little-endian archive +0 beshort 0177555 very old 16-bit-int big-endian archive +0 lelong 0177555 very old 32-bit-int little-endian archive +0 belong 0177555 very old 32-bit-int big-endian archive + +0 leshort 0177545 old 16-bit-int little-endian archive +>2 string __.SYMDEF random library +0 beshort 0177545 old 16-bit-int big-endian archive +>2 string __.SYMDEF random library +0 lelong 0177545 old 32-bit-int little-endian archive +>4 string __.SYMDEF random library +0 belong 0177545 old 32-bit-int big-endian archive +>4 string __.SYMDEF random library + +# +# From "pdp" (but why a 4-byte quantity?) +# +0 lelong 0x39bed PDP-11 old archive +0 lelong 0x39bee PDP-11 4.0 archive + +# +# XXX - what flavor of APL used this, and was it a variant of +# some ar archive format? It's similar to, but not the same +# as, the APL workspace magic numbers in pdp. +# +0 long 0100554 apl workspace + +# +# System V Release 1 portable(?) archive format. +# +0 string = System V Release 1 ar archive +!:mime application/x-archive + +# +# Debian package; it's in the portable archive format, and needs to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "debian". +# +# Update: Joerg Jenderek +# URL: https://en.wikipedia.org/wiki/Deb_(file_format) +0 string =!\ndebian +# https://manpages.debian.org/testing/dpkg/dpkg-split.1.en.html +>14 string -split part of multipart Debian package +!:mime application/vnd.debian.binary-package +# udeb is used for stripped down deb file +#!:ext deb/udeb +>14 string -binary Debian binary package +!:mime application/vnd.debian.binary-package +# For ipk packager see also https://en.wikipedia.org/wiki/Opkg +#!:ext deb/udeb/ipk +# This should not happen +>14 default x Unknown Debian package +# NL terminated version; for most Debian cases this is 2.0 or 2.1 for split +>68 string >\0 (format %s) +#>68 string !2.0\n +#>>68 string x (format %.3s) +>68 string =2.0\n +# 2nd archive name=control archive name like control.tar.gz or control.tar.xz +>>72 string >\0 \b, with %.14s +# look for 3rd archive name=data archive name like data.tar.{gz,xz,bz2,lzma} +>>0 search/0x93e4f data.tar. \b, data compression +# the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised +# for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb +>>>&0 string x %.2s +# skip space (0x20 BSD) and slash (0x2f System V) character marking end of name +>>>&2 ubyte !0x20 +>>>>&-1 ubyte !0x2f +# display 3rd character of file name extension like 2 of bz2 or m of lzma +>>>>>&-1 ubyte x \b%c +>>>>>>&0 ubyte !0x20 +>>>>>>>&-1 ubyte !0x2f +# display 4th character of file name extension like a of lzma +>>>>>>>>&-1 ubyte x \b%c +# split debian package case +>68 string =2.1\n +# dpkg-1.18.25/dpkg-split/info.c +# NL terminated ASCII package name like ckermit +>>&0 string x \b, %s +# NL terminated package version like 302-5.3 +>>>&1 string x %s +# NL terminated MD5 checksum +>>>>&1 string x \b, MD5 %s +# NL terminated original package length +>>>>>&1 string x \b, unsplitted size %s +# NL terminated part length +>>>>>>&1 string x \b, part length %s +# NL terminated package part like n/m +>>>>>>>&1 string x \b, part %s +# NL terminated package architecture like armhf since dpkg 1.16.1 or later +>>>>>>>>&1 string x \b, %s + +# +# MIPS archive; they're in the portable archive format, and need to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "__________E". +# +0 string =!\n__________E MIPS archive +!:mime application/x-archive +>20 string U with MIPS Ucode members +>21 string L with MIPSEL members +>21 string B with MIPSEB members +>19 string L and an EL hash table +>19 string B and an EB hash table +>22 string X -- out of date + +# +# BSD/SVR2-and-later portable archive formats. +# +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/AR +# Reference: https://www.unix.com/man-page/opensolaris/3HEAD/ar.h/ +# Note: Mach-O universal binary in ./cafebabe is dependent +# TODO: unify current ar archive, MIPS archive, Debian package +# distinguish BSD, SVR; 32, 64 bit; HP from other 32-bit SVR; +# *.ar packages from *.a libraries. handle empty archive +0 string =!\n current ar archive +# print first and possibly second ar_name[16] for debugging purpose +#>8 string x \b, 1st "%.16s" +#>68 string x \b, 2nd "%.16s" +!:mime application/x-archive +# a in most case for libraries; lib for Microsoft libraries; ar else cases +#!:ext a/lib/ar +>8 string __.SYMDEF random library +# first member with long marked name __.SYMDEF SORTED implies BSD library +>68 string __.SYMDEF\ SORTED random library +# Reference: https://parisc.wiki.kernel.org/images-parisc/b/b2/Rad_11_0_32.pdf +# "archive file" entry moved from ./hp +# LST header system_id 0210h~PA-RISC 1.1,... identifies the target architecture +# LST header a_magic 0619h~relocatable library +>68 belong 0x020b0619 - PA-RISC1.0 relocatable library +>68 belong 0x02100619 - PA-RISC1.1 relocatable library +>68 belong 0x02110619 - PA-RISC1.2 relocatable library +>68 belong 0x02140619 - PA-RISC2.0 relocatable library +#EOF for common ar archives + +# +# "Thin" archive, as can be produced by GNU ar. +# +0 string =!\n thin archive with +>68 belong 0 no symbol entries +>68 belong 1 %d symbol entry +>68 belong >1 %d symbol entries + +0 search/1 -h- Software Tools format archive text + +# ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com) +# +# The first byte is the magic (0x1a), byte 2 is the compression type for +# the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS +# filename of the first file (null terminated). Since some types collide +# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%), +# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo. +0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000031a ARC archive data, packed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched +!:mime application/x-arc +# [JW] stuff taken from idarc, obviously ARC successors: +0 lelong&0x8080ffff 0x00000a1a PAK archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000141a ARC+ archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000481a HYP archive data +!:mime application/x-arc + +# Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk) +# I can't create either SPARK or ArcFS archives so I have not tested this stuff +# [GRR: the original entries collide with ARC, above; replaced with combined +# version (not tested)] +#0 byte 0x1a RISC OS archive (spark format) +0 string \032archive RISC OS archive (ArcFS format) +0 string Archive\000 RISC OS archive (ArcFS format) + +# All these were taken from idarc, many could not be verified. Unfortunately, +# there were many low-quality sigs, i.e. easy to trigger false positives. +# Please notify me of any real-world fishy/ambiguous signatures and I'll try +# to get my hands on the actual archiver and see if I find something better. [JW] +# probably many can be enhanced by finding some 0-byte or control char near the start + +# idarc calls this Crush/Uncompressed... *shrug* +0 string CRUSH Crush archive data +# Squeeze It (.sqz) +0 string HLSQZ Squeeze It archive data +# SQWEZ +0 string SQWEZ SQWEZ archive data +# HPack (.hpk) +0 string HPAK HPack archive data +# HAP +0 string \x91\x33HF HAP archive data +# MD/MDCD +0 string MDmd MDCD archive data +# LIM +0 string LIM\x1a LIM archive data +# SAR +3 string LH5 SAR archive data +# BSArc/BS2 +0 string \212\3SB\020\0 BSArc/BS2 archive data +# Bethesda Softworks Archive (Oblivion) +0 string BSA\0 BSArc archive data +>4 lelong x version %d +# MAR +2 string =-ah MAR archive data +# ACB +#0 belong&0x00f800ff 0x00800000 ACB archive data +# CPZ +# TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data +# JRC +0 string JRchive JRC archive data +# Quantum +0 string DS\0 Quantum archive data +# ReSOF +0 string PK\3\6 ReSOF archive data +# QuArk +0 string 7\4 QuArk archive data +# YAC +14 string YC YAC archive data +# X1 +0 string X1 X1 archive data +0 string XhDr X1 archive data +# CDC Codec (.dqt) +0 belong&0xffffe000 0x76ff2000 CDC Codec archive data +# AMGC +0 string \xad6" AMGC archive data +# NuLIB +0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data +# PakLeo +0 string LEOLZW PAKLeo archive data +# ChArc +0 string SChF ChArc archive data +# PSA +0 string PSA PSA archive data +# CrossePAC +0 string DSIGDCC CrossePAC archive data +# Freeze +0 string \x1f\x9f\x4a\x10\x0a Freeze archive data +# KBoom +0 string \xc2\xa8MP\xc2\xa8 KBoom archive data +# NSQ, must go after CDC Codec +0 string \x76\xff NSQ archive data +# DPA +0 string Dirk\ Paehl DPA archive data +# BA +# TODO: idarc says "bytes 0-2 == bytes 3-5" +# TTComp +# URL: http://fileformats.archiveteam.org/wiki/TTComp_archive +# Update: Joerg Jenderek +# GRR: line below is too general as it matches also Panorama database "TCDB 2003-10 demo.pan", others +0 string \0\6 +# look for first keyword of Panorama database *.pan +>12 search/261 DESIGN +# skip keyword with low entropy +>12 default x TTComp archive, binary, 4K dictionary +# (version 5.25) labeled the above entry as "TTComp archive data" +# From: Joerg Jenderek +# URL: https://wiki.68kmla.org/DiskCopy_4.2_format_specification +# reference: http://nulib.com/library/FTN.e00005.htm +0x52 ubeshort 0x0100 +# test for disk image size equal or above 400k +>0x40 ubelong >409599 +# test also for disk image size equal or below 1440k to skip +# windows7en.mbr UNICODE.DAT +>>0x40 ubelong <1474561 +# To skip Flags$StringJoiner.class with size 00106A61h test also for only 4 disk image sizes +# 00064000 for 400k GCR disks +# 000c8000 for 800k GCR disks +# 000b4000 for 720k MFM disks +# 00168000 for 1440k MFM disks +>>>0x40 ubelong&0xffE03fFF 0 +# display information of Apple DiskCopy 4.2 floppy image +# image pascal name padded with NULs like Microsoft Mail +>00 pstring/B x Apple DiskCopy 4.2 image %s +#!:mime application/octet-stream +!:mime application/x-dc42-floppy-image +!:apple dCpydImg +#!:ext image/dc42 +# data size in bytes like 409600 +>0x40 ubelong x \b, %u bytes +# for debugging purpose size in hexadecimal +#>0x40 ubelong x (0x%8.8x) +# tag size in bytes +>0x44 ubelong >0 \b, 0x%x tag size +# data checksum +#>0x48 ubelong x \b, 0x%x checksum +# tag checksum +#>0x4c ubelong x \b, 0x%x tag checksum +# disk encoding +>0x50 ubyte 0 \b, GCR CLV ssdd (400k) +>0x50 ubyte 1 \b, GCR CLV dsdd (800k) +>0x50 ubyte 2 \b, MFM CAV dsdd (720k) +>0x50 ubyte 3 \b, MFM CAV dshd (1440k) +>0x50 ubyte >3 \b, 0x%x encoding +# format byte +>0x51 ubyte x \b, 0x%x format +#>0x54 ubequad x \b, data 0x%16.16llx +# ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation? +0 string ESP ESP archive data +# ZPack +0 string \1ZPK\1 ZPack archive data +# Sky +0 string \xbc\x40 Sky archive data +# UFA +0 string UFA UFA archive data +# Dry +0 string =-H2O DRY archive data +# FoxSQZ +0 string FOXSQZ FoxSQZ archive data +# AR7 +0 string ,AR7 AR7 archive data +# PPMZ +0 string PPMZ PPMZ archive data +# MS Compress +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/MS-DOS_installation_compression +# Reference: https://hwiegman.home.xs4all.nl/fileformats/compress/szdd_kwaj_format.html +# Note: use correct version of extracting tool like EXPAND, UNPACK, DECOMP or 7Z +4 string \x88\xf0\x27 +# KWAJ variant +>0 string KWAJ MS Compress archive data, KWAJ variant +!:mime application/x-ms-compress-kwaj +# extension not working in version 5.32 +# magic/Magdir/archive, 284: Warning: EXTENSION type ` ??_' has bad char '?' +# file: line 284: Bad magic entry ' ??_' +#!:ext ??_ +# compression method (0-4) +>>8 uleshort x \b, %u method +# offset of compressed data +>>10 uleshort x \b, 0x%x offset +#>>(10.s) uleshort x +#>>>&-6 string x \b, TEST extension %-.3s +# header flags to mark header extensions +>>12 uleshort >0 \b, 0x%x flags +# 4 bytes: decompressed length of file +>>12 uleshort &0x01 +>>>14 ulelong x \b, original size: %u bytes +# 2 bytes: unknown purpose +# 2 bytes: length of unknown data + mentioned bytes +# 1-9 bytes: null-terminated file name +# 1-4 bytes: null-terminated file extension +>>12 uleshort &0x08 +>>>12 uleshort ^0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>>&16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>&16 string x %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>12 uleshort &0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +# 2 bytes: length of data + mentioned bytes +# +# SZDD variant Haruhiko Okumura's LZSS or 7z type MsLZ +>0 string SZDD MS Compress archive data, SZDD variant +!:mime application/x-ms-compress-szdd +#!:ext ??_ +# The character missing from the end of the filename (0=unknown) +>>9 string >\0 \b, %-.1s is last character of original name +# https://www.betaarchive.com/forum/viewtopic.php?t=26161 +# Compression mode: "A" (0x41) found but sometimes "B" in Windows 3.1 builds 026 and 034e +>>8 string !A \b, %-.1s method +>>10 ulelong >0 \b, original size: %u bytes +# QBasic SZDD variant +3 string \x88\xf0\x27 +>0 string SZ\x20 MS Compress archive data, QBasic variant +!:mime application/x-ms-compress-sz +#!:ext ??$ +>>8 ulelong >0 \b, original size: %u bytes + +# MP3 (archiver, not lossy audio compression) +0 string MP3\x1a MP3-Archiver archive data +# ZET +0 string OZ\xc3\x9d ZET archive data +# TSComp +0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data +# ARQ +0 string gW\4\1 ARQ archive data +# Squash +3 string OctSqu Squash archive data +# Terse +0 string \5\1\1\0 Terse archive data +# PUCrunch +0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data +# UHarc +0 string UHA UHarc archive data +# ABComp +0 string \2AB ABComp archive data +0 string \3AB2 ABComp archive data +# CMP +0 string CO\0 CMP archive data +# Splint +0 string \x93\xb9\x06 Splint archive data +# InstallShield +0 string \x13\x5d\x65\x8c InstallShield Z archive Data +# Gather +1 string GTH Gather archive data +# BOA +0 string BOA BOA archive data +# RAX +0 string ULEB\xa RAX archive data +# Xtreme +0 string ULEB\0 Xtreme archive data +# Pack Magic +0 string @\xc3\xa2\1\0 Pack Magic archive data +# BTS +0 belong&0xfeffffff 0x1a034465 BTS archive data +# ELI 5750 +0 string Ora\ ELI 5750 archive data +# QFC +0 string \x1aFC\x1a QFC archive data +0 string \x1aQF\x1a QFC archive data +# PRO-PACK +0 string RNC PRO-PACK archive data +# 777 +0 string 777 777 archive data +# LZS221 +0 string sTaC LZS221 archive data +# HPA +0 string HPA HPA archive data +# Arhangel +0 string LG Arhangel archive data +# EXP1, uses bzip2 +0 string 0123456789012345BZh EXP1 archive data +# IMP +0 string IMP\xa IMP archive data +# NRV +0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data +# Squish +0 string \x73\xb2\x90\xf4 Squish archive data +# Par +0 string PHILIPP Par archive data +0 string PAR Par archive data +# HIT +0 string UB HIT archive data +# SBX +0 belong&0xfffff000 0x53423000 SBX archive data +# NaShrink +0 string NSK NaShrink archive data +# SAPCAR +0 string #\ CAR\ archive\ header SAPCAR archive data +0 string CAR\ 2.00RG SAPCAR archive data +# Disintegrator +0 string DST Disintegrator archive data +# ASD +0 string ASD ASD archive data +# InstallShield CAB +0 string ISc( InstallShield CAB +# TOP4 +0 string T4\x1a TOP4 archive data +# BatComp left out: sig looks like COM executable +# so TODO: get real 4dos batcomp file and find sig +# BlakHole +0 string BH\5\7 BlakHole archive data +# BIX +0 string BIX0 BIX archive data +# ChiefLZA +0 string ChfLZ ChiefLZA archive data +# Blink +0 string Blink Blink archive data +# Logitech Compress +0 string \xda\xfa Logitech Compress archive data +# ARS-Sfx (FIXME: really a SFX? then goto COM/EXE) +1 string (C)\ STEPANYUK ARS-Sfx archive data +# AKT/AKT32 +0 string AKT32 AKT32 archive data +0 string AKT AKT archive data +# NPack +0 string MSTSM NPack archive data +# PFT +0 string \0\x50\0\x14 PFT archive data +# SemOne +0 string SEM SemOne archive data +# PPMD +0 string \x8f\xaf\xac\x84 PPMD archive data +# FIZ +0 string FIZ FIZ archive data +# MSXiE +0 belong&0xfffff0f0 0x4d530000 MSXiE archive data +# DeepFreezer +0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data +# DC +0 string =2 string \x2\x4 Xpack DiskImage archive data +#!:ext xdi +# XPack Data +# *.xpa updated by Joerg Jenderek Sep 2015 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/ +0 string xpa XPA +#!:ext xpa +# XPA32 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/xpa32.zip +# created by XPA32.EXE version 1.0.2 for Windows +>0 string xpa\0\1 \b32 archive data +# created by XPACK.COM version 1.67m or 1.67r with short 0x1800 +>3 ubeshort !0x0001 \bck archive data +# XPack Single Data +# changed by Joerg Jenderek Sep 2015 back to like in version 5.12 +# letter 'I'+ acute accent is equivalent to \xcd +0 string \xcd\ jm Xpack single archive data +#!:mime application/x-xpa-compressed +#!:ext xpa + +# TODO: missing due to unknown magic/magic at end of file: +#DWC +#ARG +#ZAR +#PC/3270 +#InstallIt +#RKive +#RK +#XPack Diskimage + +# These were inspired by idarc, but actually verified +# Dzip archiver (.dz) +# Update: Joerg Jenderek +# URL: http://speeddemosarchive.com/dzip/ +# reference: http://speeddemosarchive.com/dzip/dz29src.zip/main.c +# GRR: line below is too general as it matches also ASCII texts like Doszip commander help dz.txt +0 string DZ +# latest version is 2.9 dated 7 may 2003 +>2 byte <4 Dzip archive data +!:mime application/x-dzip +#!:ext dz +>>2 byte x \b, version %i +>>3 byte x \b.%i +>>4 ulelong x \b, offset 0x%x +>>8 ulelong x \b, %u files +# ZZip archiver (.zz) +0 string ZZ\ \0\0 ZZip archive data +0 string ZZ0 ZZip archive data +# PAQ archiver (.paq) +0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data +0 string PAQ PAQ archive data +>3 byte&0xf0 0x30 +>>3 byte x (v%c) +# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP) +0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data +0 string JARCS JAR (ARJ Software, Inc.) archive data + +# ARJ archiver (jason@jarthur.Claremont.EDU) +0 leshort 0xea60 ARJ archive data +!:mime application/x-arj +>5 byte x \b, v%d, +>8 byte &0x04 multi-volume, +>8 byte &0x10 slash-switched, +>8 byte &0x20 backup, +>34 string x original name: %s, +>7 byte 0 os: MS-DOS +>7 byte 1 os: PRIMOS +>7 byte 2 os: Unix +>7 byte 3 os: Amiga +>7 byte 4 os: Macintosh +>7 byte 5 os: OS/2 +>7 byte 6 os: Apple ][ GS +>7 byte 7 os: Atari ST +>7 byte 8 os: NeXT +>7 byte 9 os: VAX/VMS +>3 byte >0 %d] +# [JW] idarc says this is also possible +2 leshort 0xea60 ARJ archive data + +# HA archiver (Greg Roelofs, newt@uchicago.edu) +# This is a really bad format. A file containing HAWAII will match this... +#0 string HA HA archive data, +#>2 leshort =1 1 file, +#>2 leshort >1 %hu files, +#>4 byte&0x0f =0 first is type CPY +#>4 byte&0x0f =1 first is type ASC +#>4 byte&0x0f =2 first is type HSC +#>4 byte&0x0f =0x0e first is type DIR +#>4 byte&0x0f =0x0f first is type SPECIAL +# suggestion: at least identify small archives (<1024 files) +0 belong&0xffff00fc 0x48410000 HA archive data +>2 leshort =1 1 file, +>2 leshort >1 %u files, +>4 byte&0x0f =0 first is type CPY +>4 byte&0x0f =1 first is type ASC +>4 byte&0x0f =2 first is type HSC +>4 byte&0x0f =0x0e first is type DIR +>4 byte&0x0f =0x0f first is type SPECIAL + +# HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz) +0 string HPAK HPACK archive data + +# JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net +0 string \351,\001JAM\ JAM archive, +>7 string >\0 version %.4s +>0x26 byte =0x27 - +>>0x2b string >\0 label %.11s, +>>0x27 lelong x serial %08x, +>>0x36 string >\0 fstype %.8s + +# Very old RAR archive +# https://jasonblanks.com/wp-includes/images/papers/KnowyourarchiveRAR.pdf +0 string RE\x7e\x5e RAR archive data (26 string \x8\0\0\0mimetypeapplication/ + +# KOffice / OpenOffice & StarOffice / OpenDocument formats +# From: Abel Cheung + +# KOffice (1.2 or above) formats +# (mimetype contains "application/vnd.kde.") +>>50 string vnd.kde. KOffice (>=1.2) +>>>58 string karbon Karbon document +>>>58 string kchart KChart document +>>>58 string kformula KFormula document +>>>58 string kivio Kivio document +>>>58 string kontour Kontour document +>>>58 string kpresenter KPresenter document +>>>58 string kspread KSpread document +>>>58 string kword KWord document + +# OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) +# (mimetype contains "application/vnd.sun.xml.") +# URL: https://en.wikipedia.org/wiki/OpenOffice.org_XML +# reference: http://fileformats.archiveteam.org/wiki/OpenOffice.org_XML +>>50 string vnd.sun.xml. OpenOffice.org 1.x +>>>62 string writer Writer +>>>>68 byte !0x2e document +!:mime application/vnd.sun.xml.writer +#!:ext sxw +>>>>68 string .template template +!:mime application/vnd.sun.xml.writer.template +#!:ext stw +>>>>68 string .web Web template +!:mime application/vnd.sun.xml.writer.web +#!:ext stw +>>>>68 string .global global document +!:mime application/vnd.sun.xml.writer.global +#!:ext sxg +>>>62 string calc Calc +>>>>66 byte !0x2e spreadsheet +!:mime application/vnd.sun.xml.calc +#!:ext sxc +>>>>66 string .template template +!:mime application/vnd.sun.xml.calc.template +#!:ext stc +>>>62 string draw Draw +>>>>66 byte !0x2e document +!:mime application/vnd.sun.xml.draw +#!:ext sxd +>>>>66 string .template template +!:mime application/vnd.sun.xml.draw.template +#!:ext std +>>>62 string impress Impress +>>>>69 byte !0x2e presentation +!:mime application/vnd.sun.xml.impress +#!:ext sxi +>>>>69 string .template template +!:mime application/vnd.sun.xml.impress.template +#!:ext sti +>>>62 string math Math document +!:mime application/vnd.sun.xml.math +#!:ext sxm +>>>62 string base Database file +!:mime application/vnd.sun.xml.base +#!:ext sdb + +# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) +# URL: http://fileformats.archiveteam.org/wiki/OpenDocument +# https://lists.oasis-open.org/archives/office/200505/msg00006.html +# (mimetype contains "application/vnd.oasis.opendocument.") +>>50 string vnd.oasis.opendocument. OpenDocument +>>>73 string text +>>>>77 byte !0x2d Text +!:mime application/vnd.oasis.opendocument.text +#!:ext odt +>>>>77 string -template Text Template +!:mime application/vnd.oasis.opendocument.text-template +#!:ext ott +>>>>77 string -web HTML Document Template +!:mime application/vnd.oasis.opendocument.text-web +#!:ext oth +>>>>77 string -master Master Document +!:mime application/vnd.oasis.opendocument.text-master +#!:ext odm +>>>73 string graphics +>>>>81 byte !0x2d Drawing +!:mime application/vnd.oasis.opendocument.graphics +#!:ext odg +>>>>81 string -template Drawing Template +!:mime application/vnd.oasis.opendocument.graphics-template +#!:ext otg +>>>73 string presentation +>>>>85 byte !0x2d Presentation +!:mime application/vnd.oasis.opendocument.presentation +#!:ext odp +>>>>85 string -template Presentation Template +!:mime application/vnd.oasis.opendocument.presentation-template +#!:ext otp +>>>73 string spreadsheet +>>>>84 byte !0x2d Spreadsheet +!:mime application/vnd.oasis.opendocument.spreadsheet +#!:ext ods +>>>>84 string -template Spreadsheet Template +!:mime application/vnd.oasis.opendocument.spreadsheet-template +#!:ext ots +>>>73 string chart +>>>>78 byte !0x2d Chart +!:mime application/vnd.oasis.opendocument.chart +#!:ext odc +>>>>78 string -template Chart Template +!:mime application/vnd.oasis.opendocument.chart-template +#!:ext otc +>>>73 string formula +>>>>80 byte !0x2d Formula +!:mime application/vnd.oasis.opendocument.formula +#!:ext odf +>>>>80 string -template Formula Template +!:mime application/vnd.oasis.opendocument.formula-template +#!:ext otf +# https://www.loc.gov/preservation/digital/formats/fdd/fdd000441.shtml +>>>73 string database Database +!:mime application/vnd.oasis.opendocument.database +#!:ext odb +# Valid for LibreOffice Base 6.0.1.1 at least +>>>73 string base Database +# https://bugs.documentfoundation.org/show_bug.cgi?id=45854 +!:mime application/vnd.oasis.opendocument.database +#!:mime application/vnd.oasis.opendocument.base +#!:ext odb +>>>73 string image +>>>>78 byte !0x2d Image +!:mime application/vnd.oasis.opendocument.image +#!:ext odi +>>>>78 string -template Image Template +!:mime application/vnd.oasis.opendocument.image-template +#!:ext oti + +# EPUB (OEBPS) books using OCF (OEBPS Container Format) +# https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. +# From: Ralf Brown +>>50 string epub+zip EPUB document +!:mime application/epub+zip + +# From: Joerg Jenderek +# URL: http://en.wikipedia.org/wiki/CorelDRAW +# NOTE: version; til 2 WL-based; from 3 til 13 by ./riff; from 14 zip based +>>50 string x-vnd.corel. Corel +>>>62 string draw.document+zip Draw drawing, version 14-16 +!:mime application/x-vnd.corel.draw.document+zip +#!:ext cdr +>>>62 string draw.template+zip Draw template, version 14-16 +!:mime application/x-vnd.corel.draw.template+zip +#!:ext cdrt +>>>62 string zcf.draw.document+zip Draw drawing, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.document+zip +#!:ext cdr +>>>62 string zcf.draw.template+zip Draw template, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.template+zip +#!:ext cdt/cdrt +# URL: http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html +>>>62 string zcf.pattern+zip Draw pattern, version 22 +!:mime application/x-vnd.corel.zcf.pattern+zip +#!:ext pat +# URL: https://en.wikipedia.org/wiki/Corel_Designer +# Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer +# Note: called by TrID "Corel DESIGN graphics" +>>>62 string designer.document+zip DESIGNER graphics, version 14-16 +!:mime application/x-vnd.corel.designer.document+zip +#!:ext des +>>>62 string zcf.designer.document+zip DESIGNER graphics, version 17-21 +!:mime application/x-vnd.corel.zcf.designer.document+zip +#!:ext des +# URL: http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/ +# CorelDRAW-Corel-Symbol-Library-CSL.html +>>>62 string symbol.library+zip Symbol Library, version 6-16.3 +!:mime application/x-vnd.corel.symbol.library+zip +#!:ext csl +>>>62 string zcf.symbol.library+zip Symbol Library, version 17-22 +!:mime application/x-vnd.corel.zcf.symbol.library+zip +#!:ext csl + +# Catch other ZIP-with-mimetype formats +# In a ZIP file, the bytes immediately after a member's contents are +# always "PK". The 2 regex rules here print the "mimetype" member's +# contents up to the first 'P'. Luckily, most MIME types don't contain +# any capital 'P's. This is a kludge. +# (mimetype contains "application/") +>>50 default x Zip data +>>>38 regex [!-OQ-~]+ (MIME type "%s"?) +!:mime application/zip +# (mimetype contents other than "application/*") +>26 string \x8\0\0\0mimetype +>>38 string !application/ +>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?) +!:mime application/zip + +# Java Jar files +>(26.s+30) leshort 0xcafe Java archive data (JAR) +!:mime application/java-archive + +# iOS App +>(26.s+30) leshort !0xcafe +>>26 string !\x8\0\0\0mimetype +>>>30 string Payload/ +>>>>38 search/64 .app/ iOS App +!:mime application/x-ios-app + +>30 search/100/b application/epub+zip EPUB document +!:mime application/epub+zip + +# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) +# Next line excludes specialized formats: +>(26.s+30) leshort !0xcafe +>>30 search/100/b !application/epub+zip +>>>26 string !\x8\0\0\0mimetype Zip archive data +!:mime application/zip +>>>>4 beshort x \b, at least +>>>>4 beshort x to extract +>>>>8 beshort x \b, compression method= +>>>>0x161 string WINZIP \b, WinZIP self-extracting + +# StarView Metafile +# From Pierre Ducroquet +0 string VCLMTF StarView MetaFile +>6 beshort x \b, version %d +>8 belong x \b, size %d + +# Zoo archiver +20 lelong 0xfdc4a7dc Zoo archive data +!:mime application/x-zoo +>4 byte >48 \b, v%c. +>>6 byte >47 \b%c +>>>7 byte >47 \b%c +>32 byte >0 \b, modify: v%d +>>33 byte x \b.%d+ +>42 lelong 0xfdc4a7dc \b, +>>70 byte >0 extract: v%d +>>>71 byte x \b.%d+ + +# Shell archives +10 string #\ This\ is\ a\ shell\ archive shell archive text +!:mime application/octet-stream + +# +# LBR. NB: May conflict with the questionable +# "binary Computer Graphics Metafile" format. +# +0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data +# +# From Rafael Laboissiere +# The Project Revision Control System (see +# http://prcs.sourceforge.net) generates a packaged project +# file which is recognized by the following entry: +0 leshort 0xeb81 PRCS packaged project + +# Microsoft cabinets +# by David Necas (Yeti) +#0 string MSCF\0\0\0\0 Microsoft cabinet file data, +#>25 byte x v%d +#>24 byte x \b.%d +# MPi: All CABs have version 1.3, so this is pointless. +# Better magic in debian-additions. + +# GTKtalog catalogs +# by David Necas (Yeti) +4 string gtktalog\ GTKtalog catalog data, +>13 string 3 version 3 +>>14 beshort 0x677a (gzipped) +>>14 beshort !0x677a (not gzipped) +>13 string >3 version %s + +############################################################################ +# Parity archive reconstruction file, the 'par' file format now used on Usenet. +0 string PAR\0 PARity archive data +>48 leshort =0 - Index file +>48 leshort >0 - file number %d + +# Felix von Leitner +0 string d8:announce BitTorrent file +!:mime application/x-bittorrent +# Durval Menezes, +0 string d13:announce-list BitTorrent file +!:mime application/x-bittorrent +0 string d7:comment BitTorrent file +!:mime application/x-bittorrent +0 string d4:info BitTorrent file +!:mime application/x-bittorrent + +# Atari MSA archive - Teemu Hukkanen +0 beshort 0x0e0f Atari MSA archive data +>2 beshort x \b, %d sectors per track +>4 beshort 0 \b, 1 sided +>4 beshort 1 \b, 2 sided +>6 beshort x \b, starting track: %d +>8 beshort x \b, ending track: %d + +# Alternate ZIP string (amc@arwen.cs.berkeley.edu) +0 string PK00PK\003\004 Zip archive data +!:mime application/zip +#!:ext zip/cbz + +# ACE archive (from http://www.wotsit.org/download.asp?f=ace) +# by Stefan `Sec` Zehl +7 string **ACE** ACE archive data +>15 byte >0 version %d +>16 byte =0x00 \b, from MS-DOS +>16 byte =0x01 \b, from OS/2 +>16 byte =0x02 \b, from Win/32 +>16 byte =0x03 \b, from Unix +>16 byte =0x04 \b, from MacOS +>16 byte =0x05 \b, from WinNT +>16 byte =0x06 \b, from Primos +>16 byte =0x07 \b, from AppleGS +>16 byte =0x08 \b, from Atari +>16 byte =0x09 \b, from Vax/VMS +>16 byte =0x0A \b, from Amiga +>16 byte =0x0B \b, from Next +>14 byte x \b, version %d to extract +>5 leshort &0x0080 \b, multiple volumes, +>>17 byte x \b (part %d), +>5 leshort &0x0002 \b, contains comment +>5 leshort &0x0200 \b, sfx +>5 leshort &0x0400 \b, small dictionary +>5 leshort &0x0800 \b, multi-volume +>5 leshort &0x1000 \b, contains AV-String +>>30 string \x16*UNREGISTERED\x20VERSION* (unregistered) +>5 leshort &0x2000 \b, with recovery record +>5 leshort &0x4000 \b, locked +>5 leshort &0x8000 \b, solid +# Date in MS-DOS format (whatever that is) +#>18 lelong x Created on + +# sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann +# +0x1A string sfArk sfArk compressed Soundfont +>0x15 string 2 +>>0x1 string >\0 Version %s +>>0x2A string >\0 : %s + +# DR-DOS 7.03 Packed File *.??_ +# Reference: http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm +# Note: unpacked by PNUNPACK.EXE +0 string Packed\ File\ +# by looking for Control-Z skip ASCII text starting with Packed File +>0x18 ubyte 0x1a Personal NetWare Packed File +!:mime application/x-novell-compress +#!:ext ??_ +>>12 string x \b, was "%.12s" +# 1 or 2 +#>>0x19 ubyte x \b, at 0x19 %u +>>0x1b ulelong x with %u bytes + +# EET archive +# From: Tilman Sauerbeck +0 belong 0x1ee7ff00 EET archive +!:mime application/x-eet + +# rzip archives +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +# From: Joerg Jenderek +# URL: https://help.foxitsoftware.com/kb/install-fzip-file.php +# reference: http://mark0.net/download/triddefs_xml.7z/ +# defs/f/fzip.trid.xml +# Note: unknown compression; No "PK" zip magic; normally in directory like +# "%APPDATA%\Foxit Software\Addon\Foxit Reader\Install" +0 ubequad 0x2506781901010000 Foxit add-on/update +!:mime application/x-fzip +#!:ext fzip + +# From: "Robert Dale" +0 belong 123 dar archive, +>4 belong x label "%.8x +>>8 belong x %.8x +>>>12 beshort x %.4x" +>14 byte 0x54 end slice +>14 beshort 0x4e4e multi-part +>14 beshort 0x4e53 multi-part, with -S + +# Symbian installation files +# https://www.thouky.co.uk/software/psifs/sis.html +# http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf +8 lelong 0x10000419 Symbian installation file +!:mime application/vnd.symbian.install +>4 lelong 0x1000006D (EPOC release 3/4/5) +>4 lelong 0x10003A12 (EPOC release 6) +0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x) +!:mime x-epoc/x-sisx-app + +# From "Nelson A. de Oliveira" +0 string MPQ\032 MoPaQ (MPQ) archive + +# From: "Nelson A. de Oliveira" +# .kgb +0 string KGB_arch KGB Archiver file +>10 string x with compression level %.1s + +# Type: Parity Archive +# From: Daniel van Eeden +0 string PAR2 Parity Archive Volume Set + +# Bacula volume format. (Volumes always start with a block header.) +# URL: https://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html +# From: Adam Buchbinder +12 string BB02 Bacula volume +>20 bedate x \b, started %s + +# ePub is XHTML + XML inside a ZIP archive. The first member of the +# archive must be an uncompressed file called 'mimetype' with contents +# 'application/epub+zip' + + +# From: "Michael Gorny" +# ZPAQ: http://mattmahoney.net/dc/zpaq.html +0 string zPQ ZPAQ stream +>3 byte x \b, level %d +# From: Barry Carter +# https://encode.ru/threads/456-zpaq-updates/page32 +0 string 7kSt ZPAQ file + +# BBeB ebook, unencrypted (LRF format) +# URL: https://www.sven.de/librie/Librie/LrfFormat +# From: Adam Buchbinder +0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted +>8 beshort x \b, version %d +>36 byte 1 \b, front-to-back +>36 byte 16 \b, back-to-front +>42 beshort x \b, (%dx, +>44 beshort x %d) + +# Symantec GHOST image by Joerg Jenderek at May 2014 +# https://us.norton.com/ghost/ +# https://www.garykessler.net/library/file_sigs.html +0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image +# *.GHO +>2 ubyte&0x08 0x00 \b, first file +# *.GHS or *.[0-9] with cns program option +>2 ubyte&0x08 0x08 \b, split file +# part of split index interesting for *.ghs +>>4 ubyte x id=0x%x +# compression tag minus one equals numeric compression command line switch z[1-9] +>3 ubyte 0 \b, no compression +>3 ubyte 2 \b, fast compression (Z1) +>3 ubyte 3 \b, medium compression (Z2) +>3 ubyte >3 +>>3 ubyte <11 \b, compression (Z%d-1) +>2 ubyte&0x08 0x00 +# ~ 30 byte password field only for *.gho +>>12 ubequad !0 \b, password protected +>>44 ubyte !1 +# 1~Image All, sector-by-sector only for *.gho +>>>10 ubyte 1 \b, sector copy +# 1~Image Boot track only for *.gho +>>>43 ubyte 1 \b, boot track +# 1~Image Disc only for *.gho implies Image Boot track and sector copy +>>44 ubyte 1 \b, disc sector copy +# optional image description only *.gho +>>0xff string >\0 "%-.254s" +# look for DOS sector end sequence +>0xE08 search/7776 \x55\xAA +>>&-512 indirect x \b; contains + +# Google Chrome extensions +# https://developer.chrome.com/extensions/crx +# https://developer.chrome.com/extensions/hosting +0 string Cr24 Google Chrome extension +!:mime application/x-chrome-extension +>4 ulong x \b, version %u + +# SeqBox - Sequenced container +# ext: sbx, seqbox +# Marco Pontello marcopon@gmail.com +# reference: https://github.com/MarcoPon/SeqBox +0 string SBx SeqBox, +>3 byte x version %d + +# LyNX archive +56 string USE\040LYNX\040TO\040DISSOLVE\040THIS\040FILE LyNX archive + +# From: Joerg Jenderek +# URL: https://www.acronis.com/ +# Reference: https://en.wikipedia.org/wiki/TIB_(file_format) +# Note: only tested with True Image 2013 Build 5962 and 2019 Build 14110 +0 ubequad 0xce24b9a220000000 Acronis True Image backup +!:mime application/x-acronis-tib +#!:ext tib +# 01000000 +#>20 ubelong x \b, at 20 0x%x +# 20000000 +#>28 ubelong x \b, at 28 0x%x +# strings like "Generic- SD/MMC 1.00" "Unknown Disk" "Msft Virtual Disk 1.0" +# ??? +# strings like "\Device\0000011e" "\Device\0000015a" +#>0 search/0x6852300/cs \\Device\\ +#>>&-1 pstring x \b, %s +# "\Device\HarddiskVolume30" "\Device\HarddiskVolume39" +#>>>&1 search/180/cs \\Device\\ +#>>>>&-1 pstring x \b, %s +#>>>>>&0 search/29/cs \0\0\xc8\0 +# disk label +#>>>>>>&10 lestring16 x \b, disk label %11.11s +#>>>>>>&9 plestring16 x \b, disk label "%11.11s" +#>>>>>>&10 ubequad x %16.16llx + + +# Gentoo XPAK binary package +# by Michal Gorny +# https://gitweb.gentoo.org/proj/portage.git/tree/man/xpak.5 +-4 string STOP +>-16 string XPAKSTOP Gentoo binary package (XPAK) + +# From: Joerg Jenderek +# URL: https://kodi.wiki/view/TexturePacker +# Reference: https://mirrors.kodi.tv/releases/source/17.3-Krypton.tar.gz +# /xbmc-Krypton/xbmc/guilib/XBTF.h +# /xbmc-Krypton/xbmc/guilib/XBTF.cpp +0 string XBTF +# skip ASCII text by looking for terminating \0 of path +>264 ubyte 0 XBMC texture package +!:mime application/x-xbmc-xbt +#!:ext xbt +# XBTF_VERSION 2 +>>4 string !2 \b, version %-.1s +# nofFiles /xbmc-Krypton/xbmc/guilib/XBTFReader.cpp +>>5 ulelong x \b, %u file +# plural s +>>5 ulelong >1 \bs +# path[CXBTFFile[MaximumPathLength=256] +>>9 string x \b, 1st %s + +# ALZIP archive +# by Hyungjun Park , Hajin Jang +# http://kippler.com/win/unalz/ +# https://salsa.debian.org/l10n-korean-team/unalz +0 string ALZ\001 ALZ archive data +#!:ext alz + +# https://cf-aldn.altools.co.kr/setup/EGG_Specification.zip +0 string EGGA EGG archive data, +#!:ext egg +>5 byte x version %u +>4 byte x \b.%u +>>0x0E ulelong =0x08E28222 +>>0x0E ulelong =0x24F5A262 \b, split +>>0x0E ulelong =0x24E5A060 \b, solid +>>0x0E default x \b, unknown + +# PAQ9A archive +# URL: http://mattmahoney.net/dc/#paq9a +# Note: Line 1186 of paq9a.cpp gives the magic bytes +0 string pQ9\001 PAQ9A archive + +#------------------------------------------------------------------------------ +# $File: compress,v 1.80 2021/03/15 17:49:24 christos Exp $ +# compress: file(1) magic for pure-compression formats (no archives) +# +# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. +# +# Formats for various forms of compressed data +# Formats for "compress" proper have been moved into "compress.c", +# because it tries to uncompress it to figure out what's inside. + +# standard unix compress +0 string \037\235 compress'd data +!:mime application/x-compress +!:apple LZIVZIVU +>2 byte&0x80 >0 block compressed +>2 byte&0x1f x %d bits + +# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver) +# URL: https://en.wikipedia.org/wiki/Gzip +# Reference: https://tools.ietf.org/html/rfc1952 +# Update: Joerg Jenderek, Apr 2019 +# Edited by Chris Chittleborough , March 2002 +# * Original filename is only at offset 10 if "extra field" absent +# * Produce shorter output - notably, only report compression methods +# other than 8 ("deflate", the only method defined in RFC 1952). +# Note: find defs -iname '*.trid.xml' -exec grep -q '1F8B08' {} \; -ls +# TODO: +# FBR Blueberry FlashBack screen Record https://www.flashbackrecorder.com/ +# KPR KOffice/Calligra KPresenter application/x-kpresenter +# KPT KOffice/Calligra KPresenter template? application/x-kpresenter +# SAV Diggles Saved Game File http://www.innonics.com +# SAV FarCry (demo) saved game http://www.farcry-thegame.com +# DAT ZOAGZIP game data format http://en.wikipedia.org/wiki/SD_Gundam_Capsule_Fighter +0 string \037\213 +# to display gzip compressed (strength=100=2*50) before other (strength=50)? +#!:strength * 2 +# no FNAME and FCOMMENT bit implies no file name/comment. That means only binary +>3 byte&0x18 =0 +# For binary gzipped no ASCII text should occur +# mcd-monu-cad.trid.xml +>>10 string MCD Monu-Cad Drawing, Component or Font +#>>36 string Created\ with\ MONU-CAD +#!:mime application/octet-stream +# http://fileformats.archiveteam.org/wiki/Monu-CAD +# http://www.monucad.com/downloads/FullDemo-2005.EXE +# /HANDS96.MCC Component +# /DEMO_DD01.MCD Drawing +# /MCALF020.FNT Font +#!:ext mcc/mcd/fnt +# http://www.generalcadd.com +>>10 string GXD General CADD, Drawing or Component +#!:mime application/octet-stream +# /gxc/BUILDINGEDGE.gxc Component +# /gxd/HOCKETT-STPAUL-WRHSE.gxd Drawing +# /gxd/POWERLAND-MILL-ADD-11.gxd Drawing v9.1.06 +#!:ext gxc/gxd +#>>>13 ubyte 0 \b, version 0 +>>>13 string 09 \b, version 9 +# other gzipped binary like gzipped tar, VirtualBox extension package,... +>>10 default x gzip compressed data +!:mime application/gzip +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# gzipped TAR or VirtualBox extension package +#!:mime application/x-compressed-tar +#!:mime application/x-virtualbox-vbox-extpack +# https://www.w3.org/TR/SVG/mimereg.html +#!:mime image/image/svg+xml-compressed +# zlib.3.gz +# microcode-20180312.tgz +# tpz same as tgz +# lua-md5_1.2-1_i386_i486.ipk https://en.wikipedia.org/wiki/Opkg +# Oracle_VM_VirtualBox_Extension_Pack-5.0.12-104815.vbox-extpack +#!:ext gz/tgz/tpz/ipk/vbox-extpack/svgz +# FNAME/FCOMMENT bit implies file name/comment as iso-8859-1 text +>3 byte&0x18 >0 gzip compressed data +!:mime application/gzip +# gzipped tar, gzipped Abiword document +#!:mime application/x-compressed-tar +#!:mime application/x-abiword-compressed +#!:mime image/image/svg+xml-compressed +# kleopatra_splashscreen.svgz gzipped .svg +#!:ext gz/tgz/tpz/zabw/svgz +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# display information of gzip compressed files +#>2 byte x THIS iS GZIP +>2 byte <8 \b, reserved method +>2 byte >8 \b, unknown method +>3 byte &0x01 \b, ASCII +>3 byte &0x02 \b, has CRC +>3 byte &0x04 \b, extra field +>3 byte&0xC =0x08 +>>10 string x \b, was "%s" +>3 byte &0x10 \b, has comment +>3 byte &0x20 \b, encrypted +>4 ledate >0 \b, last modified: %s +>8 byte 2 \b, max compression +>8 byte 4 \b, max speed +>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT) +>9 byte =0x01 \b, from Amiga +>9 byte =0x02 \b, from VMS +>9 byte =0x03 \b, from Unix +>9 byte =0x04 \b, from VM/CMS +>9 byte =0x05 \b, from Atari +>9 byte =0x06 \b, from HPFS filesystem (OS/2, NT) +>9 byte =0x07 \b, from MacOS +>9 byte =0x08 \b, from Z-System +>9 byte =0x09 \b, from CP/M +>9 byte =0x0A \b, from TOPS/20 +>9 byte =0x0B \b, from NTFS filesystem (NT) +>9 byte =0x0C \b, from QDOS +>9 byte =0x0D \b, from Acorn RISCOS +# size of the original (uncompressed) input data modulo 2^32 +#>-4 ulelong x \b, original size modulo 2^32 %u +#ERROR: line 114: non zero offset 1048572 at level 1 + +# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis +0 string \037\036 packed data +!:mime application/octet-stream +>2 belong >1 \b, %d characters originally +>2 belong =1 \b, %d character originally +# +# This magic number is byte-order-independent. +0 short 0x1f1f old packed data +!:mime application/octet-stream + +# XXX - why *two* entries for "compacted data", one of which is +# byte-order independent, and one of which is byte-order dependent? +# +0 short 0x1fff compacted data +!:mime application/octet-stream +# This string is valid for SunOS (BE) and a matching "short" is listed +# in the Ultrix (LE) magic file. +0 string \377\037 compacted data +!:mime application/octet-stream +0 short 0145405 huf output +!:mime application/octet-stream + +# bzip2 +0 string BZh bzip2 compressed data +!:mime application/x-bzip2 +>3 byte >47 \b, block size = %c00k + +# bzip a block-sorting file compressor +# by Julian Seward and others +0 string BZ0 bzip compressed data +!:mime application/x-bzip +>3 byte >47 \b, block size = %c00k + +# lzip +0 string LZIP lzip compressed data +!:mime application/x-lzip +>4 byte x \b, version: %d + +# squeeze and crunch +# Michael Haardt +0 beshort 0x76FF squeezed data, +>4 string x original name %s +0 beshort 0x76FE crunched data, +>2 string x original name %s +0 beshort 0x76FD LZH compressed data, +>2 string x original name %s + +# Freeze +0 string \037\237 frozen file 2.1 +0 string \037\236 frozen file 1.0 (or gzip 0.5) + +# SCO compress -H (LZH) +0 string \037\240 SCO compress -H (LZH) data + +# European GSM 06.10 is a provisional standard for full-rate speech +# transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse +# excitation/long term prediction) coding at 13 kbit/s. +# +# There's only a magic nibble (4 bits); that nibble repeats every 33 +# bytes. This isn't suited for use, but maybe we can use it someday. +# +# This will cause very short GSM files to be declared as data and +# mismatches to be declared as data too! +#0 byte&0xF0 0xd0 data +#>33 byte&0xF0 0xd0 +#>66 byte&0xF0 0xd0 +#>99 byte&0xF0 0xd0 +#>132 byte&0xF0 0xd0 GSM 06.10 compressed audio + +# lzop from +0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data +>9 beshort <0x0940 +>>9 byte&0xf0 =0x00 - version 0. +>>9 beshort&0x0fff x \b%03x, +>>13 byte 1 LZO1X-1, +>>13 byte 2 LZO1X-1(15), +>>13 byte 3 LZO1X-999, +## >>22 bedate >0 last modified: %s, +>>14 byte =0x00 os: MS-DOS +>>14 byte =0x01 os: Amiga +>>14 byte =0x02 os: VMS +>>14 byte =0x03 os: Unix +>>14 byte =0x05 os: Atari +>>14 byte =0x06 os: OS/2 +>>14 byte =0x07 os: MacOS +>>14 byte =0x0A os: Tops/20 +>>14 byte =0x0B os: WinNT +>>14 byte =0x0E os: Win32 +>9 beshort >0x0939 +>>9 byte&0xf0 =0x00 - version 0. +>>9 byte&0xf0 =0x10 - version 1. +>>9 byte&0xf0 =0x20 - version 2. +>>9 beshort&0x0fff x \b%03x, +>>15 byte 1 LZO1X-1, +>>15 byte 2 LZO1X-1(15), +>>15 byte 3 LZO1X-999, +## >>25 bedate >0 last modified: %s, +>>17 byte =0x00 os: MS-DOS +>>17 byte =0x01 os: Amiga +>>17 byte =0x02 os: VMS +>>17 byte =0x03 os: Unix +>>17 byte =0x05 os: Atari +>>17 byte =0x06 os: OS/2 +>>17 byte =0x07 os: MacOS +>>17 byte =0x0A os: Tops/20 +>>17 byte =0x0B os: WinNT +>>17 byte =0x0E os: Win32 + +# 4.3BSD-Quasijarus Strong Compression +# https://minnie.tuhs.org/Quasijarus/compress.html +0 string \037\241 Quasijarus strong compressed data + +# From: Cory Dikkers +0 string XPKF Amiga xpkf.library compressed data +0 string PP11 Power Packer 1.1 compressed data +0 string PP20 Power Packer 2.0 compressed data, +>4 belong 0x09090909 fast compression +>4 belong 0x090A0A0A mediocre compression +>4 belong 0x090A0B0B good compression +>4 belong 0x090A0C0C very good compression +>4 belong 0x090A0C0D best compression + +# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at) +# https://www.7-zip.org or DOC/7zFormat.txt +# +0 string 7z\274\257\047\034 7-zip archive data, +>6 byte x version %d +>7 byte x \b.%d +!:mime application/x-7z-compressed +#!:ext 7z/cb7 + +# Type: LZMA +0 lelong&0xffffff =0x5d +>12 leshort 0xff lzma compressed data, +!:mime application/x-lzma +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld +>12 leshort 0 lzma compressed data, +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld + +# http://tukaani.org/xz/xz-file-format.txt +0 ustring \xFD7zXZ\x00 xz compressed data, checksum +>7 byte&0xf 0x0 NONE +>7 byte&0xf 0x1 CRC32 +>7 byte&0xf 0x4 CRC64 +>7 byte&0xf 0xa SHA-256 + +!:strength * 2 +!:mime application/x-xz + +# https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt +0 string LRZI LRZIP compressed data +>4 byte x - version %d +>5 byte x \b.%d +!:mime application/x-lrzip + +# https://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html +0 lelong 0x184d2204 lz4 compressed data (v1.4+) +!:mime application/x-lz4 +# Added by osm0sis@xda-developers.com +0 lelong 0x184c2103 lz4 compressed data (v1.0-v1.3) +!:mime application/x-lz4 +0 lelong 0x184c2102 lz4-l compressed data (v0.1-v0.9) +!:mime application/x-lz4 + +# Zstandard/LZ4 skippable frames +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong&0xFFFFFFF0 0x184D2A50 +>(4.l+8) indirect x + +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong 0xEC30A437 Zstandard dictionary +!:mime application/x-std-dictionary +>4 lelong x (ID %u) + +# AFX compressed files (Wolfram Kleff) +2 string -afx- AFX compressed file data + +# Supplementary magic data for the file(1) command to support +# rzip(1). The format is described in magic(5). +# +# Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with +# this file. +# +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +0 string ArC\x01 FreeArc archive + +# Type: DACT compressed files +0 long 0x444354C3 DACT compressed data +>4 byte >-1 (version %i. +>5 byte >-1 %i. +>6 byte >-1 %i) +>7 long >0 , original size: %i bytes +>15 long >30 , block size: %i bytes + +# Valve Pack (VPK) files +0 lelong 0x55aa1234 Valve Pak file +>0x4 lelong x \b, version %u +>0x8 lelong x \b, %u entries + +# Snappy framing format +# https://code.google.com/p/snappy/source/browse/trunk/framing_format.txt +0 string \377\006\0\0sNaPpY snappy framed data +!:mime application/x-snappy-framed + +# qpress, https://www.quicklz.com/ +0 string qpress10 qpress compressed data +!:mime application/x-qpress + +# Zlib https://www.ietf.org/rfc/rfc6713.txt +0 string/b x +>0 beshort%31 =0 +>>0 byte&0xf =8 +>>>0 byte&0x80 =0 zlib compressed data +!:mime application/zlib + +# BWC compression +0 string BWC +>3 byte 0 BWC compressed data + +# UCL compression +0 bequad 0x00e955434cff011a UCL compressed data + +# Softlib archive +0 string SLIB Softlib archive +>4 leshort x \b, version %d +>6 leshort x (contains %d files) + +# URL: https://github.com/lzfse/lzfse/blob/master/src/lzfse_internal.h#L276 +# From: Eric Hall +0 string bvx- lzfse encoded, no compression +0 string bvx1 lzfse compressed, uncompressed tables +0 string bvx2 lzfse compressed, compressed tables +0 string bvxn lzfse encoded, lzvn compressed + +# pcxLib.exe compression program +# http://www.shikadi.net/moddingwiki/PCX_Library +0 string/b pcxLib + +#------------------------------------------------------------ +# $File: android,v 1.18 2021/02/23 00:51:10 christos Exp $ +# Various android related magic entries +#------------------------------------------------------------ + +# Dalvik .dex format. http://retrodev.com/android/dexformat.html +# From "Mike Fleming" +# Fixed to avoid regexec 17 errors on some dex files +# From "Tim Strazzere" +0 string dex\n +>0 regex dex\n[0-9]{2}\0 Dalvik dex file +>4 string >000 version %s +0 string dey\n +>0 regex dey\n[0-9]{2}\0 Dalvik dex file (optimized for host) +>4 string >000 version %s + +# Android bootimg format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/mkbootimg/bootimg.h +# https://github.com/djrbliss/loki/blob/master/loki.h#L43 +0 string ANDROID! Android bootimg +>1024 string LOKI \b, LOKI'd +>>1028 lelong 0 \b (boot) +>>1028 lelong 1 \b (recovery) +>8 lelong >0 \b, kernel +>>12 lelong >0 \b (0x%x) +>16 lelong >0 \b, ramdisk +>>20 lelong >0 \b (0x%x) +>24 lelong >0 \b, second stage +>>28 lelong >0 \b (0x%x) +>36 lelong >0 \b, page size: %d +>38 string >0 \b, name: %s +>64 string >0 \b, cmdline (%s) + +# Android sparse img format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/libsparse/sparse_format.h +0 lelong 0xed26ff3a Android sparse image +>4 leshort x \b, version: %d +>6 leshort x \b.%d +>16 lelong x \b, Total of %d +>12 lelong x \b %d-byte output blocks in +>20 lelong x \b %d input chunks. + +# Android binary XML magic +# In include/androidfw/ResourceTypes.h: +# RES_XML_TYPE = 0x0003 followed by the size of the header (ResXMLTree_header), +# which is 8 bytes (2 bytes type + 2 bytes header size + 4 bytes size). +0 lelong 0x00080003 Android binary XML + +# Android cryptfs footer +# From https://android.googlesource.com/\ +# platform/system/vold/+/refs/heads/master/cryptfs.h +0 lelong 0xd0b5b1c4 Android cryptfs footer +>4 leshort x \b, version: %d +>6 leshort x \b.%d + +# Android Vdex format +# From https://android.googlesource.com/\ +# platform/art/+/master/runtime/vdex_file.h +0 string vdex Android vdex file, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d + +# Android Vdex format, dexfile is currently being updated +# by android system +# From https://android.googlesource.com/\ +# platform/art/+/master/dex2oat/dex2oat.cc +0 string wdex Android vdex file, being processed by dex2oat, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d diff --git a/Final_Zip/AIK/OFRP-R/cleanup.sh b/Final_Zip/AIK/OFRP-R/cleanup.sh new file mode 100755 index 0000000..d8f1d61 --- /dev/null +++ b/Final_Zip/AIK/OFRP-R/cleanup.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# AIK-Linux/cleanup: reset working directory +# osm0sis @ xda-developers + +case $1 in + --help) echo "usage: cleanup.sh [--local] [--quiet]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + statarg="-f %Su"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) statarg="-c %U";; +esac; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; + +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + sudo=sudo; +fi; + +$sudo rm -rf ramdisk split_img *new.* || exit 1; + +case $1 in + --quiet) ;; + *) echo "Working directory cleaned.";; +esac; +exit 0; + diff --git a/Final_Zip/AIK/OFRP-R/repackimg.sh b/Final_Zip/AIK/OFRP-R/repackimg.sh new file mode 100755 index 0000000..5709f0f --- /dev/null +++ b/Final_Zip/AIK/OFRP-R/repackimg.sh @@ -0,0 +1,413 @@ +#!/bin/bash +# AIK-Linux/repackimg: repack ramdisk and build image +# osm0sis @ xda-developers + +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: repackimg.sh [--local] [--original] [--origsize] [--level <0-9>] [--avbkey ] [--forceelf]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + + javaver=$(java -version 2>&1 | head -n1 | cut -d\" -f2); + javamaj=$(echo $javaver | cut -d. -f1); + javamin=$(echo $javaver | cut -d. -f2); + if [ "$javamaj" -lt 9 ] && [ "$javamaj" -eq 1 -a "$javamin" -lt 8 ]; then + java() { "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" "$@"; } + fi; + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; +chmod -R 755 "$bin" "$aik/"*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -z "$(ls split_img/* 2>/dev/null)" -o ! -e ramdisk ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +while [ "$1" ]; do + case $1 in + --original) original=1;; + --origsize) origsize=1;; + --forceelf) repackelf=1;; + --level) + case $2 in + ''|*[!0-9]*) ;; + *) level="-$2"; lvltxt=" - Level: $2"; shift;; + esac; + ;; + --avbkey) + if [ "$2" ]; then + for keytest in "$2" "$cur/$2" "$aik/$2"; do + if [ ! -z "$(ls $keytest.pk8 2>/dev/null)" -a ! -z "$(ls $keytest.x509.* 2>/dev/null)" ]; then + avbkey="$keytest"; avbtxt=" - Key: $2"; shift; break; + fi; + done; + fi; + ;; + esac; + shift; +done; + +ramdiskcomp=`cat split_img/*-*ramdiskcomp 2>/dev/null`; +if [ -z "$(ls ramdisk/* 2>/dev/null)" ] && [ ! "$ramdiskcomp" = "empty" -a ! "$original" ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - RepackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +if [ ! -z "$(ls *-new.* 2>/dev/null)" ]; then + echo "Warning: Overwriting existing files!"; + echo " "; +fi; +rm -f "*-new.*"; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" ]; then + sudo=sudo; sumsg=" (as root)"; +else + cpioarg="-R 0:0"; +fi; + +if [ "$original" ]; then + echo "Repacking with original ramdisk..."; +elif [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: Using empty ramdisk for repack!"; + compext=.empty; + touch ramdisk-new.cpio$compext; +else + echo "Packing ramdisk$sumsg..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + if [ -z "$level" ]; then + case $ramdiskcomp in + xz) level=-1;; + lz4*) level=-9;; + esac; + fi; + echo "Using compression: $ramdiskcomp$lvltxt"; + repackcmd="$ramdiskcomp $level"; + compext=$ramdiskcomp; + case $ramdiskcomp in + gzip) compext=gz;; + lzop) compext=lzo;; + xz) repackcmd="xz $level -Ccrc32";; + lzma) repackcmd="xz $level -Flzma";; + bzip2) compext=bz2;; + lz4) repackcmd="$bin/$arch/lz4 $level";; + lz4-l) repackcmd="$bin/$arch/lz4 $level -l"; compext=lz4;; + cpio) repackcmd="cat"; compext="";; + *) abort; exit 1;; + esac; + if [ "$compext" ]; then + compext=.$compext; + fi; + cd ramdisk; + $sudo find . | $sudo $cpio $cpioarg -H newc -o 2>/dev/null | $repackcmd > ../ramdisk-new.cpio$compext; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Getting build information..."; +cd split_img; +imgtype=`cat *-imgtype`; +case $imgtype in + KRNL) ;; + AOSP_VNDR) vendor=vendor_;; + *) + if [ -f *-kernel ]; then + kernel=`ls *-kernel`; echo "kernel = $kernel"; + kernel="split_img/$kernel"; + fi; + ;; +esac; +if [ "$original" ]; then + ramdisk=`ls *-*ramdisk.cpio*`; echo "${vendor}ramdisk = $ramdisk"; + ramdisk="split_img/$ramdisk"; +else + ramdisk="ramdisk-new.cpio$compext"; +fi; +case $imgtype in + KRNL) rsz=$(wc -c < ../"$ramdisk"); echo "ramdisk_size = $rsz";; + OSIP) echo "cmdline = $(cat *-*cmdline)";; + U-Boot) + name=`cat *-name`; echo "name = $name"; + uarch=`cat *-arch`; + os=`cat *-os`; + type=`cat *-type`; + comp=`cat *-comp`; echo "type = $uarch $os $type ($comp)"; + [ "$comp" = "uncompressed" ] && comp=none; + addr=`cat *-addr`; echo "load_addr = $addr"; + ep=`cat *-ep`; echo "entry_point = $ep"; + ;; + *) + if [ -f *-second ]; then + second=`ls *-second`; echo "second = $second"; + second=(--second "split_img/$second"); + fi; + if [ -f *-dtb ]; then + dtb=`ls *-dtb`; echo "dtb = $dtb"; + dtb=(--dtb "split_img/$dtb"); + fi; + if [ -f *-recovery_dtbo ]; then + recoverydtbo=`ls *-recovery_dtbo`; echo "recovery_dtbo = $recoverydtbo"; + recoverydtbo=(--recovery_dtbo "split_img/$recoverydtbo"); + fi; + if [ -f *-*cmdline ]; then + cmdname=`ls *-*cmdline`; + cmdline=`cat *-*cmdline`; echo "${vendor}cmdline = $cmdline"; + cmd=("split_img/$cmdname"@cmdline); + fi; + if [ -f *-board ]; then + board=`cat *-board`; echo "board = $board"; + fi; + if [ -f *-base ]; then + base=`cat *-base`; echo "base = $base"; + fi; + if [ -f *-pagesize ]; then + pagesize=`cat *-pagesize`; echo "pagesize = $pagesize"; + fi; + if [ -f *-kernel_offset ]; then + kerneloff=`cat *-kernel_offset`; echo "kernel_offset = $kerneloff"; + fi; + if [ -f *-ramdisk_offset ]; then + ramdiskoff=`cat *-ramdisk_offset`; echo "ramdisk_offset = $ramdiskoff"; + fi; + if [ -f *-second_offset ]; then + secondoff=`cat *-second_offset`; echo "second_offset = $secondoff"; + fi; + if [ -f *-tags_offset ]; then + tagsoff=`cat *-tags_offset`; echo "tags_offset = $tagsoff"; + fi; + if [ -f *-dtb_offset ]; then + dtboff=`cat *-dtb_offset`; echo "dtb_offset = $dtboff"; + fi; + if [ -f *-os_version ]; then + osver=`cat *-os_version`; echo "os_version = $osver"; + fi; + if [ -f *-os_patch_level ]; then + oslvl=`cat *-os_patch_level`; echo "os_patch_level = $oslvl"; + fi; + if [ -f *-header_version ]; then + hdrver=`cat *-header_version`; echo "header_version = $hdrver"; + fi; + if [ -f *-hashtype ]; then + hashtype=`cat *-hashtype`; echo "hashtype = $hashtype"; + hashtype="--hashtype $hashtype"; + fi; + if [ -f *-dt ]; then + dttype=`cat *-dttype`; + dt=`ls *-dt`; echo "dt = $dt"; + rpm=("split_img/$dt",rpm); + dt=(--dt "split_img/$dt"); + fi; + if [ -f *-unknown ]; then + unknown=`cat *-unknown`; echo "unknown = $unknown"; + fi; + if [ -f *-header ]; then + header=`ls *-header`; + header="split_img/$header"; + fi; + ;; +esac; +cd ..; + +if [ -f split_img/*-mtktype ]; then + mtktype=`cat split_img/*-mtktype`; + echo " "; + echo "Generating MTK headers..."; + echo " "; + echo "Using ramdisk type: $mtktype"; + "$bin/$arch/mkmtkhdr" --kernel "$kernel" --$mtktype "$ramdisk" >/dev/null; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + mv -f "$(basename "$kernel")-mtk" kernel-new.mtk; + mv -f "$(basename "$ramdisk")-mtk" $mtktype-new.mtk; + kernel=kernel-new.mtk; + ramdisk=$mtktype-new.mtk; +fi; + +if [ -f split_img/*-sigtype ]; then + outname=unsigned-new.img; +else + outname=image-new.img; +fi; + +[ "$dttype" = "ELF" ] && repackelf=1; +if [ "$imgtype" = "ELF" ] && [ ! "$header" -o ! "$repackelf" ]; then + imgtype=AOSP; + echo " "; + echo "Warning: ELF format without RPM detected; will be repacked using AOSP format!"; +fi; + +echo " "; +echo "Building image..."; +echo " "; +echo "Using format: $imgtype"; +echo " "; +case $imgtype in + AOSP_VNDR) "$bin/$arch/mkbootimg" --vendor_ramdisk "$ramdisk" "${dtb[@]}" --vendor_cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --tags_offset $tagsoff --dtb_offset $dtboff --os_version "$osver" --os_patch_level "$oslvl" --header_version $hdrver --vendor_boot $outname;; + AOSP) "$bin/$arch/mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" "${dtb[@]}" "${recoverydtbo[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --dtb_offset "$dtboff" --os_version "$osver" --os_patch_level "$oslvl" --header_version "$hdrver" $hashtype "${dt[@]}" -o $outname;; + AOSP-PXA) "$bin/$arch/pxa-mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --unknown $unknown "${dt[@]}" -o $outname;; + ELF) "$bin/$arch/elftool" pack -o $outname header="$header" "$kernel" "$ramdisk",ramdisk "${rpm[@]}" "${cmd[@]}" >/dev/null;; + KRNL) "$bin/$arch/rkcrc" -k "$ramdisk" $outname;; + OSIP) + mkdir split_img/.temp 2>/dev/null; + for i in bootstub cmdline.txt hdr kernel parameter sig; do + cp -f split_img/*-*$(basename $i .txt | sed -e 's/hdr/header/') split_img/.temp/$i 2>/dev/null; + done; + cp -f "$ramdisk" split_img/.temp/ramdisk.cpio.gz; + "$bin/$arch/mboot" -d split_img/.temp -f $outname; + ;; + U-Boot) + part0="$kernel"; + case $type in + Multi) part1=(:"$ramdisk");; + RAMDisk) part0="$ramdisk";; + esac; + "$bin/$arch/mkimage" -A $uarch -O $os -T $type -C $comp -a $addr -e $ep -n "$name" -d "$part0""${part1[@]}" $outname >/dev/null; + ;; + *) echo " "; echo "Unsupported format."; abort; exit 1;; +esac; +if [ ! $? -eq "0" ]; then + abort; + exit 1; +fi; + +rm -rf split_img/.temp; + +if [ -f split_img/*-sigtype ]; then + sigtype=`cat split_img/*-sigtype`; + if [ -f split_img/*-avbtype ]; then + avbtype=`cat split_img/*-avbtype`; + fi; + if [ -f split_img/*-blobtype ]; then + blobtype=`cat split_img/*-blobtype`; + fi; + echo "Signing new image..."; + echo " "; + echo "Using signature: $sigtype $avbtype$avbtxt$blobtype"; + [ ! "$avbkey" ] && avbkey="$bin/avb/verity"; + echo " "; + case $sigtype in + AVBv1) java -jar "$bin/boot_signer.jar" /$avbtype unsigned-new.img "$avbkey.pk8" "$avbkey.x509."* image-new.img 2>/dev/null;; + BLOB) + awk 'BEGIN { printf "-SIGNED-BY-SIGNBLOB-\00\00\00\00\00\00\00\00" }' > image-new.img; + "$bin/$arch/blobpack" blob.tmp $blobtype unsigned-new.img >/dev/null; + cat blob.tmp >> image-new.img; + rm -f blob.tmp; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --pack image-new.img --keyblock "$bin/chromeos/kernel.keyblock" --signprivate "$bin/chromeos/kernel_data_key.vbprivk" --version 1 --vmlinuz unsigned-new.img --bootloader "$bin/chromeos/empty" --config "$bin/chromeos/empty" --arch arm --flags 0x1;; + DHTB) + "$bin/$arch/dhtbsign" -i unsigned-new.img -o image-new.img >/dev/null; + rm -f split_img/*-tailtype 2>/dev/null; + ;; + NOOK*) cat split_img/*-master_boot.key unsigned-new.img > image-new.img;; + esac; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; +fi; + +if [ -f split_img/*-lokitype ]; then + lokitype=`cat split_img/*-lokitype`; + echo "Loki patching new image..."; + echo " "; + echo "Using type: $lokitype"; + echo " "; + mv -f image-new.img unlokied-new.img; + if [ -f aboot.img ]; then + "$bin/$arch/loki_tool" patch $lokitype aboot.img unlokied-new.img image-new.img >/dev/null; + if [ ! $? -eq "0" ]; then + echo "Patching failed."; + abort; + exit 1; + fi; + else + echo "Device aboot.img required in script directory to find Loki patch offset."; + abort; + exit 1; + fi; +elif [ -f split_img/*-microloader.bin ]; then + echo "Amonet patching new image..."; + echo " "; + cp -f image-new.img unamonet-new.img; + cp -f split_img/*-microloader.bin microloader.tmp; + dd bs=1024 count=1 conv=notrunc if=unamonet-new.img of=head.tmp 2>/dev/null; + dd bs=1024 seek=1 conv=notrunc if=head.tmp of=image-new.img 2>/dev/null; + dd conv=notrunc if=microloader.tmp of=image-new.img 2>/dev/null; + rm -f head.tmp microloader.tmp; +fi; + +if [ -f split_img/*-tailtype ]; then + tailtype=`cat split_img/*-tailtype`; + echo "Appending footer..."; + echo " "; + echo "Using type: $tailtype"; + echo " "; + case $tailtype in + Bump) awk 'BEGIN { printf "\x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79" }' >> image-new.img;; + SEAndroid) printf 'SEANDROIDENFORCE' >> image-new.img;; + esac; +fi; + +if [ "$origsize" -a -f split_img/*-origsize ]; then + filesize=`cat split_img/*-origsize`; + echo "Padding to original size..."; + echo " "; + cp -f image-new.img unpadded-new.img; + truncate -s $filesize image-new.img; +fi; + +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/OFRP-R/unpackimg.sh b/Final_Zip/AIK/OFRP-R/unpackimg.sh new file mode 100755 index 0000000..6198f2a --- /dev/null +++ b/Final_Zip/AIK/OFRP-R/unpackimg.sh @@ -0,0 +1,370 @@ +#!/bin/bash +# AIK-Linux/unpackimg: split image and unpack ramdisk +# osm0sis @ xda-developers + +cleanup() { "$aik/cleanup.sh" $local --quiet; } +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: unpackimg.sh [--local] [--nosudo] "; exit 1;; + --local) local="--local"; shift;; +esac; +case $1 in + --nosudo) nosudo=1; shift;; + --sudo) shift;; +esac; +if [ ! "$nosudo" ]; then + sudo=sudo; sumsg=" (as root)"; +fi; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + file() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/file" "$@"; } + lzma() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + tail() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/tail" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +if [ ! "$local" ]; then + cd "$aik"; +fi; +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +img="$1"; +[ -f "$cur/$1" ] && img="$cur/$1"; +if [ ! "$img" ]; then + while IFS= read -r line; do + case $line in + aboot.img|image-new.img|unlokied-new.img|unsigned-new.img) continue;; + esac; + img="$line"; + break; + done < <(ls *.elf *.img *.sin 2>/dev/null); +fi; +img="$(readlink -f "$img")"; +if [ ! -f "$img" ]; then + echo "No image file supplied."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - UnpackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +file=$(basename "$img"); +echo "Supplied image: $file"; +echo " "; + +if [ -d split_img -o -d ramdisk ]; then + if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + rmsumsg=" (as root)"; + fi; + echo "Removing old work folders and files$rmsumsg..."; + echo " "; + cleanup; +fi; + +echo "Setting up work folders..."; +echo " "; +mkdir split_img ramdisk; + +cd split_img; +filesize=$(wc -c < "$img"); +echo "$filesize" > "$file-origsize"; +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "signing" ]; then + echo $imgtest | awk '{ print $1 }' > "$file-sigtype"; + sigtype=$(cat "$file-sigtype"); + echo "Signature with \"$sigtype\" type detected, removing..."; + echo " "; + case $sigtype in + BLOB) + cp -f "$img" "$file"; + "$bin/$arch/blobunpack" "$file" | tail -n+5 | cut -d" " -f2 | dd bs=1 count=3 > "$file-blobtype" 2>/dev/null; + mv -f "$file."* "$file"; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --get-vmlinuz "$img" --vmlinuz-out "$file";; + DHTB) dd bs=4096 skip=512 iflag=skip_bytes conv=notrunc if="$img" of="$file" 2>/dev/null;; + NOOK) + dd bs=1048576 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=1048576 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + NOOKTAB) + dd bs=262144 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=262144 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + SIN*) + "$bin/$arch/sony_dump" . "$img" >/dev/null; + mv -f "$file."* "$file"; + rm -f "$file-sigtype"; + ;; + esac; + img="$file"; +fi; + +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "bootimg" ]; then + [ "$(echo $imgtest | awk '{ print $3 }')" = "PXA" ] && typesuffix=-PXA; + echo "$(echo $imgtest | awk '{ print $1 }')$typesuffix" > "$file-imgtype"; + imgtype=$(cat "$file-imgtype"); +else + cd ..; + cleanup; + echo "Unrecognized format."; + abort; + exit 1; +fi; +echo "Image type: $imgtype"; +echo " "; + +case $imgtype in + AOSP*|ELF|KRNL|OSIP|U-Boot) ;; + *) + cd ..; + cleanup; + echo "Unsupported format."; + abort; + exit 1; + ;; +esac; + +case $(echo $imgtest | awk '{ print $3 }') in + LOKI) + echo $imgtest | awk '{ print $5 }' | cut -d\( -f2 | cut -d\) -f1 > "$file-lokitype"; + lokitype=$(cat "$file-lokitype"); + echo "Loki patch with \"$lokitype\" type detected, reverting..."; + echo " "; + echo "Warning: A dump of your device's aboot.img is required to re-Loki!"; + echo " "; + "$bin/$arch/loki_tool" unlok "$img" "$file" >/dev/null; + img="$file"; + ;; + AMONET) + echo "Amonet patch detected, reverting..."; + echo " "; + dd bs=2048 count=1 conv=notrunc if="$img" of="$file-microloader.bin" 2>/dev/null; + dd bs=1024 skip=1 conv=notrunc if="$file-microloader.bin" of="$file-head" 2>/dev/null; + truncate -s 1024 "$file-microloader.bin"; + truncate -s 2048 "$file-head"; + dd bs=2048 skip=1 conv=notrunc if="$img" of="$file-tail" 2>/dev/null; + cat "$file-head" "$file-tail" > "$file"; + rm -f "$file-head" "$file-tail"; + img="$file"; + ;; +esac; + +tailtest="$(dd if="$img" iflag=skip_bytes skip=$(($(wc -c < "$img") - 8192)) bs=8192 count=1 2>/dev/null | file -m $bin/androidbootimg.magic - 2>/dev/null | cut -d: -f2-)"; +case $tailtest in + *data) tailtest="$(tail -n50 "$img" | file -m "$bin/androidbootimg.magic" - 2>/dev/null | cut -d: -f2-)";; +esac; +tailtype="$(echo $tailtest | awk '{ print $1 }')"; +case $tailtype in + AVB*) + echo "Signature with \"$tailtype\" type detected."; + echo " "; + case $tailtype in + *v1) + echo $tailtype > "$file-sigtype"; + echo $tailtest | awk '{ print $4 }' > "$file-avbtype"; + ;; + esac; + ;; + Bump|SEAndroid) + echo "Footer with \"$tailtype\" type detected."; + echo " "; + echo $tailtype > "$file-tailtype"; + ;; +esac; + +if [ "$imgtype" = "U-Boot" ]; then + imgsize=$(($(printf '%d\n' 0x$(hexdump -n 4 -s 12 -e '16/1 "%02x""\n"' "$img")) + 64)); + if [ ! "$filesize" = "$imgsize" ]; then + echo "Trimming..."; + echo " "; + dd bs=$imgsize count=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + img="$file"; + fi; +fi; + +echo 'Splitting image to "split_img/"...'; +case $imgtype in + AOSP_VNDR) vendor=vendor_;; +esac; +case $imgtype in + AOSP|AOSP_VNDR) "$bin/$arch/unpackbootimg" -i "$img";; + AOSP-PXA) "$bin/$arch/pxa-unpackbootimg" -i "$img";; + ELF) + mkdir elftool_out; + "$bin/$arch/elftool" unpack -i "$img" -o elftool_out >/dev/null; + mv -f elftool_out/header "$file-header" 2>/dev/null; + rm -rf elftool_out; + "$bin/$arch/unpackelf" -i "$img"; + ;; + KRNL) dd bs=4096 skip=8 iflag=skip_bytes conv=notrunc if="$img" of="$file-ramdisk" 2>&1 | tail -n+3 | cut -d" " -f1-2;; + OSIP) + "$bin/$arch/mboot" -u -f "$img"; + [ ! $? -eq "0" ] && error=1; + for i in bootstub cmdline.txt hdr kernel parameter ramdisk.cpio.gz sig; do + mv -f $i "$file-$(basename $i .txt | sed -e 's/hdr/header/' -e 's/ramdisk.cpio.gz/ramdisk/')" 2>/dev/null || true; + done; + ;; + U-Boot) + "$bin/$arch/dumpimage" -l "$img"; + "$bin/$arch/dumpimage" -l "$img" > "$file-header"; + grep "Name:" "$file-header" | cut -c15- > "$file-name"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f1 > "$file-arch"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f2 > "$file-os"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f3 | cut -d- -f1 > "$file-type"; + grep "Type:" "$file-header" | cut -d\( -f2 | cut -d\) -f1 | cut -d" " -f1 | cut -d- -f1 > "$file-comp"; + grep "Address:" "$file-header" | cut -c15- > "$file-addr"; + grep "Point:" "$file-header" | cut -c15- > "$file-ep"; + rm -f "$file-header"; + "$bin/$arch/dumpimage" -p 0 -o "$file-kernel" "$img"; + [ ! $? -eq "0" ] && error=1; + case $(cat "$file-type") in + Multi) "$bin/$arch/dumpimage" -p 1 -o "$file-ramdisk" "$img";; + RAMDisk) mv -f "$file-kernel" "$file-ramdisk";; + *) touch "$file-ramdisk";; + esac; + ;; +esac; +if [ ! $? -eq "0" -o "$error" ]; then + cd ..; + cleanup; + abort; + exit 1; +fi; + +if [ -f *-kernel ] && [ "$(file -m "$bin/androidbootimg.magic" *-kernel 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')" = "MTK" ]; then + mtk=1; + echo " "; + echo "MTK header found in kernel, removing..."; + dd bs=512 skip=1 conv=notrunc if="$file-kernel" of=tempkern 2>/dev/null; + mv -f tempkern "$file-kernel"; +fi; +mtktest="$(file -m "$bin/androidbootimg.magic" *-*ramdisk 2>/dev/null | cut -d: -f2-)"; +mtktype=$(echo $mtktest | awk '{ print $3 }'); +if [ "$(echo $mtktest | awk '{ print $1 }')" = "MTK" ]; then + if [ ! "$mtk" ]; then + echo " "; + echo "Warning: No MTK header found in kernel!"; + mtk=1; + fi; + echo "MTK header found in \"$mtktype\" type ramdisk, removing..."; + dd bs=512 skip=1 conv=notrunc if="$(ls *-*ramdisk)" of=temprd 2>/dev/null; + mv -f temprd "$(ls *-*ramdisk)"; +else + if [ "$mtk" ]; then + if [ ! "$mtktype" ]; then + echo 'Warning: No MTK header found in ramdisk, assuming "rootfs" type!'; + mtktype="rootfs"; + fi; + fi; +fi; +[ "$mtk" ] && echo $mtktype > "$file-mtktype"; + +if [ -f *-dt ]; then + dttest="$(file -m "$bin/androidbootimg.magic" *-dt 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')"; + echo $dttest > "$file-dttype"; + if [ "$imgtype" = "ELF" ]; then + case $dttest in + QCDT|ELF) ;; + *) echo " "; + echo "Non-QC DTB found, packing kernel and appending..."; + gzip --no-name -9 "$file-kernel"; + mv -f "$file-kernel.gz" "$file-kernel"; + cat "$file-dt" >> "$file-kernel"; + rm -f "$file-dt"*;; + esac; + fi; +fi; + +file -m "$bin/magic" *-*ramdisk 2>/dev/null | cut -d: -f2 | awk '{ print $1 }' > "$file-${vendor}ramdiskcomp"; +ramdiskcomp=`cat *-*ramdiskcomp`; +unpackcmd="$ramdiskcomp -dc"; +compext=$ramdiskcomp; +case $ramdiskcomp in + gzip) unpackcmd="gzip -dcq"; compext=gz;; + lzop) compext=lzo;; + xz) ;; + lzma) ;; + bzip2) compext=bz2;; + lz4) unpackcmd="$bin/$arch/lz4 -dcq";; + lz4-l) unpackcmd="$bin/$arch/lz4 -dcq"; compext=lz4;; + cpio) unpackcmd="cat"; compext="";; + empty) compext=empty;; + *) compext="";; +esac; +if [ "$compext" ]; then + compext=.$compext; +fi; +mv -f "$(ls *-*ramdisk)" "$file-${vendor}ramdisk.cpio$compext" 2>/dev/null; +cd ..; +if [ "$ramdiskcomp" = "data" ]; then + echo "Unrecognized format."; + abort; + exit 1; +fi; + +echo " "; +if [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: No ramdisk found to be unpacked!"; +else + echo "Unpacking ramdisk$sumsg to \"ramdisk/\"..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + echo "Compression used: $ramdiskcomp"; + if [ ! "$compext" -a ! "$ramdiskcomp" = "cpio" ]; then + echo "Unsupported format."; + abort; + exit 1; + fi; + $sudo chown 0:0 ramdisk 2>/dev/null; + cd ramdisk; + $unpackcmd "../split_img/$file-${vendor}ramdisk.cpio$compext" | $sudo $cpio -i -d --no-absolute-filenames; + if [ ! $? -eq "0" ]; then + [ "$nosudo" ] && echo "Unpacking failed, try without --nosudo."; + cd ..; + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/OFRP/bin/androidbootimg.magic b/Final_Zip/AIK/OFRP/bin/androidbootimg.magic new file mode 100644 index 0000000..4e7a106 --- /dev/null +++ b/Final_Zip/AIK/OFRP/bin/androidbootimg.magic @@ -0,0 +1,111 @@ +#------------------------------------------------------------------------------ +# Various Android OEM non-standard boot image related magic entries +# osm0sis @ xda-developers +#------------------------------------------------------------------------------ + +# ASUS Blob Signature +0 string -SIGNED-BY-SIGNBLOB- BLOB signing + +# Barnes & Noble Nook Signature +64 string Red\x20Loader NOOK signing (red loader) +64 string Green\x20Loader NOOK signing (green loader) +64 string Green\x20Recovery NOOK signing (green recovery) +64 string eMMC\x20boot.img+secondloader NOOK signing (emmc boot) +64 string eMMC\x20recovery.img+secondloader NOOK signing (emmc recovery) +48 string BauwksBoot NOOKTAB signing (bauwks) + +# Google ChromeOS Signature +0 string CHROMEOS CHROMEOS signing + +# Samsung/Spreadtrum DHTB Signature +0 string DHTB\x01\x00\x00 DHTB signing + +# Sony SIN Packaging/Signature +0 string \x01\x00\x00\x00 SINv1 signing +0 string \x02\x00\x00\x00 SINv2 signing +0 string \x03SIN SINv3 signing + +# Google Pixel/Nexus/AOSP Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search ANDROID! AOSP bootimg +>>36 string \x00\x00\x00\x02 \b, PXA variant (020) +>>36 string \x00\x00\x80\x02 \b, PXA variant (028) +>>36 string \x00\x00\x00\x03 \b, PXA variant (030) +>>96 search microloader +>>>1024 string ANDROID! \b, AMONET header +>>1024 string LOKI \b, LOKI header +>>>1028 string \x00 \b (boot) +>>>1028 string \x01 \b (recovery) +>>2048 search \x88\x16\x88\x58 \b, MTK headers +!:strength * 3 + +# Google Pixel/AOSP Vendor Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search VNDRBOOT AOSP_VNDR bootimg +!:strength * 3 + +# DENX U-Boot +0 string \x27\x05\x19\x56 U-Boot bootimg + +# Intel OSIP +1000 search \xFC\xFA\xBC\x00 OSIP bootimg (headerless) +!:strength / 15 +0 string $OS$\x00\x00\x01 OSIP bootimg +>52 string \x00\x00\x00\x00 \b, boot (signed) +>52 string \x01\x00\x00\x00 \b, boot (unsigned) +>52 string \x0C\x00\x00\x00 \b, recovery (signed) +>52 string \x0D\x00\x00\x00 \b, recovery (unsigned) + +# Rockchip KRNL +0 string KRNL KRNL bootimg + +# Sony ELF +0 string \x7FELF ELF +>5 string \x01\x01\x61 bootimg +>18 string \x28 (ARM +>18 string \x03 (x86_ +>18 string \x08 (MIPS +>4 string \x01 \b) +>4 string \x02 \b64) +>0 search \x88\x16\x88\x58 \b, MTK headers + +# MediaTek MTK +# [for detection after boot image has already been split] +0 search \x88\x16\x88\x58 MTK header +>0 search KERNEL \b, kernel type +>0 search ROOTFS \b, rootfs type +>0 search RECOVERY \b, recovery type +!:strength / 20 + +# Qualcomm Device Tree +# [for detection after boot image has already been split] +0 string QCDT QCDT header +!:strength / 20 + +# Google Android Verified Boot 1.0 Signature +# [for detection with the tail of the boot image] +0 search \x02\x01\x01\x30\x82 AVBv1 signing footer +>0 search /boot \b, boot type +>0 search /recovery \b, recovery type +!:strength / 20 + +# Google Android Verified Boot 2.0 Signature +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search AVBf AVBv2 signing footer +!:strength / 20 + +# LG Bump +# [for detection with the tail of the boot image] +0 search \x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79 Bump footer +!:strength / 20 + +# Samsung SEAndroid +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search SEANDROIDENFORCE SEAndroid footer +!:strength / 20 diff --git a/Final_Zip/AIK/OFRP/bin/avb/verity.pk8 b/Final_Zip/AIK/OFRP/bin/avb/verity.pk8 new file mode 100644 index 0000000..bebf216 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/avb/verity.pk8 differ diff --git a/Final_Zip/AIK/OFRP/bin/avb/verity.x509.pem b/Final_Zip/AIK/OFRP/bin/avb/verity.x509.pem new file mode 100644 index 0000000..86399c3 --- /dev/null +++ b/Final_Zip/AIK/OFRP/bin/avb/verity.x509.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIID/TCCAuWgAwIBAgIJAJcPmDkJqolJMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g +VmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UE +AwwHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe +Fw0xNDExMDYxOTA3NDBaFw00MjAzMjQxOTA3NDBaMIGUMQswCQYDVQQGEwJVUzET +MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEQMA4G +A1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UEAwwHQW5kcm9p +ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAOjreE0vTVSRenuzO9vnaWfk0eQzYab0gqpi +6xAzi6dmD+ugoEKJmbPiuE5Dwf21isZ9uhUUu0dQM46dK4ocKxMRrcnmGxydFn6o +fs3ODJMXOkv2gKXL/FdbEPdDbxzdu8z3yk+W67udM/fW7WbaQ3DO0knu+izKak/3 +T41c5uoXmQ81UNtAzRGzGchNVXMmWuTGOkg6U+0I2Td7K8yvUMWhAWPPpKLtVH9r +AL5TzjYNR92izdKcz3AjRsI3CTjtpiVABGeX0TcjRSuZB7K9EK56HV+OFNS6I1NP +jdD7FIShyGlqqZdUOkAUZYanbpgeT5N7QL6uuqcGpoTOkalu6kkCAwEAAaNQME4w +HQYDVR0OBBYEFH5DM/m7oArf4O3peeKO0ZIEkrQPMB8GA1UdIwQYMBaAFH5DM/m7 +oArf4O3peeKO0ZIEkrQPMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB +AHO3NSvDE5jFvMehGGtS8BnFYdFKRIglDMc4niWSzhzOVYRH4WajxdtBWc5fx0ix +NF/+hVKVhP6AIOQa+++sk+HIi7RvioPPbhjcsVlZe7cUEGrLSSveGouQyc+j0+m6 +JF84kszIl5GGNMTnx0XRPO+g8t6h5LWfnVydgZfpGRRg+WHewk1U2HlvTjIceb0N +dcoJ8WKJAFWdcuE7VIm4w+vF/DYX/A2Oyzr2+QRhmYSv1cusgAeC1tvH4ap+J1Lg +UnOu5Kh/FqPLLSwNVQp4Bu7b9QFfqK8Moj84bj88NqRGZgDyqzuTrFxn6FW7dmyA +yttuAJAEAymk1mipd9+zp38= +-----END CERTIFICATE----- diff --git a/Final_Zip/AIK/OFRP/bin/boot_signer.jar b/Final_Zip/AIK/OFRP/bin/boot_signer.jar new file mode 100644 index 0000000..dd96a3e Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/boot_signer.jar differ diff --git a/Final_Zip/AIK/OFRP/bin/chromeos/empty b/Final_Zip/AIK/OFRP/bin/chromeos/empty new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Final_Zip/AIK/OFRP/bin/chromeos/empty @@ -0,0 +1 @@ + diff --git a/Final_Zip/AIK/OFRP/bin/chromeos/kernel.keyblock b/Final_Zip/AIK/OFRP/bin/chromeos/kernel.keyblock new file mode 100644 index 0000000..9740be4 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/chromeos/kernel.keyblock differ diff --git a/Final_Zip/AIK/OFRP/bin/chromeos/kernel_data_key.vbprivk b/Final_Zip/AIK/OFRP/bin/chromeos/kernel_data_key.vbprivk new file mode 100644 index 0000000..8d392fb Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/chromeos/kernel_data_key.vbprivk differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/blobpack b/Final_Zip/AIK/OFRP/bin/linux/i686/blobpack new file mode 100755 index 0000000..685c6c0 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/blobpack differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/blobunpack b/Final_Zip/AIK/OFRP/bin/linux/i686/blobunpack new file mode 100755 index 0000000..2d96696 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/blobunpack differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/dhtbsign b/Final_Zip/AIK/OFRP/bin/linux/i686/dhtbsign new file mode 100755 index 0000000..f117b88 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/dhtbsign differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/dumpimage b/Final_Zip/AIK/OFRP/bin/linux/i686/dumpimage new file mode 100755 index 0000000..8ba15d3 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/dumpimage differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/elftool b/Final_Zip/AIK/OFRP/bin/linux/i686/elftool new file mode 100755 index 0000000..b25dd56 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/elftool differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/futility b/Final_Zip/AIK/OFRP/bin/linux/i686/futility new file mode 100755 index 0000000..c830e31 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/futility differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/loki_tool b/Final_Zip/AIK/OFRP/bin/linux/i686/loki_tool new file mode 100755 index 0000000..d305760 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/loki_tool differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/lz4 b/Final_Zip/AIK/OFRP/bin/linux/i686/lz4 new file mode 100755 index 0000000..801bad4 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/lz4 differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/mboot b/Final_Zip/AIK/OFRP/bin/linux/i686/mboot new file mode 100755 index 0000000..023eab0 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/mboot differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/mkbootimg b/Final_Zip/AIK/OFRP/bin/linux/i686/mkbootimg new file mode 100755 index 0000000..ed68c2d Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/mkbootimg differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/mkimage b/Final_Zip/AIK/OFRP/bin/linux/i686/mkimage new file mode 100755 index 0000000..8e97c0c Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/mkimage differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/mkmtkhdr b/Final_Zip/AIK/OFRP/bin/linux/i686/mkmtkhdr new file mode 100755 index 0000000..d71db24 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/mkmtkhdr differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/pxa-mkbootimg b/Final_Zip/AIK/OFRP/bin/linux/i686/pxa-mkbootimg new file mode 100755 index 0000000..0636873 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/pxa-unpackbootimg b/Final_Zip/AIK/OFRP/bin/linux/i686/pxa-unpackbootimg new file mode 100755 index 0000000..8dbdecf Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/rkcrc b/Final_Zip/AIK/OFRP/bin/linux/i686/rkcrc new file mode 100755 index 0000000..45027f3 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/rkcrc differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/sony_dump b/Final_Zip/AIK/OFRP/bin/linux/i686/sony_dump new file mode 100755 index 0000000..2563e25 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/sony_dump differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/unpackbootimg b/Final_Zip/AIK/OFRP/bin/linux/i686/unpackbootimg new file mode 100755 index 0000000..b70aed5 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/unpackbootimg differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/i686/unpackelf b/Final_Zip/AIK/OFRP/bin/linux/i686/unpackelf new file mode 100755 index 0000000..12e9057 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/i686/unpackelf differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/blobpack b/Final_Zip/AIK/OFRP/bin/linux/x86_64/blobpack new file mode 100755 index 0000000..90256d4 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/blobpack differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/blobunpack b/Final_Zip/AIK/OFRP/bin/linux/x86_64/blobunpack new file mode 100755 index 0000000..53374ff Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/dhtbsign b/Final_Zip/AIK/OFRP/bin/linux/x86_64/dhtbsign new file mode 100755 index 0000000..ccb7a67 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/dumpimage b/Final_Zip/AIK/OFRP/bin/linux/x86_64/dumpimage new file mode 100755 index 0000000..861bd68 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/elftool b/Final_Zip/AIK/OFRP/bin/linux/x86_64/elftool new file mode 100755 index 0000000..07a520d Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/elftool differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/futility b/Final_Zip/AIK/OFRP/bin/linux/x86_64/futility new file mode 100755 index 0000000..4d56ec3 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/futility differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/loki_tool b/Final_Zip/AIK/OFRP/bin/linux/x86_64/loki_tool new file mode 100755 index 0000000..4a1b74a Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/lz4 b/Final_Zip/AIK/OFRP/bin/linux/x86_64/lz4 new file mode 100755 index 0000000..8a4136b Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/lz4 differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/mboot b/Final_Zip/AIK/OFRP/bin/linux/x86_64/mboot new file mode 100755 index 0000000..8bf92d4 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/mboot differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/mkbootimg b/Final_Zip/AIK/OFRP/bin/linux/x86_64/mkbootimg new file mode 100755 index 0000000..2b628c3 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/mkimage b/Final_Zip/AIK/OFRP/bin/linux/x86_64/mkimage new file mode 100755 index 0000000..6419ea3 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/mkimage differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/mkmtkhdr b/Final_Zip/AIK/OFRP/bin/linux/x86_64/mkmtkhdr new file mode 100755 index 0000000..1ab256f Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/pxa-mkbootimg b/Final_Zip/AIK/OFRP/bin/linux/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..5885720 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/OFRP/bin/linux/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..d7b1b7d Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/rkcrc b/Final_Zip/AIK/OFRP/bin/linux/x86_64/rkcrc new file mode 100755 index 0000000..f218228 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/sony_dump b/Final_Zip/AIK/OFRP/bin/linux/x86_64/sony_dump new file mode 100755 index 0000000..6fc3696 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/unpackbootimg b/Final_Zip/AIK/OFRP/bin/linux/x86_64/unpackbootimg new file mode 100755 index 0000000..8f4fccf Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/OFRP/bin/linux/x86_64/unpackelf b/Final_Zip/AIK/OFRP/bin/linux/x86_64/unpackelf new file mode 100755 index 0000000..477e25d Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/linux/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/blobpack b/Final_Zip/AIK/OFRP/bin/macos/i386/blobpack new file mode 100755 index 0000000..2336ec0 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/blobpack differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/blobunpack b/Final_Zip/AIK/OFRP/bin/macos/i386/blobunpack new file mode 100755 index 0000000..834cb50 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/blobunpack differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/cpio b/Final_Zip/AIK/OFRP/bin/macos/i386/cpio new file mode 100755 index 0000000..b7e41f1 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/cpio differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/dd b/Final_Zip/AIK/OFRP/bin/macos/i386/dd new file mode 100755 index 0000000..b684139 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/dd differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/dhtbsign b/Final_Zip/AIK/OFRP/bin/macos/i386/dhtbsign new file mode 100755 index 0000000..b3ba0ba Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/dhtbsign differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/dumpimage b/Final_Zip/AIK/OFRP/bin/macos/i386/dumpimage new file mode 100755 index 0000000..917c8ed Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/dumpimage differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/elftool b/Final_Zip/AIK/OFRP/bin/macos/i386/elftool new file mode 100755 index 0000000..27f12be Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/elftool differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/file b/Final_Zip/AIK/OFRP/bin/macos/i386/file new file mode 100755 index 0000000..8024db5 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/file differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/futility b/Final_Zip/AIK/OFRP/bin/macos/i386/futility new file mode 100755 index 0000000..8658249 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/futility differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/libiconv.2.dylib b/Final_Zip/AIK/OFRP/bin/macos/i386/libiconv.2.dylib new file mode 100755 index 0000000..ec61db0 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/libintl.8.dylib b/Final_Zip/AIK/OFRP/bin/macos/i386/libintl.8.dylib new file mode 100755 index 0000000..c297f0a Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/libintl.8.dylib differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/liblzma.5.dylib b/Final_Zip/AIK/OFRP/bin/macos/i386/liblzma.5.dylib new file mode 100755 index 0000000..126d338 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/liblzo2.2.dylib b/Final_Zip/AIK/OFRP/bin/macos/i386/liblzo2.2.dylib new file mode 100755 index 0000000..8a24e23 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/libmagic.1.dylib b/Final_Zip/AIK/OFRP/bin/macos/i386/libmagic.1.dylib new file mode 100755 index 0000000..92e6c7f Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/loki_tool b/Final_Zip/AIK/OFRP/bin/macos/i386/loki_tool new file mode 100755 index 0000000..7eecf68 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/loki_tool differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/lz4 b/Final_Zip/AIK/OFRP/bin/macos/i386/lz4 new file mode 100755 index 0000000..43126f8 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/lz4 differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/lzop b/Final_Zip/AIK/OFRP/bin/macos/i386/lzop new file mode 100755 index 0000000..fc3103c Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/lzop differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/mboot b/Final_Zip/AIK/OFRP/bin/macos/i386/mboot new file mode 100755 index 0000000..dfa0d3e Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/mboot differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/mkbootimg b/Final_Zip/AIK/OFRP/bin/macos/i386/mkbootimg new file mode 100755 index 0000000..82f05a9 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/mkbootimg differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/mkimage b/Final_Zip/AIK/OFRP/bin/macos/i386/mkimage new file mode 100755 index 0000000..e760d6e Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/mkimage differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/mkmtkhdr b/Final_Zip/AIK/OFRP/bin/macos/i386/mkmtkhdr new file mode 100755 index 0000000..907ba0f Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/mkmtkhdr differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/pxa-mkbootimg b/Final_Zip/AIK/OFRP/bin/macos/i386/pxa-mkbootimg new file mode 100755 index 0000000..12f8337 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/pxa-unpackbootimg b/Final_Zip/AIK/OFRP/bin/macos/i386/pxa-unpackbootimg new file mode 100755 index 0000000..2f1fe6c Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/rkcrc b/Final_Zip/AIK/OFRP/bin/macos/i386/rkcrc new file mode 100755 index 0000000..c2b70ce Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/rkcrc differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/sony_dump b/Final_Zip/AIK/OFRP/bin/macos/i386/sony_dump new file mode 100755 index 0000000..2f187e6 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/sony_dump differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/tail b/Final_Zip/AIK/OFRP/bin/macos/i386/tail new file mode 100755 index 0000000..99ee578 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/tail differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/truncate b/Final_Zip/AIK/OFRP/bin/macos/i386/truncate new file mode 100755 index 0000000..26bf16b Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/truncate differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/unpackbootimg b/Final_Zip/AIK/OFRP/bin/macos/i386/unpackbootimg new file mode 100755 index 0000000..e92b74e Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/unpackbootimg differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/unpackelf b/Final_Zip/AIK/OFRP/bin/macos/i386/unpackelf new file mode 100755 index 0000000..4ea11d0 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/unpackelf differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/i386/xz b/Final_Zip/AIK/OFRP/bin/macos/i386/xz new file mode 100755 index 0000000..b501c14 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/i386/xz differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/blobpack b/Final_Zip/AIK/OFRP/bin/macos/x86_64/blobpack new file mode 100755 index 0000000..816fcf2 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/blobpack differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/blobunpack b/Final_Zip/AIK/OFRP/bin/macos/x86_64/blobunpack new file mode 100755 index 0000000..9241057 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/cpio b/Final_Zip/AIK/OFRP/bin/macos/x86_64/cpio new file mode 100755 index 0000000..991c5a8 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/cpio differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/dd b/Final_Zip/AIK/OFRP/bin/macos/x86_64/dd new file mode 100755 index 0000000..e927886 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/dd differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/dhtbsign b/Final_Zip/AIK/OFRP/bin/macos/x86_64/dhtbsign new file mode 100755 index 0000000..162fa88 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/dumpimage b/Final_Zip/AIK/OFRP/bin/macos/x86_64/dumpimage new file mode 100755 index 0000000..473538b Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/elftool b/Final_Zip/AIK/OFRP/bin/macos/x86_64/elftool new file mode 100755 index 0000000..0185019 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/elftool differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/file b/Final_Zip/AIK/OFRP/bin/macos/x86_64/file new file mode 100755 index 0000000..0b9f24c Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/file differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/futility b/Final_Zip/AIK/OFRP/bin/macos/x86_64/futility new file mode 100755 index 0000000..a28db4d Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/futility differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/libiconv.2.dylib b/Final_Zip/AIK/OFRP/bin/macos/x86_64/libiconv.2.dylib new file mode 100755 index 0000000..8f56eed Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/libintl.8.dylib b/Final_Zip/AIK/OFRP/bin/macos/x86_64/libintl.8.dylib new file mode 100755 index 0000000..f270e89 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/libintl.8.dylib differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/liblzma.5.dylib b/Final_Zip/AIK/OFRP/bin/macos/x86_64/liblzma.5.dylib new file mode 100755 index 0000000..39c6b96 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/liblzo2.2.dylib b/Final_Zip/AIK/OFRP/bin/macos/x86_64/liblzo2.2.dylib new file mode 100755 index 0000000..a05b7eb Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/libmagic.1.dylib b/Final_Zip/AIK/OFRP/bin/macos/x86_64/libmagic.1.dylib new file mode 100755 index 0000000..29ad687 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/loki_tool b/Final_Zip/AIK/OFRP/bin/macos/x86_64/loki_tool new file mode 100755 index 0000000..1b9f062 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/lz4 b/Final_Zip/AIK/OFRP/bin/macos/x86_64/lz4 new file mode 100755 index 0000000..bcee28d Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/lz4 differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/lzop b/Final_Zip/AIK/OFRP/bin/macos/x86_64/lzop new file mode 100755 index 0000000..8be71f4 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/lzop differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/mboot b/Final_Zip/AIK/OFRP/bin/macos/x86_64/mboot new file mode 100755 index 0000000..ad67219 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/mboot differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/mkbootimg b/Final_Zip/AIK/OFRP/bin/macos/x86_64/mkbootimg new file mode 100755 index 0000000..137aef2 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/mkimage b/Final_Zip/AIK/OFRP/bin/macos/x86_64/mkimage new file mode 100755 index 0000000..61d5a9c Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/mkimage differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/mkmtkhdr b/Final_Zip/AIK/OFRP/bin/macos/x86_64/mkmtkhdr new file mode 100755 index 0000000..99949d5 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/pxa-mkbootimg b/Final_Zip/AIK/OFRP/bin/macos/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..0ec79a3 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/OFRP/bin/macos/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..03fc864 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/rkcrc b/Final_Zip/AIK/OFRP/bin/macos/x86_64/rkcrc new file mode 100755 index 0000000..9b0b94a Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/sony_dump b/Final_Zip/AIK/OFRP/bin/macos/x86_64/sony_dump new file mode 100755 index 0000000..e219101 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/tail b/Final_Zip/AIK/OFRP/bin/macos/x86_64/tail new file mode 100755 index 0000000..59692eb Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/tail differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/truncate b/Final_Zip/AIK/OFRP/bin/macos/x86_64/truncate new file mode 100755 index 0000000..f2ed631 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/truncate differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/unpackbootimg b/Final_Zip/AIK/OFRP/bin/macos/x86_64/unpackbootimg new file mode 100755 index 0000000..a717c48 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/unpackelf b/Final_Zip/AIK/OFRP/bin/macos/x86_64/unpackelf new file mode 100755 index 0000000..d6edefa Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/OFRP/bin/macos/x86_64/xz b/Final_Zip/AIK/OFRP/bin/macos/x86_64/xz new file mode 100755 index 0000000..6faedc7 Binary files /dev/null and b/Final_Zip/AIK/OFRP/bin/macos/x86_64/xz differ diff --git a/Final_Zip/AIK/OFRP/bin/magic b/Final_Zip/AIK/OFRP/bin/magic new file mode 100644 index 0000000..4530761 --- /dev/null +++ b/Final_Zip/AIK/OFRP/bin/magic @@ -0,0 +1,1916 @@ +#------------------------------------------------------------------------------ +# Slimmed down magic file for archives only +#------------------------------------------------------------------------------ +# $File: archive,v 1.145 2021/01/03 20:58:47 christos Exp $ +# archive: file(1) magic for archive formats (see also "msdos" for self- +# extracting compressed archives) +# +# cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc. +# pre-POSIX "tar" archives are also handled in the C code ../../src/is_tar.c. + +# POSIX tar archives +# URL: https://en.wikipedia.org/wiki/Tar_(computing) +# Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current +# header mainly padded with nul bytes +500 quad 0 +!:strength /2 +# filename or extended attribute printable strings in range space null til umlaut ue +>0 ubeshort >0x1F00 +>>0 ubeshort <0xFCFD +# last 4 header bytes often null but tar\0 in gtarfail2.tar gtarfail.tar-bad +# at https://sourceforge.net/projects/s-tar/files/testscripts/ +>>>508 ubelong&0x8B9E8DFF 0 +# nul, space or ascii digit 0-7 at start of mode +>>>>100 ubyte&0xC8 =0 +>>>>>101 ubyte&0xC8 =0 +# nul, space at end of check sum +>>>>>>155 ubyte&0xDF =0 +# space or ascii digit 0 at start of check sum +>>>>>>>148 ubyte&0xEF =0x20 +# minimal check and then display tar archive information which can also be +# embedded inside others like Android Backup, Clam AntiVirus database +>257 string !ustar +# header padded with nuls +>>257 ulong =0 +# GNU tar version 1.29 with non pax format option without refusing +# creates misleading V7 header for Long path, Multi-volume, Volume type +>>>156 ubyte 0x4c GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x4d GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x56 GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 default x tar archive (V7) +!:mime application/x-tar +#!:ext tar +# other stuff in padding +# some implementations add new fields to the blank area at the end of the header record +# created for example by DOS TAR 3.20g 1994 Tim V.Shapore with -j option +>>257 ulong !0 tar archive (old) +!:mime application/x-tar +#!:ext tar +# magic in newer, GNU, posix variants +>257 string =ustar +# 2 last char of magic and UStar version because string expression does not work +# 2 space characters followed by a null for GNU variant +>>261 ubelong =0x72202000 POSIX tar archive (GNU) +!:mime application/x-gtar +#!:ext tar/gtar +# UStar version with ASCII "00" +>>261 ubelong 0x72003030 POSIX +# gLOBAL and ExTENSION type only found in POSIX.1-2001 format +>>>156 ubyte 0x67 \b.1-2001 +>>>156 ubyte 0x78 \b.1-2001 +>>>156 ubyte x tar archive +!:mime application/x-ustar +#!:ext tar/ustar +# version with 2 binary nuls embedded in Android Backup like com.android.settings.ab +>>261 ubelong 0x72000000 tar archive (ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# not seen ustar variant with garbish version +>>261 default x tar archive (unknown ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# type flag of 1st tar archive member +#>156 ubyte x \b, %c-type +>156 ubyte x +>>156 ubyte 0 \b, file +>>156 ubyte 0x30 \b, file +>>156 ubyte 0x31 \b, hard link +>>156 ubyte 0x32 \b, symlink +>>156 ubyte 0x33 \b, char device +>>156 ubyte 0x34 \b, block device +>>156 ubyte 0x35 \b, directory +>>156 ubyte 0x36 \b, fifo +>>156 ubyte 0x37 \b, reserved +>>156 ubyte 0x4c \b, long path +>>156 ubyte 0x4d \b, multi volume +>>156 ubyte 0x56 \b, volume +>>156 ubyte 0x67 \b, global +>>156 ubyte 0x78 \b, extension +>>156 default x \b, type +>>>156 ubyte x '%c' +# name[100] +>0 string >\0 %-.60s +# mode mainly stored as an octal number in ASCII null or space terminated +>100 string >\0 \b, mode %-.7s +# user id mainly as octal numbers in ASCII null or space terminated +>108 string >\0 \b, uid %-.7s +# group id mainly as octal numbers in ASCII null or space terminated +>116 string >\0 \b, gid %-.7s +# size mainly as octal number in ASCII +>124 ubyte <0x38 +>>124 string >\0 \b, size %-.12s +# coding indicated by setting the high-order bit of the leftmost byte +>124 ubyte >0xEF \b, size 0x +>>124 ubyte !0xff \b%2.2x +>>125 ubyte !0xff \b%2.2x +>>126 ubyte !0xff \b%2.2x +>>127 ubyte !0xff \b%2.2x +>>128 ubyte !0xff \b%2.2x +>>129 ubyte !0xff \b%2.2x +>>130 ubyte !0xff \b%2.2x +>>131 ubyte !0xff \b%2.2x +>>132 ubyte !0xff \b%2.2x +>>133 ubyte !0xff \b%2.2x +>>134 ubyte !0xff \b%2.2x +>>135 ubyte !0xff \b%2.2x +# seconds since 0:0:0 1 jan 1970 UTC as octal number mainly in ASCII null or space terminated +>136 string >\0 \b, seconds %-.11s +# header checksum stored as an octal number in ASCII null or space terminated +#>148 string x \b, cksum %.7s +# linkname[100] +>157 string >\0 \b, linkname %-.40s +# additional fields for ustar +>257 string =ustar +# owner user name null terminated +>>265 string >\0 \b, user %-.32s +# group name null terminated +>>297 string >\0 \b, group %-.32s +# device major minor if not zero +>>329 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>329 string x \b, devmaj %-.7s +>>337 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>337 string x \b, devmin %-.7s +# prefix[155] +>>345 string >\0 \b, prefix %-.155s +# old non ustar/POSIX tar +>257 string !ustar +>>508 string =tar\0 +# padding[255] in old star +>>>257 string >\0 \b, padding: %-.40s +>>508 default x +# padding[255] in old tar sometimes comment field +>>>257 string >\0 \b, comment: %-.40s + +# Incremental snapshot gnu-tar format from: +# https://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html +0 string GNU\ tar- GNU tar incremental snapshot data +>&0 regex [0-9]\.[0-9]+-[0-9]+ version %s + +# cpio archives +# +# Yes, the top two "cpio archive" formats *are* supposed to just be "short". +# The idea is to indicate archives produced on machines with the same +# byte order as the machine running "file" with "cpio archive", and +# to indicate archives produced on machines with the opposite byte order +# from the machine running "file" with "cpio byte-swapped archive". +# +# The SVR4 "cpio(4)" hints that there are additional formats, but they +# are defined as "short"s; I think all the new formats are +# character-header formats and thus are strings, not numbers. +0 short 070707 cpio archive +!:mime application/x-cpio +0 short 0143561 cpio byte-swapped archive +!:mime application/x-cpio # encoding: swapped +0 string 070707 cpio ASCII archive (pre-SVR4 or odc) +0 string 070701 cpio ASCII archive (SVR4 with no CRC) +0 string 070702 cpio ASCII archive (SVR4 with CRC) + +# +# Various archive formats used by various versions of the "ar" +# command. +# + +# +# Original UNIX archive formats. +# They were written with binary values in host byte order, and +# the magic number was a host "int", which might have been 16 bits +# or 32 bits. We don't say "PDP-11" or "VAX", as there might have +# been ports to little-endian 16-bit-int or 32-bit-int platforms +# (x86?) using some of those formats; if none existed, feel free +# to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian +# 32-bit. There might have been big-endian ports of that sort as +# well. +# +0 leshort 0177555 very old 16-bit-int little-endian archive +0 beshort 0177555 very old 16-bit-int big-endian archive +0 lelong 0177555 very old 32-bit-int little-endian archive +0 belong 0177555 very old 32-bit-int big-endian archive + +0 leshort 0177545 old 16-bit-int little-endian archive +>2 string __.SYMDEF random library +0 beshort 0177545 old 16-bit-int big-endian archive +>2 string __.SYMDEF random library +0 lelong 0177545 old 32-bit-int little-endian archive +>4 string __.SYMDEF random library +0 belong 0177545 old 32-bit-int big-endian archive +>4 string __.SYMDEF random library + +# +# From "pdp" (but why a 4-byte quantity?) +# +0 lelong 0x39bed PDP-11 old archive +0 lelong 0x39bee PDP-11 4.0 archive + +# +# XXX - what flavor of APL used this, and was it a variant of +# some ar archive format? It's similar to, but not the same +# as, the APL workspace magic numbers in pdp. +# +0 long 0100554 apl workspace + +# +# System V Release 1 portable(?) archive format. +# +0 string = System V Release 1 ar archive +!:mime application/x-archive + +# +# Debian package; it's in the portable archive format, and needs to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "debian". +# +# Update: Joerg Jenderek +# URL: https://en.wikipedia.org/wiki/Deb_(file_format) +0 string =!\ndebian +# https://manpages.debian.org/testing/dpkg/dpkg-split.1.en.html +>14 string -split part of multipart Debian package +!:mime application/vnd.debian.binary-package +# udeb is used for stripped down deb file +#!:ext deb/udeb +>14 string -binary Debian binary package +!:mime application/vnd.debian.binary-package +# For ipk packager see also https://en.wikipedia.org/wiki/Opkg +#!:ext deb/udeb/ipk +# This should not happen +>14 default x Unknown Debian package +# NL terminated version; for most Debian cases this is 2.0 or 2.1 for split +>68 string >\0 (format %s) +#>68 string !2.0\n +#>>68 string x (format %.3s) +>68 string =2.0\n +# 2nd archive name=control archive name like control.tar.gz or control.tar.xz +>>72 string >\0 \b, with %.14s +# look for 3rd archive name=data archive name like data.tar.{gz,xz,bz2,lzma} +>>0 search/0x93e4f data.tar. \b, data compression +# the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised +# for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb +>>>&0 string x %.2s +# skip space (0x20 BSD) and slash (0x2f System V) character marking end of name +>>>&2 ubyte !0x20 +>>>>&-1 ubyte !0x2f +# display 3rd character of file name extension like 2 of bz2 or m of lzma +>>>>>&-1 ubyte x \b%c +>>>>>>&0 ubyte !0x20 +>>>>>>>&-1 ubyte !0x2f +# display 4th character of file name extension like a of lzma +>>>>>>>>&-1 ubyte x \b%c +# split debian package case +>68 string =2.1\n +# dpkg-1.18.25/dpkg-split/info.c +# NL terminated ASCII package name like ckermit +>>&0 string x \b, %s +# NL terminated package version like 302-5.3 +>>>&1 string x %s +# NL terminated MD5 checksum +>>>>&1 string x \b, MD5 %s +# NL terminated original package length +>>>>>&1 string x \b, unsplitted size %s +# NL terminated part length +>>>>>>&1 string x \b, part length %s +# NL terminated package part like n/m +>>>>>>>&1 string x \b, part %s +# NL terminated package architecture like armhf since dpkg 1.16.1 or later +>>>>>>>>&1 string x \b, %s + +# +# MIPS archive; they're in the portable archive format, and need to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "__________E". +# +0 string =!\n__________E MIPS archive +!:mime application/x-archive +>20 string U with MIPS Ucode members +>21 string L with MIPSEL members +>21 string B with MIPSEB members +>19 string L and an EL hash table +>19 string B and an EB hash table +>22 string X -- out of date + +# +# BSD/SVR2-and-later portable archive formats. +# +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/AR +# Reference: https://www.unix.com/man-page/opensolaris/3HEAD/ar.h/ +# Note: Mach-O universal binary in ./cafebabe is dependent +# TODO: unify current ar archive, MIPS archive, Debian package +# distinguish BSD, SVR; 32, 64 bit; HP from other 32-bit SVR; +# *.ar packages from *.a libraries. handle empty archive +0 string =!\n current ar archive +# print first and possibly second ar_name[16] for debugging purpose +#>8 string x \b, 1st "%.16s" +#>68 string x \b, 2nd "%.16s" +!:mime application/x-archive +# a in most case for libraries; lib for Microsoft libraries; ar else cases +#!:ext a/lib/ar +>8 string __.SYMDEF random library +# first member with long marked name __.SYMDEF SORTED implies BSD library +>68 string __.SYMDEF\ SORTED random library +# Reference: https://parisc.wiki.kernel.org/images-parisc/b/b2/Rad_11_0_32.pdf +# "archive file" entry moved from ./hp +# LST header system_id 0210h~PA-RISC 1.1,... identifies the target architecture +# LST header a_magic 0619h~relocatable library +>68 belong 0x020b0619 - PA-RISC1.0 relocatable library +>68 belong 0x02100619 - PA-RISC1.1 relocatable library +>68 belong 0x02110619 - PA-RISC1.2 relocatable library +>68 belong 0x02140619 - PA-RISC2.0 relocatable library +#EOF for common ar archives + +# +# "Thin" archive, as can be produced by GNU ar. +# +0 string =!\n thin archive with +>68 belong 0 no symbol entries +>68 belong 1 %d symbol entry +>68 belong >1 %d symbol entries + +0 search/1 -h- Software Tools format archive text + +# ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com) +# +# The first byte is the magic (0x1a), byte 2 is the compression type for +# the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS +# filename of the first file (null terminated). Since some types collide +# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%), +# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo. +0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000031a ARC archive data, packed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched +!:mime application/x-arc +# [JW] stuff taken from idarc, obviously ARC successors: +0 lelong&0x8080ffff 0x00000a1a PAK archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000141a ARC+ archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000481a HYP archive data +!:mime application/x-arc + +# Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk) +# I can't create either SPARK or ArcFS archives so I have not tested this stuff +# [GRR: the original entries collide with ARC, above; replaced with combined +# version (not tested)] +#0 byte 0x1a RISC OS archive (spark format) +0 string \032archive RISC OS archive (ArcFS format) +0 string Archive\000 RISC OS archive (ArcFS format) + +# All these were taken from idarc, many could not be verified. Unfortunately, +# there were many low-quality sigs, i.e. easy to trigger false positives. +# Please notify me of any real-world fishy/ambiguous signatures and I'll try +# to get my hands on the actual archiver and see if I find something better. [JW] +# probably many can be enhanced by finding some 0-byte or control char near the start + +# idarc calls this Crush/Uncompressed... *shrug* +0 string CRUSH Crush archive data +# Squeeze It (.sqz) +0 string HLSQZ Squeeze It archive data +# SQWEZ +0 string SQWEZ SQWEZ archive data +# HPack (.hpk) +0 string HPAK HPack archive data +# HAP +0 string \x91\x33HF HAP archive data +# MD/MDCD +0 string MDmd MDCD archive data +# LIM +0 string LIM\x1a LIM archive data +# SAR +3 string LH5 SAR archive data +# BSArc/BS2 +0 string \212\3SB\020\0 BSArc/BS2 archive data +# Bethesda Softworks Archive (Oblivion) +0 string BSA\0 BSArc archive data +>4 lelong x version %d +# MAR +2 string =-ah MAR archive data +# ACB +#0 belong&0x00f800ff 0x00800000 ACB archive data +# CPZ +# TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data +# JRC +0 string JRchive JRC archive data +# Quantum +0 string DS\0 Quantum archive data +# ReSOF +0 string PK\3\6 ReSOF archive data +# QuArk +0 string 7\4 QuArk archive data +# YAC +14 string YC YAC archive data +# X1 +0 string X1 X1 archive data +0 string XhDr X1 archive data +# CDC Codec (.dqt) +0 belong&0xffffe000 0x76ff2000 CDC Codec archive data +# AMGC +0 string \xad6" AMGC archive data +# NuLIB +0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data +# PakLeo +0 string LEOLZW PAKLeo archive data +# ChArc +0 string SChF ChArc archive data +# PSA +0 string PSA PSA archive data +# CrossePAC +0 string DSIGDCC CrossePAC archive data +# Freeze +0 string \x1f\x9f\x4a\x10\x0a Freeze archive data +# KBoom +0 string \xc2\xa8MP\xc2\xa8 KBoom archive data +# NSQ, must go after CDC Codec +0 string \x76\xff NSQ archive data +# DPA +0 string Dirk\ Paehl DPA archive data +# BA +# TODO: idarc says "bytes 0-2 == bytes 3-5" +# TTComp +# URL: http://fileformats.archiveteam.org/wiki/TTComp_archive +# Update: Joerg Jenderek +# GRR: line below is too general as it matches also Panorama database "TCDB 2003-10 demo.pan", others +0 string \0\6 +# look for first keyword of Panorama database *.pan +>12 search/261 DESIGN +# skip keyword with low entropy +>12 default x TTComp archive, binary, 4K dictionary +# (version 5.25) labeled the above entry as "TTComp archive data" +# From: Joerg Jenderek +# URL: https://wiki.68kmla.org/DiskCopy_4.2_format_specification +# reference: http://nulib.com/library/FTN.e00005.htm +0x52 ubeshort 0x0100 +# test for disk image size equal or above 400k +>0x40 ubelong >409599 +# test also for disk image size equal or below 1440k to skip +# windows7en.mbr UNICODE.DAT +>>0x40 ubelong <1474561 +# To skip Flags$StringJoiner.class with size 00106A61h test also for only 4 disk image sizes +# 00064000 for 400k GCR disks +# 000c8000 for 800k GCR disks +# 000b4000 for 720k MFM disks +# 00168000 for 1440k MFM disks +>>>0x40 ubelong&0xffE03fFF 0 +# display information of Apple DiskCopy 4.2 floppy image +# image pascal name padded with NULs like Microsoft Mail +>00 pstring/B x Apple DiskCopy 4.2 image %s +#!:mime application/octet-stream +!:mime application/x-dc42-floppy-image +!:apple dCpydImg +#!:ext image/dc42 +# data size in bytes like 409600 +>0x40 ubelong x \b, %u bytes +# for debugging purpose size in hexadecimal +#>0x40 ubelong x (0x%8.8x) +# tag size in bytes +>0x44 ubelong >0 \b, 0x%x tag size +# data checksum +#>0x48 ubelong x \b, 0x%x checksum +# tag checksum +#>0x4c ubelong x \b, 0x%x tag checksum +# disk encoding +>0x50 ubyte 0 \b, GCR CLV ssdd (400k) +>0x50 ubyte 1 \b, GCR CLV dsdd (800k) +>0x50 ubyte 2 \b, MFM CAV dsdd (720k) +>0x50 ubyte 3 \b, MFM CAV dshd (1440k) +>0x50 ubyte >3 \b, 0x%x encoding +# format byte +>0x51 ubyte x \b, 0x%x format +#>0x54 ubequad x \b, data 0x%16.16llx +# ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation? +0 string ESP ESP archive data +# ZPack +0 string \1ZPK\1 ZPack archive data +# Sky +0 string \xbc\x40 Sky archive data +# UFA +0 string UFA UFA archive data +# Dry +0 string =-H2O DRY archive data +# FoxSQZ +0 string FOXSQZ FoxSQZ archive data +# AR7 +0 string ,AR7 AR7 archive data +# PPMZ +0 string PPMZ PPMZ archive data +# MS Compress +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/MS-DOS_installation_compression +# Reference: https://hwiegman.home.xs4all.nl/fileformats/compress/szdd_kwaj_format.html +# Note: use correct version of extracting tool like EXPAND, UNPACK, DECOMP or 7Z +4 string \x88\xf0\x27 +# KWAJ variant +>0 string KWAJ MS Compress archive data, KWAJ variant +!:mime application/x-ms-compress-kwaj +# extension not working in version 5.32 +# magic/Magdir/archive, 284: Warning: EXTENSION type ` ??_' has bad char '?' +# file: line 284: Bad magic entry ' ??_' +#!:ext ??_ +# compression method (0-4) +>>8 uleshort x \b, %u method +# offset of compressed data +>>10 uleshort x \b, 0x%x offset +#>>(10.s) uleshort x +#>>>&-6 string x \b, TEST extension %-.3s +# header flags to mark header extensions +>>12 uleshort >0 \b, 0x%x flags +# 4 bytes: decompressed length of file +>>12 uleshort &0x01 +>>>14 ulelong x \b, original size: %u bytes +# 2 bytes: unknown purpose +# 2 bytes: length of unknown data + mentioned bytes +# 1-9 bytes: null-terminated file name +# 1-4 bytes: null-terminated file extension +>>12 uleshort &0x08 +>>>12 uleshort ^0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>>&16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>&16 string x %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>12 uleshort &0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +# 2 bytes: length of data + mentioned bytes +# +# SZDD variant Haruhiko Okumura's LZSS or 7z type MsLZ +>0 string SZDD MS Compress archive data, SZDD variant +!:mime application/x-ms-compress-szdd +#!:ext ??_ +# The character missing from the end of the filename (0=unknown) +>>9 string >\0 \b, %-.1s is last character of original name +# https://www.betaarchive.com/forum/viewtopic.php?t=26161 +# Compression mode: "A" (0x41) found but sometimes "B" in Windows 3.1 builds 026 and 034e +>>8 string !A \b, %-.1s method +>>10 ulelong >0 \b, original size: %u bytes +# QBasic SZDD variant +3 string \x88\xf0\x27 +>0 string SZ\x20 MS Compress archive data, QBasic variant +!:mime application/x-ms-compress-sz +#!:ext ??$ +>>8 ulelong >0 \b, original size: %u bytes + +# MP3 (archiver, not lossy audio compression) +0 string MP3\x1a MP3-Archiver archive data +# ZET +0 string OZ\xc3\x9d ZET archive data +# TSComp +0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data +# ARQ +0 string gW\4\1 ARQ archive data +# Squash +3 string OctSqu Squash archive data +# Terse +0 string \5\1\1\0 Terse archive data +# PUCrunch +0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data +# UHarc +0 string UHA UHarc archive data +# ABComp +0 string \2AB ABComp archive data +0 string \3AB2 ABComp archive data +# CMP +0 string CO\0 CMP archive data +# Splint +0 string \x93\xb9\x06 Splint archive data +# InstallShield +0 string \x13\x5d\x65\x8c InstallShield Z archive Data +# Gather +1 string GTH Gather archive data +# BOA +0 string BOA BOA archive data +# RAX +0 string ULEB\xa RAX archive data +# Xtreme +0 string ULEB\0 Xtreme archive data +# Pack Magic +0 string @\xc3\xa2\1\0 Pack Magic archive data +# BTS +0 belong&0xfeffffff 0x1a034465 BTS archive data +# ELI 5750 +0 string Ora\ ELI 5750 archive data +# QFC +0 string \x1aFC\x1a QFC archive data +0 string \x1aQF\x1a QFC archive data +# PRO-PACK +0 string RNC PRO-PACK archive data +# 777 +0 string 777 777 archive data +# LZS221 +0 string sTaC LZS221 archive data +# HPA +0 string HPA HPA archive data +# Arhangel +0 string LG Arhangel archive data +# EXP1, uses bzip2 +0 string 0123456789012345BZh EXP1 archive data +# IMP +0 string IMP\xa IMP archive data +# NRV +0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data +# Squish +0 string \x73\xb2\x90\xf4 Squish archive data +# Par +0 string PHILIPP Par archive data +0 string PAR Par archive data +# HIT +0 string UB HIT archive data +# SBX +0 belong&0xfffff000 0x53423000 SBX archive data +# NaShrink +0 string NSK NaShrink archive data +# SAPCAR +0 string #\ CAR\ archive\ header SAPCAR archive data +0 string CAR\ 2.00RG SAPCAR archive data +# Disintegrator +0 string DST Disintegrator archive data +# ASD +0 string ASD ASD archive data +# InstallShield CAB +0 string ISc( InstallShield CAB +# TOP4 +0 string T4\x1a TOP4 archive data +# BatComp left out: sig looks like COM executable +# so TODO: get real 4dos batcomp file and find sig +# BlakHole +0 string BH\5\7 BlakHole archive data +# BIX +0 string BIX0 BIX archive data +# ChiefLZA +0 string ChfLZ ChiefLZA archive data +# Blink +0 string Blink Blink archive data +# Logitech Compress +0 string \xda\xfa Logitech Compress archive data +# ARS-Sfx (FIXME: really a SFX? then goto COM/EXE) +1 string (C)\ STEPANYUK ARS-Sfx archive data +# AKT/AKT32 +0 string AKT32 AKT32 archive data +0 string AKT AKT archive data +# NPack +0 string MSTSM NPack archive data +# PFT +0 string \0\x50\0\x14 PFT archive data +# SemOne +0 string SEM SemOne archive data +# PPMD +0 string \x8f\xaf\xac\x84 PPMD archive data +# FIZ +0 string FIZ FIZ archive data +# MSXiE +0 belong&0xfffff0f0 0x4d530000 MSXiE archive data +# DeepFreezer +0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data +# DC +0 string =2 string \x2\x4 Xpack DiskImage archive data +#!:ext xdi +# XPack Data +# *.xpa updated by Joerg Jenderek Sep 2015 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/ +0 string xpa XPA +#!:ext xpa +# XPA32 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/xpa32.zip +# created by XPA32.EXE version 1.0.2 for Windows +>0 string xpa\0\1 \b32 archive data +# created by XPACK.COM version 1.67m or 1.67r with short 0x1800 +>3 ubeshort !0x0001 \bck archive data +# XPack Single Data +# changed by Joerg Jenderek Sep 2015 back to like in version 5.12 +# letter 'I'+ acute accent is equivalent to \xcd +0 string \xcd\ jm Xpack single archive data +#!:mime application/x-xpa-compressed +#!:ext xpa + +# TODO: missing due to unknown magic/magic at end of file: +#DWC +#ARG +#ZAR +#PC/3270 +#InstallIt +#RKive +#RK +#XPack Diskimage + +# These were inspired by idarc, but actually verified +# Dzip archiver (.dz) +# Update: Joerg Jenderek +# URL: http://speeddemosarchive.com/dzip/ +# reference: http://speeddemosarchive.com/dzip/dz29src.zip/main.c +# GRR: line below is too general as it matches also ASCII texts like Doszip commander help dz.txt +0 string DZ +# latest version is 2.9 dated 7 may 2003 +>2 byte <4 Dzip archive data +!:mime application/x-dzip +#!:ext dz +>>2 byte x \b, version %i +>>3 byte x \b.%i +>>4 ulelong x \b, offset 0x%x +>>8 ulelong x \b, %u files +# ZZip archiver (.zz) +0 string ZZ\ \0\0 ZZip archive data +0 string ZZ0 ZZip archive data +# PAQ archiver (.paq) +0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data +0 string PAQ PAQ archive data +>3 byte&0xf0 0x30 +>>3 byte x (v%c) +# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP) +0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data +0 string JARCS JAR (ARJ Software, Inc.) archive data + +# ARJ archiver (jason@jarthur.Claremont.EDU) +0 leshort 0xea60 ARJ archive data +!:mime application/x-arj +>5 byte x \b, v%d, +>8 byte &0x04 multi-volume, +>8 byte &0x10 slash-switched, +>8 byte &0x20 backup, +>34 string x original name: %s, +>7 byte 0 os: MS-DOS +>7 byte 1 os: PRIMOS +>7 byte 2 os: Unix +>7 byte 3 os: Amiga +>7 byte 4 os: Macintosh +>7 byte 5 os: OS/2 +>7 byte 6 os: Apple ][ GS +>7 byte 7 os: Atari ST +>7 byte 8 os: NeXT +>7 byte 9 os: VAX/VMS +>3 byte >0 %d] +# [JW] idarc says this is also possible +2 leshort 0xea60 ARJ archive data + +# HA archiver (Greg Roelofs, newt@uchicago.edu) +# This is a really bad format. A file containing HAWAII will match this... +#0 string HA HA archive data, +#>2 leshort =1 1 file, +#>2 leshort >1 %hu files, +#>4 byte&0x0f =0 first is type CPY +#>4 byte&0x0f =1 first is type ASC +#>4 byte&0x0f =2 first is type HSC +#>4 byte&0x0f =0x0e first is type DIR +#>4 byte&0x0f =0x0f first is type SPECIAL +# suggestion: at least identify small archives (<1024 files) +0 belong&0xffff00fc 0x48410000 HA archive data +>2 leshort =1 1 file, +>2 leshort >1 %u files, +>4 byte&0x0f =0 first is type CPY +>4 byte&0x0f =1 first is type ASC +>4 byte&0x0f =2 first is type HSC +>4 byte&0x0f =0x0e first is type DIR +>4 byte&0x0f =0x0f first is type SPECIAL + +# HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz) +0 string HPAK HPACK archive data + +# JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net +0 string \351,\001JAM\ JAM archive, +>7 string >\0 version %.4s +>0x26 byte =0x27 - +>>0x2b string >\0 label %.11s, +>>0x27 lelong x serial %08x, +>>0x36 string >\0 fstype %.8s + +# Very old RAR archive +# https://jasonblanks.com/wp-includes/images/papers/KnowyourarchiveRAR.pdf +0 string RE\x7e\x5e RAR archive data (26 string \x8\0\0\0mimetypeapplication/ + +# KOffice / OpenOffice & StarOffice / OpenDocument formats +# From: Abel Cheung + +# KOffice (1.2 or above) formats +# (mimetype contains "application/vnd.kde.") +>>50 string vnd.kde. KOffice (>=1.2) +>>>58 string karbon Karbon document +>>>58 string kchart KChart document +>>>58 string kformula KFormula document +>>>58 string kivio Kivio document +>>>58 string kontour Kontour document +>>>58 string kpresenter KPresenter document +>>>58 string kspread KSpread document +>>>58 string kword KWord document + +# OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) +# (mimetype contains "application/vnd.sun.xml.") +# URL: https://en.wikipedia.org/wiki/OpenOffice.org_XML +# reference: http://fileformats.archiveteam.org/wiki/OpenOffice.org_XML +>>50 string vnd.sun.xml. OpenOffice.org 1.x +>>>62 string writer Writer +>>>>68 byte !0x2e document +!:mime application/vnd.sun.xml.writer +#!:ext sxw +>>>>68 string .template template +!:mime application/vnd.sun.xml.writer.template +#!:ext stw +>>>>68 string .web Web template +!:mime application/vnd.sun.xml.writer.web +#!:ext stw +>>>>68 string .global global document +!:mime application/vnd.sun.xml.writer.global +#!:ext sxg +>>>62 string calc Calc +>>>>66 byte !0x2e spreadsheet +!:mime application/vnd.sun.xml.calc +#!:ext sxc +>>>>66 string .template template +!:mime application/vnd.sun.xml.calc.template +#!:ext stc +>>>62 string draw Draw +>>>>66 byte !0x2e document +!:mime application/vnd.sun.xml.draw +#!:ext sxd +>>>>66 string .template template +!:mime application/vnd.sun.xml.draw.template +#!:ext std +>>>62 string impress Impress +>>>>69 byte !0x2e presentation +!:mime application/vnd.sun.xml.impress +#!:ext sxi +>>>>69 string .template template +!:mime application/vnd.sun.xml.impress.template +#!:ext sti +>>>62 string math Math document +!:mime application/vnd.sun.xml.math +#!:ext sxm +>>>62 string base Database file +!:mime application/vnd.sun.xml.base +#!:ext sdb + +# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) +# URL: http://fileformats.archiveteam.org/wiki/OpenDocument +# https://lists.oasis-open.org/archives/office/200505/msg00006.html +# (mimetype contains "application/vnd.oasis.opendocument.") +>>50 string vnd.oasis.opendocument. OpenDocument +>>>73 string text +>>>>77 byte !0x2d Text +!:mime application/vnd.oasis.opendocument.text +#!:ext odt +>>>>77 string -template Text Template +!:mime application/vnd.oasis.opendocument.text-template +#!:ext ott +>>>>77 string -web HTML Document Template +!:mime application/vnd.oasis.opendocument.text-web +#!:ext oth +>>>>77 string -master Master Document +!:mime application/vnd.oasis.opendocument.text-master +#!:ext odm +>>>73 string graphics +>>>>81 byte !0x2d Drawing +!:mime application/vnd.oasis.opendocument.graphics +#!:ext odg +>>>>81 string -template Drawing Template +!:mime application/vnd.oasis.opendocument.graphics-template +#!:ext otg +>>>73 string presentation +>>>>85 byte !0x2d Presentation +!:mime application/vnd.oasis.opendocument.presentation +#!:ext odp +>>>>85 string -template Presentation Template +!:mime application/vnd.oasis.opendocument.presentation-template +#!:ext otp +>>>73 string spreadsheet +>>>>84 byte !0x2d Spreadsheet +!:mime application/vnd.oasis.opendocument.spreadsheet +#!:ext ods +>>>>84 string -template Spreadsheet Template +!:mime application/vnd.oasis.opendocument.spreadsheet-template +#!:ext ots +>>>73 string chart +>>>>78 byte !0x2d Chart +!:mime application/vnd.oasis.opendocument.chart +#!:ext odc +>>>>78 string -template Chart Template +!:mime application/vnd.oasis.opendocument.chart-template +#!:ext otc +>>>73 string formula +>>>>80 byte !0x2d Formula +!:mime application/vnd.oasis.opendocument.formula +#!:ext odf +>>>>80 string -template Formula Template +!:mime application/vnd.oasis.opendocument.formula-template +#!:ext otf +# https://www.loc.gov/preservation/digital/formats/fdd/fdd000441.shtml +>>>73 string database Database +!:mime application/vnd.oasis.opendocument.database +#!:ext odb +# Valid for LibreOffice Base 6.0.1.1 at least +>>>73 string base Database +# https://bugs.documentfoundation.org/show_bug.cgi?id=45854 +!:mime application/vnd.oasis.opendocument.database +#!:mime application/vnd.oasis.opendocument.base +#!:ext odb +>>>73 string image +>>>>78 byte !0x2d Image +!:mime application/vnd.oasis.opendocument.image +#!:ext odi +>>>>78 string -template Image Template +!:mime application/vnd.oasis.opendocument.image-template +#!:ext oti + +# EPUB (OEBPS) books using OCF (OEBPS Container Format) +# https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. +# From: Ralf Brown +>>50 string epub+zip EPUB document +!:mime application/epub+zip + +# From: Joerg Jenderek +# URL: http://en.wikipedia.org/wiki/CorelDRAW +# NOTE: version; til 2 WL-based; from 3 til 13 by ./riff; from 14 zip based +>>50 string x-vnd.corel. Corel +>>>62 string draw.document+zip Draw drawing, version 14-16 +!:mime application/x-vnd.corel.draw.document+zip +#!:ext cdr +>>>62 string draw.template+zip Draw template, version 14-16 +!:mime application/x-vnd.corel.draw.template+zip +#!:ext cdrt +>>>62 string zcf.draw.document+zip Draw drawing, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.document+zip +#!:ext cdr +>>>62 string zcf.draw.template+zip Draw template, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.template+zip +#!:ext cdt/cdrt +# URL: http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html +>>>62 string zcf.pattern+zip Draw pattern, version 22 +!:mime application/x-vnd.corel.zcf.pattern+zip +#!:ext pat +# URL: https://en.wikipedia.org/wiki/Corel_Designer +# Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer +# Note: called by TrID "Corel DESIGN graphics" +>>>62 string designer.document+zip DESIGNER graphics, version 14-16 +!:mime application/x-vnd.corel.designer.document+zip +#!:ext des +>>>62 string zcf.designer.document+zip DESIGNER graphics, version 17-21 +!:mime application/x-vnd.corel.zcf.designer.document+zip +#!:ext des +# URL: http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/ +# CorelDRAW-Corel-Symbol-Library-CSL.html +>>>62 string symbol.library+zip Symbol Library, version 6-16.3 +!:mime application/x-vnd.corel.symbol.library+zip +#!:ext csl +>>>62 string zcf.symbol.library+zip Symbol Library, version 17-22 +!:mime application/x-vnd.corel.zcf.symbol.library+zip +#!:ext csl + +# Catch other ZIP-with-mimetype formats +# In a ZIP file, the bytes immediately after a member's contents are +# always "PK". The 2 regex rules here print the "mimetype" member's +# contents up to the first 'P'. Luckily, most MIME types don't contain +# any capital 'P's. This is a kludge. +# (mimetype contains "application/") +>>50 default x Zip data +>>>38 regex [!-OQ-~]+ (MIME type "%s"?) +!:mime application/zip +# (mimetype contents other than "application/*") +>26 string \x8\0\0\0mimetype +>>38 string !application/ +>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?) +!:mime application/zip + +# Java Jar files +>(26.s+30) leshort 0xcafe Java archive data (JAR) +!:mime application/java-archive + +# iOS App +>(26.s+30) leshort !0xcafe +>>26 string !\x8\0\0\0mimetype +>>>30 string Payload/ +>>>>38 search/64 .app/ iOS App +!:mime application/x-ios-app + +>30 search/100/b application/epub+zip EPUB document +!:mime application/epub+zip + +# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) +# Next line excludes specialized formats: +>(26.s+30) leshort !0xcafe +>>30 search/100/b !application/epub+zip +>>>26 string !\x8\0\0\0mimetype Zip archive data +!:mime application/zip +>>>>4 beshort x \b, at least +>>>>4 beshort x to extract +>>>>8 beshort x \b, compression method= +>>>>0x161 string WINZIP \b, WinZIP self-extracting + +# StarView Metafile +# From Pierre Ducroquet +0 string VCLMTF StarView MetaFile +>6 beshort x \b, version %d +>8 belong x \b, size %d + +# Zoo archiver +20 lelong 0xfdc4a7dc Zoo archive data +!:mime application/x-zoo +>4 byte >48 \b, v%c. +>>6 byte >47 \b%c +>>>7 byte >47 \b%c +>32 byte >0 \b, modify: v%d +>>33 byte x \b.%d+ +>42 lelong 0xfdc4a7dc \b, +>>70 byte >0 extract: v%d +>>>71 byte x \b.%d+ + +# Shell archives +10 string #\ This\ is\ a\ shell\ archive shell archive text +!:mime application/octet-stream + +# +# LBR. NB: May conflict with the questionable +# "binary Computer Graphics Metafile" format. +# +0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data +# +# From Rafael Laboissiere +# The Project Revision Control System (see +# http://prcs.sourceforge.net) generates a packaged project +# file which is recognized by the following entry: +0 leshort 0xeb81 PRCS packaged project + +# Microsoft cabinets +# by David Necas (Yeti) +#0 string MSCF\0\0\0\0 Microsoft cabinet file data, +#>25 byte x v%d +#>24 byte x \b.%d +# MPi: All CABs have version 1.3, so this is pointless. +# Better magic in debian-additions. + +# GTKtalog catalogs +# by David Necas (Yeti) +4 string gtktalog\ GTKtalog catalog data, +>13 string 3 version 3 +>>14 beshort 0x677a (gzipped) +>>14 beshort !0x677a (not gzipped) +>13 string >3 version %s + +############################################################################ +# Parity archive reconstruction file, the 'par' file format now used on Usenet. +0 string PAR\0 PARity archive data +>48 leshort =0 - Index file +>48 leshort >0 - file number %d + +# Felix von Leitner +0 string d8:announce BitTorrent file +!:mime application/x-bittorrent +# Durval Menezes, +0 string d13:announce-list BitTorrent file +!:mime application/x-bittorrent +0 string d7:comment BitTorrent file +!:mime application/x-bittorrent +0 string d4:info BitTorrent file +!:mime application/x-bittorrent + +# Atari MSA archive - Teemu Hukkanen +0 beshort 0x0e0f Atari MSA archive data +>2 beshort x \b, %d sectors per track +>4 beshort 0 \b, 1 sided +>4 beshort 1 \b, 2 sided +>6 beshort x \b, starting track: %d +>8 beshort x \b, ending track: %d + +# Alternate ZIP string (amc@arwen.cs.berkeley.edu) +0 string PK00PK\003\004 Zip archive data +!:mime application/zip +#!:ext zip/cbz + +# ACE archive (from http://www.wotsit.org/download.asp?f=ace) +# by Stefan `Sec` Zehl +7 string **ACE** ACE archive data +>15 byte >0 version %d +>16 byte =0x00 \b, from MS-DOS +>16 byte =0x01 \b, from OS/2 +>16 byte =0x02 \b, from Win/32 +>16 byte =0x03 \b, from Unix +>16 byte =0x04 \b, from MacOS +>16 byte =0x05 \b, from WinNT +>16 byte =0x06 \b, from Primos +>16 byte =0x07 \b, from AppleGS +>16 byte =0x08 \b, from Atari +>16 byte =0x09 \b, from Vax/VMS +>16 byte =0x0A \b, from Amiga +>16 byte =0x0B \b, from Next +>14 byte x \b, version %d to extract +>5 leshort &0x0080 \b, multiple volumes, +>>17 byte x \b (part %d), +>5 leshort &0x0002 \b, contains comment +>5 leshort &0x0200 \b, sfx +>5 leshort &0x0400 \b, small dictionary +>5 leshort &0x0800 \b, multi-volume +>5 leshort &0x1000 \b, contains AV-String +>>30 string \x16*UNREGISTERED\x20VERSION* (unregistered) +>5 leshort &0x2000 \b, with recovery record +>5 leshort &0x4000 \b, locked +>5 leshort &0x8000 \b, solid +# Date in MS-DOS format (whatever that is) +#>18 lelong x Created on + +# sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann +# +0x1A string sfArk sfArk compressed Soundfont +>0x15 string 2 +>>0x1 string >\0 Version %s +>>0x2A string >\0 : %s + +# DR-DOS 7.03 Packed File *.??_ +# Reference: http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm +# Note: unpacked by PNUNPACK.EXE +0 string Packed\ File\ +# by looking for Control-Z skip ASCII text starting with Packed File +>0x18 ubyte 0x1a Personal NetWare Packed File +!:mime application/x-novell-compress +#!:ext ??_ +>>12 string x \b, was "%.12s" +# 1 or 2 +#>>0x19 ubyte x \b, at 0x19 %u +>>0x1b ulelong x with %u bytes + +# EET archive +# From: Tilman Sauerbeck +0 belong 0x1ee7ff00 EET archive +!:mime application/x-eet + +# rzip archives +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +# From: Joerg Jenderek +# URL: https://help.foxitsoftware.com/kb/install-fzip-file.php +# reference: http://mark0.net/download/triddefs_xml.7z/ +# defs/f/fzip.trid.xml +# Note: unknown compression; No "PK" zip magic; normally in directory like +# "%APPDATA%\Foxit Software\Addon\Foxit Reader\Install" +0 ubequad 0x2506781901010000 Foxit add-on/update +!:mime application/x-fzip +#!:ext fzip + +# From: "Robert Dale" +0 belong 123 dar archive, +>4 belong x label "%.8x +>>8 belong x %.8x +>>>12 beshort x %.4x" +>14 byte 0x54 end slice +>14 beshort 0x4e4e multi-part +>14 beshort 0x4e53 multi-part, with -S + +# Symbian installation files +# https://www.thouky.co.uk/software/psifs/sis.html +# http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf +8 lelong 0x10000419 Symbian installation file +!:mime application/vnd.symbian.install +>4 lelong 0x1000006D (EPOC release 3/4/5) +>4 lelong 0x10003A12 (EPOC release 6) +0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x) +!:mime x-epoc/x-sisx-app + +# From "Nelson A. de Oliveira" +0 string MPQ\032 MoPaQ (MPQ) archive + +# From: "Nelson A. de Oliveira" +# .kgb +0 string KGB_arch KGB Archiver file +>10 string x with compression level %.1s + +# Type: Parity Archive +# From: Daniel van Eeden +0 string PAR2 Parity Archive Volume Set + +# Bacula volume format. (Volumes always start with a block header.) +# URL: https://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html +# From: Adam Buchbinder +12 string BB02 Bacula volume +>20 bedate x \b, started %s + +# ePub is XHTML + XML inside a ZIP archive. The first member of the +# archive must be an uncompressed file called 'mimetype' with contents +# 'application/epub+zip' + + +# From: "Michael Gorny" +# ZPAQ: http://mattmahoney.net/dc/zpaq.html +0 string zPQ ZPAQ stream +>3 byte x \b, level %d +# From: Barry Carter +# https://encode.ru/threads/456-zpaq-updates/page32 +0 string 7kSt ZPAQ file + +# BBeB ebook, unencrypted (LRF format) +# URL: https://www.sven.de/librie/Librie/LrfFormat +# From: Adam Buchbinder +0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted +>8 beshort x \b, version %d +>36 byte 1 \b, front-to-back +>36 byte 16 \b, back-to-front +>42 beshort x \b, (%dx, +>44 beshort x %d) + +# Symantec GHOST image by Joerg Jenderek at May 2014 +# https://us.norton.com/ghost/ +# https://www.garykessler.net/library/file_sigs.html +0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image +# *.GHO +>2 ubyte&0x08 0x00 \b, first file +# *.GHS or *.[0-9] with cns program option +>2 ubyte&0x08 0x08 \b, split file +# part of split index interesting for *.ghs +>>4 ubyte x id=0x%x +# compression tag minus one equals numeric compression command line switch z[1-9] +>3 ubyte 0 \b, no compression +>3 ubyte 2 \b, fast compression (Z1) +>3 ubyte 3 \b, medium compression (Z2) +>3 ubyte >3 +>>3 ubyte <11 \b, compression (Z%d-1) +>2 ubyte&0x08 0x00 +# ~ 30 byte password field only for *.gho +>>12 ubequad !0 \b, password protected +>>44 ubyte !1 +# 1~Image All, sector-by-sector only for *.gho +>>>10 ubyte 1 \b, sector copy +# 1~Image Boot track only for *.gho +>>>43 ubyte 1 \b, boot track +# 1~Image Disc only for *.gho implies Image Boot track and sector copy +>>44 ubyte 1 \b, disc sector copy +# optional image description only *.gho +>>0xff string >\0 "%-.254s" +# look for DOS sector end sequence +>0xE08 search/7776 \x55\xAA +>>&-512 indirect x \b; contains + +# Google Chrome extensions +# https://developer.chrome.com/extensions/crx +# https://developer.chrome.com/extensions/hosting +0 string Cr24 Google Chrome extension +!:mime application/x-chrome-extension +>4 ulong x \b, version %u + +# SeqBox - Sequenced container +# ext: sbx, seqbox +# Marco Pontello marcopon@gmail.com +# reference: https://github.com/MarcoPon/SeqBox +0 string SBx SeqBox, +>3 byte x version %d + +# LyNX archive +56 string USE\040LYNX\040TO\040DISSOLVE\040THIS\040FILE LyNX archive + +# From: Joerg Jenderek +# URL: https://www.acronis.com/ +# Reference: https://en.wikipedia.org/wiki/TIB_(file_format) +# Note: only tested with True Image 2013 Build 5962 and 2019 Build 14110 +0 ubequad 0xce24b9a220000000 Acronis True Image backup +!:mime application/x-acronis-tib +#!:ext tib +# 01000000 +#>20 ubelong x \b, at 20 0x%x +# 20000000 +#>28 ubelong x \b, at 28 0x%x +# strings like "Generic- SD/MMC 1.00" "Unknown Disk" "Msft Virtual Disk 1.0" +# ??? +# strings like "\Device\0000011e" "\Device\0000015a" +#>0 search/0x6852300/cs \\Device\\ +#>>&-1 pstring x \b, %s +# "\Device\HarddiskVolume30" "\Device\HarddiskVolume39" +#>>>&1 search/180/cs \\Device\\ +#>>>>&-1 pstring x \b, %s +#>>>>>&0 search/29/cs \0\0\xc8\0 +# disk label +#>>>>>>&10 lestring16 x \b, disk label %11.11s +#>>>>>>&9 plestring16 x \b, disk label "%11.11s" +#>>>>>>&10 ubequad x %16.16llx + + +# Gentoo XPAK binary package +# by Michal Gorny +# https://gitweb.gentoo.org/proj/portage.git/tree/man/xpak.5 +-4 string STOP +>-16 string XPAKSTOP Gentoo binary package (XPAK) + +# From: Joerg Jenderek +# URL: https://kodi.wiki/view/TexturePacker +# Reference: https://mirrors.kodi.tv/releases/source/17.3-Krypton.tar.gz +# /xbmc-Krypton/xbmc/guilib/XBTF.h +# /xbmc-Krypton/xbmc/guilib/XBTF.cpp +0 string XBTF +# skip ASCII text by looking for terminating \0 of path +>264 ubyte 0 XBMC texture package +!:mime application/x-xbmc-xbt +#!:ext xbt +# XBTF_VERSION 2 +>>4 string !2 \b, version %-.1s +# nofFiles /xbmc-Krypton/xbmc/guilib/XBTFReader.cpp +>>5 ulelong x \b, %u file +# plural s +>>5 ulelong >1 \bs +# path[CXBTFFile[MaximumPathLength=256] +>>9 string x \b, 1st %s + +# ALZIP archive +# by Hyungjun Park , Hajin Jang +# http://kippler.com/win/unalz/ +# https://salsa.debian.org/l10n-korean-team/unalz +0 string ALZ\001 ALZ archive data +#!:ext alz + +# https://cf-aldn.altools.co.kr/setup/EGG_Specification.zip +0 string EGGA EGG archive data, +#!:ext egg +>5 byte x version %u +>4 byte x \b.%u +>>0x0E ulelong =0x08E28222 +>>0x0E ulelong =0x24F5A262 \b, split +>>0x0E ulelong =0x24E5A060 \b, solid +>>0x0E default x \b, unknown + +# PAQ9A archive +# URL: http://mattmahoney.net/dc/#paq9a +# Note: Line 1186 of paq9a.cpp gives the magic bytes +0 string pQ9\001 PAQ9A archive + +#------------------------------------------------------------------------------ +# $File: compress,v 1.80 2021/03/15 17:49:24 christos Exp $ +# compress: file(1) magic for pure-compression formats (no archives) +# +# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. +# +# Formats for various forms of compressed data +# Formats for "compress" proper have been moved into "compress.c", +# because it tries to uncompress it to figure out what's inside. + +# standard unix compress +0 string \037\235 compress'd data +!:mime application/x-compress +!:apple LZIVZIVU +>2 byte&0x80 >0 block compressed +>2 byte&0x1f x %d bits + +# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver) +# URL: https://en.wikipedia.org/wiki/Gzip +# Reference: https://tools.ietf.org/html/rfc1952 +# Update: Joerg Jenderek, Apr 2019 +# Edited by Chris Chittleborough , March 2002 +# * Original filename is only at offset 10 if "extra field" absent +# * Produce shorter output - notably, only report compression methods +# other than 8 ("deflate", the only method defined in RFC 1952). +# Note: find defs -iname '*.trid.xml' -exec grep -q '1F8B08' {} \; -ls +# TODO: +# FBR Blueberry FlashBack screen Record https://www.flashbackrecorder.com/ +# KPR KOffice/Calligra KPresenter application/x-kpresenter +# KPT KOffice/Calligra KPresenter template? application/x-kpresenter +# SAV Diggles Saved Game File http://www.innonics.com +# SAV FarCry (demo) saved game http://www.farcry-thegame.com +# DAT ZOAGZIP game data format http://en.wikipedia.org/wiki/SD_Gundam_Capsule_Fighter +0 string \037\213 +# to display gzip compressed (strength=100=2*50) before other (strength=50)? +#!:strength * 2 +# no FNAME and FCOMMENT bit implies no file name/comment. That means only binary +>3 byte&0x18 =0 +# For binary gzipped no ASCII text should occur +# mcd-monu-cad.trid.xml +>>10 string MCD Monu-Cad Drawing, Component or Font +#>>36 string Created\ with\ MONU-CAD +#!:mime application/octet-stream +# http://fileformats.archiveteam.org/wiki/Monu-CAD +# http://www.monucad.com/downloads/FullDemo-2005.EXE +# /HANDS96.MCC Component +# /DEMO_DD01.MCD Drawing +# /MCALF020.FNT Font +#!:ext mcc/mcd/fnt +# http://www.generalcadd.com +>>10 string GXD General CADD, Drawing or Component +#!:mime application/octet-stream +# /gxc/BUILDINGEDGE.gxc Component +# /gxd/HOCKETT-STPAUL-WRHSE.gxd Drawing +# /gxd/POWERLAND-MILL-ADD-11.gxd Drawing v9.1.06 +#!:ext gxc/gxd +#>>>13 ubyte 0 \b, version 0 +>>>13 string 09 \b, version 9 +# other gzipped binary like gzipped tar, VirtualBox extension package,... +>>10 default x gzip compressed data +!:mime application/gzip +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# gzipped TAR or VirtualBox extension package +#!:mime application/x-compressed-tar +#!:mime application/x-virtualbox-vbox-extpack +# https://www.w3.org/TR/SVG/mimereg.html +#!:mime image/image/svg+xml-compressed +# zlib.3.gz +# microcode-20180312.tgz +# tpz same as tgz +# lua-md5_1.2-1_i386_i486.ipk https://en.wikipedia.org/wiki/Opkg +# Oracle_VM_VirtualBox_Extension_Pack-5.0.12-104815.vbox-extpack +#!:ext gz/tgz/tpz/ipk/vbox-extpack/svgz +# FNAME/FCOMMENT bit implies file name/comment as iso-8859-1 text +>3 byte&0x18 >0 gzip compressed data +!:mime application/gzip +# gzipped tar, gzipped Abiword document +#!:mime application/x-compressed-tar +#!:mime application/x-abiword-compressed +#!:mime image/image/svg+xml-compressed +# kleopatra_splashscreen.svgz gzipped .svg +#!:ext gz/tgz/tpz/zabw/svgz +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# display information of gzip compressed files +#>2 byte x THIS iS GZIP +>2 byte <8 \b, reserved method +>2 byte >8 \b, unknown method +>3 byte &0x01 \b, ASCII +>3 byte &0x02 \b, has CRC +>3 byte &0x04 \b, extra field +>3 byte&0xC =0x08 +>>10 string x \b, was "%s" +>3 byte &0x10 \b, has comment +>3 byte &0x20 \b, encrypted +>4 ledate >0 \b, last modified: %s +>8 byte 2 \b, max compression +>8 byte 4 \b, max speed +>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT) +>9 byte =0x01 \b, from Amiga +>9 byte =0x02 \b, from VMS +>9 byte =0x03 \b, from Unix +>9 byte =0x04 \b, from VM/CMS +>9 byte =0x05 \b, from Atari +>9 byte =0x06 \b, from HPFS filesystem (OS/2, NT) +>9 byte =0x07 \b, from MacOS +>9 byte =0x08 \b, from Z-System +>9 byte =0x09 \b, from CP/M +>9 byte =0x0A \b, from TOPS/20 +>9 byte =0x0B \b, from NTFS filesystem (NT) +>9 byte =0x0C \b, from QDOS +>9 byte =0x0D \b, from Acorn RISCOS +# size of the original (uncompressed) input data modulo 2^32 +#>-4 ulelong x \b, original size modulo 2^32 %u +#ERROR: line 114: non zero offset 1048572 at level 1 + +# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis +0 string \037\036 packed data +!:mime application/octet-stream +>2 belong >1 \b, %d characters originally +>2 belong =1 \b, %d character originally +# +# This magic number is byte-order-independent. +0 short 0x1f1f old packed data +!:mime application/octet-stream + +# XXX - why *two* entries for "compacted data", one of which is +# byte-order independent, and one of which is byte-order dependent? +# +0 short 0x1fff compacted data +!:mime application/octet-stream +# This string is valid for SunOS (BE) and a matching "short" is listed +# in the Ultrix (LE) magic file. +0 string \377\037 compacted data +!:mime application/octet-stream +0 short 0145405 huf output +!:mime application/octet-stream + +# bzip2 +0 string BZh bzip2 compressed data +!:mime application/x-bzip2 +>3 byte >47 \b, block size = %c00k + +# bzip a block-sorting file compressor +# by Julian Seward and others +0 string BZ0 bzip compressed data +!:mime application/x-bzip +>3 byte >47 \b, block size = %c00k + +# lzip +0 string LZIP lzip compressed data +!:mime application/x-lzip +>4 byte x \b, version: %d + +# squeeze and crunch +# Michael Haardt +0 beshort 0x76FF squeezed data, +>4 string x original name %s +0 beshort 0x76FE crunched data, +>2 string x original name %s +0 beshort 0x76FD LZH compressed data, +>2 string x original name %s + +# Freeze +0 string \037\237 frozen file 2.1 +0 string \037\236 frozen file 1.0 (or gzip 0.5) + +# SCO compress -H (LZH) +0 string \037\240 SCO compress -H (LZH) data + +# European GSM 06.10 is a provisional standard for full-rate speech +# transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse +# excitation/long term prediction) coding at 13 kbit/s. +# +# There's only a magic nibble (4 bits); that nibble repeats every 33 +# bytes. This isn't suited for use, but maybe we can use it someday. +# +# This will cause very short GSM files to be declared as data and +# mismatches to be declared as data too! +#0 byte&0xF0 0xd0 data +#>33 byte&0xF0 0xd0 +#>66 byte&0xF0 0xd0 +#>99 byte&0xF0 0xd0 +#>132 byte&0xF0 0xd0 GSM 06.10 compressed audio + +# lzop from +0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data +>9 beshort <0x0940 +>>9 byte&0xf0 =0x00 - version 0. +>>9 beshort&0x0fff x \b%03x, +>>13 byte 1 LZO1X-1, +>>13 byte 2 LZO1X-1(15), +>>13 byte 3 LZO1X-999, +## >>22 bedate >0 last modified: %s, +>>14 byte =0x00 os: MS-DOS +>>14 byte =0x01 os: Amiga +>>14 byte =0x02 os: VMS +>>14 byte =0x03 os: Unix +>>14 byte =0x05 os: Atari +>>14 byte =0x06 os: OS/2 +>>14 byte =0x07 os: MacOS +>>14 byte =0x0A os: Tops/20 +>>14 byte =0x0B os: WinNT +>>14 byte =0x0E os: Win32 +>9 beshort >0x0939 +>>9 byte&0xf0 =0x00 - version 0. +>>9 byte&0xf0 =0x10 - version 1. +>>9 byte&0xf0 =0x20 - version 2. +>>9 beshort&0x0fff x \b%03x, +>>15 byte 1 LZO1X-1, +>>15 byte 2 LZO1X-1(15), +>>15 byte 3 LZO1X-999, +## >>25 bedate >0 last modified: %s, +>>17 byte =0x00 os: MS-DOS +>>17 byte =0x01 os: Amiga +>>17 byte =0x02 os: VMS +>>17 byte =0x03 os: Unix +>>17 byte =0x05 os: Atari +>>17 byte =0x06 os: OS/2 +>>17 byte =0x07 os: MacOS +>>17 byte =0x0A os: Tops/20 +>>17 byte =0x0B os: WinNT +>>17 byte =0x0E os: Win32 + +# 4.3BSD-Quasijarus Strong Compression +# https://minnie.tuhs.org/Quasijarus/compress.html +0 string \037\241 Quasijarus strong compressed data + +# From: Cory Dikkers +0 string XPKF Amiga xpkf.library compressed data +0 string PP11 Power Packer 1.1 compressed data +0 string PP20 Power Packer 2.0 compressed data, +>4 belong 0x09090909 fast compression +>4 belong 0x090A0A0A mediocre compression +>4 belong 0x090A0B0B good compression +>4 belong 0x090A0C0C very good compression +>4 belong 0x090A0C0D best compression + +# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at) +# https://www.7-zip.org or DOC/7zFormat.txt +# +0 string 7z\274\257\047\034 7-zip archive data, +>6 byte x version %d +>7 byte x \b.%d +!:mime application/x-7z-compressed +#!:ext 7z/cb7 + +# Type: LZMA +0 lelong&0xffffff =0x5d +>12 leshort 0xff lzma compressed data, +!:mime application/x-lzma +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld +>12 leshort 0 lzma compressed data, +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld + +# http://tukaani.org/xz/xz-file-format.txt +0 ustring \xFD7zXZ\x00 xz compressed data, checksum +>7 byte&0xf 0x0 NONE +>7 byte&0xf 0x1 CRC32 +>7 byte&0xf 0x4 CRC64 +>7 byte&0xf 0xa SHA-256 + +!:strength * 2 +!:mime application/x-xz + +# https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt +0 string LRZI LRZIP compressed data +>4 byte x - version %d +>5 byte x \b.%d +!:mime application/x-lrzip + +# https://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html +0 lelong 0x184d2204 lz4 compressed data (v1.4+) +!:mime application/x-lz4 +# Added by osm0sis@xda-developers.com +0 lelong 0x184c2103 lz4 compressed data (v1.0-v1.3) +!:mime application/x-lz4 +0 lelong 0x184c2102 lz4-l compressed data (v0.1-v0.9) +!:mime application/x-lz4 + +# Zstandard/LZ4 skippable frames +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong&0xFFFFFFF0 0x184D2A50 +>(4.l+8) indirect x + +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong 0xEC30A437 Zstandard dictionary +!:mime application/x-std-dictionary +>4 lelong x (ID %u) + +# AFX compressed files (Wolfram Kleff) +2 string -afx- AFX compressed file data + +# Supplementary magic data for the file(1) command to support +# rzip(1). The format is described in magic(5). +# +# Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with +# this file. +# +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +0 string ArC\x01 FreeArc archive + +# Type: DACT compressed files +0 long 0x444354C3 DACT compressed data +>4 byte >-1 (version %i. +>5 byte >-1 %i. +>6 byte >-1 %i) +>7 long >0 , original size: %i bytes +>15 long >30 , block size: %i bytes + +# Valve Pack (VPK) files +0 lelong 0x55aa1234 Valve Pak file +>0x4 lelong x \b, version %u +>0x8 lelong x \b, %u entries + +# Snappy framing format +# https://code.google.com/p/snappy/source/browse/trunk/framing_format.txt +0 string \377\006\0\0sNaPpY snappy framed data +!:mime application/x-snappy-framed + +# qpress, https://www.quicklz.com/ +0 string qpress10 qpress compressed data +!:mime application/x-qpress + +# Zlib https://www.ietf.org/rfc/rfc6713.txt +0 string/b x +>0 beshort%31 =0 +>>0 byte&0xf =8 +>>>0 byte&0x80 =0 zlib compressed data +!:mime application/zlib + +# BWC compression +0 string BWC +>3 byte 0 BWC compressed data + +# UCL compression +0 bequad 0x00e955434cff011a UCL compressed data + +# Softlib archive +0 string SLIB Softlib archive +>4 leshort x \b, version %d +>6 leshort x (contains %d files) + +# URL: https://github.com/lzfse/lzfse/blob/master/src/lzfse_internal.h#L276 +# From: Eric Hall +0 string bvx- lzfse encoded, no compression +0 string bvx1 lzfse compressed, uncompressed tables +0 string bvx2 lzfse compressed, compressed tables +0 string bvxn lzfse encoded, lzvn compressed + +# pcxLib.exe compression program +# http://www.shikadi.net/moddingwiki/PCX_Library +0 string/b pcxLib + +#------------------------------------------------------------ +# $File: android,v 1.18 2021/02/23 00:51:10 christos Exp $ +# Various android related magic entries +#------------------------------------------------------------ + +# Dalvik .dex format. http://retrodev.com/android/dexformat.html +# From "Mike Fleming" +# Fixed to avoid regexec 17 errors on some dex files +# From "Tim Strazzere" +0 string dex\n +>0 regex dex\n[0-9]{2}\0 Dalvik dex file +>4 string >000 version %s +0 string dey\n +>0 regex dey\n[0-9]{2}\0 Dalvik dex file (optimized for host) +>4 string >000 version %s + +# Android bootimg format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/mkbootimg/bootimg.h +# https://github.com/djrbliss/loki/blob/master/loki.h#L43 +0 string ANDROID! Android bootimg +>1024 string LOKI \b, LOKI'd +>>1028 lelong 0 \b (boot) +>>1028 lelong 1 \b (recovery) +>8 lelong >0 \b, kernel +>>12 lelong >0 \b (0x%x) +>16 lelong >0 \b, ramdisk +>>20 lelong >0 \b (0x%x) +>24 lelong >0 \b, second stage +>>28 lelong >0 \b (0x%x) +>36 lelong >0 \b, page size: %d +>38 string >0 \b, name: %s +>64 string >0 \b, cmdline (%s) + +# Android sparse img format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/libsparse/sparse_format.h +0 lelong 0xed26ff3a Android sparse image +>4 leshort x \b, version: %d +>6 leshort x \b.%d +>16 lelong x \b, Total of %d +>12 lelong x \b %d-byte output blocks in +>20 lelong x \b %d input chunks. + +# Android binary XML magic +# In include/androidfw/ResourceTypes.h: +# RES_XML_TYPE = 0x0003 followed by the size of the header (ResXMLTree_header), +# which is 8 bytes (2 bytes type + 2 bytes header size + 4 bytes size). +0 lelong 0x00080003 Android binary XML + +# Android cryptfs footer +# From https://android.googlesource.com/\ +# platform/system/vold/+/refs/heads/master/cryptfs.h +0 lelong 0xd0b5b1c4 Android cryptfs footer +>4 leshort x \b, version: %d +>6 leshort x \b.%d + +# Android Vdex format +# From https://android.googlesource.com/\ +# platform/art/+/master/runtime/vdex_file.h +0 string vdex Android vdex file, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d + +# Android Vdex format, dexfile is currently being updated +# by android system +# From https://android.googlesource.com/\ +# platform/art/+/master/dex2oat/dex2oat.cc +0 string wdex Android vdex file, being processed by dex2oat, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d diff --git a/Final_Zip/AIK/OFRP/cleanup.sh b/Final_Zip/AIK/OFRP/cleanup.sh new file mode 100755 index 0000000..d8f1d61 --- /dev/null +++ b/Final_Zip/AIK/OFRP/cleanup.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# AIK-Linux/cleanup: reset working directory +# osm0sis @ xda-developers + +case $1 in + --help) echo "usage: cleanup.sh [--local] [--quiet]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + statarg="-f %Su"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) statarg="-c %U";; +esac; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; + +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + sudo=sudo; +fi; + +$sudo rm -rf ramdisk split_img *new.* || exit 1; + +case $1 in + --quiet) ;; + *) echo "Working directory cleaned.";; +esac; +exit 0; + diff --git a/Final_Zip/AIK/OFRP/repackimg.sh b/Final_Zip/AIK/OFRP/repackimg.sh new file mode 100755 index 0000000..5709f0f --- /dev/null +++ b/Final_Zip/AIK/OFRP/repackimg.sh @@ -0,0 +1,413 @@ +#!/bin/bash +# AIK-Linux/repackimg: repack ramdisk and build image +# osm0sis @ xda-developers + +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: repackimg.sh [--local] [--original] [--origsize] [--level <0-9>] [--avbkey ] [--forceelf]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + + javaver=$(java -version 2>&1 | head -n1 | cut -d\" -f2); + javamaj=$(echo $javaver | cut -d. -f1); + javamin=$(echo $javaver | cut -d. -f2); + if [ "$javamaj" -lt 9 ] && [ "$javamaj" -eq 1 -a "$javamin" -lt 8 ]; then + java() { "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" "$@"; } + fi; + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; +chmod -R 755 "$bin" "$aik/"*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -z "$(ls split_img/* 2>/dev/null)" -o ! -e ramdisk ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +while [ "$1" ]; do + case $1 in + --original) original=1;; + --origsize) origsize=1;; + --forceelf) repackelf=1;; + --level) + case $2 in + ''|*[!0-9]*) ;; + *) level="-$2"; lvltxt=" - Level: $2"; shift;; + esac; + ;; + --avbkey) + if [ "$2" ]; then + for keytest in "$2" "$cur/$2" "$aik/$2"; do + if [ ! -z "$(ls $keytest.pk8 2>/dev/null)" -a ! -z "$(ls $keytest.x509.* 2>/dev/null)" ]; then + avbkey="$keytest"; avbtxt=" - Key: $2"; shift; break; + fi; + done; + fi; + ;; + esac; + shift; +done; + +ramdiskcomp=`cat split_img/*-*ramdiskcomp 2>/dev/null`; +if [ -z "$(ls ramdisk/* 2>/dev/null)" ] && [ ! "$ramdiskcomp" = "empty" -a ! "$original" ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - RepackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +if [ ! -z "$(ls *-new.* 2>/dev/null)" ]; then + echo "Warning: Overwriting existing files!"; + echo " "; +fi; +rm -f "*-new.*"; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" ]; then + sudo=sudo; sumsg=" (as root)"; +else + cpioarg="-R 0:0"; +fi; + +if [ "$original" ]; then + echo "Repacking with original ramdisk..."; +elif [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: Using empty ramdisk for repack!"; + compext=.empty; + touch ramdisk-new.cpio$compext; +else + echo "Packing ramdisk$sumsg..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + if [ -z "$level" ]; then + case $ramdiskcomp in + xz) level=-1;; + lz4*) level=-9;; + esac; + fi; + echo "Using compression: $ramdiskcomp$lvltxt"; + repackcmd="$ramdiskcomp $level"; + compext=$ramdiskcomp; + case $ramdiskcomp in + gzip) compext=gz;; + lzop) compext=lzo;; + xz) repackcmd="xz $level -Ccrc32";; + lzma) repackcmd="xz $level -Flzma";; + bzip2) compext=bz2;; + lz4) repackcmd="$bin/$arch/lz4 $level";; + lz4-l) repackcmd="$bin/$arch/lz4 $level -l"; compext=lz4;; + cpio) repackcmd="cat"; compext="";; + *) abort; exit 1;; + esac; + if [ "$compext" ]; then + compext=.$compext; + fi; + cd ramdisk; + $sudo find . | $sudo $cpio $cpioarg -H newc -o 2>/dev/null | $repackcmd > ../ramdisk-new.cpio$compext; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Getting build information..."; +cd split_img; +imgtype=`cat *-imgtype`; +case $imgtype in + KRNL) ;; + AOSP_VNDR) vendor=vendor_;; + *) + if [ -f *-kernel ]; then + kernel=`ls *-kernel`; echo "kernel = $kernel"; + kernel="split_img/$kernel"; + fi; + ;; +esac; +if [ "$original" ]; then + ramdisk=`ls *-*ramdisk.cpio*`; echo "${vendor}ramdisk = $ramdisk"; + ramdisk="split_img/$ramdisk"; +else + ramdisk="ramdisk-new.cpio$compext"; +fi; +case $imgtype in + KRNL) rsz=$(wc -c < ../"$ramdisk"); echo "ramdisk_size = $rsz";; + OSIP) echo "cmdline = $(cat *-*cmdline)";; + U-Boot) + name=`cat *-name`; echo "name = $name"; + uarch=`cat *-arch`; + os=`cat *-os`; + type=`cat *-type`; + comp=`cat *-comp`; echo "type = $uarch $os $type ($comp)"; + [ "$comp" = "uncompressed" ] && comp=none; + addr=`cat *-addr`; echo "load_addr = $addr"; + ep=`cat *-ep`; echo "entry_point = $ep"; + ;; + *) + if [ -f *-second ]; then + second=`ls *-second`; echo "second = $second"; + second=(--second "split_img/$second"); + fi; + if [ -f *-dtb ]; then + dtb=`ls *-dtb`; echo "dtb = $dtb"; + dtb=(--dtb "split_img/$dtb"); + fi; + if [ -f *-recovery_dtbo ]; then + recoverydtbo=`ls *-recovery_dtbo`; echo "recovery_dtbo = $recoverydtbo"; + recoverydtbo=(--recovery_dtbo "split_img/$recoverydtbo"); + fi; + if [ -f *-*cmdline ]; then + cmdname=`ls *-*cmdline`; + cmdline=`cat *-*cmdline`; echo "${vendor}cmdline = $cmdline"; + cmd=("split_img/$cmdname"@cmdline); + fi; + if [ -f *-board ]; then + board=`cat *-board`; echo "board = $board"; + fi; + if [ -f *-base ]; then + base=`cat *-base`; echo "base = $base"; + fi; + if [ -f *-pagesize ]; then + pagesize=`cat *-pagesize`; echo "pagesize = $pagesize"; + fi; + if [ -f *-kernel_offset ]; then + kerneloff=`cat *-kernel_offset`; echo "kernel_offset = $kerneloff"; + fi; + if [ -f *-ramdisk_offset ]; then + ramdiskoff=`cat *-ramdisk_offset`; echo "ramdisk_offset = $ramdiskoff"; + fi; + if [ -f *-second_offset ]; then + secondoff=`cat *-second_offset`; echo "second_offset = $secondoff"; + fi; + if [ -f *-tags_offset ]; then + tagsoff=`cat *-tags_offset`; echo "tags_offset = $tagsoff"; + fi; + if [ -f *-dtb_offset ]; then + dtboff=`cat *-dtb_offset`; echo "dtb_offset = $dtboff"; + fi; + if [ -f *-os_version ]; then + osver=`cat *-os_version`; echo "os_version = $osver"; + fi; + if [ -f *-os_patch_level ]; then + oslvl=`cat *-os_patch_level`; echo "os_patch_level = $oslvl"; + fi; + if [ -f *-header_version ]; then + hdrver=`cat *-header_version`; echo "header_version = $hdrver"; + fi; + if [ -f *-hashtype ]; then + hashtype=`cat *-hashtype`; echo "hashtype = $hashtype"; + hashtype="--hashtype $hashtype"; + fi; + if [ -f *-dt ]; then + dttype=`cat *-dttype`; + dt=`ls *-dt`; echo "dt = $dt"; + rpm=("split_img/$dt",rpm); + dt=(--dt "split_img/$dt"); + fi; + if [ -f *-unknown ]; then + unknown=`cat *-unknown`; echo "unknown = $unknown"; + fi; + if [ -f *-header ]; then + header=`ls *-header`; + header="split_img/$header"; + fi; + ;; +esac; +cd ..; + +if [ -f split_img/*-mtktype ]; then + mtktype=`cat split_img/*-mtktype`; + echo " "; + echo "Generating MTK headers..."; + echo " "; + echo "Using ramdisk type: $mtktype"; + "$bin/$arch/mkmtkhdr" --kernel "$kernel" --$mtktype "$ramdisk" >/dev/null; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + mv -f "$(basename "$kernel")-mtk" kernel-new.mtk; + mv -f "$(basename "$ramdisk")-mtk" $mtktype-new.mtk; + kernel=kernel-new.mtk; + ramdisk=$mtktype-new.mtk; +fi; + +if [ -f split_img/*-sigtype ]; then + outname=unsigned-new.img; +else + outname=image-new.img; +fi; + +[ "$dttype" = "ELF" ] && repackelf=1; +if [ "$imgtype" = "ELF" ] && [ ! "$header" -o ! "$repackelf" ]; then + imgtype=AOSP; + echo " "; + echo "Warning: ELF format without RPM detected; will be repacked using AOSP format!"; +fi; + +echo " "; +echo "Building image..."; +echo " "; +echo "Using format: $imgtype"; +echo " "; +case $imgtype in + AOSP_VNDR) "$bin/$arch/mkbootimg" --vendor_ramdisk "$ramdisk" "${dtb[@]}" --vendor_cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --tags_offset $tagsoff --dtb_offset $dtboff --os_version "$osver" --os_patch_level "$oslvl" --header_version $hdrver --vendor_boot $outname;; + AOSP) "$bin/$arch/mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" "${dtb[@]}" "${recoverydtbo[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --dtb_offset "$dtboff" --os_version "$osver" --os_patch_level "$oslvl" --header_version "$hdrver" $hashtype "${dt[@]}" -o $outname;; + AOSP-PXA) "$bin/$arch/pxa-mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --unknown $unknown "${dt[@]}" -o $outname;; + ELF) "$bin/$arch/elftool" pack -o $outname header="$header" "$kernel" "$ramdisk",ramdisk "${rpm[@]}" "${cmd[@]}" >/dev/null;; + KRNL) "$bin/$arch/rkcrc" -k "$ramdisk" $outname;; + OSIP) + mkdir split_img/.temp 2>/dev/null; + for i in bootstub cmdline.txt hdr kernel parameter sig; do + cp -f split_img/*-*$(basename $i .txt | sed -e 's/hdr/header/') split_img/.temp/$i 2>/dev/null; + done; + cp -f "$ramdisk" split_img/.temp/ramdisk.cpio.gz; + "$bin/$arch/mboot" -d split_img/.temp -f $outname; + ;; + U-Boot) + part0="$kernel"; + case $type in + Multi) part1=(:"$ramdisk");; + RAMDisk) part0="$ramdisk";; + esac; + "$bin/$arch/mkimage" -A $uarch -O $os -T $type -C $comp -a $addr -e $ep -n "$name" -d "$part0""${part1[@]}" $outname >/dev/null; + ;; + *) echo " "; echo "Unsupported format."; abort; exit 1;; +esac; +if [ ! $? -eq "0" ]; then + abort; + exit 1; +fi; + +rm -rf split_img/.temp; + +if [ -f split_img/*-sigtype ]; then + sigtype=`cat split_img/*-sigtype`; + if [ -f split_img/*-avbtype ]; then + avbtype=`cat split_img/*-avbtype`; + fi; + if [ -f split_img/*-blobtype ]; then + blobtype=`cat split_img/*-blobtype`; + fi; + echo "Signing new image..."; + echo " "; + echo "Using signature: $sigtype $avbtype$avbtxt$blobtype"; + [ ! "$avbkey" ] && avbkey="$bin/avb/verity"; + echo " "; + case $sigtype in + AVBv1) java -jar "$bin/boot_signer.jar" /$avbtype unsigned-new.img "$avbkey.pk8" "$avbkey.x509."* image-new.img 2>/dev/null;; + BLOB) + awk 'BEGIN { printf "-SIGNED-BY-SIGNBLOB-\00\00\00\00\00\00\00\00" }' > image-new.img; + "$bin/$arch/blobpack" blob.tmp $blobtype unsigned-new.img >/dev/null; + cat blob.tmp >> image-new.img; + rm -f blob.tmp; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --pack image-new.img --keyblock "$bin/chromeos/kernel.keyblock" --signprivate "$bin/chromeos/kernel_data_key.vbprivk" --version 1 --vmlinuz unsigned-new.img --bootloader "$bin/chromeos/empty" --config "$bin/chromeos/empty" --arch arm --flags 0x1;; + DHTB) + "$bin/$arch/dhtbsign" -i unsigned-new.img -o image-new.img >/dev/null; + rm -f split_img/*-tailtype 2>/dev/null; + ;; + NOOK*) cat split_img/*-master_boot.key unsigned-new.img > image-new.img;; + esac; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; +fi; + +if [ -f split_img/*-lokitype ]; then + lokitype=`cat split_img/*-lokitype`; + echo "Loki patching new image..."; + echo " "; + echo "Using type: $lokitype"; + echo " "; + mv -f image-new.img unlokied-new.img; + if [ -f aboot.img ]; then + "$bin/$arch/loki_tool" patch $lokitype aboot.img unlokied-new.img image-new.img >/dev/null; + if [ ! $? -eq "0" ]; then + echo "Patching failed."; + abort; + exit 1; + fi; + else + echo "Device aboot.img required in script directory to find Loki patch offset."; + abort; + exit 1; + fi; +elif [ -f split_img/*-microloader.bin ]; then + echo "Amonet patching new image..."; + echo " "; + cp -f image-new.img unamonet-new.img; + cp -f split_img/*-microloader.bin microloader.tmp; + dd bs=1024 count=1 conv=notrunc if=unamonet-new.img of=head.tmp 2>/dev/null; + dd bs=1024 seek=1 conv=notrunc if=head.tmp of=image-new.img 2>/dev/null; + dd conv=notrunc if=microloader.tmp of=image-new.img 2>/dev/null; + rm -f head.tmp microloader.tmp; +fi; + +if [ -f split_img/*-tailtype ]; then + tailtype=`cat split_img/*-tailtype`; + echo "Appending footer..."; + echo " "; + echo "Using type: $tailtype"; + echo " "; + case $tailtype in + Bump) awk 'BEGIN { printf "\x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79" }' >> image-new.img;; + SEAndroid) printf 'SEANDROIDENFORCE' >> image-new.img;; + esac; +fi; + +if [ "$origsize" -a -f split_img/*-origsize ]; then + filesize=`cat split_img/*-origsize`; + echo "Padding to original size..."; + echo " "; + cp -f image-new.img unpadded-new.img; + truncate -s $filesize image-new.img; +fi; + +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/OFRP/unpackimg.sh b/Final_Zip/AIK/OFRP/unpackimg.sh new file mode 100755 index 0000000..6198f2a --- /dev/null +++ b/Final_Zip/AIK/OFRP/unpackimg.sh @@ -0,0 +1,370 @@ +#!/bin/bash +# AIK-Linux/unpackimg: split image and unpack ramdisk +# osm0sis @ xda-developers + +cleanup() { "$aik/cleanup.sh" $local --quiet; } +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: unpackimg.sh [--local] [--nosudo] "; exit 1;; + --local) local="--local"; shift;; +esac; +case $1 in + --nosudo) nosudo=1; shift;; + --sudo) shift;; +esac; +if [ ! "$nosudo" ]; then + sudo=sudo; sumsg=" (as root)"; +fi; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + file() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/file" "$@"; } + lzma() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + tail() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/tail" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +if [ ! "$local" ]; then + cd "$aik"; +fi; +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +img="$1"; +[ -f "$cur/$1" ] && img="$cur/$1"; +if [ ! "$img" ]; then + while IFS= read -r line; do + case $line in + aboot.img|image-new.img|unlokied-new.img|unsigned-new.img) continue;; + esac; + img="$line"; + break; + done < <(ls *.elf *.img *.sin 2>/dev/null); +fi; +img="$(readlink -f "$img")"; +if [ ! -f "$img" ]; then + echo "No image file supplied."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - UnpackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +file=$(basename "$img"); +echo "Supplied image: $file"; +echo " "; + +if [ -d split_img -o -d ramdisk ]; then + if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + rmsumsg=" (as root)"; + fi; + echo "Removing old work folders and files$rmsumsg..."; + echo " "; + cleanup; +fi; + +echo "Setting up work folders..."; +echo " "; +mkdir split_img ramdisk; + +cd split_img; +filesize=$(wc -c < "$img"); +echo "$filesize" > "$file-origsize"; +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "signing" ]; then + echo $imgtest | awk '{ print $1 }' > "$file-sigtype"; + sigtype=$(cat "$file-sigtype"); + echo "Signature with \"$sigtype\" type detected, removing..."; + echo " "; + case $sigtype in + BLOB) + cp -f "$img" "$file"; + "$bin/$arch/blobunpack" "$file" | tail -n+5 | cut -d" " -f2 | dd bs=1 count=3 > "$file-blobtype" 2>/dev/null; + mv -f "$file."* "$file"; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --get-vmlinuz "$img" --vmlinuz-out "$file";; + DHTB) dd bs=4096 skip=512 iflag=skip_bytes conv=notrunc if="$img" of="$file" 2>/dev/null;; + NOOK) + dd bs=1048576 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=1048576 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + NOOKTAB) + dd bs=262144 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=262144 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + SIN*) + "$bin/$arch/sony_dump" . "$img" >/dev/null; + mv -f "$file."* "$file"; + rm -f "$file-sigtype"; + ;; + esac; + img="$file"; +fi; + +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "bootimg" ]; then + [ "$(echo $imgtest | awk '{ print $3 }')" = "PXA" ] && typesuffix=-PXA; + echo "$(echo $imgtest | awk '{ print $1 }')$typesuffix" > "$file-imgtype"; + imgtype=$(cat "$file-imgtype"); +else + cd ..; + cleanup; + echo "Unrecognized format."; + abort; + exit 1; +fi; +echo "Image type: $imgtype"; +echo " "; + +case $imgtype in + AOSP*|ELF|KRNL|OSIP|U-Boot) ;; + *) + cd ..; + cleanup; + echo "Unsupported format."; + abort; + exit 1; + ;; +esac; + +case $(echo $imgtest | awk '{ print $3 }') in + LOKI) + echo $imgtest | awk '{ print $5 }' | cut -d\( -f2 | cut -d\) -f1 > "$file-lokitype"; + lokitype=$(cat "$file-lokitype"); + echo "Loki patch with \"$lokitype\" type detected, reverting..."; + echo " "; + echo "Warning: A dump of your device's aboot.img is required to re-Loki!"; + echo " "; + "$bin/$arch/loki_tool" unlok "$img" "$file" >/dev/null; + img="$file"; + ;; + AMONET) + echo "Amonet patch detected, reverting..."; + echo " "; + dd bs=2048 count=1 conv=notrunc if="$img" of="$file-microloader.bin" 2>/dev/null; + dd bs=1024 skip=1 conv=notrunc if="$file-microloader.bin" of="$file-head" 2>/dev/null; + truncate -s 1024 "$file-microloader.bin"; + truncate -s 2048 "$file-head"; + dd bs=2048 skip=1 conv=notrunc if="$img" of="$file-tail" 2>/dev/null; + cat "$file-head" "$file-tail" > "$file"; + rm -f "$file-head" "$file-tail"; + img="$file"; + ;; +esac; + +tailtest="$(dd if="$img" iflag=skip_bytes skip=$(($(wc -c < "$img") - 8192)) bs=8192 count=1 2>/dev/null | file -m $bin/androidbootimg.magic - 2>/dev/null | cut -d: -f2-)"; +case $tailtest in + *data) tailtest="$(tail -n50 "$img" | file -m "$bin/androidbootimg.magic" - 2>/dev/null | cut -d: -f2-)";; +esac; +tailtype="$(echo $tailtest | awk '{ print $1 }')"; +case $tailtype in + AVB*) + echo "Signature with \"$tailtype\" type detected."; + echo " "; + case $tailtype in + *v1) + echo $tailtype > "$file-sigtype"; + echo $tailtest | awk '{ print $4 }' > "$file-avbtype"; + ;; + esac; + ;; + Bump|SEAndroid) + echo "Footer with \"$tailtype\" type detected."; + echo " "; + echo $tailtype > "$file-tailtype"; + ;; +esac; + +if [ "$imgtype" = "U-Boot" ]; then + imgsize=$(($(printf '%d\n' 0x$(hexdump -n 4 -s 12 -e '16/1 "%02x""\n"' "$img")) + 64)); + if [ ! "$filesize" = "$imgsize" ]; then + echo "Trimming..."; + echo " "; + dd bs=$imgsize count=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + img="$file"; + fi; +fi; + +echo 'Splitting image to "split_img/"...'; +case $imgtype in + AOSP_VNDR) vendor=vendor_;; +esac; +case $imgtype in + AOSP|AOSP_VNDR) "$bin/$arch/unpackbootimg" -i "$img";; + AOSP-PXA) "$bin/$arch/pxa-unpackbootimg" -i "$img";; + ELF) + mkdir elftool_out; + "$bin/$arch/elftool" unpack -i "$img" -o elftool_out >/dev/null; + mv -f elftool_out/header "$file-header" 2>/dev/null; + rm -rf elftool_out; + "$bin/$arch/unpackelf" -i "$img"; + ;; + KRNL) dd bs=4096 skip=8 iflag=skip_bytes conv=notrunc if="$img" of="$file-ramdisk" 2>&1 | tail -n+3 | cut -d" " -f1-2;; + OSIP) + "$bin/$arch/mboot" -u -f "$img"; + [ ! $? -eq "0" ] && error=1; + for i in bootstub cmdline.txt hdr kernel parameter ramdisk.cpio.gz sig; do + mv -f $i "$file-$(basename $i .txt | sed -e 's/hdr/header/' -e 's/ramdisk.cpio.gz/ramdisk/')" 2>/dev/null || true; + done; + ;; + U-Boot) + "$bin/$arch/dumpimage" -l "$img"; + "$bin/$arch/dumpimage" -l "$img" > "$file-header"; + grep "Name:" "$file-header" | cut -c15- > "$file-name"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f1 > "$file-arch"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f2 > "$file-os"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f3 | cut -d- -f1 > "$file-type"; + grep "Type:" "$file-header" | cut -d\( -f2 | cut -d\) -f1 | cut -d" " -f1 | cut -d- -f1 > "$file-comp"; + grep "Address:" "$file-header" | cut -c15- > "$file-addr"; + grep "Point:" "$file-header" | cut -c15- > "$file-ep"; + rm -f "$file-header"; + "$bin/$arch/dumpimage" -p 0 -o "$file-kernel" "$img"; + [ ! $? -eq "0" ] && error=1; + case $(cat "$file-type") in + Multi) "$bin/$arch/dumpimage" -p 1 -o "$file-ramdisk" "$img";; + RAMDisk) mv -f "$file-kernel" "$file-ramdisk";; + *) touch "$file-ramdisk";; + esac; + ;; +esac; +if [ ! $? -eq "0" -o "$error" ]; then + cd ..; + cleanup; + abort; + exit 1; +fi; + +if [ -f *-kernel ] && [ "$(file -m "$bin/androidbootimg.magic" *-kernel 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')" = "MTK" ]; then + mtk=1; + echo " "; + echo "MTK header found in kernel, removing..."; + dd bs=512 skip=1 conv=notrunc if="$file-kernel" of=tempkern 2>/dev/null; + mv -f tempkern "$file-kernel"; +fi; +mtktest="$(file -m "$bin/androidbootimg.magic" *-*ramdisk 2>/dev/null | cut -d: -f2-)"; +mtktype=$(echo $mtktest | awk '{ print $3 }'); +if [ "$(echo $mtktest | awk '{ print $1 }')" = "MTK" ]; then + if [ ! "$mtk" ]; then + echo " "; + echo "Warning: No MTK header found in kernel!"; + mtk=1; + fi; + echo "MTK header found in \"$mtktype\" type ramdisk, removing..."; + dd bs=512 skip=1 conv=notrunc if="$(ls *-*ramdisk)" of=temprd 2>/dev/null; + mv -f temprd "$(ls *-*ramdisk)"; +else + if [ "$mtk" ]; then + if [ ! "$mtktype" ]; then + echo 'Warning: No MTK header found in ramdisk, assuming "rootfs" type!'; + mtktype="rootfs"; + fi; + fi; +fi; +[ "$mtk" ] && echo $mtktype > "$file-mtktype"; + +if [ -f *-dt ]; then + dttest="$(file -m "$bin/androidbootimg.magic" *-dt 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')"; + echo $dttest > "$file-dttype"; + if [ "$imgtype" = "ELF" ]; then + case $dttest in + QCDT|ELF) ;; + *) echo " "; + echo "Non-QC DTB found, packing kernel and appending..."; + gzip --no-name -9 "$file-kernel"; + mv -f "$file-kernel.gz" "$file-kernel"; + cat "$file-dt" >> "$file-kernel"; + rm -f "$file-dt"*;; + esac; + fi; +fi; + +file -m "$bin/magic" *-*ramdisk 2>/dev/null | cut -d: -f2 | awk '{ print $1 }' > "$file-${vendor}ramdiskcomp"; +ramdiskcomp=`cat *-*ramdiskcomp`; +unpackcmd="$ramdiskcomp -dc"; +compext=$ramdiskcomp; +case $ramdiskcomp in + gzip) unpackcmd="gzip -dcq"; compext=gz;; + lzop) compext=lzo;; + xz) ;; + lzma) ;; + bzip2) compext=bz2;; + lz4) unpackcmd="$bin/$arch/lz4 -dcq";; + lz4-l) unpackcmd="$bin/$arch/lz4 -dcq"; compext=lz4;; + cpio) unpackcmd="cat"; compext="";; + empty) compext=empty;; + *) compext="";; +esac; +if [ "$compext" ]; then + compext=.$compext; +fi; +mv -f "$(ls *-*ramdisk)" "$file-${vendor}ramdisk.cpio$compext" 2>/dev/null; +cd ..; +if [ "$ramdiskcomp" = "data" ]; then + echo "Unrecognized format."; + abort; + exit 1; +fi; + +echo " "; +if [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: No ramdisk found to be unpacked!"; +else + echo "Unpacking ramdisk$sumsg to \"ramdisk/\"..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + echo "Compression used: $ramdiskcomp"; + if [ ! "$compext" -a ! "$ramdiskcomp" = "cpio" ]; then + echo "Unsupported format."; + abort; + exit 1; + fi; + $sudo chown 0:0 ramdisk 2>/dev/null; + cd ramdisk; + $unpackcmd "../split_img/$file-${vendor}ramdisk.cpio$compext" | $sudo $cpio -i -d --no-absolute-filenames; + if [ ! $? -eq "0" ]; then + [ "$nosudo" ] && echo "Unpacking failed, try without --nosudo."; + cd ..; + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/PBRP-R/bin/androidbootimg.magic b/Final_Zip/AIK/PBRP-R/bin/androidbootimg.magic new file mode 100755 index 0000000..4e7a106 --- /dev/null +++ b/Final_Zip/AIK/PBRP-R/bin/androidbootimg.magic @@ -0,0 +1,111 @@ +#------------------------------------------------------------------------------ +# Various Android OEM non-standard boot image related magic entries +# osm0sis @ xda-developers +#------------------------------------------------------------------------------ + +# ASUS Blob Signature +0 string -SIGNED-BY-SIGNBLOB- BLOB signing + +# Barnes & Noble Nook Signature +64 string Red\x20Loader NOOK signing (red loader) +64 string Green\x20Loader NOOK signing (green loader) +64 string Green\x20Recovery NOOK signing (green recovery) +64 string eMMC\x20boot.img+secondloader NOOK signing (emmc boot) +64 string eMMC\x20recovery.img+secondloader NOOK signing (emmc recovery) +48 string BauwksBoot NOOKTAB signing (bauwks) + +# Google ChromeOS Signature +0 string CHROMEOS CHROMEOS signing + +# Samsung/Spreadtrum DHTB Signature +0 string DHTB\x01\x00\x00 DHTB signing + +# Sony SIN Packaging/Signature +0 string \x01\x00\x00\x00 SINv1 signing +0 string \x02\x00\x00\x00 SINv2 signing +0 string \x03SIN SINv3 signing + +# Google Pixel/Nexus/AOSP Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search ANDROID! AOSP bootimg +>>36 string \x00\x00\x00\x02 \b, PXA variant (020) +>>36 string \x00\x00\x80\x02 \b, PXA variant (028) +>>36 string \x00\x00\x00\x03 \b, PXA variant (030) +>>96 search microloader +>>>1024 string ANDROID! \b, AMONET header +>>1024 string LOKI \b, LOKI header +>>>1028 string \x00 \b (boot) +>>>1028 string \x01 \b (recovery) +>>2048 search \x88\x16\x88\x58 \b, MTK headers +!:strength * 3 + +# Google Pixel/AOSP Vendor Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search VNDRBOOT AOSP_VNDR bootimg +!:strength * 3 + +# DENX U-Boot +0 string \x27\x05\x19\x56 U-Boot bootimg + +# Intel OSIP +1000 search \xFC\xFA\xBC\x00 OSIP bootimg (headerless) +!:strength / 15 +0 string $OS$\x00\x00\x01 OSIP bootimg +>52 string \x00\x00\x00\x00 \b, boot (signed) +>52 string \x01\x00\x00\x00 \b, boot (unsigned) +>52 string \x0C\x00\x00\x00 \b, recovery (signed) +>52 string \x0D\x00\x00\x00 \b, recovery (unsigned) + +# Rockchip KRNL +0 string KRNL KRNL bootimg + +# Sony ELF +0 string \x7FELF ELF +>5 string \x01\x01\x61 bootimg +>18 string \x28 (ARM +>18 string \x03 (x86_ +>18 string \x08 (MIPS +>4 string \x01 \b) +>4 string \x02 \b64) +>0 search \x88\x16\x88\x58 \b, MTK headers + +# MediaTek MTK +# [for detection after boot image has already been split] +0 search \x88\x16\x88\x58 MTK header +>0 search KERNEL \b, kernel type +>0 search ROOTFS \b, rootfs type +>0 search RECOVERY \b, recovery type +!:strength / 20 + +# Qualcomm Device Tree +# [for detection after boot image has already been split] +0 string QCDT QCDT header +!:strength / 20 + +# Google Android Verified Boot 1.0 Signature +# [for detection with the tail of the boot image] +0 search \x02\x01\x01\x30\x82 AVBv1 signing footer +>0 search /boot \b, boot type +>0 search /recovery \b, recovery type +!:strength / 20 + +# Google Android Verified Boot 2.0 Signature +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search AVBf AVBv2 signing footer +!:strength / 20 + +# LG Bump +# [for detection with the tail of the boot image] +0 search \x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79 Bump footer +!:strength / 20 + +# Samsung SEAndroid +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search SEANDROIDENFORCE SEAndroid footer +!:strength / 20 diff --git a/Final_Zip/AIK/PBRP-R/bin/avb/verity.pk8 b/Final_Zip/AIK/PBRP-R/bin/avb/verity.pk8 new file mode 100755 index 0000000..bebf216 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/avb/verity.pk8 differ diff --git a/Final_Zip/AIK/PBRP-R/bin/avb/verity.x509.pem b/Final_Zip/AIK/PBRP-R/bin/avb/verity.x509.pem new file mode 100755 index 0000000..86399c3 --- /dev/null +++ b/Final_Zip/AIK/PBRP-R/bin/avb/verity.x509.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIID/TCCAuWgAwIBAgIJAJcPmDkJqolJMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g +VmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UE +AwwHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe +Fw0xNDExMDYxOTA3NDBaFw00MjAzMjQxOTA3NDBaMIGUMQswCQYDVQQGEwJVUzET +MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEQMA4G +A1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UEAwwHQW5kcm9p +ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAOjreE0vTVSRenuzO9vnaWfk0eQzYab0gqpi +6xAzi6dmD+ugoEKJmbPiuE5Dwf21isZ9uhUUu0dQM46dK4ocKxMRrcnmGxydFn6o +fs3ODJMXOkv2gKXL/FdbEPdDbxzdu8z3yk+W67udM/fW7WbaQ3DO0knu+izKak/3 +T41c5uoXmQ81UNtAzRGzGchNVXMmWuTGOkg6U+0I2Td7K8yvUMWhAWPPpKLtVH9r +AL5TzjYNR92izdKcz3AjRsI3CTjtpiVABGeX0TcjRSuZB7K9EK56HV+OFNS6I1NP +jdD7FIShyGlqqZdUOkAUZYanbpgeT5N7QL6uuqcGpoTOkalu6kkCAwEAAaNQME4w +HQYDVR0OBBYEFH5DM/m7oArf4O3peeKO0ZIEkrQPMB8GA1UdIwQYMBaAFH5DM/m7 +oArf4O3peeKO0ZIEkrQPMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB +AHO3NSvDE5jFvMehGGtS8BnFYdFKRIglDMc4niWSzhzOVYRH4WajxdtBWc5fx0ix +NF/+hVKVhP6AIOQa+++sk+HIi7RvioPPbhjcsVlZe7cUEGrLSSveGouQyc+j0+m6 +JF84kszIl5GGNMTnx0XRPO+g8t6h5LWfnVydgZfpGRRg+WHewk1U2HlvTjIceb0N +dcoJ8WKJAFWdcuE7VIm4w+vF/DYX/A2Oyzr2+QRhmYSv1cusgAeC1tvH4ap+J1Lg +UnOu5Kh/FqPLLSwNVQp4Bu7b9QFfqK8Moj84bj88NqRGZgDyqzuTrFxn6FW7dmyA +yttuAJAEAymk1mipd9+zp38= +-----END CERTIFICATE----- diff --git a/Final_Zip/AIK/PBRP-R/bin/boot_signer.jar b/Final_Zip/AIK/PBRP-R/bin/boot_signer.jar new file mode 100755 index 0000000..dd96a3e Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/boot_signer.jar differ diff --git a/Final_Zip/AIK/PBRP-R/bin/chromeos/empty b/Final_Zip/AIK/PBRP-R/bin/chromeos/empty new file mode 100755 index 0000000..8b13789 --- /dev/null +++ b/Final_Zip/AIK/PBRP-R/bin/chromeos/empty @@ -0,0 +1 @@ + diff --git a/Final_Zip/AIK/PBRP-R/bin/chromeos/kernel.keyblock b/Final_Zip/AIK/PBRP-R/bin/chromeos/kernel.keyblock new file mode 100755 index 0000000..9740be4 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/chromeos/kernel.keyblock differ diff --git a/Final_Zip/AIK/PBRP-R/bin/chromeos/kernel_data_key.vbprivk b/Final_Zip/AIK/PBRP-R/bin/chromeos/kernel_data_key.vbprivk new file mode 100755 index 0000000..8d392fb Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/chromeos/kernel_data_key.vbprivk differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/blobpack b/Final_Zip/AIK/PBRP-R/bin/linux/i686/blobpack new file mode 100755 index 0000000..685c6c0 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/blobpack differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/blobunpack b/Final_Zip/AIK/PBRP-R/bin/linux/i686/blobunpack new file mode 100755 index 0000000..2d96696 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/blobunpack differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/dhtbsign b/Final_Zip/AIK/PBRP-R/bin/linux/i686/dhtbsign new file mode 100755 index 0000000..f117b88 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/dhtbsign differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/dumpimage b/Final_Zip/AIK/PBRP-R/bin/linux/i686/dumpimage new file mode 100755 index 0000000..8ba15d3 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/dumpimage differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/elftool b/Final_Zip/AIK/PBRP-R/bin/linux/i686/elftool new file mode 100755 index 0000000..b25dd56 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/elftool differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/futility b/Final_Zip/AIK/PBRP-R/bin/linux/i686/futility new file mode 100755 index 0000000..c830e31 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/futility differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/loki_tool b/Final_Zip/AIK/PBRP-R/bin/linux/i686/loki_tool new file mode 100755 index 0000000..d305760 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/loki_tool differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/lz4 b/Final_Zip/AIK/PBRP-R/bin/linux/i686/lz4 new file mode 100755 index 0000000..801bad4 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/lz4 differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/mboot b/Final_Zip/AIK/PBRP-R/bin/linux/i686/mboot new file mode 100755 index 0000000..023eab0 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/mboot differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/mkbootimg b/Final_Zip/AIK/PBRP-R/bin/linux/i686/mkbootimg new file mode 100755 index 0000000..ed68c2d Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/mkbootimg differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/mkimage b/Final_Zip/AIK/PBRP-R/bin/linux/i686/mkimage new file mode 100755 index 0000000..8e97c0c Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/mkimage differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/mkmtkhdr b/Final_Zip/AIK/PBRP-R/bin/linux/i686/mkmtkhdr new file mode 100755 index 0000000..d71db24 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/mkmtkhdr differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/pxa-mkbootimg b/Final_Zip/AIK/PBRP-R/bin/linux/i686/pxa-mkbootimg new file mode 100755 index 0000000..0636873 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/pxa-unpackbootimg b/Final_Zip/AIK/PBRP-R/bin/linux/i686/pxa-unpackbootimg new file mode 100755 index 0000000..8dbdecf Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/rkcrc b/Final_Zip/AIK/PBRP-R/bin/linux/i686/rkcrc new file mode 100755 index 0000000..45027f3 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/rkcrc differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/sony_dump b/Final_Zip/AIK/PBRP-R/bin/linux/i686/sony_dump new file mode 100755 index 0000000..2563e25 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/sony_dump differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/unpackbootimg b/Final_Zip/AIK/PBRP-R/bin/linux/i686/unpackbootimg new file mode 100755 index 0000000..b70aed5 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/unpackbootimg differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/i686/unpackelf b/Final_Zip/AIK/PBRP-R/bin/linux/i686/unpackelf new file mode 100755 index 0000000..12e9057 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/i686/unpackelf differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/blobpack b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/blobpack new file mode 100755 index 0000000..90256d4 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/blobpack differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/blobunpack b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/blobunpack new file mode 100755 index 0000000..53374ff Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/dhtbsign b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/dhtbsign new file mode 100755 index 0000000..ccb7a67 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/dumpimage b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/dumpimage new file mode 100755 index 0000000..861bd68 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/elftool b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/elftool new file mode 100755 index 0000000..07a520d Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/elftool differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/futility b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/futility new file mode 100755 index 0000000..4d56ec3 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/futility differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/loki_tool b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/loki_tool new file mode 100755 index 0000000..4a1b74a Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/lz4 b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/lz4 new file mode 100755 index 0000000..8a4136b Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/lz4 differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/mboot b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/mboot new file mode 100755 index 0000000..8bf92d4 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/mboot differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/mkbootimg b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/mkbootimg new file mode 100755 index 0000000..2b628c3 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/mkimage b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/mkimage new file mode 100755 index 0000000..6419ea3 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/mkimage differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/mkmtkhdr b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/mkmtkhdr new file mode 100755 index 0000000..1ab256f Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/pxa-mkbootimg b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..5885720 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..d7b1b7d Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/rkcrc b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/rkcrc new file mode 100755 index 0000000..f218228 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/sony_dump b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/sony_dump new file mode 100755 index 0000000..6fc3696 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/unpackbootimg b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/unpackbootimg new file mode 100755 index 0000000..8f4fccf Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/unpackelf b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/unpackelf new file mode 100755 index 0000000..477e25d Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/linux/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/blobpack b/Final_Zip/AIK/PBRP-R/bin/macos/i386/blobpack new file mode 100755 index 0000000..2336ec0 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/blobpack differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/blobunpack b/Final_Zip/AIK/PBRP-R/bin/macos/i386/blobunpack new file mode 100755 index 0000000..834cb50 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/blobunpack differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/cpio b/Final_Zip/AIK/PBRP-R/bin/macos/i386/cpio new file mode 100755 index 0000000..b7e41f1 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/cpio differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/dd b/Final_Zip/AIK/PBRP-R/bin/macos/i386/dd new file mode 100755 index 0000000..b684139 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/dd differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/dhtbsign b/Final_Zip/AIK/PBRP-R/bin/macos/i386/dhtbsign new file mode 100755 index 0000000..b3ba0ba Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/dhtbsign differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/dumpimage b/Final_Zip/AIK/PBRP-R/bin/macos/i386/dumpimage new file mode 100755 index 0000000..917c8ed Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/dumpimage differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/elftool b/Final_Zip/AIK/PBRP-R/bin/macos/i386/elftool new file mode 100755 index 0000000..27f12be Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/elftool differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/file b/Final_Zip/AIK/PBRP-R/bin/macos/i386/file new file mode 100755 index 0000000..8024db5 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/file differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/futility b/Final_Zip/AIK/PBRP-R/bin/macos/i386/futility new file mode 100755 index 0000000..8658249 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/futility differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/libiconv.2.dylib b/Final_Zip/AIK/PBRP-R/bin/macos/i386/libiconv.2.dylib new file mode 100755 index 0000000..ec61db0 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/libintl.8.dylib b/Final_Zip/AIK/PBRP-R/bin/macos/i386/libintl.8.dylib new file mode 100755 index 0000000..c297f0a Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/libintl.8.dylib differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/liblzma.5.dylib b/Final_Zip/AIK/PBRP-R/bin/macos/i386/liblzma.5.dylib new file mode 100755 index 0000000..126d338 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/liblzo2.2.dylib b/Final_Zip/AIK/PBRP-R/bin/macos/i386/liblzo2.2.dylib new file mode 100755 index 0000000..8a24e23 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/libmagic.1.dylib b/Final_Zip/AIK/PBRP-R/bin/macos/i386/libmagic.1.dylib new file mode 100755 index 0000000..92e6c7f Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/loki_tool b/Final_Zip/AIK/PBRP-R/bin/macos/i386/loki_tool new file mode 100755 index 0000000..7eecf68 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/loki_tool differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/lz4 b/Final_Zip/AIK/PBRP-R/bin/macos/i386/lz4 new file mode 100755 index 0000000..43126f8 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/lz4 differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/lzop b/Final_Zip/AIK/PBRP-R/bin/macos/i386/lzop new file mode 100755 index 0000000..fc3103c Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/lzop differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/mboot b/Final_Zip/AIK/PBRP-R/bin/macos/i386/mboot new file mode 100755 index 0000000..dfa0d3e Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/mboot differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/mkbootimg b/Final_Zip/AIK/PBRP-R/bin/macos/i386/mkbootimg new file mode 100755 index 0000000..82f05a9 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/mkbootimg differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/mkimage b/Final_Zip/AIK/PBRP-R/bin/macos/i386/mkimage new file mode 100755 index 0000000..e760d6e Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/mkimage differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/mkmtkhdr b/Final_Zip/AIK/PBRP-R/bin/macos/i386/mkmtkhdr new file mode 100755 index 0000000..907ba0f Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/mkmtkhdr differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/pxa-mkbootimg b/Final_Zip/AIK/PBRP-R/bin/macos/i386/pxa-mkbootimg new file mode 100755 index 0000000..12f8337 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/pxa-unpackbootimg b/Final_Zip/AIK/PBRP-R/bin/macos/i386/pxa-unpackbootimg new file mode 100755 index 0000000..2f1fe6c Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/rkcrc b/Final_Zip/AIK/PBRP-R/bin/macos/i386/rkcrc new file mode 100755 index 0000000..c2b70ce Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/rkcrc differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/sony_dump b/Final_Zip/AIK/PBRP-R/bin/macos/i386/sony_dump new file mode 100755 index 0000000..2f187e6 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/sony_dump differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/tail b/Final_Zip/AIK/PBRP-R/bin/macos/i386/tail new file mode 100755 index 0000000..99ee578 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/tail differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/truncate b/Final_Zip/AIK/PBRP-R/bin/macos/i386/truncate new file mode 100755 index 0000000..26bf16b Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/truncate differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/unpackbootimg b/Final_Zip/AIK/PBRP-R/bin/macos/i386/unpackbootimg new file mode 100755 index 0000000..e92b74e Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/unpackbootimg differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/unpackelf b/Final_Zip/AIK/PBRP-R/bin/macos/i386/unpackelf new file mode 100755 index 0000000..4ea11d0 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/unpackelf differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/i386/xz b/Final_Zip/AIK/PBRP-R/bin/macos/i386/xz new file mode 100755 index 0000000..b501c14 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/i386/xz differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/blobpack b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/blobpack new file mode 100755 index 0000000..816fcf2 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/blobpack differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/blobunpack b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/blobunpack new file mode 100755 index 0000000..9241057 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/cpio b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/cpio new file mode 100755 index 0000000..991c5a8 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/cpio differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/dd b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/dd new file mode 100755 index 0000000..e927886 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/dd differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/dhtbsign b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/dhtbsign new file mode 100755 index 0000000..162fa88 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/dumpimage b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/dumpimage new file mode 100755 index 0000000..473538b Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/elftool b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/elftool new file mode 100755 index 0000000..0185019 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/elftool differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/file b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/file new file mode 100755 index 0000000..0b9f24c Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/file differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/futility b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/futility new file mode 100755 index 0000000..a28db4d Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/futility differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/libiconv.2.dylib b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/libiconv.2.dylib new file mode 100755 index 0000000..8f56eed Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/libintl.8.dylib b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/libintl.8.dylib new file mode 100755 index 0000000..f270e89 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/libintl.8.dylib differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/liblzma.5.dylib b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/liblzma.5.dylib new file mode 100755 index 0000000..39c6b96 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/liblzo2.2.dylib b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/liblzo2.2.dylib new file mode 100755 index 0000000..a05b7eb Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/libmagic.1.dylib b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/libmagic.1.dylib new file mode 100755 index 0000000..29ad687 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/loki_tool b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/loki_tool new file mode 100755 index 0000000..1b9f062 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/lz4 b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/lz4 new file mode 100755 index 0000000..bcee28d Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/lz4 differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/lzop b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/lzop new file mode 100755 index 0000000..8be71f4 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/lzop differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/mboot b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/mboot new file mode 100755 index 0000000..ad67219 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/mboot differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/mkbootimg b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/mkbootimg new file mode 100755 index 0000000..137aef2 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/mkimage b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/mkimage new file mode 100755 index 0000000..61d5a9c Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/mkimage differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/mkmtkhdr b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/mkmtkhdr new file mode 100755 index 0000000..99949d5 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/pxa-mkbootimg b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..0ec79a3 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..03fc864 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/rkcrc b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/rkcrc new file mode 100755 index 0000000..9b0b94a Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/sony_dump b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/sony_dump new file mode 100755 index 0000000..e219101 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/tail b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/tail new file mode 100755 index 0000000..59692eb Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/tail differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/truncate b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/truncate new file mode 100755 index 0000000..f2ed631 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/truncate differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/unpackbootimg b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/unpackbootimg new file mode 100755 index 0000000..a717c48 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/unpackelf b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/unpackelf new file mode 100755 index 0000000..d6edefa Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/xz b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/xz new file mode 100755 index 0000000..6faedc7 Binary files /dev/null and b/Final_Zip/AIK/PBRP-R/bin/macos/x86_64/xz differ diff --git a/Final_Zip/AIK/PBRP-R/bin/magic b/Final_Zip/AIK/PBRP-R/bin/magic new file mode 100755 index 0000000..4530761 --- /dev/null +++ b/Final_Zip/AIK/PBRP-R/bin/magic @@ -0,0 +1,1916 @@ +#------------------------------------------------------------------------------ +# Slimmed down magic file for archives only +#------------------------------------------------------------------------------ +# $File: archive,v 1.145 2021/01/03 20:58:47 christos Exp $ +# archive: file(1) magic for archive formats (see also "msdos" for self- +# extracting compressed archives) +# +# cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc. +# pre-POSIX "tar" archives are also handled in the C code ../../src/is_tar.c. + +# POSIX tar archives +# URL: https://en.wikipedia.org/wiki/Tar_(computing) +# Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current +# header mainly padded with nul bytes +500 quad 0 +!:strength /2 +# filename or extended attribute printable strings in range space null til umlaut ue +>0 ubeshort >0x1F00 +>>0 ubeshort <0xFCFD +# last 4 header bytes often null but tar\0 in gtarfail2.tar gtarfail.tar-bad +# at https://sourceforge.net/projects/s-tar/files/testscripts/ +>>>508 ubelong&0x8B9E8DFF 0 +# nul, space or ascii digit 0-7 at start of mode +>>>>100 ubyte&0xC8 =0 +>>>>>101 ubyte&0xC8 =0 +# nul, space at end of check sum +>>>>>>155 ubyte&0xDF =0 +# space or ascii digit 0 at start of check sum +>>>>>>>148 ubyte&0xEF =0x20 +# minimal check and then display tar archive information which can also be +# embedded inside others like Android Backup, Clam AntiVirus database +>257 string !ustar +# header padded with nuls +>>257 ulong =0 +# GNU tar version 1.29 with non pax format option without refusing +# creates misleading V7 header for Long path, Multi-volume, Volume type +>>>156 ubyte 0x4c GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x4d GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x56 GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 default x tar archive (V7) +!:mime application/x-tar +#!:ext tar +# other stuff in padding +# some implementations add new fields to the blank area at the end of the header record +# created for example by DOS TAR 3.20g 1994 Tim V.Shapore with -j option +>>257 ulong !0 tar archive (old) +!:mime application/x-tar +#!:ext tar +# magic in newer, GNU, posix variants +>257 string =ustar +# 2 last char of magic and UStar version because string expression does not work +# 2 space characters followed by a null for GNU variant +>>261 ubelong =0x72202000 POSIX tar archive (GNU) +!:mime application/x-gtar +#!:ext tar/gtar +# UStar version with ASCII "00" +>>261 ubelong 0x72003030 POSIX +# gLOBAL and ExTENSION type only found in POSIX.1-2001 format +>>>156 ubyte 0x67 \b.1-2001 +>>>156 ubyte 0x78 \b.1-2001 +>>>156 ubyte x tar archive +!:mime application/x-ustar +#!:ext tar/ustar +# version with 2 binary nuls embedded in Android Backup like com.android.settings.ab +>>261 ubelong 0x72000000 tar archive (ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# not seen ustar variant with garbish version +>>261 default x tar archive (unknown ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# type flag of 1st tar archive member +#>156 ubyte x \b, %c-type +>156 ubyte x +>>156 ubyte 0 \b, file +>>156 ubyte 0x30 \b, file +>>156 ubyte 0x31 \b, hard link +>>156 ubyte 0x32 \b, symlink +>>156 ubyte 0x33 \b, char device +>>156 ubyte 0x34 \b, block device +>>156 ubyte 0x35 \b, directory +>>156 ubyte 0x36 \b, fifo +>>156 ubyte 0x37 \b, reserved +>>156 ubyte 0x4c \b, long path +>>156 ubyte 0x4d \b, multi volume +>>156 ubyte 0x56 \b, volume +>>156 ubyte 0x67 \b, global +>>156 ubyte 0x78 \b, extension +>>156 default x \b, type +>>>156 ubyte x '%c' +# name[100] +>0 string >\0 %-.60s +# mode mainly stored as an octal number in ASCII null or space terminated +>100 string >\0 \b, mode %-.7s +# user id mainly as octal numbers in ASCII null or space terminated +>108 string >\0 \b, uid %-.7s +# group id mainly as octal numbers in ASCII null or space terminated +>116 string >\0 \b, gid %-.7s +# size mainly as octal number in ASCII +>124 ubyte <0x38 +>>124 string >\0 \b, size %-.12s +# coding indicated by setting the high-order bit of the leftmost byte +>124 ubyte >0xEF \b, size 0x +>>124 ubyte !0xff \b%2.2x +>>125 ubyte !0xff \b%2.2x +>>126 ubyte !0xff \b%2.2x +>>127 ubyte !0xff \b%2.2x +>>128 ubyte !0xff \b%2.2x +>>129 ubyte !0xff \b%2.2x +>>130 ubyte !0xff \b%2.2x +>>131 ubyte !0xff \b%2.2x +>>132 ubyte !0xff \b%2.2x +>>133 ubyte !0xff \b%2.2x +>>134 ubyte !0xff \b%2.2x +>>135 ubyte !0xff \b%2.2x +# seconds since 0:0:0 1 jan 1970 UTC as octal number mainly in ASCII null or space terminated +>136 string >\0 \b, seconds %-.11s +# header checksum stored as an octal number in ASCII null or space terminated +#>148 string x \b, cksum %.7s +# linkname[100] +>157 string >\0 \b, linkname %-.40s +# additional fields for ustar +>257 string =ustar +# owner user name null terminated +>>265 string >\0 \b, user %-.32s +# group name null terminated +>>297 string >\0 \b, group %-.32s +# device major minor if not zero +>>329 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>329 string x \b, devmaj %-.7s +>>337 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>337 string x \b, devmin %-.7s +# prefix[155] +>>345 string >\0 \b, prefix %-.155s +# old non ustar/POSIX tar +>257 string !ustar +>>508 string =tar\0 +# padding[255] in old star +>>>257 string >\0 \b, padding: %-.40s +>>508 default x +# padding[255] in old tar sometimes comment field +>>>257 string >\0 \b, comment: %-.40s + +# Incremental snapshot gnu-tar format from: +# https://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html +0 string GNU\ tar- GNU tar incremental snapshot data +>&0 regex [0-9]\.[0-9]+-[0-9]+ version %s + +# cpio archives +# +# Yes, the top two "cpio archive" formats *are* supposed to just be "short". +# The idea is to indicate archives produced on machines with the same +# byte order as the machine running "file" with "cpio archive", and +# to indicate archives produced on machines with the opposite byte order +# from the machine running "file" with "cpio byte-swapped archive". +# +# The SVR4 "cpio(4)" hints that there are additional formats, but they +# are defined as "short"s; I think all the new formats are +# character-header formats and thus are strings, not numbers. +0 short 070707 cpio archive +!:mime application/x-cpio +0 short 0143561 cpio byte-swapped archive +!:mime application/x-cpio # encoding: swapped +0 string 070707 cpio ASCII archive (pre-SVR4 or odc) +0 string 070701 cpio ASCII archive (SVR4 with no CRC) +0 string 070702 cpio ASCII archive (SVR4 with CRC) + +# +# Various archive formats used by various versions of the "ar" +# command. +# + +# +# Original UNIX archive formats. +# They were written with binary values in host byte order, and +# the magic number was a host "int", which might have been 16 bits +# or 32 bits. We don't say "PDP-11" or "VAX", as there might have +# been ports to little-endian 16-bit-int or 32-bit-int platforms +# (x86?) using some of those formats; if none existed, feel free +# to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian +# 32-bit. There might have been big-endian ports of that sort as +# well. +# +0 leshort 0177555 very old 16-bit-int little-endian archive +0 beshort 0177555 very old 16-bit-int big-endian archive +0 lelong 0177555 very old 32-bit-int little-endian archive +0 belong 0177555 very old 32-bit-int big-endian archive + +0 leshort 0177545 old 16-bit-int little-endian archive +>2 string __.SYMDEF random library +0 beshort 0177545 old 16-bit-int big-endian archive +>2 string __.SYMDEF random library +0 lelong 0177545 old 32-bit-int little-endian archive +>4 string __.SYMDEF random library +0 belong 0177545 old 32-bit-int big-endian archive +>4 string __.SYMDEF random library + +# +# From "pdp" (but why a 4-byte quantity?) +# +0 lelong 0x39bed PDP-11 old archive +0 lelong 0x39bee PDP-11 4.0 archive + +# +# XXX - what flavor of APL used this, and was it a variant of +# some ar archive format? It's similar to, but not the same +# as, the APL workspace magic numbers in pdp. +# +0 long 0100554 apl workspace + +# +# System V Release 1 portable(?) archive format. +# +0 string = System V Release 1 ar archive +!:mime application/x-archive + +# +# Debian package; it's in the portable archive format, and needs to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "debian". +# +# Update: Joerg Jenderek +# URL: https://en.wikipedia.org/wiki/Deb_(file_format) +0 string =!\ndebian +# https://manpages.debian.org/testing/dpkg/dpkg-split.1.en.html +>14 string -split part of multipart Debian package +!:mime application/vnd.debian.binary-package +# udeb is used for stripped down deb file +#!:ext deb/udeb +>14 string -binary Debian binary package +!:mime application/vnd.debian.binary-package +# For ipk packager see also https://en.wikipedia.org/wiki/Opkg +#!:ext deb/udeb/ipk +# This should not happen +>14 default x Unknown Debian package +# NL terminated version; for most Debian cases this is 2.0 or 2.1 for split +>68 string >\0 (format %s) +#>68 string !2.0\n +#>>68 string x (format %.3s) +>68 string =2.0\n +# 2nd archive name=control archive name like control.tar.gz or control.tar.xz +>>72 string >\0 \b, with %.14s +# look for 3rd archive name=data archive name like data.tar.{gz,xz,bz2,lzma} +>>0 search/0x93e4f data.tar. \b, data compression +# the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised +# for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb +>>>&0 string x %.2s +# skip space (0x20 BSD) and slash (0x2f System V) character marking end of name +>>>&2 ubyte !0x20 +>>>>&-1 ubyte !0x2f +# display 3rd character of file name extension like 2 of bz2 or m of lzma +>>>>>&-1 ubyte x \b%c +>>>>>>&0 ubyte !0x20 +>>>>>>>&-1 ubyte !0x2f +# display 4th character of file name extension like a of lzma +>>>>>>>>&-1 ubyte x \b%c +# split debian package case +>68 string =2.1\n +# dpkg-1.18.25/dpkg-split/info.c +# NL terminated ASCII package name like ckermit +>>&0 string x \b, %s +# NL terminated package version like 302-5.3 +>>>&1 string x %s +# NL terminated MD5 checksum +>>>>&1 string x \b, MD5 %s +# NL terminated original package length +>>>>>&1 string x \b, unsplitted size %s +# NL terminated part length +>>>>>>&1 string x \b, part length %s +# NL terminated package part like n/m +>>>>>>>&1 string x \b, part %s +# NL terminated package architecture like armhf since dpkg 1.16.1 or later +>>>>>>>>&1 string x \b, %s + +# +# MIPS archive; they're in the portable archive format, and need to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "__________E". +# +0 string =!\n__________E MIPS archive +!:mime application/x-archive +>20 string U with MIPS Ucode members +>21 string L with MIPSEL members +>21 string B with MIPSEB members +>19 string L and an EL hash table +>19 string B and an EB hash table +>22 string X -- out of date + +# +# BSD/SVR2-and-later portable archive formats. +# +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/AR +# Reference: https://www.unix.com/man-page/opensolaris/3HEAD/ar.h/ +# Note: Mach-O universal binary in ./cafebabe is dependent +# TODO: unify current ar archive, MIPS archive, Debian package +# distinguish BSD, SVR; 32, 64 bit; HP from other 32-bit SVR; +# *.ar packages from *.a libraries. handle empty archive +0 string =!\n current ar archive +# print first and possibly second ar_name[16] for debugging purpose +#>8 string x \b, 1st "%.16s" +#>68 string x \b, 2nd "%.16s" +!:mime application/x-archive +# a in most case for libraries; lib for Microsoft libraries; ar else cases +#!:ext a/lib/ar +>8 string __.SYMDEF random library +# first member with long marked name __.SYMDEF SORTED implies BSD library +>68 string __.SYMDEF\ SORTED random library +# Reference: https://parisc.wiki.kernel.org/images-parisc/b/b2/Rad_11_0_32.pdf +# "archive file" entry moved from ./hp +# LST header system_id 0210h~PA-RISC 1.1,... identifies the target architecture +# LST header a_magic 0619h~relocatable library +>68 belong 0x020b0619 - PA-RISC1.0 relocatable library +>68 belong 0x02100619 - PA-RISC1.1 relocatable library +>68 belong 0x02110619 - PA-RISC1.2 relocatable library +>68 belong 0x02140619 - PA-RISC2.0 relocatable library +#EOF for common ar archives + +# +# "Thin" archive, as can be produced by GNU ar. +# +0 string =!\n thin archive with +>68 belong 0 no symbol entries +>68 belong 1 %d symbol entry +>68 belong >1 %d symbol entries + +0 search/1 -h- Software Tools format archive text + +# ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com) +# +# The first byte is the magic (0x1a), byte 2 is the compression type for +# the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS +# filename of the first file (null terminated). Since some types collide +# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%), +# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo. +0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000031a ARC archive data, packed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched +!:mime application/x-arc +# [JW] stuff taken from idarc, obviously ARC successors: +0 lelong&0x8080ffff 0x00000a1a PAK archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000141a ARC+ archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000481a HYP archive data +!:mime application/x-arc + +# Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk) +# I can't create either SPARK or ArcFS archives so I have not tested this stuff +# [GRR: the original entries collide with ARC, above; replaced with combined +# version (not tested)] +#0 byte 0x1a RISC OS archive (spark format) +0 string \032archive RISC OS archive (ArcFS format) +0 string Archive\000 RISC OS archive (ArcFS format) + +# All these were taken from idarc, many could not be verified. Unfortunately, +# there were many low-quality sigs, i.e. easy to trigger false positives. +# Please notify me of any real-world fishy/ambiguous signatures and I'll try +# to get my hands on the actual archiver and see if I find something better. [JW] +# probably many can be enhanced by finding some 0-byte or control char near the start + +# idarc calls this Crush/Uncompressed... *shrug* +0 string CRUSH Crush archive data +# Squeeze It (.sqz) +0 string HLSQZ Squeeze It archive data +# SQWEZ +0 string SQWEZ SQWEZ archive data +# HPack (.hpk) +0 string HPAK HPack archive data +# HAP +0 string \x91\x33HF HAP archive data +# MD/MDCD +0 string MDmd MDCD archive data +# LIM +0 string LIM\x1a LIM archive data +# SAR +3 string LH5 SAR archive data +# BSArc/BS2 +0 string \212\3SB\020\0 BSArc/BS2 archive data +# Bethesda Softworks Archive (Oblivion) +0 string BSA\0 BSArc archive data +>4 lelong x version %d +# MAR +2 string =-ah MAR archive data +# ACB +#0 belong&0x00f800ff 0x00800000 ACB archive data +# CPZ +# TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data +# JRC +0 string JRchive JRC archive data +# Quantum +0 string DS\0 Quantum archive data +# ReSOF +0 string PK\3\6 ReSOF archive data +# QuArk +0 string 7\4 QuArk archive data +# YAC +14 string YC YAC archive data +# X1 +0 string X1 X1 archive data +0 string XhDr X1 archive data +# CDC Codec (.dqt) +0 belong&0xffffe000 0x76ff2000 CDC Codec archive data +# AMGC +0 string \xad6" AMGC archive data +# NuLIB +0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data +# PakLeo +0 string LEOLZW PAKLeo archive data +# ChArc +0 string SChF ChArc archive data +# PSA +0 string PSA PSA archive data +# CrossePAC +0 string DSIGDCC CrossePAC archive data +# Freeze +0 string \x1f\x9f\x4a\x10\x0a Freeze archive data +# KBoom +0 string \xc2\xa8MP\xc2\xa8 KBoom archive data +# NSQ, must go after CDC Codec +0 string \x76\xff NSQ archive data +# DPA +0 string Dirk\ Paehl DPA archive data +# BA +# TODO: idarc says "bytes 0-2 == bytes 3-5" +# TTComp +# URL: http://fileformats.archiveteam.org/wiki/TTComp_archive +# Update: Joerg Jenderek +# GRR: line below is too general as it matches also Panorama database "TCDB 2003-10 demo.pan", others +0 string \0\6 +# look for first keyword of Panorama database *.pan +>12 search/261 DESIGN +# skip keyword with low entropy +>12 default x TTComp archive, binary, 4K dictionary +# (version 5.25) labeled the above entry as "TTComp archive data" +# From: Joerg Jenderek +# URL: https://wiki.68kmla.org/DiskCopy_4.2_format_specification +# reference: http://nulib.com/library/FTN.e00005.htm +0x52 ubeshort 0x0100 +# test for disk image size equal or above 400k +>0x40 ubelong >409599 +# test also for disk image size equal or below 1440k to skip +# windows7en.mbr UNICODE.DAT +>>0x40 ubelong <1474561 +# To skip Flags$StringJoiner.class with size 00106A61h test also for only 4 disk image sizes +# 00064000 for 400k GCR disks +# 000c8000 for 800k GCR disks +# 000b4000 for 720k MFM disks +# 00168000 for 1440k MFM disks +>>>0x40 ubelong&0xffE03fFF 0 +# display information of Apple DiskCopy 4.2 floppy image +# image pascal name padded with NULs like Microsoft Mail +>00 pstring/B x Apple DiskCopy 4.2 image %s +#!:mime application/octet-stream +!:mime application/x-dc42-floppy-image +!:apple dCpydImg +#!:ext image/dc42 +# data size in bytes like 409600 +>0x40 ubelong x \b, %u bytes +# for debugging purpose size in hexadecimal +#>0x40 ubelong x (0x%8.8x) +# tag size in bytes +>0x44 ubelong >0 \b, 0x%x tag size +# data checksum +#>0x48 ubelong x \b, 0x%x checksum +# tag checksum +#>0x4c ubelong x \b, 0x%x tag checksum +# disk encoding +>0x50 ubyte 0 \b, GCR CLV ssdd (400k) +>0x50 ubyte 1 \b, GCR CLV dsdd (800k) +>0x50 ubyte 2 \b, MFM CAV dsdd (720k) +>0x50 ubyte 3 \b, MFM CAV dshd (1440k) +>0x50 ubyte >3 \b, 0x%x encoding +# format byte +>0x51 ubyte x \b, 0x%x format +#>0x54 ubequad x \b, data 0x%16.16llx +# ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation? +0 string ESP ESP archive data +# ZPack +0 string \1ZPK\1 ZPack archive data +# Sky +0 string \xbc\x40 Sky archive data +# UFA +0 string UFA UFA archive data +# Dry +0 string =-H2O DRY archive data +# FoxSQZ +0 string FOXSQZ FoxSQZ archive data +# AR7 +0 string ,AR7 AR7 archive data +# PPMZ +0 string PPMZ PPMZ archive data +# MS Compress +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/MS-DOS_installation_compression +# Reference: https://hwiegman.home.xs4all.nl/fileformats/compress/szdd_kwaj_format.html +# Note: use correct version of extracting tool like EXPAND, UNPACK, DECOMP or 7Z +4 string \x88\xf0\x27 +# KWAJ variant +>0 string KWAJ MS Compress archive data, KWAJ variant +!:mime application/x-ms-compress-kwaj +# extension not working in version 5.32 +# magic/Magdir/archive, 284: Warning: EXTENSION type ` ??_' has bad char '?' +# file: line 284: Bad magic entry ' ??_' +#!:ext ??_ +# compression method (0-4) +>>8 uleshort x \b, %u method +# offset of compressed data +>>10 uleshort x \b, 0x%x offset +#>>(10.s) uleshort x +#>>>&-6 string x \b, TEST extension %-.3s +# header flags to mark header extensions +>>12 uleshort >0 \b, 0x%x flags +# 4 bytes: decompressed length of file +>>12 uleshort &0x01 +>>>14 ulelong x \b, original size: %u bytes +# 2 bytes: unknown purpose +# 2 bytes: length of unknown data + mentioned bytes +# 1-9 bytes: null-terminated file name +# 1-4 bytes: null-terminated file extension +>>12 uleshort &0x08 +>>>12 uleshort ^0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>>&16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>&16 string x %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>12 uleshort &0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +# 2 bytes: length of data + mentioned bytes +# +# SZDD variant Haruhiko Okumura's LZSS or 7z type MsLZ +>0 string SZDD MS Compress archive data, SZDD variant +!:mime application/x-ms-compress-szdd +#!:ext ??_ +# The character missing from the end of the filename (0=unknown) +>>9 string >\0 \b, %-.1s is last character of original name +# https://www.betaarchive.com/forum/viewtopic.php?t=26161 +# Compression mode: "A" (0x41) found but sometimes "B" in Windows 3.1 builds 026 and 034e +>>8 string !A \b, %-.1s method +>>10 ulelong >0 \b, original size: %u bytes +# QBasic SZDD variant +3 string \x88\xf0\x27 +>0 string SZ\x20 MS Compress archive data, QBasic variant +!:mime application/x-ms-compress-sz +#!:ext ??$ +>>8 ulelong >0 \b, original size: %u bytes + +# MP3 (archiver, not lossy audio compression) +0 string MP3\x1a MP3-Archiver archive data +# ZET +0 string OZ\xc3\x9d ZET archive data +# TSComp +0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data +# ARQ +0 string gW\4\1 ARQ archive data +# Squash +3 string OctSqu Squash archive data +# Terse +0 string \5\1\1\0 Terse archive data +# PUCrunch +0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data +# UHarc +0 string UHA UHarc archive data +# ABComp +0 string \2AB ABComp archive data +0 string \3AB2 ABComp archive data +# CMP +0 string CO\0 CMP archive data +# Splint +0 string \x93\xb9\x06 Splint archive data +# InstallShield +0 string \x13\x5d\x65\x8c InstallShield Z archive Data +# Gather +1 string GTH Gather archive data +# BOA +0 string BOA BOA archive data +# RAX +0 string ULEB\xa RAX archive data +# Xtreme +0 string ULEB\0 Xtreme archive data +# Pack Magic +0 string @\xc3\xa2\1\0 Pack Magic archive data +# BTS +0 belong&0xfeffffff 0x1a034465 BTS archive data +# ELI 5750 +0 string Ora\ ELI 5750 archive data +# QFC +0 string \x1aFC\x1a QFC archive data +0 string \x1aQF\x1a QFC archive data +# PRO-PACK +0 string RNC PRO-PACK archive data +# 777 +0 string 777 777 archive data +# LZS221 +0 string sTaC LZS221 archive data +# HPA +0 string HPA HPA archive data +# Arhangel +0 string LG Arhangel archive data +# EXP1, uses bzip2 +0 string 0123456789012345BZh EXP1 archive data +# IMP +0 string IMP\xa IMP archive data +# NRV +0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data +# Squish +0 string \x73\xb2\x90\xf4 Squish archive data +# Par +0 string PHILIPP Par archive data +0 string PAR Par archive data +# HIT +0 string UB HIT archive data +# SBX +0 belong&0xfffff000 0x53423000 SBX archive data +# NaShrink +0 string NSK NaShrink archive data +# SAPCAR +0 string #\ CAR\ archive\ header SAPCAR archive data +0 string CAR\ 2.00RG SAPCAR archive data +# Disintegrator +0 string DST Disintegrator archive data +# ASD +0 string ASD ASD archive data +# InstallShield CAB +0 string ISc( InstallShield CAB +# TOP4 +0 string T4\x1a TOP4 archive data +# BatComp left out: sig looks like COM executable +# so TODO: get real 4dos batcomp file and find sig +# BlakHole +0 string BH\5\7 BlakHole archive data +# BIX +0 string BIX0 BIX archive data +# ChiefLZA +0 string ChfLZ ChiefLZA archive data +# Blink +0 string Blink Blink archive data +# Logitech Compress +0 string \xda\xfa Logitech Compress archive data +# ARS-Sfx (FIXME: really a SFX? then goto COM/EXE) +1 string (C)\ STEPANYUK ARS-Sfx archive data +# AKT/AKT32 +0 string AKT32 AKT32 archive data +0 string AKT AKT archive data +# NPack +0 string MSTSM NPack archive data +# PFT +0 string \0\x50\0\x14 PFT archive data +# SemOne +0 string SEM SemOne archive data +# PPMD +0 string \x8f\xaf\xac\x84 PPMD archive data +# FIZ +0 string FIZ FIZ archive data +# MSXiE +0 belong&0xfffff0f0 0x4d530000 MSXiE archive data +# DeepFreezer +0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data +# DC +0 string =2 string \x2\x4 Xpack DiskImage archive data +#!:ext xdi +# XPack Data +# *.xpa updated by Joerg Jenderek Sep 2015 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/ +0 string xpa XPA +#!:ext xpa +# XPA32 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/xpa32.zip +# created by XPA32.EXE version 1.0.2 for Windows +>0 string xpa\0\1 \b32 archive data +# created by XPACK.COM version 1.67m or 1.67r with short 0x1800 +>3 ubeshort !0x0001 \bck archive data +# XPack Single Data +# changed by Joerg Jenderek Sep 2015 back to like in version 5.12 +# letter 'I'+ acute accent is equivalent to \xcd +0 string \xcd\ jm Xpack single archive data +#!:mime application/x-xpa-compressed +#!:ext xpa + +# TODO: missing due to unknown magic/magic at end of file: +#DWC +#ARG +#ZAR +#PC/3270 +#InstallIt +#RKive +#RK +#XPack Diskimage + +# These were inspired by idarc, but actually verified +# Dzip archiver (.dz) +# Update: Joerg Jenderek +# URL: http://speeddemosarchive.com/dzip/ +# reference: http://speeddemosarchive.com/dzip/dz29src.zip/main.c +# GRR: line below is too general as it matches also ASCII texts like Doszip commander help dz.txt +0 string DZ +# latest version is 2.9 dated 7 may 2003 +>2 byte <4 Dzip archive data +!:mime application/x-dzip +#!:ext dz +>>2 byte x \b, version %i +>>3 byte x \b.%i +>>4 ulelong x \b, offset 0x%x +>>8 ulelong x \b, %u files +# ZZip archiver (.zz) +0 string ZZ\ \0\0 ZZip archive data +0 string ZZ0 ZZip archive data +# PAQ archiver (.paq) +0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data +0 string PAQ PAQ archive data +>3 byte&0xf0 0x30 +>>3 byte x (v%c) +# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP) +0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data +0 string JARCS JAR (ARJ Software, Inc.) archive data + +# ARJ archiver (jason@jarthur.Claremont.EDU) +0 leshort 0xea60 ARJ archive data +!:mime application/x-arj +>5 byte x \b, v%d, +>8 byte &0x04 multi-volume, +>8 byte &0x10 slash-switched, +>8 byte &0x20 backup, +>34 string x original name: %s, +>7 byte 0 os: MS-DOS +>7 byte 1 os: PRIMOS +>7 byte 2 os: Unix +>7 byte 3 os: Amiga +>7 byte 4 os: Macintosh +>7 byte 5 os: OS/2 +>7 byte 6 os: Apple ][ GS +>7 byte 7 os: Atari ST +>7 byte 8 os: NeXT +>7 byte 9 os: VAX/VMS +>3 byte >0 %d] +# [JW] idarc says this is also possible +2 leshort 0xea60 ARJ archive data + +# HA archiver (Greg Roelofs, newt@uchicago.edu) +# This is a really bad format. A file containing HAWAII will match this... +#0 string HA HA archive data, +#>2 leshort =1 1 file, +#>2 leshort >1 %hu files, +#>4 byte&0x0f =0 first is type CPY +#>4 byte&0x0f =1 first is type ASC +#>4 byte&0x0f =2 first is type HSC +#>4 byte&0x0f =0x0e first is type DIR +#>4 byte&0x0f =0x0f first is type SPECIAL +# suggestion: at least identify small archives (<1024 files) +0 belong&0xffff00fc 0x48410000 HA archive data +>2 leshort =1 1 file, +>2 leshort >1 %u files, +>4 byte&0x0f =0 first is type CPY +>4 byte&0x0f =1 first is type ASC +>4 byte&0x0f =2 first is type HSC +>4 byte&0x0f =0x0e first is type DIR +>4 byte&0x0f =0x0f first is type SPECIAL + +# HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz) +0 string HPAK HPACK archive data + +# JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net +0 string \351,\001JAM\ JAM archive, +>7 string >\0 version %.4s +>0x26 byte =0x27 - +>>0x2b string >\0 label %.11s, +>>0x27 lelong x serial %08x, +>>0x36 string >\0 fstype %.8s + +# Very old RAR archive +# https://jasonblanks.com/wp-includes/images/papers/KnowyourarchiveRAR.pdf +0 string RE\x7e\x5e RAR archive data (26 string \x8\0\0\0mimetypeapplication/ + +# KOffice / OpenOffice & StarOffice / OpenDocument formats +# From: Abel Cheung + +# KOffice (1.2 or above) formats +# (mimetype contains "application/vnd.kde.") +>>50 string vnd.kde. KOffice (>=1.2) +>>>58 string karbon Karbon document +>>>58 string kchart KChart document +>>>58 string kformula KFormula document +>>>58 string kivio Kivio document +>>>58 string kontour Kontour document +>>>58 string kpresenter KPresenter document +>>>58 string kspread KSpread document +>>>58 string kword KWord document + +# OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) +# (mimetype contains "application/vnd.sun.xml.") +# URL: https://en.wikipedia.org/wiki/OpenOffice.org_XML +# reference: http://fileformats.archiveteam.org/wiki/OpenOffice.org_XML +>>50 string vnd.sun.xml. OpenOffice.org 1.x +>>>62 string writer Writer +>>>>68 byte !0x2e document +!:mime application/vnd.sun.xml.writer +#!:ext sxw +>>>>68 string .template template +!:mime application/vnd.sun.xml.writer.template +#!:ext stw +>>>>68 string .web Web template +!:mime application/vnd.sun.xml.writer.web +#!:ext stw +>>>>68 string .global global document +!:mime application/vnd.sun.xml.writer.global +#!:ext sxg +>>>62 string calc Calc +>>>>66 byte !0x2e spreadsheet +!:mime application/vnd.sun.xml.calc +#!:ext sxc +>>>>66 string .template template +!:mime application/vnd.sun.xml.calc.template +#!:ext stc +>>>62 string draw Draw +>>>>66 byte !0x2e document +!:mime application/vnd.sun.xml.draw +#!:ext sxd +>>>>66 string .template template +!:mime application/vnd.sun.xml.draw.template +#!:ext std +>>>62 string impress Impress +>>>>69 byte !0x2e presentation +!:mime application/vnd.sun.xml.impress +#!:ext sxi +>>>>69 string .template template +!:mime application/vnd.sun.xml.impress.template +#!:ext sti +>>>62 string math Math document +!:mime application/vnd.sun.xml.math +#!:ext sxm +>>>62 string base Database file +!:mime application/vnd.sun.xml.base +#!:ext sdb + +# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) +# URL: http://fileformats.archiveteam.org/wiki/OpenDocument +# https://lists.oasis-open.org/archives/office/200505/msg00006.html +# (mimetype contains "application/vnd.oasis.opendocument.") +>>50 string vnd.oasis.opendocument. OpenDocument +>>>73 string text +>>>>77 byte !0x2d Text +!:mime application/vnd.oasis.opendocument.text +#!:ext odt +>>>>77 string -template Text Template +!:mime application/vnd.oasis.opendocument.text-template +#!:ext ott +>>>>77 string -web HTML Document Template +!:mime application/vnd.oasis.opendocument.text-web +#!:ext oth +>>>>77 string -master Master Document +!:mime application/vnd.oasis.opendocument.text-master +#!:ext odm +>>>73 string graphics +>>>>81 byte !0x2d Drawing +!:mime application/vnd.oasis.opendocument.graphics +#!:ext odg +>>>>81 string -template Drawing Template +!:mime application/vnd.oasis.opendocument.graphics-template +#!:ext otg +>>>73 string presentation +>>>>85 byte !0x2d Presentation +!:mime application/vnd.oasis.opendocument.presentation +#!:ext odp +>>>>85 string -template Presentation Template +!:mime application/vnd.oasis.opendocument.presentation-template +#!:ext otp +>>>73 string spreadsheet +>>>>84 byte !0x2d Spreadsheet +!:mime application/vnd.oasis.opendocument.spreadsheet +#!:ext ods +>>>>84 string -template Spreadsheet Template +!:mime application/vnd.oasis.opendocument.spreadsheet-template +#!:ext ots +>>>73 string chart +>>>>78 byte !0x2d Chart +!:mime application/vnd.oasis.opendocument.chart +#!:ext odc +>>>>78 string -template Chart Template +!:mime application/vnd.oasis.opendocument.chart-template +#!:ext otc +>>>73 string formula +>>>>80 byte !0x2d Formula +!:mime application/vnd.oasis.opendocument.formula +#!:ext odf +>>>>80 string -template Formula Template +!:mime application/vnd.oasis.opendocument.formula-template +#!:ext otf +# https://www.loc.gov/preservation/digital/formats/fdd/fdd000441.shtml +>>>73 string database Database +!:mime application/vnd.oasis.opendocument.database +#!:ext odb +# Valid for LibreOffice Base 6.0.1.1 at least +>>>73 string base Database +# https://bugs.documentfoundation.org/show_bug.cgi?id=45854 +!:mime application/vnd.oasis.opendocument.database +#!:mime application/vnd.oasis.opendocument.base +#!:ext odb +>>>73 string image +>>>>78 byte !0x2d Image +!:mime application/vnd.oasis.opendocument.image +#!:ext odi +>>>>78 string -template Image Template +!:mime application/vnd.oasis.opendocument.image-template +#!:ext oti + +# EPUB (OEBPS) books using OCF (OEBPS Container Format) +# https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. +# From: Ralf Brown +>>50 string epub+zip EPUB document +!:mime application/epub+zip + +# From: Joerg Jenderek +# URL: http://en.wikipedia.org/wiki/CorelDRAW +# NOTE: version; til 2 WL-based; from 3 til 13 by ./riff; from 14 zip based +>>50 string x-vnd.corel. Corel +>>>62 string draw.document+zip Draw drawing, version 14-16 +!:mime application/x-vnd.corel.draw.document+zip +#!:ext cdr +>>>62 string draw.template+zip Draw template, version 14-16 +!:mime application/x-vnd.corel.draw.template+zip +#!:ext cdrt +>>>62 string zcf.draw.document+zip Draw drawing, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.document+zip +#!:ext cdr +>>>62 string zcf.draw.template+zip Draw template, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.template+zip +#!:ext cdt/cdrt +# URL: http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html +>>>62 string zcf.pattern+zip Draw pattern, version 22 +!:mime application/x-vnd.corel.zcf.pattern+zip +#!:ext pat +# URL: https://en.wikipedia.org/wiki/Corel_Designer +# Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer +# Note: called by TrID "Corel DESIGN graphics" +>>>62 string designer.document+zip DESIGNER graphics, version 14-16 +!:mime application/x-vnd.corel.designer.document+zip +#!:ext des +>>>62 string zcf.designer.document+zip DESIGNER graphics, version 17-21 +!:mime application/x-vnd.corel.zcf.designer.document+zip +#!:ext des +# URL: http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/ +# CorelDRAW-Corel-Symbol-Library-CSL.html +>>>62 string symbol.library+zip Symbol Library, version 6-16.3 +!:mime application/x-vnd.corel.symbol.library+zip +#!:ext csl +>>>62 string zcf.symbol.library+zip Symbol Library, version 17-22 +!:mime application/x-vnd.corel.zcf.symbol.library+zip +#!:ext csl + +# Catch other ZIP-with-mimetype formats +# In a ZIP file, the bytes immediately after a member's contents are +# always "PK". The 2 regex rules here print the "mimetype" member's +# contents up to the first 'P'. Luckily, most MIME types don't contain +# any capital 'P's. This is a kludge. +# (mimetype contains "application/") +>>50 default x Zip data +>>>38 regex [!-OQ-~]+ (MIME type "%s"?) +!:mime application/zip +# (mimetype contents other than "application/*") +>26 string \x8\0\0\0mimetype +>>38 string !application/ +>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?) +!:mime application/zip + +# Java Jar files +>(26.s+30) leshort 0xcafe Java archive data (JAR) +!:mime application/java-archive + +# iOS App +>(26.s+30) leshort !0xcafe +>>26 string !\x8\0\0\0mimetype +>>>30 string Payload/ +>>>>38 search/64 .app/ iOS App +!:mime application/x-ios-app + +>30 search/100/b application/epub+zip EPUB document +!:mime application/epub+zip + +# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) +# Next line excludes specialized formats: +>(26.s+30) leshort !0xcafe +>>30 search/100/b !application/epub+zip +>>>26 string !\x8\0\0\0mimetype Zip archive data +!:mime application/zip +>>>>4 beshort x \b, at least +>>>>4 beshort x to extract +>>>>8 beshort x \b, compression method= +>>>>0x161 string WINZIP \b, WinZIP self-extracting + +# StarView Metafile +# From Pierre Ducroquet +0 string VCLMTF StarView MetaFile +>6 beshort x \b, version %d +>8 belong x \b, size %d + +# Zoo archiver +20 lelong 0xfdc4a7dc Zoo archive data +!:mime application/x-zoo +>4 byte >48 \b, v%c. +>>6 byte >47 \b%c +>>>7 byte >47 \b%c +>32 byte >0 \b, modify: v%d +>>33 byte x \b.%d+ +>42 lelong 0xfdc4a7dc \b, +>>70 byte >0 extract: v%d +>>>71 byte x \b.%d+ + +# Shell archives +10 string #\ This\ is\ a\ shell\ archive shell archive text +!:mime application/octet-stream + +# +# LBR. NB: May conflict with the questionable +# "binary Computer Graphics Metafile" format. +# +0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data +# +# From Rafael Laboissiere +# The Project Revision Control System (see +# http://prcs.sourceforge.net) generates a packaged project +# file which is recognized by the following entry: +0 leshort 0xeb81 PRCS packaged project + +# Microsoft cabinets +# by David Necas (Yeti) +#0 string MSCF\0\0\0\0 Microsoft cabinet file data, +#>25 byte x v%d +#>24 byte x \b.%d +# MPi: All CABs have version 1.3, so this is pointless. +# Better magic in debian-additions. + +# GTKtalog catalogs +# by David Necas (Yeti) +4 string gtktalog\ GTKtalog catalog data, +>13 string 3 version 3 +>>14 beshort 0x677a (gzipped) +>>14 beshort !0x677a (not gzipped) +>13 string >3 version %s + +############################################################################ +# Parity archive reconstruction file, the 'par' file format now used on Usenet. +0 string PAR\0 PARity archive data +>48 leshort =0 - Index file +>48 leshort >0 - file number %d + +# Felix von Leitner +0 string d8:announce BitTorrent file +!:mime application/x-bittorrent +# Durval Menezes, +0 string d13:announce-list BitTorrent file +!:mime application/x-bittorrent +0 string d7:comment BitTorrent file +!:mime application/x-bittorrent +0 string d4:info BitTorrent file +!:mime application/x-bittorrent + +# Atari MSA archive - Teemu Hukkanen +0 beshort 0x0e0f Atari MSA archive data +>2 beshort x \b, %d sectors per track +>4 beshort 0 \b, 1 sided +>4 beshort 1 \b, 2 sided +>6 beshort x \b, starting track: %d +>8 beshort x \b, ending track: %d + +# Alternate ZIP string (amc@arwen.cs.berkeley.edu) +0 string PK00PK\003\004 Zip archive data +!:mime application/zip +#!:ext zip/cbz + +# ACE archive (from http://www.wotsit.org/download.asp?f=ace) +# by Stefan `Sec` Zehl +7 string **ACE** ACE archive data +>15 byte >0 version %d +>16 byte =0x00 \b, from MS-DOS +>16 byte =0x01 \b, from OS/2 +>16 byte =0x02 \b, from Win/32 +>16 byte =0x03 \b, from Unix +>16 byte =0x04 \b, from MacOS +>16 byte =0x05 \b, from WinNT +>16 byte =0x06 \b, from Primos +>16 byte =0x07 \b, from AppleGS +>16 byte =0x08 \b, from Atari +>16 byte =0x09 \b, from Vax/VMS +>16 byte =0x0A \b, from Amiga +>16 byte =0x0B \b, from Next +>14 byte x \b, version %d to extract +>5 leshort &0x0080 \b, multiple volumes, +>>17 byte x \b (part %d), +>5 leshort &0x0002 \b, contains comment +>5 leshort &0x0200 \b, sfx +>5 leshort &0x0400 \b, small dictionary +>5 leshort &0x0800 \b, multi-volume +>5 leshort &0x1000 \b, contains AV-String +>>30 string \x16*UNREGISTERED\x20VERSION* (unregistered) +>5 leshort &0x2000 \b, with recovery record +>5 leshort &0x4000 \b, locked +>5 leshort &0x8000 \b, solid +# Date in MS-DOS format (whatever that is) +#>18 lelong x Created on + +# sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann +# +0x1A string sfArk sfArk compressed Soundfont +>0x15 string 2 +>>0x1 string >\0 Version %s +>>0x2A string >\0 : %s + +# DR-DOS 7.03 Packed File *.??_ +# Reference: http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm +# Note: unpacked by PNUNPACK.EXE +0 string Packed\ File\ +# by looking for Control-Z skip ASCII text starting with Packed File +>0x18 ubyte 0x1a Personal NetWare Packed File +!:mime application/x-novell-compress +#!:ext ??_ +>>12 string x \b, was "%.12s" +# 1 or 2 +#>>0x19 ubyte x \b, at 0x19 %u +>>0x1b ulelong x with %u bytes + +# EET archive +# From: Tilman Sauerbeck +0 belong 0x1ee7ff00 EET archive +!:mime application/x-eet + +# rzip archives +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +# From: Joerg Jenderek +# URL: https://help.foxitsoftware.com/kb/install-fzip-file.php +# reference: http://mark0.net/download/triddefs_xml.7z/ +# defs/f/fzip.trid.xml +# Note: unknown compression; No "PK" zip magic; normally in directory like +# "%APPDATA%\Foxit Software\Addon\Foxit Reader\Install" +0 ubequad 0x2506781901010000 Foxit add-on/update +!:mime application/x-fzip +#!:ext fzip + +# From: "Robert Dale" +0 belong 123 dar archive, +>4 belong x label "%.8x +>>8 belong x %.8x +>>>12 beshort x %.4x" +>14 byte 0x54 end slice +>14 beshort 0x4e4e multi-part +>14 beshort 0x4e53 multi-part, with -S + +# Symbian installation files +# https://www.thouky.co.uk/software/psifs/sis.html +# http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf +8 lelong 0x10000419 Symbian installation file +!:mime application/vnd.symbian.install +>4 lelong 0x1000006D (EPOC release 3/4/5) +>4 lelong 0x10003A12 (EPOC release 6) +0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x) +!:mime x-epoc/x-sisx-app + +# From "Nelson A. de Oliveira" +0 string MPQ\032 MoPaQ (MPQ) archive + +# From: "Nelson A. de Oliveira" +# .kgb +0 string KGB_arch KGB Archiver file +>10 string x with compression level %.1s + +# Type: Parity Archive +# From: Daniel van Eeden +0 string PAR2 Parity Archive Volume Set + +# Bacula volume format. (Volumes always start with a block header.) +# URL: https://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html +# From: Adam Buchbinder +12 string BB02 Bacula volume +>20 bedate x \b, started %s + +# ePub is XHTML + XML inside a ZIP archive. The first member of the +# archive must be an uncompressed file called 'mimetype' with contents +# 'application/epub+zip' + + +# From: "Michael Gorny" +# ZPAQ: http://mattmahoney.net/dc/zpaq.html +0 string zPQ ZPAQ stream +>3 byte x \b, level %d +# From: Barry Carter +# https://encode.ru/threads/456-zpaq-updates/page32 +0 string 7kSt ZPAQ file + +# BBeB ebook, unencrypted (LRF format) +# URL: https://www.sven.de/librie/Librie/LrfFormat +# From: Adam Buchbinder +0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted +>8 beshort x \b, version %d +>36 byte 1 \b, front-to-back +>36 byte 16 \b, back-to-front +>42 beshort x \b, (%dx, +>44 beshort x %d) + +# Symantec GHOST image by Joerg Jenderek at May 2014 +# https://us.norton.com/ghost/ +# https://www.garykessler.net/library/file_sigs.html +0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image +# *.GHO +>2 ubyte&0x08 0x00 \b, first file +# *.GHS or *.[0-9] with cns program option +>2 ubyte&0x08 0x08 \b, split file +# part of split index interesting for *.ghs +>>4 ubyte x id=0x%x +# compression tag minus one equals numeric compression command line switch z[1-9] +>3 ubyte 0 \b, no compression +>3 ubyte 2 \b, fast compression (Z1) +>3 ubyte 3 \b, medium compression (Z2) +>3 ubyte >3 +>>3 ubyte <11 \b, compression (Z%d-1) +>2 ubyte&0x08 0x00 +# ~ 30 byte password field only for *.gho +>>12 ubequad !0 \b, password protected +>>44 ubyte !1 +# 1~Image All, sector-by-sector only for *.gho +>>>10 ubyte 1 \b, sector copy +# 1~Image Boot track only for *.gho +>>>43 ubyte 1 \b, boot track +# 1~Image Disc only for *.gho implies Image Boot track and sector copy +>>44 ubyte 1 \b, disc sector copy +# optional image description only *.gho +>>0xff string >\0 "%-.254s" +# look for DOS sector end sequence +>0xE08 search/7776 \x55\xAA +>>&-512 indirect x \b; contains + +# Google Chrome extensions +# https://developer.chrome.com/extensions/crx +# https://developer.chrome.com/extensions/hosting +0 string Cr24 Google Chrome extension +!:mime application/x-chrome-extension +>4 ulong x \b, version %u + +# SeqBox - Sequenced container +# ext: sbx, seqbox +# Marco Pontello marcopon@gmail.com +# reference: https://github.com/MarcoPon/SeqBox +0 string SBx SeqBox, +>3 byte x version %d + +# LyNX archive +56 string USE\040LYNX\040TO\040DISSOLVE\040THIS\040FILE LyNX archive + +# From: Joerg Jenderek +# URL: https://www.acronis.com/ +# Reference: https://en.wikipedia.org/wiki/TIB_(file_format) +# Note: only tested with True Image 2013 Build 5962 and 2019 Build 14110 +0 ubequad 0xce24b9a220000000 Acronis True Image backup +!:mime application/x-acronis-tib +#!:ext tib +# 01000000 +#>20 ubelong x \b, at 20 0x%x +# 20000000 +#>28 ubelong x \b, at 28 0x%x +# strings like "Generic- SD/MMC 1.00" "Unknown Disk" "Msft Virtual Disk 1.0" +# ??? +# strings like "\Device\0000011e" "\Device\0000015a" +#>0 search/0x6852300/cs \\Device\\ +#>>&-1 pstring x \b, %s +# "\Device\HarddiskVolume30" "\Device\HarddiskVolume39" +#>>>&1 search/180/cs \\Device\\ +#>>>>&-1 pstring x \b, %s +#>>>>>&0 search/29/cs \0\0\xc8\0 +# disk label +#>>>>>>&10 lestring16 x \b, disk label %11.11s +#>>>>>>&9 plestring16 x \b, disk label "%11.11s" +#>>>>>>&10 ubequad x %16.16llx + + +# Gentoo XPAK binary package +# by Michal Gorny +# https://gitweb.gentoo.org/proj/portage.git/tree/man/xpak.5 +-4 string STOP +>-16 string XPAKSTOP Gentoo binary package (XPAK) + +# From: Joerg Jenderek +# URL: https://kodi.wiki/view/TexturePacker +# Reference: https://mirrors.kodi.tv/releases/source/17.3-Krypton.tar.gz +# /xbmc-Krypton/xbmc/guilib/XBTF.h +# /xbmc-Krypton/xbmc/guilib/XBTF.cpp +0 string XBTF +# skip ASCII text by looking for terminating \0 of path +>264 ubyte 0 XBMC texture package +!:mime application/x-xbmc-xbt +#!:ext xbt +# XBTF_VERSION 2 +>>4 string !2 \b, version %-.1s +# nofFiles /xbmc-Krypton/xbmc/guilib/XBTFReader.cpp +>>5 ulelong x \b, %u file +# plural s +>>5 ulelong >1 \bs +# path[CXBTFFile[MaximumPathLength=256] +>>9 string x \b, 1st %s + +# ALZIP archive +# by Hyungjun Park , Hajin Jang +# http://kippler.com/win/unalz/ +# https://salsa.debian.org/l10n-korean-team/unalz +0 string ALZ\001 ALZ archive data +#!:ext alz + +# https://cf-aldn.altools.co.kr/setup/EGG_Specification.zip +0 string EGGA EGG archive data, +#!:ext egg +>5 byte x version %u +>4 byte x \b.%u +>>0x0E ulelong =0x08E28222 +>>0x0E ulelong =0x24F5A262 \b, split +>>0x0E ulelong =0x24E5A060 \b, solid +>>0x0E default x \b, unknown + +# PAQ9A archive +# URL: http://mattmahoney.net/dc/#paq9a +# Note: Line 1186 of paq9a.cpp gives the magic bytes +0 string pQ9\001 PAQ9A archive + +#------------------------------------------------------------------------------ +# $File: compress,v 1.80 2021/03/15 17:49:24 christos Exp $ +# compress: file(1) magic for pure-compression formats (no archives) +# +# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. +# +# Formats for various forms of compressed data +# Formats for "compress" proper have been moved into "compress.c", +# because it tries to uncompress it to figure out what's inside. + +# standard unix compress +0 string \037\235 compress'd data +!:mime application/x-compress +!:apple LZIVZIVU +>2 byte&0x80 >0 block compressed +>2 byte&0x1f x %d bits + +# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver) +# URL: https://en.wikipedia.org/wiki/Gzip +# Reference: https://tools.ietf.org/html/rfc1952 +# Update: Joerg Jenderek, Apr 2019 +# Edited by Chris Chittleborough , March 2002 +# * Original filename is only at offset 10 if "extra field" absent +# * Produce shorter output - notably, only report compression methods +# other than 8 ("deflate", the only method defined in RFC 1952). +# Note: find defs -iname '*.trid.xml' -exec grep -q '1F8B08' {} \; -ls +# TODO: +# FBR Blueberry FlashBack screen Record https://www.flashbackrecorder.com/ +# KPR KOffice/Calligra KPresenter application/x-kpresenter +# KPT KOffice/Calligra KPresenter template? application/x-kpresenter +# SAV Diggles Saved Game File http://www.innonics.com +# SAV FarCry (demo) saved game http://www.farcry-thegame.com +# DAT ZOAGZIP game data format http://en.wikipedia.org/wiki/SD_Gundam_Capsule_Fighter +0 string \037\213 +# to display gzip compressed (strength=100=2*50) before other (strength=50)? +#!:strength * 2 +# no FNAME and FCOMMENT bit implies no file name/comment. That means only binary +>3 byte&0x18 =0 +# For binary gzipped no ASCII text should occur +# mcd-monu-cad.trid.xml +>>10 string MCD Monu-Cad Drawing, Component or Font +#>>36 string Created\ with\ MONU-CAD +#!:mime application/octet-stream +# http://fileformats.archiveteam.org/wiki/Monu-CAD +# http://www.monucad.com/downloads/FullDemo-2005.EXE +# /HANDS96.MCC Component +# /DEMO_DD01.MCD Drawing +# /MCALF020.FNT Font +#!:ext mcc/mcd/fnt +# http://www.generalcadd.com +>>10 string GXD General CADD, Drawing or Component +#!:mime application/octet-stream +# /gxc/BUILDINGEDGE.gxc Component +# /gxd/HOCKETT-STPAUL-WRHSE.gxd Drawing +# /gxd/POWERLAND-MILL-ADD-11.gxd Drawing v9.1.06 +#!:ext gxc/gxd +#>>>13 ubyte 0 \b, version 0 +>>>13 string 09 \b, version 9 +# other gzipped binary like gzipped tar, VirtualBox extension package,... +>>10 default x gzip compressed data +!:mime application/gzip +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# gzipped TAR or VirtualBox extension package +#!:mime application/x-compressed-tar +#!:mime application/x-virtualbox-vbox-extpack +# https://www.w3.org/TR/SVG/mimereg.html +#!:mime image/image/svg+xml-compressed +# zlib.3.gz +# microcode-20180312.tgz +# tpz same as tgz +# lua-md5_1.2-1_i386_i486.ipk https://en.wikipedia.org/wiki/Opkg +# Oracle_VM_VirtualBox_Extension_Pack-5.0.12-104815.vbox-extpack +#!:ext gz/tgz/tpz/ipk/vbox-extpack/svgz +# FNAME/FCOMMENT bit implies file name/comment as iso-8859-1 text +>3 byte&0x18 >0 gzip compressed data +!:mime application/gzip +# gzipped tar, gzipped Abiword document +#!:mime application/x-compressed-tar +#!:mime application/x-abiword-compressed +#!:mime image/image/svg+xml-compressed +# kleopatra_splashscreen.svgz gzipped .svg +#!:ext gz/tgz/tpz/zabw/svgz +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# display information of gzip compressed files +#>2 byte x THIS iS GZIP +>2 byte <8 \b, reserved method +>2 byte >8 \b, unknown method +>3 byte &0x01 \b, ASCII +>3 byte &0x02 \b, has CRC +>3 byte &0x04 \b, extra field +>3 byte&0xC =0x08 +>>10 string x \b, was "%s" +>3 byte &0x10 \b, has comment +>3 byte &0x20 \b, encrypted +>4 ledate >0 \b, last modified: %s +>8 byte 2 \b, max compression +>8 byte 4 \b, max speed +>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT) +>9 byte =0x01 \b, from Amiga +>9 byte =0x02 \b, from VMS +>9 byte =0x03 \b, from Unix +>9 byte =0x04 \b, from VM/CMS +>9 byte =0x05 \b, from Atari +>9 byte =0x06 \b, from HPFS filesystem (OS/2, NT) +>9 byte =0x07 \b, from MacOS +>9 byte =0x08 \b, from Z-System +>9 byte =0x09 \b, from CP/M +>9 byte =0x0A \b, from TOPS/20 +>9 byte =0x0B \b, from NTFS filesystem (NT) +>9 byte =0x0C \b, from QDOS +>9 byte =0x0D \b, from Acorn RISCOS +# size of the original (uncompressed) input data modulo 2^32 +#>-4 ulelong x \b, original size modulo 2^32 %u +#ERROR: line 114: non zero offset 1048572 at level 1 + +# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis +0 string \037\036 packed data +!:mime application/octet-stream +>2 belong >1 \b, %d characters originally +>2 belong =1 \b, %d character originally +# +# This magic number is byte-order-independent. +0 short 0x1f1f old packed data +!:mime application/octet-stream + +# XXX - why *two* entries for "compacted data", one of which is +# byte-order independent, and one of which is byte-order dependent? +# +0 short 0x1fff compacted data +!:mime application/octet-stream +# This string is valid for SunOS (BE) and a matching "short" is listed +# in the Ultrix (LE) magic file. +0 string \377\037 compacted data +!:mime application/octet-stream +0 short 0145405 huf output +!:mime application/octet-stream + +# bzip2 +0 string BZh bzip2 compressed data +!:mime application/x-bzip2 +>3 byte >47 \b, block size = %c00k + +# bzip a block-sorting file compressor +# by Julian Seward and others +0 string BZ0 bzip compressed data +!:mime application/x-bzip +>3 byte >47 \b, block size = %c00k + +# lzip +0 string LZIP lzip compressed data +!:mime application/x-lzip +>4 byte x \b, version: %d + +# squeeze and crunch +# Michael Haardt +0 beshort 0x76FF squeezed data, +>4 string x original name %s +0 beshort 0x76FE crunched data, +>2 string x original name %s +0 beshort 0x76FD LZH compressed data, +>2 string x original name %s + +# Freeze +0 string \037\237 frozen file 2.1 +0 string \037\236 frozen file 1.0 (or gzip 0.5) + +# SCO compress -H (LZH) +0 string \037\240 SCO compress -H (LZH) data + +# European GSM 06.10 is a provisional standard for full-rate speech +# transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse +# excitation/long term prediction) coding at 13 kbit/s. +# +# There's only a magic nibble (4 bits); that nibble repeats every 33 +# bytes. This isn't suited for use, but maybe we can use it someday. +# +# This will cause very short GSM files to be declared as data and +# mismatches to be declared as data too! +#0 byte&0xF0 0xd0 data +#>33 byte&0xF0 0xd0 +#>66 byte&0xF0 0xd0 +#>99 byte&0xF0 0xd0 +#>132 byte&0xF0 0xd0 GSM 06.10 compressed audio + +# lzop from +0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data +>9 beshort <0x0940 +>>9 byte&0xf0 =0x00 - version 0. +>>9 beshort&0x0fff x \b%03x, +>>13 byte 1 LZO1X-1, +>>13 byte 2 LZO1X-1(15), +>>13 byte 3 LZO1X-999, +## >>22 bedate >0 last modified: %s, +>>14 byte =0x00 os: MS-DOS +>>14 byte =0x01 os: Amiga +>>14 byte =0x02 os: VMS +>>14 byte =0x03 os: Unix +>>14 byte =0x05 os: Atari +>>14 byte =0x06 os: OS/2 +>>14 byte =0x07 os: MacOS +>>14 byte =0x0A os: Tops/20 +>>14 byte =0x0B os: WinNT +>>14 byte =0x0E os: Win32 +>9 beshort >0x0939 +>>9 byte&0xf0 =0x00 - version 0. +>>9 byte&0xf0 =0x10 - version 1. +>>9 byte&0xf0 =0x20 - version 2. +>>9 beshort&0x0fff x \b%03x, +>>15 byte 1 LZO1X-1, +>>15 byte 2 LZO1X-1(15), +>>15 byte 3 LZO1X-999, +## >>25 bedate >0 last modified: %s, +>>17 byte =0x00 os: MS-DOS +>>17 byte =0x01 os: Amiga +>>17 byte =0x02 os: VMS +>>17 byte =0x03 os: Unix +>>17 byte =0x05 os: Atari +>>17 byte =0x06 os: OS/2 +>>17 byte =0x07 os: MacOS +>>17 byte =0x0A os: Tops/20 +>>17 byte =0x0B os: WinNT +>>17 byte =0x0E os: Win32 + +# 4.3BSD-Quasijarus Strong Compression +# https://minnie.tuhs.org/Quasijarus/compress.html +0 string \037\241 Quasijarus strong compressed data + +# From: Cory Dikkers +0 string XPKF Amiga xpkf.library compressed data +0 string PP11 Power Packer 1.1 compressed data +0 string PP20 Power Packer 2.0 compressed data, +>4 belong 0x09090909 fast compression +>4 belong 0x090A0A0A mediocre compression +>4 belong 0x090A0B0B good compression +>4 belong 0x090A0C0C very good compression +>4 belong 0x090A0C0D best compression + +# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at) +# https://www.7-zip.org or DOC/7zFormat.txt +# +0 string 7z\274\257\047\034 7-zip archive data, +>6 byte x version %d +>7 byte x \b.%d +!:mime application/x-7z-compressed +#!:ext 7z/cb7 + +# Type: LZMA +0 lelong&0xffffff =0x5d +>12 leshort 0xff lzma compressed data, +!:mime application/x-lzma +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld +>12 leshort 0 lzma compressed data, +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld + +# http://tukaani.org/xz/xz-file-format.txt +0 ustring \xFD7zXZ\x00 xz compressed data, checksum +>7 byte&0xf 0x0 NONE +>7 byte&0xf 0x1 CRC32 +>7 byte&0xf 0x4 CRC64 +>7 byte&0xf 0xa SHA-256 + +!:strength * 2 +!:mime application/x-xz + +# https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt +0 string LRZI LRZIP compressed data +>4 byte x - version %d +>5 byte x \b.%d +!:mime application/x-lrzip + +# https://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html +0 lelong 0x184d2204 lz4 compressed data (v1.4+) +!:mime application/x-lz4 +# Added by osm0sis@xda-developers.com +0 lelong 0x184c2103 lz4 compressed data (v1.0-v1.3) +!:mime application/x-lz4 +0 lelong 0x184c2102 lz4-l compressed data (v0.1-v0.9) +!:mime application/x-lz4 + +# Zstandard/LZ4 skippable frames +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong&0xFFFFFFF0 0x184D2A50 +>(4.l+8) indirect x + +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong 0xEC30A437 Zstandard dictionary +!:mime application/x-std-dictionary +>4 lelong x (ID %u) + +# AFX compressed files (Wolfram Kleff) +2 string -afx- AFX compressed file data + +# Supplementary magic data for the file(1) command to support +# rzip(1). The format is described in magic(5). +# +# Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with +# this file. +# +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +0 string ArC\x01 FreeArc archive + +# Type: DACT compressed files +0 long 0x444354C3 DACT compressed data +>4 byte >-1 (version %i. +>5 byte >-1 %i. +>6 byte >-1 %i) +>7 long >0 , original size: %i bytes +>15 long >30 , block size: %i bytes + +# Valve Pack (VPK) files +0 lelong 0x55aa1234 Valve Pak file +>0x4 lelong x \b, version %u +>0x8 lelong x \b, %u entries + +# Snappy framing format +# https://code.google.com/p/snappy/source/browse/trunk/framing_format.txt +0 string \377\006\0\0sNaPpY snappy framed data +!:mime application/x-snappy-framed + +# qpress, https://www.quicklz.com/ +0 string qpress10 qpress compressed data +!:mime application/x-qpress + +# Zlib https://www.ietf.org/rfc/rfc6713.txt +0 string/b x +>0 beshort%31 =0 +>>0 byte&0xf =8 +>>>0 byte&0x80 =0 zlib compressed data +!:mime application/zlib + +# BWC compression +0 string BWC +>3 byte 0 BWC compressed data + +# UCL compression +0 bequad 0x00e955434cff011a UCL compressed data + +# Softlib archive +0 string SLIB Softlib archive +>4 leshort x \b, version %d +>6 leshort x (contains %d files) + +# URL: https://github.com/lzfse/lzfse/blob/master/src/lzfse_internal.h#L276 +# From: Eric Hall +0 string bvx- lzfse encoded, no compression +0 string bvx1 lzfse compressed, uncompressed tables +0 string bvx2 lzfse compressed, compressed tables +0 string bvxn lzfse encoded, lzvn compressed + +# pcxLib.exe compression program +# http://www.shikadi.net/moddingwiki/PCX_Library +0 string/b pcxLib + +#------------------------------------------------------------ +# $File: android,v 1.18 2021/02/23 00:51:10 christos Exp $ +# Various android related magic entries +#------------------------------------------------------------ + +# Dalvik .dex format. http://retrodev.com/android/dexformat.html +# From "Mike Fleming" +# Fixed to avoid regexec 17 errors on some dex files +# From "Tim Strazzere" +0 string dex\n +>0 regex dex\n[0-9]{2}\0 Dalvik dex file +>4 string >000 version %s +0 string dey\n +>0 regex dey\n[0-9]{2}\0 Dalvik dex file (optimized for host) +>4 string >000 version %s + +# Android bootimg format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/mkbootimg/bootimg.h +# https://github.com/djrbliss/loki/blob/master/loki.h#L43 +0 string ANDROID! Android bootimg +>1024 string LOKI \b, LOKI'd +>>1028 lelong 0 \b (boot) +>>1028 lelong 1 \b (recovery) +>8 lelong >0 \b, kernel +>>12 lelong >0 \b (0x%x) +>16 lelong >0 \b, ramdisk +>>20 lelong >0 \b (0x%x) +>24 lelong >0 \b, second stage +>>28 lelong >0 \b (0x%x) +>36 lelong >0 \b, page size: %d +>38 string >0 \b, name: %s +>64 string >0 \b, cmdline (%s) + +# Android sparse img format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/libsparse/sparse_format.h +0 lelong 0xed26ff3a Android sparse image +>4 leshort x \b, version: %d +>6 leshort x \b.%d +>16 lelong x \b, Total of %d +>12 lelong x \b %d-byte output blocks in +>20 lelong x \b %d input chunks. + +# Android binary XML magic +# In include/androidfw/ResourceTypes.h: +# RES_XML_TYPE = 0x0003 followed by the size of the header (ResXMLTree_header), +# which is 8 bytes (2 bytes type + 2 bytes header size + 4 bytes size). +0 lelong 0x00080003 Android binary XML + +# Android cryptfs footer +# From https://android.googlesource.com/\ +# platform/system/vold/+/refs/heads/master/cryptfs.h +0 lelong 0xd0b5b1c4 Android cryptfs footer +>4 leshort x \b, version: %d +>6 leshort x \b.%d + +# Android Vdex format +# From https://android.googlesource.com/\ +# platform/art/+/master/runtime/vdex_file.h +0 string vdex Android vdex file, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d + +# Android Vdex format, dexfile is currently being updated +# by android system +# From https://android.googlesource.com/\ +# platform/art/+/master/dex2oat/dex2oat.cc +0 string wdex Android vdex file, being processed by dex2oat, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d diff --git a/Final_Zip/AIK/PBRP-R/cleanup.sh b/Final_Zip/AIK/PBRP-R/cleanup.sh new file mode 100755 index 0000000..d8f1d61 --- /dev/null +++ b/Final_Zip/AIK/PBRP-R/cleanup.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# AIK-Linux/cleanup: reset working directory +# osm0sis @ xda-developers + +case $1 in + --help) echo "usage: cleanup.sh [--local] [--quiet]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + statarg="-f %Su"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) statarg="-c %U";; +esac; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; + +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + sudo=sudo; +fi; + +$sudo rm -rf ramdisk split_img *new.* || exit 1; + +case $1 in + --quiet) ;; + *) echo "Working directory cleaned.";; +esac; +exit 0; + diff --git a/Final_Zip/AIK/PBRP-R/repackimg.sh b/Final_Zip/AIK/PBRP-R/repackimg.sh new file mode 100755 index 0000000..5709f0f --- /dev/null +++ b/Final_Zip/AIK/PBRP-R/repackimg.sh @@ -0,0 +1,413 @@ +#!/bin/bash +# AIK-Linux/repackimg: repack ramdisk and build image +# osm0sis @ xda-developers + +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: repackimg.sh [--local] [--original] [--origsize] [--level <0-9>] [--avbkey ] [--forceelf]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + + javaver=$(java -version 2>&1 | head -n1 | cut -d\" -f2); + javamaj=$(echo $javaver | cut -d. -f1); + javamin=$(echo $javaver | cut -d. -f2); + if [ "$javamaj" -lt 9 ] && [ "$javamaj" -eq 1 -a "$javamin" -lt 8 ]; then + java() { "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" "$@"; } + fi; + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; +chmod -R 755 "$bin" "$aik/"*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -z "$(ls split_img/* 2>/dev/null)" -o ! -e ramdisk ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +while [ "$1" ]; do + case $1 in + --original) original=1;; + --origsize) origsize=1;; + --forceelf) repackelf=1;; + --level) + case $2 in + ''|*[!0-9]*) ;; + *) level="-$2"; lvltxt=" - Level: $2"; shift;; + esac; + ;; + --avbkey) + if [ "$2" ]; then + for keytest in "$2" "$cur/$2" "$aik/$2"; do + if [ ! -z "$(ls $keytest.pk8 2>/dev/null)" -a ! -z "$(ls $keytest.x509.* 2>/dev/null)" ]; then + avbkey="$keytest"; avbtxt=" - Key: $2"; shift; break; + fi; + done; + fi; + ;; + esac; + shift; +done; + +ramdiskcomp=`cat split_img/*-*ramdiskcomp 2>/dev/null`; +if [ -z "$(ls ramdisk/* 2>/dev/null)" ] && [ ! "$ramdiskcomp" = "empty" -a ! "$original" ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - RepackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +if [ ! -z "$(ls *-new.* 2>/dev/null)" ]; then + echo "Warning: Overwriting existing files!"; + echo " "; +fi; +rm -f "*-new.*"; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" ]; then + sudo=sudo; sumsg=" (as root)"; +else + cpioarg="-R 0:0"; +fi; + +if [ "$original" ]; then + echo "Repacking with original ramdisk..."; +elif [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: Using empty ramdisk for repack!"; + compext=.empty; + touch ramdisk-new.cpio$compext; +else + echo "Packing ramdisk$sumsg..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + if [ -z "$level" ]; then + case $ramdiskcomp in + xz) level=-1;; + lz4*) level=-9;; + esac; + fi; + echo "Using compression: $ramdiskcomp$lvltxt"; + repackcmd="$ramdiskcomp $level"; + compext=$ramdiskcomp; + case $ramdiskcomp in + gzip) compext=gz;; + lzop) compext=lzo;; + xz) repackcmd="xz $level -Ccrc32";; + lzma) repackcmd="xz $level -Flzma";; + bzip2) compext=bz2;; + lz4) repackcmd="$bin/$arch/lz4 $level";; + lz4-l) repackcmd="$bin/$arch/lz4 $level -l"; compext=lz4;; + cpio) repackcmd="cat"; compext="";; + *) abort; exit 1;; + esac; + if [ "$compext" ]; then + compext=.$compext; + fi; + cd ramdisk; + $sudo find . | $sudo $cpio $cpioarg -H newc -o 2>/dev/null | $repackcmd > ../ramdisk-new.cpio$compext; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Getting build information..."; +cd split_img; +imgtype=`cat *-imgtype`; +case $imgtype in + KRNL) ;; + AOSP_VNDR) vendor=vendor_;; + *) + if [ -f *-kernel ]; then + kernel=`ls *-kernel`; echo "kernel = $kernel"; + kernel="split_img/$kernel"; + fi; + ;; +esac; +if [ "$original" ]; then + ramdisk=`ls *-*ramdisk.cpio*`; echo "${vendor}ramdisk = $ramdisk"; + ramdisk="split_img/$ramdisk"; +else + ramdisk="ramdisk-new.cpio$compext"; +fi; +case $imgtype in + KRNL) rsz=$(wc -c < ../"$ramdisk"); echo "ramdisk_size = $rsz";; + OSIP) echo "cmdline = $(cat *-*cmdline)";; + U-Boot) + name=`cat *-name`; echo "name = $name"; + uarch=`cat *-arch`; + os=`cat *-os`; + type=`cat *-type`; + comp=`cat *-comp`; echo "type = $uarch $os $type ($comp)"; + [ "$comp" = "uncompressed" ] && comp=none; + addr=`cat *-addr`; echo "load_addr = $addr"; + ep=`cat *-ep`; echo "entry_point = $ep"; + ;; + *) + if [ -f *-second ]; then + second=`ls *-second`; echo "second = $second"; + second=(--second "split_img/$second"); + fi; + if [ -f *-dtb ]; then + dtb=`ls *-dtb`; echo "dtb = $dtb"; + dtb=(--dtb "split_img/$dtb"); + fi; + if [ -f *-recovery_dtbo ]; then + recoverydtbo=`ls *-recovery_dtbo`; echo "recovery_dtbo = $recoverydtbo"; + recoverydtbo=(--recovery_dtbo "split_img/$recoverydtbo"); + fi; + if [ -f *-*cmdline ]; then + cmdname=`ls *-*cmdline`; + cmdline=`cat *-*cmdline`; echo "${vendor}cmdline = $cmdline"; + cmd=("split_img/$cmdname"@cmdline); + fi; + if [ -f *-board ]; then + board=`cat *-board`; echo "board = $board"; + fi; + if [ -f *-base ]; then + base=`cat *-base`; echo "base = $base"; + fi; + if [ -f *-pagesize ]; then + pagesize=`cat *-pagesize`; echo "pagesize = $pagesize"; + fi; + if [ -f *-kernel_offset ]; then + kerneloff=`cat *-kernel_offset`; echo "kernel_offset = $kerneloff"; + fi; + if [ -f *-ramdisk_offset ]; then + ramdiskoff=`cat *-ramdisk_offset`; echo "ramdisk_offset = $ramdiskoff"; + fi; + if [ -f *-second_offset ]; then + secondoff=`cat *-second_offset`; echo "second_offset = $secondoff"; + fi; + if [ -f *-tags_offset ]; then + tagsoff=`cat *-tags_offset`; echo "tags_offset = $tagsoff"; + fi; + if [ -f *-dtb_offset ]; then + dtboff=`cat *-dtb_offset`; echo "dtb_offset = $dtboff"; + fi; + if [ -f *-os_version ]; then + osver=`cat *-os_version`; echo "os_version = $osver"; + fi; + if [ -f *-os_patch_level ]; then + oslvl=`cat *-os_patch_level`; echo "os_patch_level = $oslvl"; + fi; + if [ -f *-header_version ]; then + hdrver=`cat *-header_version`; echo "header_version = $hdrver"; + fi; + if [ -f *-hashtype ]; then + hashtype=`cat *-hashtype`; echo "hashtype = $hashtype"; + hashtype="--hashtype $hashtype"; + fi; + if [ -f *-dt ]; then + dttype=`cat *-dttype`; + dt=`ls *-dt`; echo "dt = $dt"; + rpm=("split_img/$dt",rpm); + dt=(--dt "split_img/$dt"); + fi; + if [ -f *-unknown ]; then + unknown=`cat *-unknown`; echo "unknown = $unknown"; + fi; + if [ -f *-header ]; then + header=`ls *-header`; + header="split_img/$header"; + fi; + ;; +esac; +cd ..; + +if [ -f split_img/*-mtktype ]; then + mtktype=`cat split_img/*-mtktype`; + echo " "; + echo "Generating MTK headers..."; + echo " "; + echo "Using ramdisk type: $mtktype"; + "$bin/$arch/mkmtkhdr" --kernel "$kernel" --$mtktype "$ramdisk" >/dev/null; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + mv -f "$(basename "$kernel")-mtk" kernel-new.mtk; + mv -f "$(basename "$ramdisk")-mtk" $mtktype-new.mtk; + kernel=kernel-new.mtk; + ramdisk=$mtktype-new.mtk; +fi; + +if [ -f split_img/*-sigtype ]; then + outname=unsigned-new.img; +else + outname=image-new.img; +fi; + +[ "$dttype" = "ELF" ] && repackelf=1; +if [ "$imgtype" = "ELF" ] && [ ! "$header" -o ! "$repackelf" ]; then + imgtype=AOSP; + echo " "; + echo "Warning: ELF format without RPM detected; will be repacked using AOSP format!"; +fi; + +echo " "; +echo "Building image..."; +echo " "; +echo "Using format: $imgtype"; +echo " "; +case $imgtype in + AOSP_VNDR) "$bin/$arch/mkbootimg" --vendor_ramdisk "$ramdisk" "${dtb[@]}" --vendor_cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --tags_offset $tagsoff --dtb_offset $dtboff --os_version "$osver" --os_patch_level "$oslvl" --header_version $hdrver --vendor_boot $outname;; + AOSP) "$bin/$arch/mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" "${dtb[@]}" "${recoverydtbo[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --dtb_offset "$dtboff" --os_version "$osver" --os_patch_level "$oslvl" --header_version "$hdrver" $hashtype "${dt[@]}" -o $outname;; + AOSP-PXA) "$bin/$arch/pxa-mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --unknown $unknown "${dt[@]}" -o $outname;; + ELF) "$bin/$arch/elftool" pack -o $outname header="$header" "$kernel" "$ramdisk",ramdisk "${rpm[@]}" "${cmd[@]}" >/dev/null;; + KRNL) "$bin/$arch/rkcrc" -k "$ramdisk" $outname;; + OSIP) + mkdir split_img/.temp 2>/dev/null; + for i in bootstub cmdline.txt hdr kernel parameter sig; do + cp -f split_img/*-*$(basename $i .txt | sed -e 's/hdr/header/') split_img/.temp/$i 2>/dev/null; + done; + cp -f "$ramdisk" split_img/.temp/ramdisk.cpio.gz; + "$bin/$arch/mboot" -d split_img/.temp -f $outname; + ;; + U-Boot) + part0="$kernel"; + case $type in + Multi) part1=(:"$ramdisk");; + RAMDisk) part0="$ramdisk";; + esac; + "$bin/$arch/mkimage" -A $uarch -O $os -T $type -C $comp -a $addr -e $ep -n "$name" -d "$part0""${part1[@]}" $outname >/dev/null; + ;; + *) echo " "; echo "Unsupported format."; abort; exit 1;; +esac; +if [ ! $? -eq "0" ]; then + abort; + exit 1; +fi; + +rm -rf split_img/.temp; + +if [ -f split_img/*-sigtype ]; then + sigtype=`cat split_img/*-sigtype`; + if [ -f split_img/*-avbtype ]; then + avbtype=`cat split_img/*-avbtype`; + fi; + if [ -f split_img/*-blobtype ]; then + blobtype=`cat split_img/*-blobtype`; + fi; + echo "Signing new image..."; + echo " "; + echo "Using signature: $sigtype $avbtype$avbtxt$blobtype"; + [ ! "$avbkey" ] && avbkey="$bin/avb/verity"; + echo " "; + case $sigtype in + AVBv1) java -jar "$bin/boot_signer.jar" /$avbtype unsigned-new.img "$avbkey.pk8" "$avbkey.x509."* image-new.img 2>/dev/null;; + BLOB) + awk 'BEGIN { printf "-SIGNED-BY-SIGNBLOB-\00\00\00\00\00\00\00\00" }' > image-new.img; + "$bin/$arch/blobpack" blob.tmp $blobtype unsigned-new.img >/dev/null; + cat blob.tmp >> image-new.img; + rm -f blob.tmp; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --pack image-new.img --keyblock "$bin/chromeos/kernel.keyblock" --signprivate "$bin/chromeos/kernel_data_key.vbprivk" --version 1 --vmlinuz unsigned-new.img --bootloader "$bin/chromeos/empty" --config "$bin/chromeos/empty" --arch arm --flags 0x1;; + DHTB) + "$bin/$arch/dhtbsign" -i unsigned-new.img -o image-new.img >/dev/null; + rm -f split_img/*-tailtype 2>/dev/null; + ;; + NOOK*) cat split_img/*-master_boot.key unsigned-new.img > image-new.img;; + esac; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; +fi; + +if [ -f split_img/*-lokitype ]; then + lokitype=`cat split_img/*-lokitype`; + echo "Loki patching new image..."; + echo " "; + echo "Using type: $lokitype"; + echo " "; + mv -f image-new.img unlokied-new.img; + if [ -f aboot.img ]; then + "$bin/$arch/loki_tool" patch $lokitype aboot.img unlokied-new.img image-new.img >/dev/null; + if [ ! $? -eq "0" ]; then + echo "Patching failed."; + abort; + exit 1; + fi; + else + echo "Device aboot.img required in script directory to find Loki patch offset."; + abort; + exit 1; + fi; +elif [ -f split_img/*-microloader.bin ]; then + echo "Amonet patching new image..."; + echo " "; + cp -f image-new.img unamonet-new.img; + cp -f split_img/*-microloader.bin microloader.tmp; + dd bs=1024 count=1 conv=notrunc if=unamonet-new.img of=head.tmp 2>/dev/null; + dd bs=1024 seek=1 conv=notrunc if=head.tmp of=image-new.img 2>/dev/null; + dd conv=notrunc if=microloader.tmp of=image-new.img 2>/dev/null; + rm -f head.tmp microloader.tmp; +fi; + +if [ -f split_img/*-tailtype ]; then + tailtype=`cat split_img/*-tailtype`; + echo "Appending footer..."; + echo " "; + echo "Using type: $tailtype"; + echo " "; + case $tailtype in + Bump) awk 'BEGIN { printf "\x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79" }' >> image-new.img;; + SEAndroid) printf 'SEANDROIDENFORCE' >> image-new.img;; + esac; +fi; + +if [ "$origsize" -a -f split_img/*-origsize ]; then + filesize=`cat split_img/*-origsize`; + echo "Padding to original size..."; + echo " "; + cp -f image-new.img unpadded-new.img; + truncate -s $filesize image-new.img; +fi; + +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/PBRP-R/unpackimg.sh b/Final_Zip/AIK/PBRP-R/unpackimg.sh new file mode 100755 index 0000000..6198f2a --- /dev/null +++ b/Final_Zip/AIK/PBRP-R/unpackimg.sh @@ -0,0 +1,370 @@ +#!/bin/bash +# AIK-Linux/unpackimg: split image and unpack ramdisk +# osm0sis @ xda-developers + +cleanup() { "$aik/cleanup.sh" $local --quiet; } +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: unpackimg.sh [--local] [--nosudo] "; exit 1;; + --local) local="--local"; shift;; +esac; +case $1 in + --nosudo) nosudo=1; shift;; + --sudo) shift;; +esac; +if [ ! "$nosudo" ]; then + sudo=sudo; sumsg=" (as root)"; +fi; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + file() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/file" "$@"; } + lzma() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + tail() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/tail" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +if [ ! "$local" ]; then + cd "$aik"; +fi; +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +img="$1"; +[ -f "$cur/$1" ] && img="$cur/$1"; +if [ ! "$img" ]; then + while IFS= read -r line; do + case $line in + aboot.img|image-new.img|unlokied-new.img|unsigned-new.img) continue;; + esac; + img="$line"; + break; + done < <(ls *.elf *.img *.sin 2>/dev/null); +fi; +img="$(readlink -f "$img")"; +if [ ! -f "$img" ]; then + echo "No image file supplied."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - UnpackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +file=$(basename "$img"); +echo "Supplied image: $file"; +echo " "; + +if [ -d split_img -o -d ramdisk ]; then + if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + rmsumsg=" (as root)"; + fi; + echo "Removing old work folders and files$rmsumsg..."; + echo " "; + cleanup; +fi; + +echo "Setting up work folders..."; +echo " "; +mkdir split_img ramdisk; + +cd split_img; +filesize=$(wc -c < "$img"); +echo "$filesize" > "$file-origsize"; +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "signing" ]; then + echo $imgtest | awk '{ print $1 }' > "$file-sigtype"; + sigtype=$(cat "$file-sigtype"); + echo "Signature with \"$sigtype\" type detected, removing..."; + echo " "; + case $sigtype in + BLOB) + cp -f "$img" "$file"; + "$bin/$arch/blobunpack" "$file" | tail -n+5 | cut -d" " -f2 | dd bs=1 count=3 > "$file-blobtype" 2>/dev/null; + mv -f "$file."* "$file"; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --get-vmlinuz "$img" --vmlinuz-out "$file";; + DHTB) dd bs=4096 skip=512 iflag=skip_bytes conv=notrunc if="$img" of="$file" 2>/dev/null;; + NOOK) + dd bs=1048576 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=1048576 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + NOOKTAB) + dd bs=262144 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=262144 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + SIN*) + "$bin/$arch/sony_dump" . "$img" >/dev/null; + mv -f "$file."* "$file"; + rm -f "$file-sigtype"; + ;; + esac; + img="$file"; +fi; + +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "bootimg" ]; then + [ "$(echo $imgtest | awk '{ print $3 }')" = "PXA" ] && typesuffix=-PXA; + echo "$(echo $imgtest | awk '{ print $1 }')$typesuffix" > "$file-imgtype"; + imgtype=$(cat "$file-imgtype"); +else + cd ..; + cleanup; + echo "Unrecognized format."; + abort; + exit 1; +fi; +echo "Image type: $imgtype"; +echo " "; + +case $imgtype in + AOSP*|ELF|KRNL|OSIP|U-Boot) ;; + *) + cd ..; + cleanup; + echo "Unsupported format."; + abort; + exit 1; + ;; +esac; + +case $(echo $imgtest | awk '{ print $3 }') in + LOKI) + echo $imgtest | awk '{ print $5 }' | cut -d\( -f2 | cut -d\) -f1 > "$file-lokitype"; + lokitype=$(cat "$file-lokitype"); + echo "Loki patch with \"$lokitype\" type detected, reverting..."; + echo " "; + echo "Warning: A dump of your device's aboot.img is required to re-Loki!"; + echo " "; + "$bin/$arch/loki_tool" unlok "$img" "$file" >/dev/null; + img="$file"; + ;; + AMONET) + echo "Amonet patch detected, reverting..."; + echo " "; + dd bs=2048 count=1 conv=notrunc if="$img" of="$file-microloader.bin" 2>/dev/null; + dd bs=1024 skip=1 conv=notrunc if="$file-microloader.bin" of="$file-head" 2>/dev/null; + truncate -s 1024 "$file-microloader.bin"; + truncate -s 2048 "$file-head"; + dd bs=2048 skip=1 conv=notrunc if="$img" of="$file-tail" 2>/dev/null; + cat "$file-head" "$file-tail" > "$file"; + rm -f "$file-head" "$file-tail"; + img="$file"; + ;; +esac; + +tailtest="$(dd if="$img" iflag=skip_bytes skip=$(($(wc -c < "$img") - 8192)) bs=8192 count=1 2>/dev/null | file -m $bin/androidbootimg.magic - 2>/dev/null | cut -d: -f2-)"; +case $tailtest in + *data) tailtest="$(tail -n50 "$img" | file -m "$bin/androidbootimg.magic" - 2>/dev/null | cut -d: -f2-)";; +esac; +tailtype="$(echo $tailtest | awk '{ print $1 }')"; +case $tailtype in + AVB*) + echo "Signature with \"$tailtype\" type detected."; + echo " "; + case $tailtype in + *v1) + echo $tailtype > "$file-sigtype"; + echo $tailtest | awk '{ print $4 }' > "$file-avbtype"; + ;; + esac; + ;; + Bump|SEAndroid) + echo "Footer with \"$tailtype\" type detected."; + echo " "; + echo $tailtype > "$file-tailtype"; + ;; +esac; + +if [ "$imgtype" = "U-Boot" ]; then + imgsize=$(($(printf '%d\n' 0x$(hexdump -n 4 -s 12 -e '16/1 "%02x""\n"' "$img")) + 64)); + if [ ! "$filesize" = "$imgsize" ]; then + echo "Trimming..."; + echo " "; + dd bs=$imgsize count=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + img="$file"; + fi; +fi; + +echo 'Splitting image to "split_img/"...'; +case $imgtype in + AOSP_VNDR) vendor=vendor_;; +esac; +case $imgtype in + AOSP|AOSP_VNDR) "$bin/$arch/unpackbootimg" -i "$img";; + AOSP-PXA) "$bin/$arch/pxa-unpackbootimg" -i "$img";; + ELF) + mkdir elftool_out; + "$bin/$arch/elftool" unpack -i "$img" -o elftool_out >/dev/null; + mv -f elftool_out/header "$file-header" 2>/dev/null; + rm -rf elftool_out; + "$bin/$arch/unpackelf" -i "$img"; + ;; + KRNL) dd bs=4096 skip=8 iflag=skip_bytes conv=notrunc if="$img" of="$file-ramdisk" 2>&1 | tail -n+3 | cut -d" " -f1-2;; + OSIP) + "$bin/$arch/mboot" -u -f "$img"; + [ ! $? -eq "0" ] && error=1; + for i in bootstub cmdline.txt hdr kernel parameter ramdisk.cpio.gz sig; do + mv -f $i "$file-$(basename $i .txt | sed -e 's/hdr/header/' -e 's/ramdisk.cpio.gz/ramdisk/')" 2>/dev/null || true; + done; + ;; + U-Boot) + "$bin/$arch/dumpimage" -l "$img"; + "$bin/$arch/dumpimage" -l "$img" > "$file-header"; + grep "Name:" "$file-header" | cut -c15- > "$file-name"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f1 > "$file-arch"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f2 > "$file-os"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f3 | cut -d- -f1 > "$file-type"; + grep "Type:" "$file-header" | cut -d\( -f2 | cut -d\) -f1 | cut -d" " -f1 | cut -d- -f1 > "$file-comp"; + grep "Address:" "$file-header" | cut -c15- > "$file-addr"; + grep "Point:" "$file-header" | cut -c15- > "$file-ep"; + rm -f "$file-header"; + "$bin/$arch/dumpimage" -p 0 -o "$file-kernel" "$img"; + [ ! $? -eq "0" ] && error=1; + case $(cat "$file-type") in + Multi) "$bin/$arch/dumpimage" -p 1 -o "$file-ramdisk" "$img";; + RAMDisk) mv -f "$file-kernel" "$file-ramdisk";; + *) touch "$file-ramdisk";; + esac; + ;; +esac; +if [ ! $? -eq "0" -o "$error" ]; then + cd ..; + cleanup; + abort; + exit 1; +fi; + +if [ -f *-kernel ] && [ "$(file -m "$bin/androidbootimg.magic" *-kernel 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')" = "MTK" ]; then + mtk=1; + echo " "; + echo "MTK header found in kernel, removing..."; + dd bs=512 skip=1 conv=notrunc if="$file-kernel" of=tempkern 2>/dev/null; + mv -f tempkern "$file-kernel"; +fi; +mtktest="$(file -m "$bin/androidbootimg.magic" *-*ramdisk 2>/dev/null | cut -d: -f2-)"; +mtktype=$(echo $mtktest | awk '{ print $3 }'); +if [ "$(echo $mtktest | awk '{ print $1 }')" = "MTK" ]; then + if [ ! "$mtk" ]; then + echo " "; + echo "Warning: No MTK header found in kernel!"; + mtk=1; + fi; + echo "MTK header found in \"$mtktype\" type ramdisk, removing..."; + dd bs=512 skip=1 conv=notrunc if="$(ls *-*ramdisk)" of=temprd 2>/dev/null; + mv -f temprd "$(ls *-*ramdisk)"; +else + if [ "$mtk" ]; then + if [ ! "$mtktype" ]; then + echo 'Warning: No MTK header found in ramdisk, assuming "rootfs" type!'; + mtktype="rootfs"; + fi; + fi; +fi; +[ "$mtk" ] && echo $mtktype > "$file-mtktype"; + +if [ -f *-dt ]; then + dttest="$(file -m "$bin/androidbootimg.magic" *-dt 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')"; + echo $dttest > "$file-dttype"; + if [ "$imgtype" = "ELF" ]; then + case $dttest in + QCDT|ELF) ;; + *) echo " "; + echo "Non-QC DTB found, packing kernel and appending..."; + gzip --no-name -9 "$file-kernel"; + mv -f "$file-kernel.gz" "$file-kernel"; + cat "$file-dt" >> "$file-kernel"; + rm -f "$file-dt"*;; + esac; + fi; +fi; + +file -m "$bin/magic" *-*ramdisk 2>/dev/null | cut -d: -f2 | awk '{ print $1 }' > "$file-${vendor}ramdiskcomp"; +ramdiskcomp=`cat *-*ramdiskcomp`; +unpackcmd="$ramdiskcomp -dc"; +compext=$ramdiskcomp; +case $ramdiskcomp in + gzip) unpackcmd="gzip -dcq"; compext=gz;; + lzop) compext=lzo;; + xz) ;; + lzma) ;; + bzip2) compext=bz2;; + lz4) unpackcmd="$bin/$arch/lz4 -dcq";; + lz4-l) unpackcmd="$bin/$arch/lz4 -dcq"; compext=lz4;; + cpio) unpackcmd="cat"; compext="";; + empty) compext=empty;; + *) compext="";; +esac; +if [ "$compext" ]; then + compext=.$compext; +fi; +mv -f "$(ls *-*ramdisk)" "$file-${vendor}ramdisk.cpio$compext" 2>/dev/null; +cd ..; +if [ "$ramdiskcomp" = "data" ]; then + echo "Unrecognized format."; + abort; + exit 1; +fi; + +echo " "; +if [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: No ramdisk found to be unpacked!"; +else + echo "Unpacking ramdisk$sumsg to \"ramdisk/\"..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + echo "Compression used: $ramdiskcomp"; + if [ ! "$compext" -a ! "$ramdiskcomp" = "cpio" ]; then + echo "Unsupported format."; + abort; + exit 1; + fi; + $sudo chown 0:0 ramdisk 2>/dev/null; + cd ramdisk; + $unpackcmd "../split_img/$file-${vendor}ramdisk.cpio$compext" | $sudo $cpio -i -d --no-absolute-filenames; + if [ ! $? -eq "0" ]; then + [ "$nosudo" ] && echo "Unpacking failed, try without --nosudo."; + cd ..; + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/PBRP/bin/androidbootimg.magic b/Final_Zip/AIK/PBRP/bin/androidbootimg.magic new file mode 100755 index 0000000..4e7a106 --- /dev/null +++ b/Final_Zip/AIK/PBRP/bin/androidbootimg.magic @@ -0,0 +1,111 @@ +#------------------------------------------------------------------------------ +# Various Android OEM non-standard boot image related magic entries +# osm0sis @ xda-developers +#------------------------------------------------------------------------------ + +# ASUS Blob Signature +0 string -SIGNED-BY-SIGNBLOB- BLOB signing + +# Barnes & Noble Nook Signature +64 string Red\x20Loader NOOK signing (red loader) +64 string Green\x20Loader NOOK signing (green loader) +64 string Green\x20Recovery NOOK signing (green recovery) +64 string eMMC\x20boot.img+secondloader NOOK signing (emmc boot) +64 string eMMC\x20recovery.img+secondloader NOOK signing (emmc recovery) +48 string BauwksBoot NOOKTAB signing (bauwks) + +# Google ChromeOS Signature +0 string CHROMEOS CHROMEOS signing + +# Samsung/Spreadtrum DHTB Signature +0 string DHTB\x01\x00\x00 DHTB signing + +# Sony SIN Packaging/Signature +0 string \x01\x00\x00\x00 SINv1 signing +0 string \x02\x00\x00\x00 SINv2 signing +0 string \x03SIN SINv3 signing + +# Google Pixel/Nexus/AOSP Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search ANDROID! AOSP bootimg +>>36 string \x00\x00\x00\x02 \b, PXA variant (020) +>>36 string \x00\x00\x80\x02 \b, PXA variant (028) +>>36 string \x00\x00\x00\x03 \b, PXA variant (030) +>>96 search microloader +>>>1024 string ANDROID! \b, AMONET header +>>1024 string LOKI \b, LOKI header +>>>1028 string \x00 \b (boot) +>>>1028 string \x01 \b (recovery) +>>2048 search \x88\x16\x88\x58 \b, MTK headers +!:strength * 3 + +# Google Pixel/AOSP Vendor Standard +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search VNDRBOOT AOSP_VNDR bootimg +!:strength * 3 + +# DENX U-Boot +0 string \x27\x05\x19\x56 U-Boot bootimg + +# Intel OSIP +1000 search \xFC\xFA\xBC\x00 OSIP bootimg (headerless) +!:strength / 15 +0 string $OS$\x00\x00\x01 OSIP bootimg +>52 string \x00\x00\x00\x00 \b, boot (signed) +>52 string \x01\x00\x00\x00 \b, boot (unsigned) +>52 string \x0C\x00\x00\x00 \b, recovery (signed) +>52 string \x0D\x00\x00\x00 \b, recovery (unsigned) + +# Rockchip KRNL +0 string KRNL KRNL bootimg + +# Sony ELF +0 string \x7FELF ELF +>5 string \x01\x01\x61 bootimg +>18 string \x28 (ARM +>18 string \x03 (x86_ +>18 string \x08 (MIPS +>4 string \x01 \b) +>4 string \x02 \b64) +>0 search \x88\x16\x88\x58 \b, MTK headers + +# MediaTek MTK +# [for detection after boot image has already been split] +0 search \x88\x16\x88\x58 MTK header +>0 search KERNEL \b, kernel type +>0 search ROOTFS \b, rootfs type +>0 search RECOVERY \b, recovery type +!:strength / 20 + +# Qualcomm Device Tree +# [for detection after boot image has already been split] +0 string QCDT QCDT header +!:strength / 20 + +# Google Android Verified Boot 1.0 Signature +# [for detection with the tail of the boot image] +0 search \x02\x01\x01\x30\x82 AVBv1 signing footer +>0 search /boot \b, boot type +>0 search /recovery \b, recovery type +!:strength / 20 + +# Google Android Verified Boot 2.0 Signature +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search AVBf AVBv2 signing footer +!:strength / 20 + +# LG Bump +# [for detection with the tail of the boot image] +0 search \x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79 Bump footer +!:strength / 20 + +# Samsung SEAndroid +# [for detection with the tail of the boot image] +# [test "x" as workaround to odd file/magic behavior not allowing search here] +0 string x +>0 search SEANDROIDENFORCE SEAndroid footer +!:strength / 20 diff --git a/Final_Zip/AIK/PBRP/bin/avb/verity.pk8 b/Final_Zip/AIK/PBRP/bin/avb/verity.pk8 new file mode 100755 index 0000000..bebf216 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/avb/verity.pk8 differ diff --git a/Final_Zip/AIK/PBRP/bin/avb/verity.x509.pem b/Final_Zip/AIK/PBRP/bin/avb/verity.x509.pem new file mode 100755 index 0000000..86399c3 --- /dev/null +++ b/Final_Zip/AIK/PBRP/bin/avb/verity.x509.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIID/TCCAuWgAwIBAgIJAJcPmDkJqolJMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g +VmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UE +AwwHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe +Fw0xNDExMDYxOTA3NDBaFw00MjAzMjQxOTA3NDBaMIGUMQswCQYDVQQGEwJVUzET +MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEQMA4G +A1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEQMA4GA1UEAwwHQW5kcm9p +ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAOjreE0vTVSRenuzO9vnaWfk0eQzYab0gqpi +6xAzi6dmD+ugoEKJmbPiuE5Dwf21isZ9uhUUu0dQM46dK4ocKxMRrcnmGxydFn6o +fs3ODJMXOkv2gKXL/FdbEPdDbxzdu8z3yk+W67udM/fW7WbaQ3DO0knu+izKak/3 +T41c5uoXmQ81UNtAzRGzGchNVXMmWuTGOkg6U+0I2Td7K8yvUMWhAWPPpKLtVH9r +AL5TzjYNR92izdKcz3AjRsI3CTjtpiVABGeX0TcjRSuZB7K9EK56HV+OFNS6I1NP +jdD7FIShyGlqqZdUOkAUZYanbpgeT5N7QL6uuqcGpoTOkalu6kkCAwEAAaNQME4w +HQYDVR0OBBYEFH5DM/m7oArf4O3peeKO0ZIEkrQPMB8GA1UdIwQYMBaAFH5DM/m7 +oArf4O3peeKO0ZIEkrQPMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB +AHO3NSvDE5jFvMehGGtS8BnFYdFKRIglDMc4niWSzhzOVYRH4WajxdtBWc5fx0ix +NF/+hVKVhP6AIOQa+++sk+HIi7RvioPPbhjcsVlZe7cUEGrLSSveGouQyc+j0+m6 +JF84kszIl5GGNMTnx0XRPO+g8t6h5LWfnVydgZfpGRRg+WHewk1U2HlvTjIceb0N +dcoJ8WKJAFWdcuE7VIm4w+vF/DYX/A2Oyzr2+QRhmYSv1cusgAeC1tvH4ap+J1Lg +UnOu5Kh/FqPLLSwNVQp4Bu7b9QFfqK8Moj84bj88NqRGZgDyqzuTrFxn6FW7dmyA +yttuAJAEAymk1mipd9+zp38= +-----END CERTIFICATE----- diff --git a/Final_Zip/AIK/PBRP/bin/boot_signer.jar b/Final_Zip/AIK/PBRP/bin/boot_signer.jar new file mode 100755 index 0000000..dd96a3e Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/boot_signer.jar differ diff --git a/Final_Zip/AIK/PBRP/bin/chromeos/empty b/Final_Zip/AIK/PBRP/bin/chromeos/empty new file mode 100755 index 0000000..8b13789 --- /dev/null +++ b/Final_Zip/AIK/PBRP/bin/chromeos/empty @@ -0,0 +1 @@ + diff --git a/Final_Zip/AIK/PBRP/bin/chromeos/kernel.keyblock b/Final_Zip/AIK/PBRP/bin/chromeos/kernel.keyblock new file mode 100755 index 0000000..9740be4 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/chromeos/kernel.keyblock differ diff --git a/Final_Zip/AIK/PBRP/bin/chromeos/kernel_data_key.vbprivk b/Final_Zip/AIK/PBRP/bin/chromeos/kernel_data_key.vbprivk new file mode 100755 index 0000000..8d392fb Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/chromeos/kernel_data_key.vbprivk differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/blobpack b/Final_Zip/AIK/PBRP/bin/linux/i686/blobpack new file mode 100755 index 0000000..685c6c0 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/blobpack differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/blobunpack b/Final_Zip/AIK/PBRP/bin/linux/i686/blobunpack new file mode 100755 index 0000000..2d96696 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/blobunpack differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/dhtbsign b/Final_Zip/AIK/PBRP/bin/linux/i686/dhtbsign new file mode 100755 index 0000000..f117b88 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/dhtbsign differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/dumpimage b/Final_Zip/AIK/PBRP/bin/linux/i686/dumpimage new file mode 100755 index 0000000..8ba15d3 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/dumpimage differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/elftool b/Final_Zip/AIK/PBRP/bin/linux/i686/elftool new file mode 100755 index 0000000..b25dd56 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/elftool differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/futility b/Final_Zip/AIK/PBRP/bin/linux/i686/futility new file mode 100755 index 0000000..c830e31 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/futility differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/loki_tool b/Final_Zip/AIK/PBRP/bin/linux/i686/loki_tool new file mode 100755 index 0000000..d305760 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/loki_tool differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/lz4 b/Final_Zip/AIK/PBRP/bin/linux/i686/lz4 new file mode 100755 index 0000000..801bad4 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/lz4 differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/mboot b/Final_Zip/AIK/PBRP/bin/linux/i686/mboot new file mode 100755 index 0000000..023eab0 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/mboot differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/mkbootimg b/Final_Zip/AIK/PBRP/bin/linux/i686/mkbootimg new file mode 100755 index 0000000..ed68c2d Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/mkbootimg differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/mkimage b/Final_Zip/AIK/PBRP/bin/linux/i686/mkimage new file mode 100755 index 0000000..8e97c0c Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/mkimage differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/mkmtkhdr b/Final_Zip/AIK/PBRP/bin/linux/i686/mkmtkhdr new file mode 100755 index 0000000..d71db24 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/mkmtkhdr differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/pxa-mkbootimg b/Final_Zip/AIK/PBRP/bin/linux/i686/pxa-mkbootimg new file mode 100755 index 0000000..0636873 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/pxa-unpackbootimg b/Final_Zip/AIK/PBRP/bin/linux/i686/pxa-unpackbootimg new file mode 100755 index 0000000..8dbdecf Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/rkcrc b/Final_Zip/AIK/PBRP/bin/linux/i686/rkcrc new file mode 100755 index 0000000..45027f3 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/rkcrc differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/sony_dump b/Final_Zip/AIK/PBRP/bin/linux/i686/sony_dump new file mode 100755 index 0000000..2563e25 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/sony_dump differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/unpackbootimg b/Final_Zip/AIK/PBRP/bin/linux/i686/unpackbootimg new file mode 100755 index 0000000..b70aed5 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/unpackbootimg differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/i686/unpackelf b/Final_Zip/AIK/PBRP/bin/linux/i686/unpackelf new file mode 100755 index 0000000..12e9057 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/i686/unpackelf differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/blobpack b/Final_Zip/AIK/PBRP/bin/linux/x86_64/blobpack new file mode 100755 index 0000000..90256d4 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/blobpack differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/blobunpack b/Final_Zip/AIK/PBRP/bin/linux/x86_64/blobunpack new file mode 100755 index 0000000..53374ff Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/dhtbsign b/Final_Zip/AIK/PBRP/bin/linux/x86_64/dhtbsign new file mode 100755 index 0000000..ccb7a67 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/dumpimage b/Final_Zip/AIK/PBRP/bin/linux/x86_64/dumpimage new file mode 100755 index 0000000..861bd68 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/elftool b/Final_Zip/AIK/PBRP/bin/linux/x86_64/elftool new file mode 100755 index 0000000..07a520d Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/elftool differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/futility b/Final_Zip/AIK/PBRP/bin/linux/x86_64/futility new file mode 100755 index 0000000..4d56ec3 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/futility differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/loki_tool b/Final_Zip/AIK/PBRP/bin/linux/x86_64/loki_tool new file mode 100755 index 0000000..4a1b74a Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/lz4 b/Final_Zip/AIK/PBRP/bin/linux/x86_64/lz4 new file mode 100755 index 0000000..8a4136b Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/lz4 differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/mboot b/Final_Zip/AIK/PBRP/bin/linux/x86_64/mboot new file mode 100755 index 0000000..8bf92d4 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/mboot differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/mkbootimg b/Final_Zip/AIK/PBRP/bin/linux/x86_64/mkbootimg new file mode 100755 index 0000000..2b628c3 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/mkimage b/Final_Zip/AIK/PBRP/bin/linux/x86_64/mkimage new file mode 100755 index 0000000..6419ea3 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/mkimage differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/mkmtkhdr b/Final_Zip/AIK/PBRP/bin/linux/x86_64/mkmtkhdr new file mode 100755 index 0000000..1ab256f Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/pxa-mkbootimg b/Final_Zip/AIK/PBRP/bin/linux/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..5885720 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/PBRP/bin/linux/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..d7b1b7d Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/rkcrc b/Final_Zip/AIK/PBRP/bin/linux/x86_64/rkcrc new file mode 100755 index 0000000..f218228 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/sony_dump b/Final_Zip/AIK/PBRP/bin/linux/x86_64/sony_dump new file mode 100755 index 0000000..6fc3696 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/unpackbootimg b/Final_Zip/AIK/PBRP/bin/linux/x86_64/unpackbootimg new file mode 100755 index 0000000..8f4fccf Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/PBRP/bin/linux/x86_64/unpackelf b/Final_Zip/AIK/PBRP/bin/linux/x86_64/unpackelf new file mode 100755 index 0000000..477e25d Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/linux/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/blobpack b/Final_Zip/AIK/PBRP/bin/macos/i386/blobpack new file mode 100755 index 0000000..2336ec0 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/blobpack differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/blobunpack b/Final_Zip/AIK/PBRP/bin/macos/i386/blobunpack new file mode 100755 index 0000000..834cb50 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/blobunpack differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/cpio b/Final_Zip/AIK/PBRP/bin/macos/i386/cpio new file mode 100755 index 0000000..b7e41f1 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/cpio differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/dd b/Final_Zip/AIK/PBRP/bin/macos/i386/dd new file mode 100755 index 0000000..b684139 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/dd differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/dhtbsign b/Final_Zip/AIK/PBRP/bin/macos/i386/dhtbsign new file mode 100755 index 0000000..b3ba0ba Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/dhtbsign differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/dumpimage b/Final_Zip/AIK/PBRP/bin/macos/i386/dumpimage new file mode 100755 index 0000000..917c8ed Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/dumpimage differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/elftool b/Final_Zip/AIK/PBRP/bin/macos/i386/elftool new file mode 100755 index 0000000..27f12be Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/elftool differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/file b/Final_Zip/AIK/PBRP/bin/macos/i386/file new file mode 100755 index 0000000..8024db5 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/file differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/futility b/Final_Zip/AIK/PBRP/bin/macos/i386/futility new file mode 100755 index 0000000..8658249 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/futility differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/libiconv.2.dylib b/Final_Zip/AIK/PBRP/bin/macos/i386/libiconv.2.dylib new file mode 100755 index 0000000..ec61db0 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/libintl.8.dylib b/Final_Zip/AIK/PBRP/bin/macos/i386/libintl.8.dylib new file mode 100755 index 0000000..c297f0a Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/libintl.8.dylib differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/liblzma.5.dylib b/Final_Zip/AIK/PBRP/bin/macos/i386/liblzma.5.dylib new file mode 100755 index 0000000..126d338 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/liblzo2.2.dylib b/Final_Zip/AIK/PBRP/bin/macos/i386/liblzo2.2.dylib new file mode 100755 index 0000000..8a24e23 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/libmagic.1.dylib b/Final_Zip/AIK/PBRP/bin/macos/i386/libmagic.1.dylib new file mode 100755 index 0000000..92e6c7f Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/loki_tool b/Final_Zip/AIK/PBRP/bin/macos/i386/loki_tool new file mode 100755 index 0000000..7eecf68 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/loki_tool differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/lz4 b/Final_Zip/AIK/PBRP/bin/macos/i386/lz4 new file mode 100755 index 0000000..43126f8 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/lz4 differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/lzop b/Final_Zip/AIK/PBRP/bin/macos/i386/lzop new file mode 100755 index 0000000..fc3103c Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/lzop differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/mboot b/Final_Zip/AIK/PBRP/bin/macos/i386/mboot new file mode 100755 index 0000000..dfa0d3e Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/mboot differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/mkbootimg b/Final_Zip/AIK/PBRP/bin/macos/i386/mkbootimg new file mode 100755 index 0000000..82f05a9 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/mkbootimg differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/mkimage b/Final_Zip/AIK/PBRP/bin/macos/i386/mkimage new file mode 100755 index 0000000..e760d6e Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/mkimage differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/mkmtkhdr b/Final_Zip/AIK/PBRP/bin/macos/i386/mkmtkhdr new file mode 100755 index 0000000..907ba0f Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/mkmtkhdr differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/pxa-mkbootimg b/Final_Zip/AIK/PBRP/bin/macos/i386/pxa-mkbootimg new file mode 100755 index 0000000..12f8337 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/pxa-unpackbootimg b/Final_Zip/AIK/PBRP/bin/macos/i386/pxa-unpackbootimg new file mode 100755 index 0000000..2f1fe6c Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/rkcrc b/Final_Zip/AIK/PBRP/bin/macos/i386/rkcrc new file mode 100755 index 0000000..c2b70ce Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/rkcrc differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/sony_dump b/Final_Zip/AIK/PBRP/bin/macos/i386/sony_dump new file mode 100755 index 0000000..2f187e6 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/sony_dump differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/tail b/Final_Zip/AIK/PBRP/bin/macos/i386/tail new file mode 100755 index 0000000..99ee578 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/tail differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/truncate b/Final_Zip/AIK/PBRP/bin/macos/i386/truncate new file mode 100755 index 0000000..26bf16b Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/truncate differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/unpackbootimg b/Final_Zip/AIK/PBRP/bin/macos/i386/unpackbootimg new file mode 100755 index 0000000..e92b74e Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/unpackbootimg differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/unpackelf b/Final_Zip/AIK/PBRP/bin/macos/i386/unpackelf new file mode 100755 index 0000000..4ea11d0 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/unpackelf differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/i386/xz b/Final_Zip/AIK/PBRP/bin/macos/i386/xz new file mode 100755 index 0000000..b501c14 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/i386/xz differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/blobpack b/Final_Zip/AIK/PBRP/bin/macos/x86_64/blobpack new file mode 100755 index 0000000..816fcf2 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/blobpack differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/blobunpack b/Final_Zip/AIK/PBRP/bin/macos/x86_64/blobunpack new file mode 100755 index 0000000..9241057 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/blobunpack differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/cpio b/Final_Zip/AIK/PBRP/bin/macos/x86_64/cpio new file mode 100755 index 0000000..991c5a8 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/cpio differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/dd b/Final_Zip/AIK/PBRP/bin/macos/x86_64/dd new file mode 100755 index 0000000..e927886 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/dd differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/dhtbsign b/Final_Zip/AIK/PBRP/bin/macos/x86_64/dhtbsign new file mode 100755 index 0000000..162fa88 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/dhtbsign differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/dumpimage b/Final_Zip/AIK/PBRP/bin/macos/x86_64/dumpimage new file mode 100755 index 0000000..473538b Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/dumpimage differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/elftool b/Final_Zip/AIK/PBRP/bin/macos/x86_64/elftool new file mode 100755 index 0000000..0185019 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/elftool differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/file b/Final_Zip/AIK/PBRP/bin/macos/x86_64/file new file mode 100755 index 0000000..0b9f24c Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/file differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/futility b/Final_Zip/AIK/PBRP/bin/macos/x86_64/futility new file mode 100755 index 0000000..a28db4d Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/futility differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/libiconv.2.dylib b/Final_Zip/AIK/PBRP/bin/macos/x86_64/libiconv.2.dylib new file mode 100755 index 0000000..8f56eed Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/libiconv.2.dylib differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/libintl.8.dylib b/Final_Zip/AIK/PBRP/bin/macos/x86_64/libintl.8.dylib new file mode 100755 index 0000000..f270e89 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/libintl.8.dylib differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/liblzma.5.dylib b/Final_Zip/AIK/PBRP/bin/macos/x86_64/liblzma.5.dylib new file mode 100755 index 0000000..39c6b96 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/liblzma.5.dylib differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/liblzo2.2.dylib b/Final_Zip/AIK/PBRP/bin/macos/x86_64/liblzo2.2.dylib new file mode 100755 index 0000000..a05b7eb Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/liblzo2.2.dylib differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/libmagic.1.dylib b/Final_Zip/AIK/PBRP/bin/macos/x86_64/libmagic.1.dylib new file mode 100755 index 0000000..29ad687 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/libmagic.1.dylib differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/loki_tool b/Final_Zip/AIK/PBRP/bin/macos/x86_64/loki_tool new file mode 100755 index 0000000..1b9f062 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/loki_tool differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/lz4 b/Final_Zip/AIK/PBRP/bin/macos/x86_64/lz4 new file mode 100755 index 0000000..bcee28d Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/lz4 differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/lzop b/Final_Zip/AIK/PBRP/bin/macos/x86_64/lzop new file mode 100755 index 0000000..8be71f4 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/lzop differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/mboot b/Final_Zip/AIK/PBRP/bin/macos/x86_64/mboot new file mode 100755 index 0000000..ad67219 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/mboot differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/mkbootimg b/Final_Zip/AIK/PBRP/bin/macos/x86_64/mkbootimg new file mode 100755 index 0000000..137aef2 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/mkbootimg differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/mkimage b/Final_Zip/AIK/PBRP/bin/macos/x86_64/mkimage new file mode 100755 index 0000000..61d5a9c Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/mkimage differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/mkmtkhdr b/Final_Zip/AIK/PBRP/bin/macos/x86_64/mkmtkhdr new file mode 100755 index 0000000..99949d5 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/mkmtkhdr differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/pxa-mkbootimg b/Final_Zip/AIK/PBRP/bin/macos/x86_64/pxa-mkbootimg new file mode 100755 index 0000000..0ec79a3 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/pxa-mkbootimg differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/pxa-unpackbootimg b/Final_Zip/AIK/PBRP/bin/macos/x86_64/pxa-unpackbootimg new file mode 100755 index 0000000..03fc864 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/pxa-unpackbootimg differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/rkcrc b/Final_Zip/AIK/PBRP/bin/macos/x86_64/rkcrc new file mode 100755 index 0000000..9b0b94a Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/rkcrc differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/sony_dump b/Final_Zip/AIK/PBRP/bin/macos/x86_64/sony_dump new file mode 100755 index 0000000..e219101 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/sony_dump differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/tail b/Final_Zip/AIK/PBRP/bin/macos/x86_64/tail new file mode 100755 index 0000000..59692eb Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/tail differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/truncate b/Final_Zip/AIK/PBRP/bin/macos/x86_64/truncate new file mode 100755 index 0000000..f2ed631 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/truncate differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/unpackbootimg b/Final_Zip/AIK/PBRP/bin/macos/x86_64/unpackbootimg new file mode 100755 index 0000000..a717c48 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/unpackbootimg differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/unpackelf b/Final_Zip/AIK/PBRP/bin/macos/x86_64/unpackelf new file mode 100755 index 0000000..d6edefa Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/unpackelf differ diff --git a/Final_Zip/AIK/PBRP/bin/macos/x86_64/xz b/Final_Zip/AIK/PBRP/bin/macos/x86_64/xz new file mode 100755 index 0000000..6faedc7 Binary files /dev/null and b/Final_Zip/AIK/PBRP/bin/macos/x86_64/xz differ diff --git a/Final_Zip/AIK/PBRP/bin/magic b/Final_Zip/AIK/PBRP/bin/magic new file mode 100755 index 0000000..4530761 --- /dev/null +++ b/Final_Zip/AIK/PBRP/bin/magic @@ -0,0 +1,1916 @@ +#------------------------------------------------------------------------------ +# Slimmed down magic file for archives only +#------------------------------------------------------------------------------ +# $File: archive,v 1.145 2021/01/03 20:58:47 christos Exp $ +# archive: file(1) magic for archive formats (see also "msdos" for self- +# extracting compressed archives) +# +# cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc. +# pre-POSIX "tar" archives are also handled in the C code ../../src/is_tar.c. + +# POSIX tar archives +# URL: https://en.wikipedia.org/wiki/Tar_(computing) +# Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current +# header mainly padded with nul bytes +500 quad 0 +!:strength /2 +# filename or extended attribute printable strings in range space null til umlaut ue +>0 ubeshort >0x1F00 +>>0 ubeshort <0xFCFD +# last 4 header bytes often null but tar\0 in gtarfail2.tar gtarfail.tar-bad +# at https://sourceforge.net/projects/s-tar/files/testscripts/ +>>>508 ubelong&0x8B9E8DFF 0 +# nul, space or ascii digit 0-7 at start of mode +>>>>100 ubyte&0xC8 =0 +>>>>>101 ubyte&0xC8 =0 +# nul, space at end of check sum +>>>>>>155 ubyte&0xDF =0 +# space or ascii digit 0 at start of check sum +>>>>>>>148 ubyte&0xEF =0x20 +# minimal check and then display tar archive information which can also be +# embedded inside others like Android Backup, Clam AntiVirus database +>257 string !ustar +# header padded with nuls +>>257 ulong =0 +# GNU tar version 1.29 with non pax format option without refusing +# creates misleading V7 header for Long path, Multi-volume, Volume type +>>>156 ubyte 0x4c GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x4d GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 ubyte 0x56 GNU tar archive +!:mime application/x-gtar +#!:ext tar/gtar +>>>156 default x tar archive (V7) +!:mime application/x-tar +#!:ext tar +# other stuff in padding +# some implementations add new fields to the blank area at the end of the header record +# created for example by DOS TAR 3.20g 1994 Tim V.Shapore with -j option +>>257 ulong !0 tar archive (old) +!:mime application/x-tar +#!:ext tar +# magic in newer, GNU, posix variants +>257 string =ustar +# 2 last char of magic and UStar version because string expression does not work +# 2 space characters followed by a null for GNU variant +>>261 ubelong =0x72202000 POSIX tar archive (GNU) +!:mime application/x-gtar +#!:ext tar/gtar +# UStar version with ASCII "00" +>>261 ubelong 0x72003030 POSIX +# gLOBAL and ExTENSION type only found in POSIX.1-2001 format +>>>156 ubyte 0x67 \b.1-2001 +>>>156 ubyte 0x78 \b.1-2001 +>>>156 ubyte x tar archive +!:mime application/x-ustar +#!:ext tar/ustar +# version with 2 binary nuls embedded in Android Backup like com.android.settings.ab +>>261 ubelong 0x72000000 tar archive (ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# not seen ustar variant with garbish version +>>261 default x tar archive (unknown ustar) +!:mime application/x-ustar +#!:ext tar/ustar +# type flag of 1st tar archive member +#>156 ubyte x \b, %c-type +>156 ubyte x +>>156 ubyte 0 \b, file +>>156 ubyte 0x30 \b, file +>>156 ubyte 0x31 \b, hard link +>>156 ubyte 0x32 \b, symlink +>>156 ubyte 0x33 \b, char device +>>156 ubyte 0x34 \b, block device +>>156 ubyte 0x35 \b, directory +>>156 ubyte 0x36 \b, fifo +>>156 ubyte 0x37 \b, reserved +>>156 ubyte 0x4c \b, long path +>>156 ubyte 0x4d \b, multi volume +>>156 ubyte 0x56 \b, volume +>>156 ubyte 0x67 \b, global +>>156 ubyte 0x78 \b, extension +>>156 default x \b, type +>>>156 ubyte x '%c' +# name[100] +>0 string >\0 %-.60s +# mode mainly stored as an octal number in ASCII null or space terminated +>100 string >\0 \b, mode %-.7s +# user id mainly as octal numbers in ASCII null or space terminated +>108 string >\0 \b, uid %-.7s +# group id mainly as octal numbers in ASCII null or space terminated +>116 string >\0 \b, gid %-.7s +# size mainly as octal number in ASCII +>124 ubyte <0x38 +>>124 string >\0 \b, size %-.12s +# coding indicated by setting the high-order bit of the leftmost byte +>124 ubyte >0xEF \b, size 0x +>>124 ubyte !0xff \b%2.2x +>>125 ubyte !0xff \b%2.2x +>>126 ubyte !0xff \b%2.2x +>>127 ubyte !0xff \b%2.2x +>>128 ubyte !0xff \b%2.2x +>>129 ubyte !0xff \b%2.2x +>>130 ubyte !0xff \b%2.2x +>>131 ubyte !0xff \b%2.2x +>>132 ubyte !0xff \b%2.2x +>>133 ubyte !0xff \b%2.2x +>>134 ubyte !0xff \b%2.2x +>>135 ubyte !0xff \b%2.2x +# seconds since 0:0:0 1 jan 1970 UTC as octal number mainly in ASCII null or space terminated +>136 string >\0 \b, seconds %-.11s +# header checksum stored as an octal number in ASCII null or space terminated +#>148 string x \b, cksum %.7s +# linkname[100] +>157 string >\0 \b, linkname %-.40s +# additional fields for ustar +>257 string =ustar +# owner user name null terminated +>>265 string >\0 \b, user %-.32s +# group name null terminated +>>297 string >\0 \b, group %-.32s +# device major minor if not zero +>>329 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>329 string x \b, devmaj %-.7s +>>337 ubequad&0xCFCFCFCFcFcFcFdf !0 +>>>337 string x \b, devmin %-.7s +# prefix[155] +>>345 string >\0 \b, prefix %-.155s +# old non ustar/POSIX tar +>257 string !ustar +>>508 string =tar\0 +# padding[255] in old star +>>>257 string >\0 \b, padding: %-.40s +>>508 default x +# padding[255] in old tar sometimes comment field +>>>257 string >\0 \b, comment: %-.40s + +# Incremental snapshot gnu-tar format from: +# https://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html +0 string GNU\ tar- GNU tar incremental snapshot data +>&0 regex [0-9]\.[0-9]+-[0-9]+ version %s + +# cpio archives +# +# Yes, the top two "cpio archive" formats *are* supposed to just be "short". +# The idea is to indicate archives produced on machines with the same +# byte order as the machine running "file" with "cpio archive", and +# to indicate archives produced on machines with the opposite byte order +# from the machine running "file" with "cpio byte-swapped archive". +# +# The SVR4 "cpio(4)" hints that there are additional formats, but they +# are defined as "short"s; I think all the new formats are +# character-header formats and thus are strings, not numbers. +0 short 070707 cpio archive +!:mime application/x-cpio +0 short 0143561 cpio byte-swapped archive +!:mime application/x-cpio # encoding: swapped +0 string 070707 cpio ASCII archive (pre-SVR4 or odc) +0 string 070701 cpio ASCII archive (SVR4 with no CRC) +0 string 070702 cpio ASCII archive (SVR4 with CRC) + +# +# Various archive formats used by various versions of the "ar" +# command. +# + +# +# Original UNIX archive formats. +# They were written with binary values in host byte order, and +# the magic number was a host "int", which might have been 16 bits +# or 32 bits. We don't say "PDP-11" or "VAX", as there might have +# been ports to little-endian 16-bit-int or 32-bit-int platforms +# (x86?) using some of those formats; if none existed, feel free +# to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian +# 32-bit. There might have been big-endian ports of that sort as +# well. +# +0 leshort 0177555 very old 16-bit-int little-endian archive +0 beshort 0177555 very old 16-bit-int big-endian archive +0 lelong 0177555 very old 32-bit-int little-endian archive +0 belong 0177555 very old 32-bit-int big-endian archive + +0 leshort 0177545 old 16-bit-int little-endian archive +>2 string __.SYMDEF random library +0 beshort 0177545 old 16-bit-int big-endian archive +>2 string __.SYMDEF random library +0 lelong 0177545 old 32-bit-int little-endian archive +>4 string __.SYMDEF random library +0 belong 0177545 old 32-bit-int big-endian archive +>4 string __.SYMDEF random library + +# +# From "pdp" (but why a 4-byte quantity?) +# +0 lelong 0x39bed PDP-11 old archive +0 lelong 0x39bee PDP-11 4.0 archive + +# +# XXX - what flavor of APL used this, and was it a variant of +# some ar archive format? It's similar to, but not the same +# as, the APL workspace magic numbers in pdp. +# +0 long 0100554 apl workspace + +# +# System V Release 1 portable(?) archive format. +# +0 string = System V Release 1 ar archive +!:mime application/x-archive + +# +# Debian package; it's in the portable archive format, and needs to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "debian". +# +# Update: Joerg Jenderek +# URL: https://en.wikipedia.org/wiki/Deb_(file_format) +0 string =!\ndebian +# https://manpages.debian.org/testing/dpkg/dpkg-split.1.en.html +>14 string -split part of multipart Debian package +!:mime application/vnd.debian.binary-package +# udeb is used for stripped down deb file +#!:ext deb/udeb +>14 string -binary Debian binary package +!:mime application/vnd.debian.binary-package +# For ipk packager see also https://en.wikipedia.org/wiki/Opkg +#!:ext deb/udeb/ipk +# This should not happen +>14 default x Unknown Debian package +# NL terminated version; for most Debian cases this is 2.0 or 2.1 for split +>68 string >\0 (format %s) +#>68 string !2.0\n +#>>68 string x (format %.3s) +>68 string =2.0\n +# 2nd archive name=control archive name like control.tar.gz or control.tar.xz +>>72 string >\0 \b, with %.14s +# look for 3rd archive name=data archive name like data.tar.{gz,xz,bz2,lzma} +>>0 search/0x93e4f data.tar. \b, data compression +# the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised +# for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb +>>>&0 string x %.2s +# skip space (0x20 BSD) and slash (0x2f System V) character marking end of name +>>>&2 ubyte !0x20 +>>>>&-1 ubyte !0x2f +# display 3rd character of file name extension like 2 of bz2 or m of lzma +>>>>>&-1 ubyte x \b%c +>>>>>>&0 ubyte !0x20 +>>>>>>>&-1 ubyte !0x2f +# display 4th character of file name extension like a of lzma +>>>>>>>>&-1 ubyte x \b%c +# split debian package case +>68 string =2.1\n +# dpkg-1.18.25/dpkg-split/info.c +# NL terminated ASCII package name like ckermit +>>&0 string x \b, %s +# NL terminated package version like 302-5.3 +>>>&1 string x %s +# NL terminated MD5 checksum +>>>>&1 string x \b, MD5 %s +# NL terminated original package length +>>>>>&1 string x \b, unsplitted size %s +# NL terminated part length +>>>>>>&1 string x \b, part length %s +# NL terminated package part like n/m +>>>>>>>&1 string x \b, part %s +# NL terminated package architecture like armhf since dpkg 1.16.1 or later +>>>>>>>>&1 string x \b, %s + +# +# MIPS archive; they're in the portable archive format, and need to go +# before the entry for regular portable archives, as it's recognized as +# a portable archive whose first member has a name beginning with +# "__________E". +# +0 string =!\n__________E MIPS archive +!:mime application/x-archive +>20 string U with MIPS Ucode members +>21 string L with MIPSEL members +>21 string B with MIPSEB members +>19 string L and an EL hash table +>19 string B and an EB hash table +>22 string X -- out of date + +# +# BSD/SVR2-and-later portable archive formats. +# +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/AR +# Reference: https://www.unix.com/man-page/opensolaris/3HEAD/ar.h/ +# Note: Mach-O universal binary in ./cafebabe is dependent +# TODO: unify current ar archive, MIPS archive, Debian package +# distinguish BSD, SVR; 32, 64 bit; HP from other 32-bit SVR; +# *.ar packages from *.a libraries. handle empty archive +0 string =!\n current ar archive +# print first and possibly second ar_name[16] for debugging purpose +#>8 string x \b, 1st "%.16s" +#>68 string x \b, 2nd "%.16s" +!:mime application/x-archive +# a in most case for libraries; lib for Microsoft libraries; ar else cases +#!:ext a/lib/ar +>8 string __.SYMDEF random library +# first member with long marked name __.SYMDEF SORTED implies BSD library +>68 string __.SYMDEF\ SORTED random library +# Reference: https://parisc.wiki.kernel.org/images-parisc/b/b2/Rad_11_0_32.pdf +# "archive file" entry moved from ./hp +# LST header system_id 0210h~PA-RISC 1.1,... identifies the target architecture +# LST header a_magic 0619h~relocatable library +>68 belong 0x020b0619 - PA-RISC1.0 relocatable library +>68 belong 0x02100619 - PA-RISC1.1 relocatable library +>68 belong 0x02110619 - PA-RISC1.2 relocatable library +>68 belong 0x02140619 - PA-RISC2.0 relocatable library +#EOF for common ar archives + +# +# "Thin" archive, as can be produced by GNU ar. +# +0 string =!\n thin archive with +>68 belong 0 no symbol entries +>68 belong 1 %d symbol entry +>68 belong >1 %d symbol entries + +0 search/1 -h- Software Tools format archive text + +# ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com) +# +# The first byte is the magic (0x1a), byte 2 is the compression type for +# the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS +# filename of the first file (null terminated). Since some types collide +# we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%), +# 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo. +0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000031a ARC archive data, packed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched +!:mime application/x-arc +# [JW] stuff taken from idarc, obviously ARC successors: +0 lelong&0x8080ffff 0x00000a1a PAK archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000141a ARC+ archive data +!:mime application/x-arc +0 lelong&0x8080ffff 0x0000481a HYP archive data +!:mime application/x-arc + +# Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk) +# I can't create either SPARK or ArcFS archives so I have not tested this stuff +# [GRR: the original entries collide with ARC, above; replaced with combined +# version (not tested)] +#0 byte 0x1a RISC OS archive (spark format) +0 string \032archive RISC OS archive (ArcFS format) +0 string Archive\000 RISC OS archive (ArcFS format) + +# All these were taken from idarc, many could not be verified. Unfortunately, +# there were many low-quality sigs, i.e. easy to trigger false positives. +# Please notify me of any real-world fishy/ambiguous signatures and I'll try +# to get my hands on the actual archiver and see if I find something better. [JW] +# probably many can be enhanced by finding some 0-byte or control char near the start + +# idarc calls this Crush/Uncompressed... *shrug* +0 string CRUSH Crush archive data +# Squeeze It (.sqz) +0 string HLSQZ Squeeze It archive data +# SQWEZ +0 string SQWEZ SQWEZ archive data +# HPack (.hpk) +0 string HPAK HPack archive data +# HAP +0 string \x91\x33HF HAP archive data +# MD/MDCD +0 string MDmd MDCD archive data +# LIM +0 string LIM\x1a LIM archive data +# SAR +3 string LH5 SAR archive data +# BSArc/BS2 +0 string \212\3SB\020\0 BSArc/BS2 archive data +# Bethesda Softworks Archive (Oblivion) +0 string BSA\0 BSArc archive data +>4 lelong x version %d +# MAR +2 string =-ah MAR archive data +# ACB +#0 belong&0x00f800ff 0x00800000 ACB archive data +# CPZ +# TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data +# JRC +0 string JRchive JRC archive data +# Quantum +0 string DS\0 Quantum archive data +# ReSOF +0 string PK\3\6 ReSOF archive data +# QuArk +0 string 7\4 QuArk archive data +# YAC +14 string YC YAC archive data +# X1 +0 string X1 X1 archive data +0 string XhDr X1 archive data +# CDC Codec (.dqt) +0 belong&0xffffe000 0x76ff2000 CDC Codec archive data +# AMGC +0 string \xad6" AMGC archive data +# NuLIB +0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data +# PakLeo +0 string LEOLZW PAKLeo archive data +# ChArc +0 string SChF ChArc archive data +# PSA +0 string PSA PSA archive data +# CrossePAC +0 string DSIGDCC CrossePAC archive data +# Freeze +0 string \x1f\x9f\x4a\x10\x0a Freeze archive data +# KBoom +0 string \xc2\xa8MP\xc2\xa8 KBoom archive data +# NSQ, must go after CDC Codec +0 string \x76\xff NSQ archive data +# DPA +0 string Dirk\ Paehl DPA archive data +# BA +# TODO: idarc says "bytes 0-2 == bytes 3-5" +# TTComp +# URL: http://fileformats.archiveteam.org/wiki/TTComp_archive +# Update: Joerg Jenderek +# GRR: line below is too general as it matches also Panorama database "TCDB 2003-10 demo.pan", others +0 string \0\6 +# look for first keyword of Panorama database *.pan +>12 search/261 DESIGN +# skip keyword with low entropy +>12 default x TTComp archive, binary, 4K dictionary +# (version 5.25) labeled the above entry as "TTComp archive data" +# From: Joerg Jenderek +# URL: https://wiki.68kmla.org/DiskCopy_4.2_format_specification +# reference: http://nulib.com/library/FTN.e00005.htm +0x52 ubeshort 0x0100 +# test for disk image size equal or above 400k +>0x40 ubelong >409599 +# test also for disk image size equal or below 1440k to skip +# windows7en.mbr UNICODE.DAT +>>0x40 ubelong <1474561 +# To skip Flags$StringJoiner.class with size 00106A61h test also for only 4 disk image sizes +# 00064000 for 400k GCR disks +# 000c8000 for 800k GCR disks +# 000b4000 for 720k MFM disks +# 00168000 for 1440k MFM disks +>>>0x40 ubelong&0xffE03fFF 0 +# display information of Apple DiskCopy 4.2 floppy image +# image pascal name padded with NULs like Microsoft Mail +>00 pstring/B x Apple DiskCopy 4.2 image %s +#!:mime application/octet-stream +!:mime application/x-dc42-floppy-image +!:apple dCpydImg +#!:ext image/dc42 +# data size in bytes like 409600 +>0x40 ubelong x \b, %u bytes +# for debugging purpose size in hexadecimal +#>0x40 ubelong x (0x%8.8x) +# tag size in bytes +>0x44 ubelong >0 \b, 0x%x tag size +# data checksum +#>0x48 ubelong x \b, 0x%x checksum +# tag checksum +#>0x4c ubelong x \b, 0x%x tag checksum +# disk encoding +>0x50 ubyte 0 \b, GCR CLV ssdd (400k) +>0x50 ubyte 1 \b, GCR CLV dsdd (800k) +>0x50 ubyte 2 \b, MFM CAV dsdd (720k) +>0x50 ubyte 3 \b, MFM CAV dshd (1440k) +>0x50 ubyte >3 \b, 0x%x encoding +# format byte +>0x51 ubyte x \b, 0x%x format +#>0x54 ubequad x \b, data 0x%16.16llx +# ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation? +0 string ESP ESP archive data +# ZPack +0 string \1ZPK\1 ZPack archive data +# Sky +0 string \xbc\x40 Sky archive data +# UFA +0 string UFA UFA archive data +# Dry +0 string =-H2O DRY archive data +# FoxSQZ +0 string FOXSQZ FoxSQZ archive data +# AR7 +0 string ,AR7 AR7 archive data +# PPMZ +0 string PPMZ PPMZ archive data +# MS Compress +# Update: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/MS-DOS_installation_compression +# Reference: https://hwiegman.home.xs4all.nl/fileformats/compress/szdd_kwaj_format.html +# Note: use correct version of extracting tool like EXPAND, UNPACK, DECOMP or 7Z +4 string \x88\xf0\x27 +# KWAJ variant +>0 string KWAJ MS Compress archive data, KWAJ variant +!:mime application/x-ms-compress-kwaj +# extension not working in version 5.32 +# magic/Magdir/archive, 284: Warning: EXTENSION type ` ??_' has bad char '?' +# file: line 284: Bad magic entry ' ??_' +#!:ext ??_ +# compression method (0-4) +>>8 uleshort x \b, %u method +# offset of compressed data +>>10 uleshort x \b, 0x%x offset +#>>(10.s) uleshort x +#>>>&-6 string x \b, TEST extension %-.3s +# header flags to mark header extensions +>>12 uleshort >0 \b, 0x%x flags +# 4 bytes: decompressed length of file +>>12 uleshort &0x01 +>>>14 ulelong x \b, original size: %u bytes +# 2 bytes: unknown purpose +# 2 bytes: length of unknown data + mentioned bytes +# 1-9 bytes: null-terminated file name +# 1-4 bytes: null-terminated file extension +>>12 uleshort &0x08 +>>>12 uleshort ^0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>14 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(14.s) uleshort x +>>>>>>>>&14 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>16 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>>&16 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(16.s) uleshort x +>>>>>>>&16 string x %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>12 uleshort &0x01 +>>>>12 uleshort ^0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>18 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(18.s) uleshort x +>>>>>>>>&18 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +>>>>12 uleshort &0x02 +>>>>>12 uleshort ^0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>20 string x \b, %-.8s +>>>>>>>>&1 string x \b.%-.3s +>>>>>12 uleshort &0x04 +>>>>>>12 uleshort ^0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>12 uleshort &0x10 +>>>>>>>(20.s) uleshort x +>>>>>>>>&20 string x \b, %-.8s +>>>>>>>>>&1 string x \b.%-.3s +# 2 bytes: length of data + mentioned bytes +# +# SZDD variant Haruhiko Okumura's LZSS or 7z type MsLZ +>0 string SZDD MS Compress archive data, SZDD variant +!:mime application/x-ms-compress-szdd +#!:ext ??_ +# The character missing from the end of the filename (0=unknown) +>>9 string >\0 \b, %-.1s is last character of original name +# https://www.betaarchive.com/forum/viewtopic.php?t=26161 +# Compression mode: "A" (0x41) found but sometimes "B" in Windows 3.1 builds 026 and 034e +>>8 string !A \b, %-.1s method +>>10 ulelong >0 \b, original size: %u bytes +# QBasic SZDD variant +3 string \x88\xf0\x27 +>0 string SZ\x20 MS Compress archive data, QBasic variant +!:mime application/x-ms-compress-sz +#!:ext ??$ +>>8 ulelong >0 \b, original size: %u bytes + +# MP3 (archiver, not lossy audio compression) +0 string MP3\x1a MP3-Archiver archive data +# ZET +0 string OZ\xc3\x9d ZET archive data +# TSComp +0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data +# ARQ +0 string gW\4\1 ARQ archive data +# Squash +3 string OctSqu Squash archive data +# Terse +0 string \5\1\1\0 Terse archive data +# PUCrunch +0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data +# UHarc +0 string UHA UHarc archive data +# ABComp +0 string \2AB ABComp archive data +0 string \3AB2 ABComp archive data +# CMP +0 string CO\0 CMP archive data +# Splint +0 string \x93\xb9\x06 Splint archive data +# InstallShield +0 string \x13\x5d\x65\x8c InstallShield Z archive Data +# Gather +1 string GTH Gather archive data +# BOA +0 string BOA BOA archive data +# RAX +0 string ULEB\xa RAX archive data +# Xtreme +0 string ULEB\0 Xtreme archive data +# Pack Magic +0 string @\xc3\xa2\1\0 Pack Magic archive data +# BTS +0 belong&0xfeffffff 0x1a034465 BTS archive data +# ELI 5750 +0 string Ora\ ELI 5750 archive data +# QFC +0 string \x1aFC\x1a QFC archive data +0 string \x1aQF\x1a QFC archive data +# PRO-PACK +0 string RNC PRO-PACK archive data +# 777 +0 string 777 777 archive data +# LZS221 +0 string sTaC LZS221 archive data +# HPA +0 string HPA HPA archive data +# Arhangel +0 string LG Arhangel archive data +# EXP1, uses bzip2 +0 string 0123456789012345BZh EXP1 archive data +# IMP +0 string IMP\xa IMP archive data +# NRV +0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data +# Squish +0 string \x73\xb2\x90\xf4 Squish archive data +# Par +0 string PHILIPP Par archive data +0 string PAR Par archive data +# HIT +0 string UB HIT archive data +# SBX +0 belong&0xfffff000 0x53423000 SBX archive data +# NaShrink +0 string NSK NaShrink archive data +# SAPCAR +0 string #\ CAR\ archive\ header SAPCAR archive data +0 string CAR\ 2.00RG SAPCAR archive data +# Disintegrator +0 string DST Disintegrator archive data +# ASD +0 string ASD ASD archive data +# InstallShield CAB +0 string ISc( InstallShield CAB +# TOP4 +0 string T4\x1a TOP4 archive data +# BatComp left out: sig looks like COM executable +# so TODO: get real 4dos batcomp file and find sig +# BlakHole +0 string BH\5\7 BlakHole archive data +# BIX +0 string BIX0 BIX archive data +# ChiefLZA +0 string ChfLZ ChiefLZA archive data +# Blink +0 string Blink Blink archive data +# Logitech Compress +0 string \xda\xfa Logitech Compress archive data +# ARS-Sfx (FIXME: really a SFX? then goto COM/EXE) +1 string (C)\ STEPANYUK ARS-Sfx archive data +# AKT/AKT32 +0 string AKT32 AKT32 archive data +0 string AKT AKT archive data +# NPack +0 string MSTSM NPack archive data +# PFT +0 string \0\x50\0\x14 PFT archive data +# SemOne +0 string SEM SemOne archive data +# PPMD +0 string \x8f\xaf\xac\x84 PPMD archive data +# FIZ +0 string FIZ FIZ archive data +# MSXiE +0 belong&0xfffff0f0 0x4d530000 MSXiE archive data +# DeepFreezer +0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data +# DC +0 string =2 string \x2\x4 Xpack DiskImage archive data +#!:ext xdi +# XPack Data +# *.xpa updated by Joerg Jenderek Sep 2015 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/ +0 string xpa XPA +#!:ext xpa +# XPA32 +# ftp://ftp.elf.stuba.sk/pub/pc/pack/xpa32.zip +# created by XPA32.EXE version 1.0.2 for Windows +>0 string xpa\0\1 \b32 archive data +# created by XPACK.COM version 1.67m or 1.67r with short 0x1800 +>3 ubeshort !0x0001 \bck archive data +# XPack Single Data +# changed by Joerg Jenderek Sep 2015 back to like in version 5.12 +# letter 'I'+ acute accent is equivalent to \xcd +0 string \xcd\ jm Xpack single archive data +#!:mime application/x-xpa-compressed +#!:ext xpa + +# TODO: missing due to unknown magic/magic at end of file: +#DWC +#ARG +#ZAR +#PC/3270 +#InstallIt +#RKive +#RK +#XPack Diskimage + +# These were inspired by idarc, but actually verified +# Dzip archiver (.dz) +# Update: Joerg Jenderek +# URL: http://speeddemosarchive.com/dzip/ +# reference: http://speeddemosarchive.com/dzip/dz29src.zip/main.c +# GRR: line below is too general as it matches also ASCII texts like Doszip commander help dz.txt +0 string DZ +# latest version is 2.9 dated 7 may 2003 +>2 byte <4 Dzip archive data +!:mime application/x-dzip +#!:ext dz +>>2 byte x \b, version %i +>>3 byte x \b.%i +>>4 ulelong x \b, offset 0x%x +>>8 ulelong x \b, %u files +# ZZip archiver (.zz) +0 string ZZ\ \0\0 ZZip archive data +0 string ZZ0 ZZip archive data +# PAQ archiver (.paq) +0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data +0 string PAQ PAQ archive data +>3 byte&0xf0 0x30 +>>3 byte x (v%c) +# JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP) +0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data +0 string JARCS JAR (ARJ Software, Inc.) archive data + +# ARJ archiver (jason@jarthur.Claremont.EDU) +0 leshort 0xea60 ARJ archive data +!:mime application/x-arj +>5 byte x \b, v%d, +>8 byte &0x04 multi-volume, +>8 byte &0x10 slash-switched, +>8 byte &0x20 backup, +>34 string x original name: %s, +>7 byte 0 os: MS-DOS +>7 byte 1 os: PRIMOS +>7 byte 2 os: Unix +>7 byte 3 os: Amiga +>7 byte 4 os: Macintosh +>7 byte 5 os: OS/2 +>7 byte 6 os: Apple ][ GS +>7 byte 7 os: Atari ST +>7 byte 8 os: NeXT +>7 byte 9 os: VAX/VMS +>3 byte >0 %d] +# [JW] idarc says this is also possible +2 leshort 0xea60 ARJ archive data + +# HA archiver (Greg Roelofs, newt@uchicago.edu) +# This is a really bad format. A file containing HAWAII will match this... +#0 string HA HA archive data, +#>2 leshort =1 1 file, +#>2 leshort >1 %hu files, +#>4 byte&0x0f =0 first is type CPY +#>4 byte&0x0f =1 first is type ASC +#>4 byte&0x0f =2 first is type HSC +#>4 byte&0x0f =0x0e first is type DIR +#>4 byte&0x0f =0x0f first is type SPECIAL +# suggestion: at least identify small archives (<1024 files) +0 belong&0xffff00fc 0x48410000 HA archive data +>2 leshort =1 1 file, +>2 leshort >1 %u files, +>4 byte&0x0f =0 first is type CPY +>4 byte&0x0f =1 first is type ASC +>4 byte&0x0f =2 first is type HSC +>4 byte&0x0f =0x0e first is type DIR +>4 byte&0x0f =0x0f first is type SPECIAL + +# HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz) +0 string HPAK HPACK archive data + +# JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net +0 string \351,\001JAM\ JAM archive, +>7 string >\0 version %.4s +>0x26 byte =0x27 - +>>0x2b string >\0 label %.11s, +>>0x27 lelong x serial %08x, +>>0x36 string >\0 fstype %.8s + +# Very old RAR archive +# https://jasonblanks.com/wp-includes/images/papers/KnowyourarchiveRAR.pdf +0 string RE\x7e\x5e RAR archive data (26 string \x8\0\0\0mimetypeapplication/ + +# KOffice / OpenOffice & StarOffice / OpenDocument formats +# From: Abel Cheung + +# KOffice (1.2 or above) formats +# (mimetype contains "application/vnd.kde.") +>>50 string vnd.kde. KOffice (>=1.2) +>>>58 string karbon Karbon document +>>>58 string kchart KChart document +>>>58 string kformula KFormula document +>>>58 string kivio Kivio document +>>>58 string kontour Kontour document +>>>58 string kpresenter KPresenter document +>>>58 string kspread KSpread document +>>>58 string kword KWord document + +# OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) +# (mimetype contains "application/vnd.sun.xml.") +# URL: https://en.wikipedia.org/wiki/OpenOffice.org_XML +# reference: http://fileformats.archiveteam.org/wiki/OpenOffice.org_XML +>>50 string vnd.sun.xml. OpenOffice.org 1.x +>>>62 string writer Writer +>>>>68 byte !0x2e document +!:mime application/vnd.sun.xml.writer +#!:ext sxw +>>>>68 string .template template +!:mime application/vnd.sun.xml.writer.template +#!:ext stw +>>>>68 string .web Web template +!:mime application/vnd.sun.xml.writer.web +#!:ext stw +>>>>68 string .global global document +!:mime application/vnd.sun.xml.writer.global +#!:ext sxg +>>>62 string calc Calc +>>>>66 byte !0x2e spreadsheet +!:mime application/vnd.sun.xml.calc +#!:ext sxc +>>>>66 string .template template +!:mime application/vnd.sun.xml.calc.template +#!:ext stc +>>>62 string draw Draw +>>>>66 byte !0x2e document +!:mime application/vnd.sun.xml.draw +#!:ext sxd +>>>>66 string .template template +!:mime application/vnd.sun.xml.draw.template +#!:ext std +>>>62 string impress Impress +>>>>69 byte !0x2e presentation +!:mime application/vnd.sun.xml.impress +#!:ext sxi +>>>>69 string .template template +!:mime application/vnd.sun.xml.impress.template +#!:ext sti +>>>62 string math Math document +!:mime application/vnd.sun.xml.math +#!:ext sxm +>>>62 string base Database file +!:mime application/vnd.sun.xml.base +#!:ext sdb + +# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) +# URL: http://fileformats.archiveteam.org/wiki/OpenDocument +# https://lists.oasis-open.org/archives/office/200505/msg00006.html +# (mimetype contains "application/vnd.oasis.opendocument.") +>>50 string vnd.oasis.opendocument. OpenDocument +>>>73 string text +>>>>77 byte !0x2d Text +!:mime application/vnd.oasis.opendocument.text +#!:ext odt +>>>>77 string -template Text Template +!:mime application/vnd.oasis.opendocument.text-template +#!:ext ott +>>>>77 string -web HTML Document Template +!:mime application/vnd.oasis.opendocument.text-web +#!:ext oth +>>>>77 string -master Master Document +!:mime application/vnd.oasis.opendocument.text-master +#!:ext odm +>>>73 string graphics +>>>>81 byte !0x2d Drawing +!:mime application/vnd.oasis.opendocument.graphics +#!:ext odg +>>>>81 string -template Drawing Template +!:mime application/vnd.oasis.opendocument.graphics-template +#!:ext otg +>>>73 string presentation +>>>>85 byte !0x2d Presentation +!:mime application/vnd.oasis.opendocument.presentation +#!:ext odp +>>>>85 string -template Presentation Template +!:mime application/vnd.oasis.opendocument.presentation-template +#!:ext otp +>>>73 string spreadsheet +>>>>84 byte !0x2d Spreadsheet +!:mime application/vnd.oasis.opendocument.spreadsheet +#!:ext ods +>>>>84 string -template Spreadsheet Template +!:mime application/vnd.oasis.opendocument.spreadsheet-template +#!:ext ots +>>>73 string chart +>>>>78 byte !0x2d Chart +!:mime application/vnd.oasis.opendocument.chart +#!:ext odc +>>>>78 string -template Chart Template +!:mime application/vnd.oasis.opendocument.chart-template +#!:ext otc +>>>73 string formula +>>>>80 byte !0x2d Formula +!:mime application/vnd.oasis.opendocument.formula +#!:ext odf +>>>>80 string -template Formula Template +!:mime application/vnd.oasis.opendocument.formula-template +#!:ext otf +# https://www.loc.gov/preservation/digital/formats/fdd/fdd000441.shtml +>>>73 string database Database +!:mime application/vnd.oasis.opendocument.database +#!:ext odb +# Valid for LibreOffice Base 6.0.1.1 at least +>>>73 string base Database +# https://bugs.documentfoundation.org/show_bug.cgi?id=45854 +!:mime application/vnd.oasis.opendocument.database +#!:mime application/vnd.oasis.opendocument.base +#!:ext odb +>>>73 string image +>>>>78 byte !0x2d Image +!:mime application/vnd.oasis.opendocument.image +#!:ext odi +>>>>78 string -template Image Template +!:mime application/vnd.oasis.opendocument.image-template +#!:ext oti + +# EPUB (OEBPS) books using OCF (OEBPS Container Format) +# https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. +# From: Ralf Brown +>>50 string epub+zip EPUB document +!:mime application/epub+zip + +# From: Joerg Jenderek +# URL: http://en.wikipedia.org/wiki/CorelDRAW +# NOTE: version; til 2 WL-based; from 3 til 13 by ./riff; from 14 zip based +>>50 string x-vnd.corel. Corel +>>>62 string draw.document+zip Draw drawing, version 14-16 +!:mime application/x-vnd.corel.draw.document+zip +#!:ext cdr +>>>62 string draw.template+zip Draw template, version 14-16 +!:mime application/x-vnd.corel.draw.template+zip +#!:ext cdrt +>>>62 string zcf.draw.document+zip Draw drawing, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.document+zip +#!:ext cdr +>>>62 string zcf.draw.template+zip Draw template, version 17-22 +!:mime application/x-vnd.corel.zcf.draw.template+zip +#!:ext cdt/cdrt +# URL: http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html +>>>62 string zcf.pattern+zip Draw pattern, version 22 +!:mime application/x-vnd.corel.zcf.pattern+zip +#!:ext pat +# URL: https://en.wikipedia.org/wiki/Corel_Designer +# Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer +# Note: called by TrID "Corel DESIGN graphics" +>>>62 string designer.document+zip DESIGNER graphics, version 14-16 +!:mime application/x-vnd.corel.designer.document+zip +#!:ext des +>>>62 string zcf.designer.document+zip DESIGNER graphics, version 17-21 +!:mime application/x-vnd.corel.zcf.designer.document+zip +#!:ext des +# URL: http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/ +# CorelDRAW-Corel-Symbol-Library-CSL.html +>>>62 string symbol.library+zip Symbol Library, version 6-16.3 +!:mime application/x-vnd.corel.symbol.library+zip +#!:ext csl +>>>62 string zcf.symbol.library+zip Symbol Library, version 17-22 +!:mime application/x-vnd.corel.zcf.symbol.library+zip +#!:ext csl + +# Catch other ZIP-with-mimetype formats +# In a ZIP file, the bytes immediately after a member's contents are +# always "PK". The 2 regex rules here print the "mimetype" member's +# contents up to the first 'P'. Luckily, most MIME types don't contain +# any capital 'P's. This is a kludge. +# (mimetype contains "application/") +>>50 default x Zip data +>>>38 regex [!-OQ-~]+ (MIME type "%s"?) +!:mime application/zip +# (mimetype contents other than "application/*") +>26 string \x8\0\0\0mimetype +>>38 string !application/ +>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?) +!:mime application/zip + +# Java Jar files +>(26.s+30) leshort 0xcafe Java archive data (JAR) +!:mime application/java-archive + +# iOS App +>(26.s+30) leshort !0xcafe +>>26 string !\x8\0\0\0mimetype +>>>30 string Payload/ +>>>>38 search/64 .app/ iOS App +!:mime application/x-ios-app + +>30 search/100/b application/epub+zip EPUB document +!:mime application/epub+zip + +# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) +# Next line excludes specialized formats: +>(26.s+30) leshort !0xcafe +>>30 search/100/b !application/epub+zip +>>>26 string !\x8\0\0\0mimetype Zip archive data +!:mime application/zip +>>>>4 beshort x \b, at least +>>>>4 beshort x to extract +>>>>8 beshort x \b, compression method= +>>>>0x161 string WINZIP \b, WinZIP self-extracting + +# StarView Metafile +# From Pierre Ducroquet +0 string VCLMTF StarView MetaFile +>6 beshort x \b, version %d +>8 belong x \b, size %d + +# Zoo archiver +20 lelong 0xfdc4a7dc Zoo archive data +!:mime application/x-zoo +>4 byte >48 \b, v%c. +>>6 byte >47 \b%c +>>>7 byte >47 \b%c +>32 byte >0 \b, modify: v%d +>>33 byte x \b.%d+ +>42 lelong 0xfdc4a7dc \b, +>>70 byte >0 extract: v%d +>>>71 byte x \b.%d+ + +# Shell archives +10 string #\ This\ is\ a\ shell\ archive shell archive text +!:mime application/octet-stream + +# +# LBR. NB: May conflict with the questionable +# "binary Computer Graphics Metafile" format. +# +0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data +# +# From Rafael Laboissiere +# The Project Revision Control System (see +# http://prcs.sourceforge.net) generates a packaged project +# file which is recognized by the following entry: +0 leshort 0xeb81 PRCS packaged project + +# Microsoft cabinets +# by David Necas (Yeti) +#0 string MSCF\0\0\0\0 Microsoft cabinet file data, +#>25 byte x v%d +#>24 byte x \b.%d +# MPi: All CABs have version 1.3, so this is pointless. +# Better magic in debian-additions. + +# GTKtalog catalogs +# by David Necas (Yeti) +4 string gtktalog\ GTKtalog catalog data, +>13 string 3 version 3 +>>14 beshort 0x677a (gzipped) +>>14 beshort !0x677a (not gzipped) +>13 string >3 version %s + +############################################################################ +# Parity archive reconstruction file, the 'par' file format now used on Usenet. +0 string PAR\0 PARity archive data +>48 leshort =0 - Index file +>48 leshort >0 - file number %d + +# Felix von Leitner +0 string d8:announce BitTorrent file +!:mime application/x-bittorrent +# Durval Menezes, +0 string d13:announce-list BitTorrent file +!:mime application/x-bittorrent +0 string d7:comment BitTorrent file +!:mime application/x-bittorrent +0 string d4:info BitTorrent file +!:mime application/x-bittorrent + +# Atari MSA archive - Teemu Hukkanen +0 beshort 0x0e0f Atari MSA archive data +>2 beshort x \b, %d sectors per track +>4 beshort 0 \b, 1 sided +>4 beshort 1 \b, 2 sided +>6 beshort x \b, starting track: %d +>8 beshort x \b, ending track: %d + +# Alternate ZIP string (amc@arwen.cs.berkeley.edu) +0 string PK00PK\003\004 Zip archive data +!:mime application/zip +#!:ext zip/cbz + +# ACE archive (from http://www.wotsit.org/download.asp?f=ace) +# by Stefan `Sec` Zehl +7 string **ACE** ACE archive data +>15 byte >0 version %d +>16 byte =0x00 \b, from MS-DOS +>16 byte =0x01 \b, from OS/2 +>16 byte =0x02 \b, from Win/32 +>16 byte =0x03 \b, from Unix +>16 byte =0x04 \b, from MacOS +>16 byte =0x05 \b, from WinNT +>16 byte =0x06 \b, from Primos +>16 byte =0x07 \b, from AppleGS +>16 byte =0x08 \b, from Atari +>16 byte =0x09 \b, from Vax/VMS +>16 byte =0x0A \b, from Amiga +>16 byte =0x0B \b, from Next +>14 byte x \b, version %d to extract +>5 leshort &0x0080 \b, multiple volumes, +>>17 byte x \b (part %d), +>5 leshort &0x0002 \b, contains comment +>5 leshort &0x0200 \b, sfx +>5 leshort &0x0400 \b, small dictionary +>5 leshort &0x0800 \b, multi-volume +>5 leshort &0x1000 \b, contains AV-String +>>30 string \x16*UNREGISTERED\x20VERSION* (unregistered) +>5 leshort &0x2000 \b, with recovery record +>5 leshort &0x4000 \b, locked +>5 leshort &0x8000 \b, solid +# Date in MS-DOS format (whatever that is) +#>18 lelong x Created on + +# sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann +# +0x1A string sfArk sfArk compressed Soundfont +>0x15 string 2 +>>0x1 string >\0 Version %s +>>0x2A string >\0 : %s + +# DR-DOS 7.03 Packed File *.??_ +# Reference: http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm +# Note: unpacked by PNUNPACK.EXE +0 string Packed\ File\ +# by looking for Control-Z skip ASCII text starting with Packed File +>0x18 ubyte 0x1a Personal NetWare Packed File +!:mime application/x-novell-compress +#!:ext ??_ +>>12 string x \b, was "%.12s" +# 1 or 2 +#>>0x19 ubyte x \b, at 0x19 %u +>>0x1b ulelong x with %u bytes + +# EET archive +# From: Tilman Sauerbeck +0 belong 0x1ee7ff00 EET archive +!:mime application/x-eet + +# rzip archives +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +# From: Joerg Jenderek +# URL: https://help.foxitsoftware.com/kb/install-fzip-file.php +# reference: http://mark0.net/download/triddefs_xml.7z/ +# defs/f/fzip.trid.xml +# Note: unknown compression; No "PK" zip magic; normally in directory like +# "%APPDATA%\Foxit Software\Addon\Foxit Reader\Install" +0 ubequad 0x2506781901010000 Foxit add-on/update +!:mime application/x-fzip +#!:ext fzip + +# From: "Robert Dale" +0 belong 123 dar archive, +>4 belong x label "%.8x +>>8 belong x %.8x +>>>12 beshort x %.4x" +>14 byte 0x54 end slice +>14 beshort 0x4e4e multi-part +>14 beshort 0x4e53 multi-part, with -S + +# Symbian installation files +# https://www.thouky.co.uk/software/psifs/sis.html +# http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf +8 lelong 0x10000419 Symbian installation file +!:mime application/vnd.symbian.install +>4 lelong 0x1000006D (EPOC release 3/4/5) +>4 lelong 0x10003A12 (EPOC release 6) +0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x) +!:mime x-epoc/x-sisx-app + +# From "Nelson A. de Oliveira" +0 string MPQ\032 MoPaQ (MPQ) archive + +# From: "Nelson A. de Oliveira" +# .kgb +0 string KGB_arch KGB Archiver file +>10 string x with compression level %.1s + +# Type: Parity Archive +# From: Daniel van Eeden +0 string PAR2 Parity Archive Volume Set + +# Bacula volume format. (Volumes always start with a block header.) +# URL: https://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html +# From: Adam Buchbinder +12 string BB02 Bacula volume +>20 bedate x \b, started %s + +# ePub is XHTML + XML inside a ZIP archive. The first member of the +# archive must be an uncompressed file called 'mimetype' with contents +# 'application/epub+zip' + + +# From: "Michael Gorny" +# ZPAQ: http://mattmahoney.net/dc/zpaq.html +0 string zPQ ZPAQ stream +>3 byte x \b, level %d +# From: Barry Carter +# https://encode.ru/threads/456-zpaq-updates/page32 +0 string 7kSt ZPAQ file + +# BBeB ebook, unencrypted (LRF format) +# URL: https://www.sven.de/librie/Librie/LrfFormat +# From: Adam Buchbinder +0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted +>8 beshort x \b, version %d +>36 byte 1 \b, front-to-back +>36 byte 16 \b, back-to-front +>42 beshort x \b, (%dx, +>44 beshort x %d) + +# Symantec GHOST image by Joerg Jenderek at May 2014 +# https://us.norton.com/ghost/ +# https://www.garykessler.net/library/file_sigs.html +0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image +# *.GHO +>2 ubyte&0x08 0x00 \b, first file +# *.GHS or *.[0-9] with cns program option +>2 ubyte&0x08 0x08 \b, split file +# part of split index interesting for *.ghs +>>4 ubyte x id=0x%x +# compression tag minus one equals numeric compression command line switch z[1-9] +>3 ubyte 0 \b, no compression +>3 ubyte 2 \b, fast compression (Z1) +>3 ubyte 3 \b, medium compression (Z2) +>3 ubyte >3 +>>3 ubyte <11 \b, compression (Z%d-1) +>2 ubyte&0x08 0x00 +# ~ 30 byte password field only for *.gho +>>12 ubequad !0 \b, password protected +>>44 ubyte !1 +# 1~Image All, sector-by-sector only for *.gho +>>>10 ubyte 1 \b, sector copy +# 1~Image Boot track only for *.gho +>>>43 ubyte 1 \b, boot track +# 1~Image Disc only for *.gho implies Image Boot track and sector copy +>>44 ubyte 1 \b, disc sector copy +# optional image description only *.gho +>>0xff string >\0 "%-.254s" +# look for DOS sector end sequence +>0xE08 search/7776 \x55\xAA +>>&-512 indirect x \b; contains + +# Google Chrome extensions +# https://developer.chrome.com/extensions/crx +# https://developer.chrome.com/extensions/hosting +0 string Cr24 Google Chrome extension +!:mime application/x-chrome-extension +>4 ulong x \b, version %u + +# SeqBox - Sequenced container +# ext: sbx, seqbox +# Marco Pontello marcopon@gmail.com +# reference: https://github.com/MarcoPon/SeqBox +0 string SBx SeqBox, +>3 byte x version %d + +# LyNX archive +56 string USE\040LYNX\040TO\040DISSOLVE\040THIS\040FILE LyNX archive + +# From: Joerg Jenderek +# URL: https://www.acronis.com/ +# Reference: https://en.wikipedia.org/wiki/TIB_(file_format) +# Note: only tested with True Image 2013 Build 5962 and 2019 Build 14110 +0 ubequad 0xce24b9a220000000 Acronis True Image backup +!:mime application/x-acronis-tib +#!:ext tib +# 01000000 +#>20 ubelong x \b, at 20 0x%x +# 20000000 +#>28 ubelong x \b, at 28 0x%x +# strings like "Generic- SD/MMC 1.00" "Unknown Disk" "Msft Virtual Disk 1.0" +# ??? +# strings like "\Device\0000011e" "\Device\0000015a" +#>0 search/0x6852300/cs \\Device\\ +#>>&-1 pstring x \b, %s +# "\Device\HarddiskVolume30" "\Device\HarddiskVolume39" +#>>>&1 search/180/cs \\Device\\ +#>>>>&-1 pstring x \b, %s +#>>>>>&0 search/29/cs \0\0\xc8\0 +# disk label +#>>>>>>&10 lestring16 x \b, disk label %11.11s +#>>>>>>&9 plestring16 x \b, disk label "%11.11s" +#>>>>>>&10 ubequad x %16.16llx + + +# Gentoo XPAK binary package +# by Michal Gorny +# https://gitweb.gentoo.org/proj/portage.git/tree/man/xpak.5 +-4 string STOP +>-16 string XPAKSTOP Gentoo binary package (XPAK) + +# From: Joerg Jenderek +# URL: https://kodi.wiki/view/TexturePacker +# Reference: https://mirrors.kodi.tv/releases/source/17.3-Krypton.tar.gz +# /xbmc-Krypton/xbmc/guilib/XBTF.h +# /xbmc-Krypton/xbmc/guilib/XBTF.cpp +0 string XBTF +# skip ASCII text by looking for terminating \0 of path +>264 ubyte 0 XBMC texture package +!:mime application/x-xbmc-xbt +#!:ext xbt +# XBTF_VERSION 2 +>>4 string !2 \b, version %-.1s +# nofFiles /xbmc-Krypton/xbmc/guilib/XBTFReader.cpp +>>5 ulelong x \b, %u file +# plural s +>>5 ulelong >1 \bs +# path[CXBTFFile[MaximumPathLength=256] +>>9 string x \b, 1st %s + +# ALZIP archive +# by Hyungjun Park , Hajin Jang +# http://kippler.com/win/unalz/ +# https://salsa.debian.org/l10n-korean-team/unalz +0 string ALZ\001 ALZ archive data +#!:ext alz + +# https://cf-aldn.altools.co.kr/setup/EGG_Specification.zip +0 string EGGA EGG archive data, +#!:ext egg +>5 byte x version %u +>4 byte x \b.%u +>>0x0E ulelong =0x08E28222 +>>0x0E ulelong =0x24F5A262 \b, split +>>0x0E ulelong =0x24E5A060 \b, solid +>>0x0E default x \b, unknown + +# PAQ9A archive +# URL: http://mattmahoney.net/dc/#paq9a +# Note: Line 1186 of paq9a.cpp gives the magic bytes +0 string pQ9\001 PAQ9A archive + +#------------------------------------------------------------------------------ +# $File: compress,v 1.80 2021/03/15 17:49:24 christos Exp $ +# compress: file(1) magic for pure-compression formats (no archives) +# +# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. +# +# Formats for various forms of compressed data +# Formats for "compress" proper have been moved into "compress.c", +# because it tries to uncompress it to figure out what's inside. + +# standard unix compress +0 string \037\235 compress'd data +!:mime application/x-compress +!:apple LZIVZIVU +>2 byte&0x80 >0 block compressed +>2 byte&0x1f x %d bits + +# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver) +# URL: https://en.wikipedia.org/wiki/Gzip +# Reference: https://tools.ietf.org/html/rfc1952 +# Update: Joerg Jenderek, Apr 2019 +# Edited by Chris Chittleborough , March 2002 +# * Original filename is only at offset 10 if "extra field" absent +# * Produce shorter output - notably, only report compression methods +# other than 8 ("deflate", the only method defined in RFC 1952). +# Note: find defs -iname '*.trid.xml' -exec grep -q '1F8B08' {} \; -ls +# TODO: +# FBR Blueberry FlashBack screen Record https://www.flashbackrecorder.com/ +# KPR KOffice/Calligra KPresenter application/x-kpresenter +# KPT KOffice/Calligra KPresenter template? application/x-kpresenter +# SAV Diggles Saved Game File http://www.innonics.com +# SAV FarCry (demo) saved game http://www.farcry-thegame.com +# DAT ZOAGZIP game data format http://en.wikipedia.org/wiki/SD_Gundam_Capsule_Fighter +0 string \037\213 +# to display gzip compressed (strength=100=2*50) before other (strength=50)? +#!:strength * 2 +# no FNAME and FCOMMENT bit implies no file name/comment. That means only binary +>3 byte&0x18 =0 +# For binary gzipped no ASCII text should occur +# mcd-monu-cad.trid.xml +>>10 string MCD Monu-Cad Drawing, Component or Font +#>>36 string Created\ with\ MONU-CAD +#!:mime application/octet-stream +# http://fileformats.archiveteam.org/wiki/Monu-CAD +# http://www.monucad.com/downloads/FullDemo-2005.EXE +# /HANDS96.MCC Component +# /DEMO_DD01.MCD Drawing +# /MCALF020.FNT Font +#!:ext mcc/mcd/fnt +# http://www.generalcadd.com +>>10 string GXD General CADD, Drawing or Component +#!:mime application/octet-stream +# /gxc/BUILDINGEDGE.gxc Component +# /gxd/HOCKETT-STPAUL-WRHSE.gxd Drawing +# /gxd/POWERLAND-MILL-ADD-11.gxd Drawing v9.1.06 +#!:ext gxc/gxd +#>>>13 ubyte 0 \b, version 0 +>>>13 string 09 \b, version 9 +# other gzipped binary like gzipped tar, VirtualBox extension package,... +>>10 default x gzip compressed data +!:mime application/gzip +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# gzipped TAR or VirtualBox extension package +#!:mime application/x-compressed-tar +#!:mime application/x-virtualbox-vbox-extpack +# https://www.w3.org/TR/SVG/mimereg.html +#!:mime image/image/svg+xml-compressed +# zlib.3.gz +# microcode-20180312.tgz +# tpz same as tgz +# lua-md5_1.2-1_i386_i486.ipk https://en.wikipedia.org/wiki/Opkg +# Oracle_VM_VirtualBox_Extension_Pack-5.0.12-104815.vbox-extpack +#!:ext gz/tgz/tpz/ipk/vbox-extpack/svgz +# FNAME/FCOMMENT bit implies file name/comment as iso-8859-1 text +>3 byte&0x18 >0 gzip compressed data +!:mime application/gzip +# gzipped tar, gzipped Abiword document +#!:mime application/x-compressed-tar +#!:mime application/x-abiword-compressed +#!:mime image/image/svg+xml-compressed +# kleopatra_splashscreen.svgz gzipped .svg +#!:ext gz/tgz/tpz/zabw/svgz +# size of the original (uncompressed) input data modulo 2^32 +>>>-4 ulelong x \b, original size modulo 2^32 %u +# display information of gzip compressed files +#>2 byte x THIS iS GZIP +>2 byte <8 \b, reserved method +>2 byte >8 \b, unknown method +>3 byte &0x01 \b, ASCII +>3 byte &0x02 \b, has CRC +>3 byte &0x04 \b, extra field +>3 byte&0xC =0x08 +>>10 string x \b, was "%s" +>3 byte &0x10 \b, has comment +>3 byte &0x20 \b, encrypted +>4 ledate >0 \b, last modified: %s +>8 byte 2 \b, max compression +>8 byte 4 \b, max speed +>9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT) +>9 byte =0x01 \b, from Amiga +>9 byte =0x02 \b, from VMS +>9 byte =0x03 \b, from Unix +>9 byte =0x04 \b, from VM/CMS +>9 byte =0x05 \b, from Atari +>9 byte =0x06 \b, from HPFS filesystem (OS/2, NT) +>9 byte =0x07 \b, from MacOS +>9 byte =0x08 \b, from Z-System +>9 byte =0x09 \b, from CP/M +>9 byte =0x0A \b, from TOPS/20 +>9 byte =0x0B \b, from NTFS filesystem (NT) +>9 byte =0x0C \b, from QDOS +>9 byte =0x0D \b, from Acorn RISCOS +# size of the original (uncompressed) input data modulo 2^32 +#>-4 ulelong x \b, original size modulo 2^32 %u +#ERROR: line 114: non zero offset 1048572 at level 1 + +# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis +0 string \037\036 packed data +!:mime application/octet-stream +>2 belong >1 \b, %d characters originally +>2 belong =1 \b, %d character originally +# +# This magic number is byte-order-independent. +0 short 0x1f1f old packed data +!:mime application/octet-stream + +# XXX - why *two* entries for "compacted data", one of which is +# byte-order independent, and one of which is byte-order dependent? +# +0 short 0x1fff compacted data +!:mime application/octet-stream +# This string is valid for SunOS (BE) and a matching "short" is listed +# in the Ultrix (LE) magic file. +0 string \377\037 compacted data +!:mime application/octet-stream +0 short 0145405 huf output +!:mime application/octet-stream + +# bzip2 +0 string BZh bzip2 compressed data +!:mime application/x-bzip2 +>3 byte >47 \b, block size = %c00k + +# bzip a block-sorting file compressor +# by Julian Seward and others +0 string BZ0 bzip compressed data +!:mime application/x-bzip +>3 byte >47 \b, block size = %c00k + +# lzip +0 string LZIP lzip compressed data +!:mime application/x-lzip +>4 byte x \b, version: %d + +# squeeze and crunch +# Michael Haardt +0 beshort 0x76FF squeezed data, +>4 string x original name %s +0 beshort 0x76FE crunched data, +>2 string x original name %s +0 beshort 0x76FD LZH compressed data, +>2 string x original name %s + +# Freeze +0 string \037\237 frozen file 2.1 +0 string \037\236 frozen file 1.0 (or gzip 0.5) + +# SCO compress -H (LZH) +0 string \037\240 SCO compress -H (LZH) data + +# European GSM 06.10 is a provisional standard for full-rate speech +# transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse +# excitation/long term prediction) coding at 13 kbit/s. +# +# There's only a magic nibble (4 bits); that nibble repeats every 33 +# bytes. This isn't suited for use, but maybe we can use it someday. +# +# This will cause very short GSM files to be declared as data and +# mismatches to be declared as data too! +#0 byte&0xF0 0xd0 data +#>33 byte&0xF0 0xd0 +#>66 byte&0xF0 0xd0 +#>99 byte&0xF0 0xd0 +#>132 byte&0xF0 0xd0 GSM 06.10 compressed audio + +# lzop from +0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data +>9 beshort <0x0940 +>>9 byte&0xf0 =0x00 - version 0. +>>9 beshort&0x0fff x \b%03x, +>>13 byte 1 LZO1X-1, +>>13 byte 2 LZO1X-1(15), +>>13 byte 3 LZO1X-999, +## >>22 bedate >0 last modified: %s, +>>14 byte =0x00 os: MS-DOS +>>14 byte =0x01 os: Amiga +>>14 byte =0x02 os: VMS +>>14 byte =0x03 os: Unix +>>14 byte =0x05 os: Atari +>>14 byte =0x06 os: OS/2 +>>14 byte =0x07 os: MacOS +>>14 byte =0x0A os: Tops/20 +>>14 byte =0x0B os: WinNT +>>14 byte =0x0E os: Win32 +>9 beshort >0x0939 +>>9 byte&0xf0 =0x00 - version 0. +>>9 byte&0xf0 =0x10 - version 1. +>>9 byte&0xf0 =0x20 - version 2. +>>9 beshort&0x0fff x \b%03x, +>>15 byte 1 LZO1X-1, +>>15 byte 2 LZO1X-1(15), +>>15 byte 3 LZO1X-999, +## >>25 bedate >0 last modified: %s, +>>17 byte =0x00 os: MS-DOS +>>17 byte =0x01 os: Amiga +>>17 byte =0x02 os: VMS +>>17 byte =0x03 os: Unix +>>17 byte =0x05 os: Atari +>>17 byte =0x06 os: OS/2 +>>17 byte =0x07 os: MacOS +>>17 byte =0x0A os: Tops/20 +>>17 byte =0x0B os: WinNT +>>17 byte =0x0E os: Win32 + +# 4.3BSD-Quasijarus Strong Compression +# https://minnie.tuhs.org/Quasijarus/compress.html +0 string \037\241 Quasijarus strong compressed data + +# From: Cory Dikkers +0 string XPKF Amiga xpkf.library compressed data +0 string PP11 Power Packer 1.1 compressed data +0 string PP20 Power Packer 2.0 compressed data, +>4 belong 0x09090909 fast compression +>4 belong 0x090A0A0A mediocre compression +>4 belong 0x090A0B0B good compression +>4 belong 0x090A0C0C very good compression +>4 belong 0x090A0C0D best compression + +# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at) +# https://www.7-zip.org or DOC/7zFormat.txt +# +0 string 7z\274\257\047\034 7-zip archive data, +>6 byte x version %d +>7 byte x \b.%d +!:mime application/x-7z-compressed +#!:ext 7z/cb7 + +# Type: LZMA +0 lelong&0xffffff =0x5d +>12 leshort 0xff lzma compressed data, +!:mime application/x-lzma +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld +>12 leshort 0 lzma compressed data, +>>5 lequad =0xffffffffffffffff streamed +>>5 lequad !0xffffffffffffffff non-streamed, size %lld + +# http://tukaani.org/xz/xz-file-format.txt +0 ustring \xFD7zXZ\x00 xz compressed data, checksum +>7 byte&0xf 0x0 NONE +>7 byte&0xf 0x1 CRC32 +>7 byte&0xf 0x4 CRC64 +>7 byte&0xf 0xa SHA-256 + +!:strength * 2 +!:mime application/x-xz + +# https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt +0 string LRZI LRZIP compressed data +>4 byte x - version %d +>5 byte x \b.%d +!:mime application/x-lrzip + +# https://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html +0 lelong 0x184d2204 lz4 compressed data (v1.4+) +!:mime application/x-lz4 +# Added by osm0sis@xda-developers.com +0 lelong 0x184c2103 lz4 compressed data (v1.0-v1.3) +!:mime application/x-lz4 +0 lelong 0x184c2102 lz4-l compressed data (v0.1-v0.9) +!:mime application/x-lz4 + +# Zstandard/LZ4 skippable frames +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong&0xFFFFFFF0 0x184D2A50 +>(4.l+8) indirect x + +# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md +0 lelong 0xEC30A437 Zstandard dictionary +!:mime application/x-std-dictionary +>4 lelong x (ID %u) + +# AFX compressed files (Wolfram Kleff) +2 string -afx- AFX compressed file data + +# Supplementary magic data for the file(1) command to support +# rzip(1). The format is described in magic(5). +# +# Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with +# this file. +# +0 string RZIP rzip compressed data +>4 byte x - version %d +>5 byte x \b.%d +>6 belong x (%d bytes) + +0 string ArC\x01 FreeArc archive + +# Type: DACT compressed files +0 long 0x444354C3 DACT compressed data +>4 byte >-1 (version %i. +>5 byte >-1 %i. +>6 byte >-1 %i) +>7 long >0 , original size: %i bytes +>15 long >30 , block size: %i bytes + +# Valve Pack (VPK) files +0 lelong 0x55aa1234 Valve Pak file +>0x4 lelong x \b, version %u +>0x8 lelong x \b, %u entries + +# Snappy framing format +# https://code.google.com/p/snappy/source/browse/trunk/framing_format.txt +0 string \377\006\0\0sNaPpY snappy framed data +!:mime application/x-snappy-framed + +# qpress, https://www.quicklz.com/ +0 string qpress10 qpress compressed data +!:mime application/x-qpress + +# Zlib https://www.ietf.org/rfc/rfc6713.txt +0 string/b x +>0 beshort%31 =0 +>>0 byte&0xf =8 +>>>0 byte&0x80 =0 zlib compressed data +!:mime application/zlib + +# BWC compression +0 string BWC +>3 byte 0 BWC compressed data + +# UCL compression +0 bequad 0x00e955434cff011a UCL compressed data + +# Softlib archive +0 string SLIB Softlib archive +>4 leshort x \b, version %d +>6 leshort x (contains %d files) + +# URL: https://github.com/lzfse/lzfse/blob/master/src/lzfse_internal.h#L276 +# From: Eric Hall +0 string bvx- lzfse encoded, no compression +0 string bvx1 lzfse compressed, uncompressed tables +0 string bvx2 lzfse compressed, compressed tables +0 string bvxn lzfse encoded, lzvn compressed + +# pcxLib.exe compression program +# http://www.shikadi.net/moddingwiki/PCX_Library +0 string/b pcxLib + +#------------------------------------------------------------ +# $File: android,v 1.18 2021/02/23 00:51:10 christos Exp $ +# Various android related magic entries +#------------------------------------------------------------ + +# Dalvik .dex format. http://retrodev.com/android/dexformat.html +# From "Mike Fleming" +# Fixed to avoid regexec 17 errors on some dex files +# From "Tim Strazzere" +0 string dex\n +>0 regex dex\n[0-9]{2}\0 Dalvik dex file +>4 string >000 version %s +0 string dey\n +>0 regex dey\n[0-9]{2}\0 Dalvik dex file (optimized for host) +>4 string >000 version %s + +# Android bootimg format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/mkbootimg/bootimg.h +# https://github.com/djrbliss/loki/blob/master/loki.h#L43 +0 string ANDROID! Android bootimg +>1024 string LOKI \b, LOKI'd +>>1028 lelong 0 \b (boot) +>>1028 lelong 1 \b (recovery) +>8 lelong >0 \b, kernel +>>12 lelong >0 \b (0x%x) +>16 lelong >0 \b, ramdisk +>>20 lelong >0 \b (0x%x) +>24 lelong >0 \b, second stage +>>28 lelong >0 \b (0x%x) +>36 lelong >0 \b, page size: %d +>38 string >0 \b, name: %s +>64 string >0 \b, cmdline (%s) + +# Android sparse img format +# From https://android.googlesource.com/\ +# platform/system/core/+/master/libsparse/sparse_format.h +0 lelong 0xed26ff3a Android sparse image +>4 leshort x \b, version: %d +>6 leshort x \b.%d +>16 lelong x \b, Total of %d +>12 lelong x \b %d-byte output blocks in +>20 lelong x \b %d input chunks. + +# Android binary XML magic +# In include/androidfw/ResourceTypes.h: +# RES_XML_TYPE = 0x0003 followed by the size of the header (ResXMLTree_header), +# which is 8 bytes (2 bytes type + 2 bytes header size + 4 bytes size). +0 lelong 0x00080003 Android binary XML + +# Android cryptfs footer +# From https://android.googlesource.com/\ +# platform/system/vold/+/refs/heads/master/cryptfs.h +0 lelong 0xd0b5b1c4 Android cryptfs footer +>4 leshort x \b, version: %d +>6 leshort x \b.%d + +# Android Vdex format +# From https://android.googlesource.com/\ +# platform/art/+/master/runtime/vdex_file.h +0 string vdex Android vdex file, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d + +# Android Vdex format, dexfile is currently being updated +# by android system +# From https://android.googlesource.com/\ +# platform/art/+/master/dex2oat/dex2oat.cc +0 string wdex Android vdex file, being processed by dex2oat, +>4 string >000 verifier deps version: %s, +>8 string >000 dex section version: %s, +>12 lelong >0 number of dex files: %d, +>16 lelong >0 verifier deps size: %d diff --git a/Final_Zip/AIK/PBRP/cleanup.sh b/Final_Zip/AIK/PBRP/cleanup.sh new file mode 100755 index 0000000..d8f1d61 --- /dev/null +++ b/Final_Zip/AIK/PBRP/cleanup.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# AIK-Linux/cleanup: reset working directory +# osm0sis @ xda-developers + +case $1 in + --help) echo "usage: cleanup.sh [--local] [--quiet]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + statarg="-f %Su"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) statarg="-c %U";; +esac; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; + +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + sudo=sudo; +fi; + +$sudo rm -rf ramdisk split_img *new.* || exit 1; + +case $1 in + --quiet) ;; + *) echo "Working directory cleaned.";; +esac; +exit 0; + diff --git a/Final_Zip/AIK/PBRP/repackimg.sh b/Final_Zip/AIK/PBRP/repackimg.sh new file mode 100755 index 0000000..5709f0f --- /dev/null +++ b/Final_Zip/AIK/PBRP/repackimg.sh @@ -0,0 +1,413 @@ +#!/bin/bash +# AIK-Linux/repackimg: repack ramdisk and build image +# osm0sis @ xda-developers + +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: repackimg.sh [--local] [--original] [--origsize] [--level <0-9>] [--avbkey ] [--forceelf]"; exit 1; +esac; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + + javaver=$(java -version 2>&1 | head -n1 | cut -d\" -f2); + javamaj=$(echo $javaver | cut -d. -f1); + javamin=$(echo $javaver | cut -d. -f2); + if [ "$javamaj" -lt 9 ] && [ "$javamaj" -eq 1 -a "$javamin" -lt 8 ]; then + java() { "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" "$@"; } + fi; + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +case $1 in + --local) shift;; + *) cd "$aik";; +esac; +chmod -R 755 "$bin" "$aik/"*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +if [ -z "$(ls split_img/* 2>/dev/null)" -o ! -e ramdisk ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +while [ "$1" ]; do + case $1 in + --original) original=1;; + --origsize) origsize=1;; + --forceelf) repackelf=1;; + --level) + case $2 in + ''|*[!0-9]*) ;; + *) level="-$2"; lvltxt=" - Level: $2"; shift;; + esac; + ;; + --avbkey) + if [ "$2" ]; then + for keytest in "$2" "$cur/$2" "$aik/$2"; do + if [ ! -z "$(ls $keytest.pk8 2>/dev/null)" -a ! -z "$(ls $keytest.x509.* 2>/dev/null)" ]; then + avbkey="$keytest"; avbtxt=" - Key: $2"; shift; break; + fi; + done; + fi; + ;; + esac; + shift; +done; + +ramdiskcomp=`cat split_img/*-*ramdiskcomp 2>/dev/null`; +if [ -z "$(ls ramdisk/* 2>/dev/null)" ] && [ ! "$ramdiskcomp" = "empty" -a ! "$original" ]; then + echo "No files found to be packed/built."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - RepackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +if [ ! -z "$(ls *-new.* 2>/dev/null)" ]; then + echo "Warning: Overwriting existing files!"; + echo " "; +fi; +rm -f "*-new.*"; + +if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" ]; then + sudo=sudo; sumsg=" (as root)"; +else + cpioarg="-R 0:0"; +fi; + +if [ "$original" ]; then + echo "Repacking with original ramdisk..."; +elif [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: Using empty ramdisk for repack!"; + compext=.empty; + touch ramdisk-new.cpio$compext; +else + echo "Packing ramdisk$sumsg..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + if [ -z "$level" ]; then + case $ramdiskcomp in + xz) level=-1;; + lz4*) level=-9;; + esac; + fi; + echo "Using compression: $ramdiskcomp$lvltxt"; + repackcmd="$ramdiskcomp $level"; + compext=$ramdiskcomp; + case $ramdiskcomp in + gzip) compext=gz;; + lzop) compext=lzo;; + xz) repackcmd="xz $level -Ccrc32";; + lzma) repackcmd="xz $level -Flzma";; + bzip2) compext=bz2;; + lz4) repackcmd="$bin/$arch/lz4 $level";; + lz4-l) repackcmd="$bin/$arch/lz4 $level -l"; compext=lz4;; + cpio) repackcmd="cat"; compext="";; + *) abort; exit 1;; + esac; + if [ "$compext" ]; then + compext=.$compext; + fi; + cd ramdisk; + $sudo find . | $sudo $cpio $cpioarg -H newc -o 2>/dev/null | $repackcmd > ../ramdisk-new.cpio$compext; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Getting build information..."; +cd split_img; +imgtype=`cat *-imgtype`; +case $imgtype in + KRNL) ;; + AOSP_VNDR) vendor=vendor_;; + *) + if [ -f *-kernel ]; then + kernel=`ls *-kernel`; echo "kernel = $kernel"; + kernel="split_img/$kernel"; + fi; + ;; +esac; +if [ "$original" ]; then + ramdisk=`ls *-*ramdisk.cpio*`; echo "${vendor}ramdisk = $ramdisk"; + ramdisk="split_img/$ramdisk"; +else + ramdisk="ramdisk-new.cpio$compext"; +fi; +case $imgtype in + KRNL) rsz=$(wc -c < ../"$ramdisk"); echo "ramdisk_size = $rsz";; + OSIP) echo "cmdline = $(cat *-*cmdline)";; + U-Boot) + name=`cat *-name`; echo "name = $name"; + uarch=`cat *-arch`; + os=`cat *-os`; + type=`cat *-type`; + comp=`cat *-comp`; echo "type = $uarch $os $type ($comp)"; + [ "$comp" = "uncompressed" ] && comp=none; + addr=`cat *-addr`; echo "load_addr = $addr"; + ep=`cat *-ep`; echo "entry_point = $ep"; + ;; + *) + if [ -f *-second ]; then + second=`ls *-second`; echo "second = $second"; + second=(--second "split_img/$second"); + fi; + if [ -f *-dtb ]; then + dtb=`ls *-dtb`; echo "dtb = $dtb"; + dtb=(--dtb "split_img/$dtb"); + fi; + if [ -f *-recovery_dtbo ]; then + recoverydtbo=`ls *-recovery_dtbo`; echo "recovery_dtbo = $recoverydtbo"; + recoverydtbo=(--recovery_dtbo "split_img/$recoverydtbo"); + fi; + if [ -f *-*cmdline ]; then + cmdname=`ls *-*cmdline`; + cmdline=`cat *-*cmdline`; echo "${vendor}cmdline = $cmdline"; + cmd=("split_img/$cmdname"@cmdline); + fi; + if [ -f *-board ]; then + board=`cat *-board`; echo "board = $board"; + fi; + if [ -f *-base ]; then + base=`cat *-base`; echo "base = $base"; + fi; + if [ -f *-pagesize ]; then + pagesize=`cat *-pagesize`; echo "pagesize = $pagesize"; + fi; + if [ -f *-kernel_offset ]; then + kerneloff=`cat *-kernel_offset`; echo "kernel_offset = $kerneloff"; + fi; + if [ -f *-ramdisk_offset ]; then + ramdiskoff=`cat *-ramdisk_offset`; echo "ramdisk_offset = $ramdiskoff"; + fi; + if [ -f *-second_offset ]; then + secondoff=`cat *-second_offset`; echo "second_offset = $secondoff"; + fi; + if [ -f *-tags_offset ]; then + tagsoff=`cat *-tags_offset`; echo "tags_offset = $tagsoff"; + fi; + if [ -f *-dtb_offset ]; then + dtboff=`cat *-dtb_offset`; echo "dtb_offset = $dtboff"; + fi; + if [ -f *-os_version ]; then + osver=`cat *-os_version`; echo "os_version = $osver"; + fi; + if [ -f *-os_patch_level ]; then + oslvl=`cat *-os_patch_level`; echo "os_patch_level = $oslvl"; + fi; + if [ -f *-header_version ]; then + hdrver=`cat *-header_version`; echo "header_version = $hdrver"; + fi; + if [ -f *-hashtype ]; then + hashtype=`cat *-hashtype`; echo "hashtype = $hashtype"; + hashtype="--hashtype $hashtype"; + fi; + if [ -f *-dt ]; then + dttype=`cat *-dttype`; + dt=`ls *-dt`; echo "dt = $dt"; + rpm=("split_img/$dt",rpm); + dt=(--dt "split_img/$dt"); + fi; + if [ -f *-unknown ]; then + unknown=`cat *-unknown`; echo "unknown = $unknown"; + fi; + if [ -f *-header ]; then + header=`ls *-header`; + header="split_img/$header"; + fi; + ;; +esac; +cd ..; + +if [ -f split_img/*-mtktype ]; then + mtktype=`cat split_img/*-mtktype`; + echo " "; + echo "Generating MTK headers..."; + echo " "; + echo "Using ramdisk type: $mtktype"; + "$bin/$arch/mkmtkhdr" --kernel "$kernel" --$mtktype "$ramdisk" >/dev/null; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; + mv -f "$(basename "$kernel")-mtk" kernel-new.mtk; + mv -f "$(basename "$ramdisk")-mtk" $mtktype-new.mtk; + kernel=kernel-new.mtk; + ramdisk=$mtktype-new.mtk; +fi; + +if [ -f split_img/*-sigtype ]; then + outname=unsigned-new.img; +else + outname=image-new.img; +fi; + +[ "$dttype" = "ELF" ] && repackelf=1; +if [ "$imgtype" = "ELF" ] && [ ! "$header" -o ! "$repackelf" ]; then + imgtype=AOSP; + echo " "; + echo "Warning: ELF format without RPM detected; will be repacked using AOSP format!"; +fi; + +echo " "; +echo "Building image..."; +echo " "; +echo "Using format: $imgtype"; +echo " "; +case $imgtype in + AOSP_VNDR) "$bin/$arch/mkbootimg" --vendor_ramdisk "$ramdisk" "${dtb[@]}" --vendor_cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --tags_offset $tagsoff --dtb_offset $dtboff --os_version "$osver" --os_patch_level "$oslvl" --header_version $hdrver --vendor_boot $outname;; + AOSP) "$bin/$arch/mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" "${dtb[@]}" "${recoverydtbo[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --dtb_offset "$dtboff" --os_version "$osver" --os_patch_level "$oslvl" --header_version "$hdrver" $hashtype "${dt[@]}" -o $outname;; + AOSP-PXA) "$bin/$arch/pxa-mkbootimg" --kernel "$kernel" --ramdisk "$ramdisk" "${second[@]}" --cmdline "$cmdline" --board "$board" --base $base --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --second_offset "$secondoff" --tags_offset "$tagsoff" --unknown $unknown "${dt[@]}" -o $outname;; + ELF) "$bin/$arch/elftool" pack -o $outname header="$header" "$kernel" "$ramdisk",ramdisk "${rpm[@]}" "${cmd[@]}" >/dev/null;; + KRNL) "$bin/$arch/rkcrc" -k "$ramdisk" $outname;; + OSIP) + mkdir split_img/.temp 2>/dev/null; + for i in bootstub cmdline.txt hdr kernel parameter sig; do + cp -f split_img/*-*$(basename $i .txt | sed -e 's/hdr/header/') split_img/.temp/$i 2>/dev/null; + done; + cp -f "$ramdisk" split_img/.temp/ramdisk.cpio.gz; + "$bin/$arch/mboot" -d split_img/.temp -f $outname; + ;; + U-Boot) + part0="$kernel"; + case $type in + Multi) part1=(:"$ramdisk");; + RAMDisk) part0="$ramdisk";; + esac; + "$bin/$arch/mkimage" -A $uarch -O $os -T $type -C $comp -a $addr -e $ep -n "$name" -d "$part0""${part1[@]}" $outname >/dev/null; + ;; + *) echo " "; echo "Unsupported format."; abort; exit 1;; +esac; +if [ ! $? -eq "0" ]; then + abort; + exit 1; +fi; + +rm -rf split_img/.temp; + +if [ -f split_img/*-sigtype ]; then + sigtype=`cat split_img/*-sigtype`; + if [ -f split_img/*-avbtype ]; then + avbtype=`cat split_img/*-avbtype`; + fi; + if [ -f split_img/*-blobtype ]; then + blobtype=`cat split_img/*-blobtype`; + fi; + echo "Signing new image..."; + echo " "; + echo "Using signature: $sigtype $avbtype$avbtxt$blobtype"; + [ ! "$avbkey" ] && avbkey="$bin/avb/verity"; + echo " "; + case $sigtype in + AVBv1) java -jar "$bin/boot_signer.jar" /$avbtype unsigned-new.img "$avbkey.pk8" "$avbkey.x509."* image-new.img 2>/dev/null;; + BLOB) + awk 'BEGIN { printf "-SIGNED-BY-SIGNBLOB-\00\00\00\00\00\00\00\00" }' > image-new.img; + "$bin/$arch/blobpack" blob.tmp $blobtype unsigned-new.img >/dev/null; + cat blob.tmp >> image-new.img; + rm -f blob.tmp; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --pack image-new.img --keyblock "$bin/chromeos/kernel.keyblock" --signprivate "$bin/chromeos/kernel_data_key.vbprivk" --version 1 --vmlinuz unsigned-new.img --bootloader "$bin/chromeos/empty" --config "$bin/chromeos/empty" --arch arm --flags 0x1;; + DHTB) + "$bin/$arch/dhtbsign" -i unsigned-new.img -o image-new.img >/dev/null; + rm -f split_img/*-tailtype 2>/dev/null; + ;; + NOOK*) cat split_img/*-master_boot.key unsigned-new.img > image-new.img;; + esac; + if [ ! $? -eq "0" ]; then + abort; + exit 1; + fi; +fi; + +if [ -f split_img/*-lokitype ]; then + lokitype=`cat split_img/*-lokitype`; + echo "Loki patching new image..."; + echo " "; + echo "Using type: $lokitype"; + echo " "; + mv -f image-new.img unlokied-new.img; + if [ -f aboot.img ]; then + "$bin/$arch/loki_tool" patch $lokitype aboot.img unlokied-new.img image-new.img >/dev/null; + if [ ! $? -eq "0" ]; then + echo "Patching failed."; + abort; + exit 1; + fi; + else + echo "Device aboot.img required in script directory to find Loki patch offset."; + abort; + exit 1; + fi; +elif [ -f split_img/*-microloader.bin ]; then + echo "Amonet patching new image..."; + echo " "; + cp -f image-new.img unamonet-new.img; + cp -f split_img/*-microloader.bin microloader.tmp; + dd bs=1024 count=1 conv=notrunc if=unamonet-new.img of=head.tmp 2>/dev/null; + dd bs=1024 seek=1 conv=notrunc if=head.tmp of=image-new.img 2>/dev/null; + dd conv=notrunc if=microloader.tmp of=image-new.img 2>/dev/null; + rm -f head.tmp microloader.tmp; +fi; + +if [ -f split_img/*-tailtype ]; then + tailtype=`cat split_img/*-tailtype`; + echo "Appending footer..."; + echo " "; + echo "Using type: $tailtype"; + echo " "; + case $tailtype in + Bump) awk 'BEGIN { printf "\x41\xA9\xE4\x67\x74\x4D\x1D\x1B\xA4\x29\xF2\xEC\xEA\x65\x52\x79" }' >> image-new.img;; + SEAndroid) printf 'SEANDROIDENFORCE' >> image-new.img;; + esac; +fi; + +if [ "$origsize" -a -f split_img/*-origsize ]; then + filesize=`cat split_img/*-origsize`; + echo "Padding to original size..."; + echo " "; + cp -f image-new.img unpadded-new.img; + truncate -s $filesize image-new.img; +fi; + +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/PBRP/unpackimg.sh b/Final_Zip/AIK/PBRP/unpackimg.sh new file mode 100755 index 0000000..6198f2a --- /dev/null +++ b/Final_Zip/AIK/PBRP/unpackimg.sh @@ -0,0 +1,370 @@ +#!/bin/bash +# AIK-Linux/unpackimg: split image and unpack ramdisk +# osm0sis @ xda-developers + +cleanup() { "$aik/cleanup.sh" $local --quiet; } +abort() { echo "Error!"; } + +case $1 in + --help) echo "usage: unpackimg.sh [--local] [--nosudo] "; exit 1;; + --local) local="--local"; shift;; +esac; +case $1 in + --nosudo) nosudo=1; shift;; + --sudo) shift;; +esac; +if [ ! "$nosudo" ]; then + sudo=sudo; sumsg=" (as root)"; +fi; + +case $(uname -s) in + Darwin|Macintosh) + plat="macos"; + readlink() { perl -MCwd -e 'print Cwd::abs_path shift' "$2"; } + ;; + *) plat="linux";; +esac; +arch=$plat/`uname -m`; + +aik="${BASH_SOURCE:-$0}"; +aik="$(dirname "$(readlink -f "$aik")")"; +bin="$aik/bin"; +cur="$(readlink -f "$PWD")"; + +case $plat in + macos) + cpio="env DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/cpio""; + statarg="-f %Su"; + dd() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/dd" "$@"; } + file() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/file" "$@"; } + lzma() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + lzop() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/lzop" "$@"; } + tail() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/tail" "$@"; } + truncate() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/truncate" "$@"; } + xz() { DYLD_LIBRARY_PATH="$bin/$arch" "$bin/$arch/xz" "$@"; } + ;; + linux) + cpio=cpio; + [ "$(cpio --version | head -n1 | rev | cut -d\ -f1 | rev)" = "2.13" ] && cpiowarning=1; + statarg="-c %U"; + ;; +esac; + +if [ ! "$local" ]; then + cd "$aik"; +fi; +chmod -R 755 "$bin" "$aik"/*.sh; +chmod 644 "$bin/magic" "$bin/androidbootimg.magic" "$bin/boot_signer.jar" "$bin/avb/"* "$bin/chromeos/"*; + +img="$1"; +[ -f "$cur/$1" ] && img="$cur/$1"; +if [ ! "$img" ]; then + while IFS= read -r line; do + case $line in + aboot.img|image-new.img|unlokied-new.img|unsigned-new.img) continue;; + esac; + img="$line"; + break; + done < <(ls *.elf *.img *.sin 2>/dev/null); +fi; +img="$(readlink -f "$img")"; +if [ ! -f "$img" ]; then + echo "No image file supplied."; + abort; + exit 1; +fi; + +echo " "; +echo " "; +echo "Android Image Kitchen - UnpackImg Script"; +echo "by osm0sis @ xda-developers"; +echo " "; + +file=$(basename "$img"); +echo "Supplied image: $file"; +echo " "; + +if [ -d split_img -o -d ramdisk ]; then + if [ -d ramdisk ] && [ "$(stat $statarg ramdisk | head -n 1)" = "root" -o ! "$(find ramdisk 2>&1 | cpio -o >/dev/null 2>&1; echo $?)" -eq "0" ]; then + rmsumsg=" (as root)"; + fi; + echo "Removing old work folders and files$rmsumsg..."; + echo " "; + cleanup; +fi; + +echo "Setting up work folders..."; +echo " "; +mkdir split_img ramdisk; + +cd split_img; +filesize=$(wc -c < "$img"); +echo "$filesize" > "$file-origsize"; +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "signing" ]; then + echo $imgtest | awk '{ print $1 }' > "$file-sigtype"; + sigtype=$(cat "$file-sigtype"); + echo "Signature with \"$sigtype\" type detected, removing..."; + echo " "; + case $sigtype in + BLOB) + cp -f "$img" "$file"; + "$bin/$arch/blobunpack" "$file" | tail -n+5 | cut -d" " -f2 | dd bs=1 count=3 > "$file-blobtype" 2>/dev/null; + mv -f "$file."* "$file"; + ;; + CHROMEOS) "$bin/$arch/futility" vbutil_kernel --get-vmlinuz "$img" --vmlinuz-out "$file";; + DHTB) dd bs=4096 skip=512 iflag=skip_bytes conv=notrunc if="$img" of="$file" 2>/dev/null;; + NOOK) + dd bs=1048576 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=1048576 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + NOOKTAB) + dd bs=262144 count=1 conv=notrunc if="$img" of="$file-master_boot.key" 2>/dev/null; + dd bs=262144 skip=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + ;; + SIN*) + "$bin/$arch/sony_dump" . "$img" >/dev/null; + mv -f "$file."* "$file"; + rm -f "$file-sigtype"; + ;; + esac; + img="$file"; +fi; + +imgtest="$(file -m "$bin/androidbootimg.magic" "$img" 2>/dev/null | cut -d: -f2-)"; +if [ "$(echo $imgtest | awk '{ print $2 }' | cut -d, -f1)" = "bootimg" ]; then + [ "$(echo $imgtest | awk '{ print $3 }')" = "PXA" ] && typesuffix=-PXA; + echo "$(echo $imgtest | awk '{ print $1 }')$typesuffix" > "$file-imgtype"; + imgtype=$(cat "$file-imgtype"); +else + cd ..; + cleanup; + echo "Unrecognized format."; + abort; + exit 1; +fi; +echo "Image type: $imgtype"; +echo " "; + +case $imgtype in + AOSP*|ELF|KRNL|OSIP|U-Boot) ;; + *) + cd ..; + cleanup; + echo "Unsupported format."; + abort; + exit 1; + ;; +esac; + +case $(echo $imgtest | awk '{ print $3 }') in + LOKI) + echo $imgtest | awk '{ print $5 }' | cut -d\( -f2 | cut -d\) -f1 > "$file-lokitype"; + lokitype=$(cat "$file-lokitype"); + echo "Loki patch with \"$lokitype\" type detected, reverting..."; + echo " "; + echo "Warning: A dump of your device's aboot.img is required to re-Loki!"; + echo " "; + "$bin/$arch/loki_tool" unlok "$img" "$file" >/dev/null; + img="$file"; + ;; + AMONET) + echo "Amonet patch detected, reverting..."; + echo " "; + dd bs=2048 count=1 conv=notrunc if="$img" of="$file-microloader.bin" 2>/dev/null; + dd bs=1024 skip=1 conv=notrunc if="$file-microloader.bin" of="$file-head" 2>/dev/null; + truncate -s 1024 "$file-microloader.bin"; + truncate -s 2048 "$file-head"; + dd bs=2048 skip=1 conv=notrunc if="$img" of="$file-tail" 2>/dev/null; + cat "$file-head" "$file-tail" > "$file"; + rm -f "$file-head" "$file-tail"; + img="$file"; + ;; +esac; + +tailtest="$(dd if="$img" iflag=skip_bytes skip=$(($(wc -c < "$img") - 8192)) bs=8192 count=1 2>/dev/null | file -m $bin/androidbootimg.magic - 2>/dev/null | cut -d: -f2-)"; +case $tailtest in + *data) tailtest="$(tail -n50 "$img" | file -m "$bin/androidbootimg.magic" - 2>/dev/null | cut -d: -f2-)";; +esac; +tailtype="$(echo $tailtest | awk '{ print $1 }')"; +case $tailtype in + AVB*) + echo "Signature with \"$tailtype\" type detected."; + echo " "; + case $tailtype in + *v1) + echo $tailtype > "$file-sigtype"; + echo $tailtest | awk '{ print $4 }' > "$file-avbtype"; + ;; + esac; + ;; + Bump|SEAndroid) + echo "Footer with \"$tailtype\" type detected."; + echo " "; + echo $tailtype > "$file-tailtype"; + ;; +esac; + +if [ "$imgtype" = "U-Boot" ]; then + imgsize=$(($(printf '%d\n' 0x$(hexdump -n 4 -s 12 -e '16/1 "%02x""\n"' "$img")) + 64)); + if [ ! "$filesize" = "$imgsize" ]; then + echo "Trimming..."; + echo " "; + dd bs=$imgsize count=1 conv=notrunc if="$img" of="$file" 2>/dev/null; + img="$file"; + fi; +fi; + +echo 'Splitting image to "split_img/"...'; +case $imgtype in + AOSP_VNDR) vendor=vendor_;; +esac; +case $imgtype in + AOSP|AOSP_VNDR) "$bin/$arch/unpackbootimg" -i "$img";; + AOSP-PXA) "$bin/$arch/pxa-unpackbootimg" -i "$img";; + ELF) + mkdir elftool_out; + "$bin/$arch/elftool" unpack -i "$img" -o elftool_out >/dev/null; + mv -f elftool_out/header "$file-header" 2>/dev/null; + rm -rf elftool_out; + "$bin/$arch/unpackelf" -i "$img"; + ;; + KRNL) dd bs=4096 skip=8 iflag=skip_bytes conv=notrunc if="$img" of="$file-ramdisk" 2>&1 | tail -n+3 | cut -d" " -f1-2;; + OSIP) + "$bin/$arch/mboot" -u -f "$img"; + [ ! $? -eq "0" ] && error=1; + for i in bootstub cmdline.txt hdr kernel parameter ramdisk.cpio.gz sig; do + mv -f $i "$file-$(basename $i .txt | sed -e 's/hdr/header/' -e 's/ramdisk.cpio.gz/ramdisk/')" 2>/dev/null || true; + done; + ;; + U-Boot) + "$bin/$arch/dumpimage" -l "$img"; + "$bin/$arch/dumpimage" -l "$img" > "$file-header"; + grep "Name:" "$file-header" | cut -c15- > "$file-name"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f1 > "$file-arch"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f2 > "$file-os"; + grep "Type:" "$file-header" | cut -c15- | cut -d" " -f3 | cut -d- -f1 > "$file-type"; + grep "Type:" "$file-header" | cut -d\( -f2 | cut -d\) -f1 | cut -d" " -f1 | cut -d- -f1 > "$file-comp"; + grep "Address:" "$file-header" | cut -c15- > "$file-addr"; + grep "Point:" "$file-header" | cut -c15- > "$file-ep"; + rm -f "$file-header"; + "$bin/$arch/dumpimage" -p 0 -o "$file-kernel" "$img"; + [ ! $? -eq "0" ] && error=1; + case $(cat "$file-type") in + Multi) "$bin/$arch/dumpimage" -p 1 -o "$file-ramdisk" "$img";; + RAMDisk) mv -f "$file-kernel" "$file-ramdisk";; + *) touch "$file-ramdisk";; + esac; + ;; +esac; +if [ ! $? -eq "0" -o "$error" ]; then + cd ..; + cleanup; + abort; + exit 1; +fi; + +if [ -f *-kernel ] && [ "$(file -m "$bin/androidbootimg.magic" *-kernel 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')" = "MTK" ]; then + mtk=1; + echo " "; + echo "MTK header found in kernel, removing..."; + dd bs=512 skip=1 conv=notrunc if="$file-kernel" of=tempkern 2>/dev/null; + mv -f tempkern "$file-kernel"; +fi; +mtktest="$(file -m "$bin/androidbootimg.magic" *-*ramdisk 2>/dev/null | cut -d: -f2-)"; +mtktype=$(echo $mtktest | awk '{ print $3 }'); +if [ "$(echo $mtktest | awk '{ print $1 }')" = "MTK" ]; then + if [ ! "$mtk" ]; then + echo " "; + echo "Warning: No MTK header found in kernel!"; + mtk=1; + fi; + echo "MTK header found in \"$mtktype\" type ramdisk, removing..."; + dd bs=512 skip=1 conv=notrunc if="$(ls *-*ramdisk)" of=temprd 2>/dev/null; + mv -f temprd "$(ls *-*ramdisk)"; +else + if [ "$mtk" ]; then + if [ ! "$mtktype" ]; then + echo 'Warning: No MTK header found in ramdisk, assuming "rootfs" type!'; + mtktype="rootfs"; + fi; + fi; +fi; +[ "$mtk" ] && echo $mtktype > "$file-mtktype"; + +if [ -f *-dt ]; then + dttest="$(file -m "$bin/androidbootimg.magic" *-dt 2>/dev/null | cut -d: -f2 | awk '{ print $1 }')"; + echo $dttest > "$file-dttype"; + if [ "$imgtype" = "ELF" ]; then + case $dttest in + QCDT|ELF) ;; + *) echo " "; + echo "Non-QC DTB found, packing kernel and appending..."; + gzip --no-name -9 "$file-kernel"; + mv -f "$file-kernel.gz" "$file-kernel"; + cat "$file-dt" >> "$file-kernel"; + rm -f "$file-dt"*;; + esac; + fi; +fi; + +file -m "$bin/magic" *-*ramdisk 2>/dev/null | cut -d: -f2 | awk '{ print $1 }' > "$file-${vendor}ramdiskcomp"; +ramdiskcomp=`cat *-*ramdiskcomp`; +unpackcmd="$ramdiskcomp -dc"; +compext=$ramdiskcomp; +case $ramdiskcomp in + gzip) unpackcmd="gzip -dcq"; compext=gz;; + lzop) compext=lzo;; + xz) ;; + lzma) ;; + bzip2) compext=bz2;; + lz4) unpackcmd="$bin/$arch/lz4 -dcq";; + lz4-l) unpackcmd="$bin/$arch/lz4 -dcq"; compext=lz4;; + cpio) unpackcmd="cat"; compext="";; + empty) compext=empty;; + *) compext="";; +esac; +if [ "$compext" ]; then + compext=.$compext; +fi; +mv -f "$(ls *-*ramdisk)" "$file-${vendor}ramdisk.cpio$compext" 2>/dev/null; +cd ..; +if [ "$ramdiskcomp" = "data" ]; then + echo "Unrecognized format."; + abort; + exit 1; +fi; + +echo " "; +if [ "$ramdiskcomp" = "empty" ]; then + echo "Warning: No ramdisk found to be unpacked!"; +else + echo "Unpacking ramdisk$sumsg to \"ramdisk/\"..."; + echo " "; + if [ "$cpiowarning" ]; then + echo "Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!"; + echo " "; + fi; + echo "Compression used: $ramdiskcomp"; + if [ ! "$compext" -a ! "$ramdiskcomp" = "cpio" ]; then + echo "Unsupported format."; + abort; + exit 1; + fi; + $sudo chown 0:0 ramdisk 2>/dev/null; + cd ramdisk; + $unpackcmd "../split_img/$file-${vendor}ramdisk.cpio$compext" | $sudo $cpio -i -d --no-absolute-filenames; + if [ ! $? -eq "0" ]; then + [ "$nosudo" ] && echo "Unpacking failed, try without --nosudo."; + cd ..; + abort; + exit 1; + fi; + cd ..; +fi; + +echo " "; +echo "Done!"; +echo " "; +exit 0; + diff --git a/Final_Zip/AIK/Patcher/boot_patch.sh b/Final_Zip/AIK/Patcher/boot_patch.sh new file mode 100755 index 0000000..64f3d8e --- /dev/null +++ b/Final_Zip/AIK/Patcher/boot_patch.sh @@ -0,0 +1,256 @@ +#!/system/bin/sh +####################################################################################### +# Magisk Boot Image Patcher +####################################################################################### +# +# Usage: boot_patch.sh +# +# The following environment variables can configure the installation: +# KEEPVERITY, KEEPFORCEENCRYPT, PATCHVBMETAFLAG, RECOVERYMODE, LEGACYSAR +# +# This script should be placed in a directory with the following files: +# +# File name Type Description +# +# boot_patch.sh script A script to patch boot image for Magisk. +# (this file) The script will use files in its same +# directory to complete the patching process. +# util_functions.sh script A script which hosts all functions required +# for this script to work properly. +# magiskinit binary The binary to replace /init. +# magisk binary The magisk binary. +# magiskboot binary A tool to manipulate boot images. +# init-ld binary The library that will be LD_PRELOAD of /init +# stub.apk binary The stub Magisk app to embed into ramdisk. +# chromeos folder This folder includes the utility and keys to sign +# (optional) chromeos boot images. Only used for Pixel C. +# +####################################################################################### + +############ +# Functions +############ + +# Pure bash dirname implementation +getdir() { + case "$1" in + */*) + dir=${1%/*} + if [ -z $dir ]; then + echo "/" + else + echo $dir + fi + ;; + *) echo "." ;; + esac +} + +################# +# Initialization +################# + +if [ -z $SOURCEDMODE ]; then + # Switch to the location of the script file + cd "$(getdir "${BASH_SOURCE:-$0}")" + # Load utility functions + . ./util_functions.sh + # Check if 64-bit + api_level_arch_detect +fi + +BOOTIMAGE="$1" +[ -e "$BOOTIMAGE" ] || abort "$BOOTIMAGE does not exist!" + +# Dump image for MTD/NAND character device boot partitions +if [ -c "$BOOTIMAGE" ]; then + nanddump -f boot.img "$BOOTIMAGE" + BOOTNAND="$BOOTIMAGE" + BOOTIMAGE=boot.img +fi + +# Flags +[ -z $KEEPVERITY ] && KEEPVERITY=false +[ -z $KEEPFORCEENCRYPT ] && KEEPFORCEENCRYPT=false +[ -z $PATCHVBMETAFLAG ] && PATCHVBMETAFLAG=false +[ -z $RECOVERYMODE ] && RECOVERYMODE=false +[ -z $LEGACYSAR ] && LEGACYSAR=false +export KEEPVERITY +export KEEPFORCEENCRYPT +export PATCHVBMETAFLAG + +chmod -R 755 . + +######### +# Unpack +######### + +CHROMEOS=false + +ui_print "- Unpacking boot image" +./magiskboot unpack "$BOOTIMAGE" + +case $? in + 0 ) ;; + 1 ) + abort "! Unsupported/Unknown image format" + ;; + 2 ) + ui_print "- ChromeOS boot image detected" + CHROMEOS=true + ;; + * ) + abort "! Unable to unpack boot image" + ;; +esac + +################### +# Ramdisk Restores +################### + +# Test patch status and do restore +ui_print "- Checking ramdisk status" +if [ -e ramdisk.cpio ]; then + ./magiskboot cpio ramdisk.cpio test + STATUS=$? + SKIP_BACKUP="" +else + # Stock A only legacy SAR, or some Android 13 GKIs + STATUS=0 + SKIP_BACKUP="#" +fi +case $STATUS in + 0 ) + # Stock boot + ui_print "- Stock boot image detected" + SHA1=$(./magiskboot sha1 "$BOOTIMAGE" 2>/dev/null) + cat $BOOTIMAGE > stock_boot.img + cp -af ramdisk.cpio ramdisk.cpio.orig 2>/dev/null + ;; + 1 ) + # Magisk patched + ui_print "- Magisk patched boot image detected" + ./magiskboot cpio ramdisk.cpio \ + "extract .backup/.magisk config.orig" \ + "restore" + cp -af ramdisk.cpio ramdisk.cpio.orig + rm -f stock_boot.img + ;; + 2 ) + # Unsupported + ui_print "! Boot image patched by unsupported programs" + abort "! Please restore back to stock boot image" + ;; +esac + +if [ -f config.orig ]; then + # Read existing configs + chmod 0644 config.orig + SHA1=$(grep_prop SHA1 config.orig) + if ! $BOOTMODE; then + # Do not inherit config if not in recovery + PREINITDEVICE=$(grep_prop PREINITDEVICE config.orig) + fi + rm config.orig +fi + +################## +# Ramdisk Patches +################## + +ui_print "- Patching ramdisk" + +$BOOTMODE && [ -z "$PREINITDEVICE" ] && PREINITDEVICE=$(./magisk --preinit-device) + +# Compress to save precious ramdisk space +./magiskboot compress=xz magisk magisk.xz +./magiskboot compress=xz stub.apk stub.xz +./magiskboot compress=xz init-ld init-ld.xz + +echo "KEEPVERITY=$KEEPVERITY" > config +echo "KEEPFORCEENCRYPT=$KEEPFORCEENCRYPT" >> config +echo "RECOVERYMODE=$RECOVERYMODE" >> config +if [ -n "$PREINITDEVICE" ]; then + ui_print "- Pre-init storage partition: $PREINITDEVICE" + echo "PREINITDEVICE=$PREINITDEVICE" >> config +fi +[ -n "$SHA1" ] && echo "SHA1=$SHA1" >> config + +./magiskboot cpio ramdisk.cpio \ +"add 0750 init magiskinit" \ +"mkdir 0750 overlay.d" \ +"mkdir 0750 overlay.d/sbin" \ +"add 0644 overlay.d/sbin/magisk.xz magisk.xz" \ +"add 0644 overlay.d/sbin/stub.xz stub.xz" \ +"add 0644 overlay.d/sbin/init-ld.xz init-ld.xz" \ +"patch" \ +"$SKIP_BACKUP backup ramdisk.cpio.orig" \ +"mkdir 000 .backup" \ +"add 000 .backup/.magisk config" \ +|| abort "! Unable to patch ramdisk" + +rm -f ramdisk.cpio.orig config *.xz + +################# +# Binary Patches +################# + +for dt in dtb kernel_dtb extra; do + if [ -f $dt ]; then + if ! ./magiskboot dtb $dt test; then + ui_print "! Boot image $dt was patched by old (unsupported) Magisk" + abort "! Please try again with *unpatched* boot image" + fi + if ./magiskboot dtb $dt patch; then + ui_print "- Patch fstab in boot image $dt" + fi + fi +done + +if [ -f kernel ]; then + PATCHEDKERNEL=false + # Remove Samsung RKP + ./magiskboot hexpatch kernel \ + 49010054011440B93FA00F71E9000054010840B93FA00F7189000054001840B91FA00F7188010054 \ + A1020054011440B93FA00F7140020054010840B93FA00F71E0010054001840B91FA00F7181010054 \ + && PATCHEDKERNEL=true + + # Remove Samsung defex + # Before: [mov w2, #-221] (-__NR_execve) + # After: [mov w2, #-32768] + ./magiskboot hexpatch kernel 821B8012 E2FF8F12 && PATCHEDKERNEL=true + + # Disable Samsung PROCA + # proca_config -> proca_magisk + ./magiskboot hexpatch kernel \ + 70726F63615F636F6E66696700 \ + 70726F63615F6D616769736B00 \ + && PATCHEDKERNEL=true + + # Force kernel to load rootfs for legacy SAR devices + # skip_initramfs -> want_initramfs + $LEGACYSAR && ./magiskboot hexpatch kernel \ + 736B69705F696E697472616D667300 \ + 77616E745F696E697472616D667300 \ + && PATCHEDKERNEL=true + + # If the kernel doesn't need to be patched at all, + # keep raw kernel to avoid bootloops on some weird devices + $PATCHEDKERNEL || rm -f kernel +fi + +################# +# Repack & Flash +################# + +ui_print "- Repacking boot image" +./magiskboot repack "$BOOTIMAGE" || abort "! Unable to repack boot image" + +# Sign chromeos boot +$CHROMEOS && sign_chromeos + +# Restore the original boot partition path +[ -e "$BOOTNAND" ] && BOOTIMAGE="$BOOTNAND" + +# Reset any error code +true diff --git a/Final_Zip/AIK/Patcher/init-ld b/Final_Zip/AIK/Patcher/init-ld new file mode 100755 index 0000000..0e413b2 Binary files /dev/null and b/Final_Zip/AIK/Patcher/init-ld differ diff --git a/Final_Zip/AIK/Patcher/magisk b/Final_Zip/AIK/Patcher/magisk new file mode 100755 index 0000000..2cddbf1 Binary files /dev/null and b/Final_Zip/AIK/Patcher/magisk differ diff --git a/Final_Zip/AIK/Patcher/magiskboot b/Final_Zip/AIK/Patcher/magiskboot new file mode 100755 index 0000000..7ef28ec Binary files /dev/null and b/Final_Zip/AIK/Patcher/magiskboot differ diff --git a/Final_Zip/AIK/Patcher/magiskinit b/Final_Zip/AIK/Patcher/magiskinit new file mode 100755 index 0000000..717e7cf Binary files /dev/null and b/Final_Zip/AIK/Patcher/magiskinit differ diff --git a/Final_Zip/AIK/Patcher/stub.apk b/Final_Zip/AIK/Patcher/stub.apk new file mode 100755 index 0000000..55cf6e9 Binary files /dev/null and b/Final_Zip/AIK/Patcher/stub.apk differ diff --git a/Final_Zip/AIK/Patcher/util_functions.sh b/Final_Zip/AIK/Patcher/util_functions.sh new file mode 100755 index 0000000..0c05b63 --- /dev/null +++ b/Final_Zip/AIK/Patcher/util_functions.sh @@ -0,0 +1,738 @@ +############################################ +# Magisk General Utility Functions +############################################ + +MAGISK_VER='28.1' +MAGISK_VER_CODE=28100 + +################### +# Global Variables +################### + +# True if the script is running on booted Android, not something like recovery +# BOOTMODE= + +# The path to store temporary files that don't need to persist +# TMPDIR= + +# The non-volatile path where magisk executables are stored +# MAGISKBIN= + +################### +# Helper Functions +################### + +ui_print() { + echo "$1" +} + +toupper() { + echo "$@" | tr '[:lower:]' '[:upper:]' +} + +grep_cmdline() { + local REGEX="s/^$1=//p" + { echo $(cat /proc/cmdline)$(sed -e 's/[^"]//g' -e 's/""//g' /proc/cmdline) | xargs -n 1; \ + sed -e 's/ = /=/g' -e 's/, /,/g' -e 's/"//g' /proc/bootconfig; \ + } 2>/dev/null | sed -n "$REGEX" +} + +grep_prop() { + local REGEX="s/^$1=//p" + shift + local FILES=$@ + [ -z "$FILES" ] && FILES='/system/build.prop' + cat $FILES 2>/dev/null | dos2unix | sed -n "$REGEX" | head -n 1 +} + +grep_get_prop() { + local result=$(grep_prop $@) + if [ -z "$result" ]; then + echo $result + fi +} + +getvar() { + local VARNAME=$1 + local VALUE + local PROPPATH='/data/.magisk /cache/.magisk' + [ ! -z $MAGISKTMP ] && PROPPATH="$MAGISKTMP/.magisk/config $PROPPATH" + VALUE=$(grep_prop $VARNAME $PROPPATH) + [ ! -z $VALUE ] && eval $VARNAME=\$VALUE +} + +is_mounted() { + grep -q " $(readlink -f $1) " /proc/mounts 2>/dev/null + return $? +} + +abort() { + ui_print "$1" + $BOOTMODE || recovery_cleanup + [ ! -z $MODPATH ] && rm -rf $MODPATH + rm -rf $TMPDIR + exit 1 +} + +print_title() { + local len line1len line2len bar + line1len=$(echo -n $1 | wc -c) + line2len=$(echo -n $2 | wc -c) + len=$line2len + [ $line1len -gt $line2len ] && len=$line1len + len=$((len + 2)) + bar=$(printf "%${len}s" | tr ' ' '*') + ui_print "$bar" + ui_print " $1 " + [ "$2" ] && ui_print " $2 " + ui_print "$bar" +} + +###################### +# Environment Related +###################### + +setup_flashable() { + ensure_bb + $BOOTMODE && return + if [ -z $OUTFD ] || readlink /proc/$$/fd/$OUTFD | grep -q /tmp; then + # We will have to manually find out OUTFD + for FD in $(ls /proc/$$/fd); do + if readlink /proc/$$/fd/$FD | grep -q pipe; then + if ps | grep -v grep | grep -qE " 3 $FD |status_fd=$FD"; then + OUTFD=$FD + break + fi + fi + done + fi + recovery_actions +} + +ensure_bb() { + if set -o | grep -q standalone; then + # We are definitely in busybox ash + set -o standalone + return + fi + + # Find our busybox binary + local bb + if [ -f $TMPDIR/busybox ]; then + bb=$TMPDIR/busybox + elif [ -f $MAGISKBIN/busybox ]; then + bb=$MAGISKBIN/busybox + else + abort "! Cannot find BusyBox" + fi + chmod 755 $bb + + # Busybox could be a script, make sure /system/bin/sh exists + if [ ! -f /system/bin/sh ]; then + umount -l /system 2>/dev/null + mkdir -p /system/bin + ln -s $(command -v sh) /system/bin/sh + fi + + export ASH_STANDALONE=1 + + # Find our current arguments + # Run in busybox environment to ensure consistent results + # /proc//cmdline shall be