Android vndk in Pie

Viewed 3716

I have added a vendor specific hal, I can able to build this as a separate module but during AOSP full build I am getting the below error. Anyone faced this issue? Added VNDK-core: android.hardware.uclhal@1.0.so error: VNDK library list has been changed. Changing the VNDK library list is not allowed in API locked branches.

4 Answers

As others mentioned, you have to either disable vndk in hal's Android.bp, or write to current.txt and 28.txt files.

Write to api files

You should add VNDK-core: android.hardware.uclhal@1.0.so to both current.txt and 28.txt under build/make/target/product/vndk/

If it's not working, check that 28.txt and current.txt are the same.

If it's still not working, check the generated libs.txt file in out/

diff $OUT/obj/PACKAGING/vndk_intermediates/libs.txt build/make/target/product/vndk/28.txt

diff $OUT/obj/PACKAGING/vndk_intermediates/libs.txt build/make/target/product/vndk/current.txt

(where $OUT is out/target/product/PRODUCT_NAME)

They shouldn't be different.

If libs.txt is different, compare the printed to your hal's module name in Android.bp

hidl_interface {
  name: "android.hardware.uclhal@1.0"
}

The hidl_interface.name should be the same as the string you're adding to current.txt and 28.txt files, but without .so

Disable it

As shrishail-satihal mentioned, you can disable it in Android.bp

hidl_interfaces {
  // ...

  vndk : {
    enabled: false
  },
}

Also supported by Android 9. Check VndkProperties for more details & options

You can find a file like build/make/target/product/vndk/28.txt in your project. Then, add a line "VNDK-core: android.hardware.uclhal@1.0.so" into the file. After that, you may have a full build without compiling error.

You can find a file like build/make/target/product/vndk/28.txt and current.txt in your project. Then, add a line "VNDK-core: android.hardware.uclhal@1.0.so" into the file by alphabet order. After that, you may have a full build without compiling error.

In android R we don't have vndk folder(build/make/target/product/vndk/), we have gsi folder(build/make/target/product/gsi/) and there we can see cureent.txt, 28.txt, 29.txt etc. but adding respective .so file here doesnt worked for me. the following approach resolved my issue disable vndk lib which is not required in Android.bp file for your respective hidl interface/module

vndk: {
    enabled: false,
},
Related