haydn: Patch xiaomi camera libraries

The modified library NOPs out the instruction to change binder
threadpool, allowing the library to load and camera to work on S.

Extend the pattern for cameraperf since "7c 00 00 94" occurs twice
to only NOP the configureRpcThreadpool call.
Output of llvm-objdump:
```
    3ad0: 7c 00 00 94  	bl	0x3cc0 <_ZdlPv@plt>
    3b10: 7c 00 00 94  	bl	0x3d00 <_ZN7android8hardware22configureRpcThreadpoolEmb@plt>
```

Change-Id: I1ef0ed29e4a2eb820826e5d7df1fa53c9e3df584
This commit is contained in:
Sebastiano Barezzi 2021-10-12 18:41:32 +02:00 committed by AdarshGrewal
parent 595f5838e9
commit fe0faf4c58

View file

@ -13,6 +13,12 @@ function blob_fixup() {
vendor/lib64/hw/camera.qcom.so)
sed -i "s/\x73\x74\x5F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x6C\x69\x63/\x63\x61\x6D\x65\x72\x61\x5F\x63\x6E\x66\x2E\x74\x78\x74/g" "${2}"
;;
vendor/lib64/hw/camera.xiaomi.so)
"${SIGSCAN}" -p "52 07 00 94" -P "1F 20 03 D5" -f "${2}"
;;
vendor/lib64/vendor.xiaomi.hardware.cameraperf@1.0-impl.so)
"${SIGSCAN}" -p "21 00 80 52 7c 00 00 94" -P "21 00 80 52 1F 20 03 D5" -f "${2}"
;;
esac
}