From 7dffcc1c5846c1284337a37ac34b33c3b14d2fa4 Mon Sep 17 00:00:00 2001 From: TH779 Date: Tue, 23 Nov 2021 22:19:17 +0800 Subject: [PATCH] sm8250-common: Don't call configureRpcThreadpool for camera postproc impl * In Android 12, no longer allowed to shrink the process pool after a larger process pool is started, we should patch camera postproc impl to nuke it from shrinking process pool and prevent triggering a fatal to cause the camera to crash. Ref: https://android.googlesource.com/platform/system/libhwbinder/+/8e047f7a626c782a02dc9e67dee2dbae35bc6956. * The following are the difference between before and after the patch. Before: MOV W1, #1 BL ._ZN7android8hardware22configureRpcThreadpoolEmb Now: MOV W1, #1 NOP * Obtained by comparing the camera postproc impl modified by GitHub@erfanoabdi. * A tutorial on use hexdump, sed and xxd to patch hex in binary file: https://everydaywithlinux.blogspot.com/2012/11/patch-strings-in-binary-files-with-sed.html. Co-authored-by: Erfan Abdi Signed-off-by: TH779 Change-Id: I66c257e80bf56a48c640efc3c1c8949852edf756 --- extract-files.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extract-files.sh b/extract-files.sh index f1c458a..29874e7 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -63,6 +63,10 @@ function blob_fixup() { system_ext/etc/permissions/moto-telephony.xml) sed -i "s#/system/#/system_ext/#" "${2}" ;; + vendor/lib64/vendor.qti.hardware.camera.postproc@1.0-service-impl.so) + hexdump -ve '1/1 "%.2X"' "${2}" | sed "s/130A0094/1F2003D5/g" | xxd -r -p > "${TMPDIR}/${1##*/}" + mv "${TMPDIR}/${1##*/}" "${2}" + ;; esac }