From: Jan Altensen Date: Sun, 1 Sep 2019 15:31:23 +0000 (+0200) Subject: hexedit firmware blobs on extraction X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a38deedcb7ed54c12382ad5ff41ff6f0092b2364;p=GitHub%2Fexynos8895%2Fandroid_device_samsung_dream2lte.git hexedit firmware blobs on extraction Change-Id: Ided61348c92ed78072d3f77eb01a44c1fb3c5658 --- diff --git a/extract-files.sh b/extract-files.sh index dc389e4..90030d5 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -65,4 +65,21 @@ setup_vendor "${DEVICE}" "${VENDOR}" "${LINEAGE_ROOT}" true "${CLEAN_VENDOR}" extract "${MY_DIR}/proprietary-files.txt" "${SRC}" \ "${KANG}" --section "${SECTION}" +# Fix proprietary blobs +BLOB_ROOT="$LINEAGE_ROOT"/vendor/"$VENDOR"/"$DEVICE"/proprietary +function patch_firmware() { + hexdump -ve '1/1 "%.2X"' $1 | \ + sed "s/40000054DEC0AD/02000014000000/g" | \ + xxd -r -p > $1.patched + + mv $1.patched $1 +} + +# remove RKP crap +patch_firmware $BLOB_ROOT/vendor/firmware/fimc_is_lib.bin +patch_firmware $BLOB_ROOT/vendor/firmware/fimc_is_rta_2l2_3h1.bin +patch_firmware $BLOB_ROOT/vendor/firmware/fimc_is_rta_2l2_imx320.bin +patch_firmware $BLOB_ROOT/vendor/firmware/fimc_is_rta_imx333_3h1.bin +patch_firmware $BLOB_ROOT/vendor/firmware/fimc_is_rta_imx333_imx320.bin + "${MY_DIR}/setup-makefiles.sh" diff --git a/proprietary-files.txt b/proprietary-files.txt index 26b9061..b0814ab 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -102,6 +102,8 @@ vendor/firmware/companion_imx333_master_setfile.bin vendor/firmware/companion_imx333_mode_setfile.bin vendor/firmware/dsm.bin vendor/firmware/dsm_tune.bin +vendor/firmware/fimc_is_lib.bin +vendor/firmware/fimc_is_rta_2l2_3h1.bin vendor/firmware/fimc_is_rta_2l2_imx320.bin vendor/firmware/fimc_is_rta_imx333_3h1.bin vendor/firmware/fimc_is_rta_imx333_imx320.bin @@ -119,7 +121,3 @@ vendor/firmware/setfile_3h1.bin vendor/firmware/setfile_imx320.bin vendor/firmware/setfile_imx333.bin vendor/firmware/vts.bin - -# Firmware - from G950FXXS5DSH5 -vendor/firmware/fimc_is_lib.bin|4cfd3ad2c85f1e32fe17bde3a3fc8b17bf2aa82c -vendor/firmware/fimc_is_rta_2l2_3h1.bin|a81e04f0fe86643c4b3f223a4840fd79a9d8e46b