* Commit Ib4590b7a3b839a993f6c747c5f09a6312f7ab329 modified
GraphicBufferMapper::unlock overload. Create a shim to provide the old
symbol for blobs that need it
Change-Id: I0e90ac0b383b05904df83076d990ad9335a40664
* Commit Ib4590b7a3b839a993f6c747c5f09a6312f7ab329 restored
GraphicBufferMapper::lock old overload, but some libs still require
the new one.
Change-Id: Ie1435961dc43f7750a80b9986977194835d916f3
* Namespace V1_0::helper has been deprecated in [1]. Wrap old symbols to
accommodate this change.
[1] I8c3160497c1e2fe7a0a7155641f0e1f5e47ec32e
Change-Id: I4c9094add5c2484fd00b04e6236ba86ac693dbfd
* They're copied from `android.hardware.radio.config@1.{0..3}.so`,
renamed to `android.hardware.radio.c_shim@1.{0..3}.so`, and
hexedited hidl interface descriptor to
`lineage.hardware.radio.config@1.{0..3}::IRadioConfig`
* For making stock RIL service register radio.config service to
`lineage.hardware.radio.config` interface instead, so that we can
add a wrapper that registers to `android.hardware.radio.config`
* Example usage on extract-files.sh:
```
vendor/lib64/libril-qc-hal-qmi.so)
for v in 1.{0..2}; do
sed -i "s|android.hardware.radio.config@${v}.so|android.hardware.radio.c_shim@${v}.so|g" "${2}"
done
;;
```
Change-Id: Ie8c48c0164c1787c851d4b3c0ccd334e0d405cd4
Copied from prebuilts/vndk/v33/arm64/*/shared/vndk-core and changed
SONAME using the following command:
* patchelf-0_9 --set-soname libcrypto-v33.so libcrypto-v33.so
Change-Id: I545f58b4119f735385fa0f389ef87c6e9d2c100e
Android moved to a versioned approach in R and vendorcompat libs were
still possible to build, but not anymore with the Android U release.
Change-Id: Ibe06bf8d22ab0ce24ac5d5d9f3394b8593ee46cb
gBn/sConstructorMap symbols were removed from libhidl:
- https://android.googlesource.com/platform/system/libhidl/+/e29b2ad
However, some prebuilts still make use of them.
In some cases, for example when using GSI, libhidl can not be patched
directly, which requires modifying affected blobs to depend on this shim
library.
Change-Id: I097c75ac210a9c3f50a9725da0b910d819c85b9a
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
* The str parameter StartsWith function in libbase got changed
from std::string to std::string_view in later android versions [1].
* Create a shim that provides the older StartsWith function.
[1]: ef973cee17
Change-Id: I116a32a739d6fa34ecc0d1a4acf8b2e3756910ea
In Pie, Google added checks to prevent destroying of the same mutexes
consecutively, and aborts the program on fortify fatal call.
Our camera blobs trigger this check when tearing down an ISP session,
destroying the same mutex consecutively by adding a destroy instruction
in a loop. This causes the whole daemon to crash and fail.
(Specifically, the violating instructions were from isp_module_stop_session
and when isp_module_start_session fails to create a thread.)
Workaround the issue by shimming the function; catching destroyed
mutexes and returning -EBUSY without passing on the bad mutexes to libc.
Change-Id: I4f8542a496dc25c53f8208a647cc0d6acc8662eb
* The shim is only used for converting timespecs, rename the shim lib
to suggest such.
* Build it with Clang since it doesn't break anything.
Change-Id: I8cfed10b73655f9aa1f4780dffc5106347441c3e
-> [1] added tests to ensure nano timespecs are below 1000000000
-> Legacy blobs before N were able to use tv_nsec > 100000000
-> One such example would be our libmmcamera2_sensor_modules.so, which
have instances of timeouts of 5000000000 nsecs.
-> The previous workaround was to shim the old libc functions to
skip these tests, but that was really ugly since we leave out bug fixes
and security patches introduced from MM up till Oreo.
-> Current workaround is applied on the latest bionic code by correcting
the invalid timespecs, taking out each second from tv_nsec, and then
adding them to tv_sec, until tv_nsec goes below 1 second.
-> Due to bionic's tight security, we've got no choice but to copy-paste
its functions here.
[1]: https://android.googlesource.com/platform/bionic/+/c9a659c
Change-Id: I271f2899db54a252d0d2a018cf4eb7877b97a02a
* All the IPermissionController related functions are guarded by
`if !defined(__ANDROID_VNDK__)` [1], meaning they're not fully
accessible to vendors.
* Since we know these are mainly used to check whether an app or
process has a required permission, simply provide an stub that
returns true no matter what the permission / caller are.
- [1]: https://github.com/LineageOS/android_frameworks_native/blob/lineage-20.0/libs/binder/IServiceManager.cpp#L170
Change-Id: I898bf8eb577faecb8bc0f007498b835816dddb93
* When --style=file is specified, clang-format will look for a
.clang-format on file's parent dirs automatically
Change-Id: If94fe4915cd434b3f5901b8830cbdb90976ae4b7
Several constructor shims are implemented incorrectly because
they completely ignore the fact that constructors have 'this-call'
calling convention and should pass 'this ptr' as the first argument [1]
as well as its return value, at least according ARM ABI [2].
Additionally android::SurfaceComposerClient::Transaction::apply(bool)
shim has void return value instead of status_t so the caller retrieves
random value.
[1] https://review.lineageos.org/c/LineageOS/android_device_xiaomi_sdm710-common/+/360011/comments/eb6600df_3e2fb434
[2] 617079d8a0/cppabi32/cppabi32.rst (L576)
Change-Id: I7b14b5d3ca6008c1e4b3f5fcbaece5021b3cbb82
Signed-off-by: Ivan Vecera <ivan@cera.cz>
* * In Android T, AOSP moved `libnetutils` to an APEX that is inaccessible
to the vendor namespace - and it can't be built to vendor in any
treble-compliant way.
* Our `wfc-pkt-router` blob lives on vendor, and relies on `libnetutils.so`.
* Upon further analysis, we only reply on a few checksum related functions,
such as the symbol `ipv4_pseudo_header_checksum`, which lives in the (now)
staticly included dependency of `libnetutils.so`, `libip_checksum`.
* To work around this, we enabled building `libip_checksum` as a stand-alone
vendor_available library called `libip_checksum_shim.so`, and `patchelf`
`wfc-pkt-router` to depend on `libipp_checksum_shim.so`.
Change-Id: I7dff9ec6c8ff146f6090e9519ece7844b4a057eb
* This was replaced with a default destructor which has no visible
linkage. No-op the destructor call and hope the actual destructor is
called from underneath.
Change-Id: Id039e916c24959e9f60391bc10886df878f4d265