Android vndk in Pie

Solution 1:

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: [email protected] 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: "[email protected]"
}

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