ueventd.common.rc: copy to /vendor/etc/ueventd.rc
Which is required since API version 33 after the following change:
https://android-review.googlesource.com/c/platform/system/core/+/2048646
Otherwise the following message will be printed:
01-01 00:07:52.491 238 238 F ueventd : Legacy ueventd configuration file detected and will not be parsed: /vendor/ueventd.rc. Please move your configuration to /vendor/etc/ueventd.rc instead.
and it will cause NDK MediaCodec_ crashes on 5.4 kernels because ION is still enabled but the permission settings in ueventd.rc does not get done. Here is the line in ueventd.rc for reference:
# media.codec2
/dev/ion 0664 system system
And the crash reported in logcat is something like this:
D C2Store : Using ION
E ion : open /dev/ion failed: Permission denied
...
F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
F DEBUG : Build fingerprint: 'Android/db845c/db845c:VanillaIceCream/MAIN/eng.liuyq.20240223.025153:userdebug/test-keys'
...
F DEBUG : Cmdline: system_server
F DEBUG : pid: 7674, tid: 7851, name: NDK MediaCodec_ >>> system_server <<<
F DEBUG : uid: 1000
F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000
F DEBUG : Cause: null pointer dereference
...
F DEBUG : x24 0000007444583e90 x25 b40000772578de40 x26 0000007444584c00 x27 0000000000000000
F DEBUG : x28 0000000000000001 x29 0000007444583e60
F DEBUG : lr 00000078b5f91e38 sp 0000007444583e60 pc 00000078b34d4ddc pst 0000000080000000
F DEBUG : 15 total frames
F DEBUG : backtrace:
F DEBUG : #00 pc 0000000000054ddc /system/lib64/libc++.so (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)+28) (BuildId: 7cfa65b01fb93656782e24553dcab4b7)
F DEBUG : #01 pc 0000000000050e34 /system/lib64/libcodec2_vndk.so (android::C2AllocatorIon::setUsageMapper(std::__1::function<c2_status_t (C2MemoryUsage, unsigned long, unsigned long*, unsigned int*, unsigned int*)> const&, unsigned long, unsigned long, unsigned long)+516) (BuildId: 47a0ee88efb04d323efd3dbcdfe62a7a)
F DEBUG : #02 pc 0000000000070378 /system/lib64/libcodec2_vndk.so (android::(anonymous namespace)::UseComponentStoreForIonAllocator(std::__1::shared_ptr<android::C2AllocatorIon>, std::__1::shared_ptr<C2ComponentStore>)+536) (BuildId: 47a0ee88efb04d323efd3dbcdfe62a7a)
F DEBUG : #03 pc 000000000006ea58 /system/lib64/libcodec2_vndk.so (android::C2PlatformAllocatorStoreImpl::fetchIonAllocator()+280) (BuildId: 47a0ee88efb04d323efd3dbcdfe62a7a)
F DEBUG : #04 pc 000000000006e518 /system/lib64/libcodec2_vndk.so (android::C2PlatformAllocatorStoreImpl::fetchAllocator(unsigned int, std::__1::shared_ptr<C2Allocator>*)+248) (BuildId: 47a0ee88efb04d323efd3dbcdfe62a7a)
Fixes: 183f6a7cc351 ("db845c: bump PRODUCT_SHIPPING_API_LEVEL to 33")
Test: boot to homescreen with the 5.4 kernel
Change-Id: I2b1fa4f8bde1cc2e2217ad8e26c754c1516cd92c
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
1 file changed