Android 9 修改framework release vn
2022-02-28 本文已影响0人
Nothing_655f
Android 9 修改framework release vndk so
修改了framework mediadef.h 文件后出现了编译不过的问题,原因是Android 导入的vndk 有严格限制,需要对so 进行对齐
编译报错log
error: VNDK library: libstagefright_foundation's ABI has EXTENDING CHANGES Please check compatiblity report at : out/soong/.intermediates/frameworks/av/media/libstagefright/foundation/libstagefright_foundation/android_arm_armv8-a_cortex-a73_vendor_shared/libstagefright_foundation.so.abidiff
******************************************************
---- Please update abi references by running platform/development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libstagefright_foundation ----
从这个编译log 提示我们可以执行create_reference_dumps.py 来更新vndk so,如果直接执行的化还是会报错,需要在提示命令后添加 -product ${porduct}
./development/vndk/tools/header-checker/utils/create_reference_dumps.py \
-l libstagefright_foundation \
-product My_Product
根据平台是32bit 还是 64 bit,执行完输出log如下,更新源码中的 文件 prebuilts/abi-dumps/vndk/28/64/arm_armv8-a/source-based/libstagefright_foundation.so.lsdump.gz
Removing reference dumps...
removing /home/xxx/prebuilts/abi-dumps/vndk/28/64/arm_armv8-a/source-based/libstagefright_foundation.so.lsdump.gz
removing /home/xxx/prebuilts/abi-dumps/ndk/28/64/arm_armv8-a/source-based/libstagefright_foundation.so.lsdump.gz
making libs for product: My_Product
Creating dumps for target_arch: arm and variant armv8-a
Created abi dump at /home/xxx/prebuilts/abi-dumps/vndk/28/64/arm_armv8-a/source-based/libstagefright_foundation.so.lsdump.gz