4

I'm trying to compile a JNI in the Android product partition. For that purpose I added the property product_specific: true in the Android.bp such as:

cc_library_shared {
    name : "..."
    ...
       shared_libs: [
            "libandroidicu",
            "libnativehelper",
            "libcutils",
            "libutils",
            "liblog",
        ],
    proprietary : false;
    product_specific: true

Unfortunately, at compilation I have the following error :

Android.bp:1:1: dependency "libnativehelper" of "libTest_jni" missing variant:
  os:android, image:product.30, arch:arm64_armv8-a, sdk:, link:shared, version:1

available variants:
  os:android, image:, arch:arm64_armv8-a, sdk:, link:shared, version:
  os:android, image:, arch:arm64_armv8-a, sdk:, link:shared, version:1
  os:android, image:, arch:arm64_armv8-a, sdk:, link:static, version:
  os:android, image:, arch:arm64_armv8-a, sdk:, link:static, version:1
  os:android, image:, arch:arm_armv8-a, sdk:, link:shared, version:
  os:android, image:, arch:arm_armv8-a, sdk:, link:shared, version:1
  os:android, image:, arch:arm_armv8-a, sdk:, link:static, version:
  os:android, image:, arch:arm_armv8-a, sdk:, link:static, version:1

How can I add a product variant to libnativehelper?

greybeard
  • 2,249
  • 8
  • 30
  • 66
Apiche
  • 41
  • 3

1 Answers1

-1

libnativehelper is part of non-sdk inerfaces. So we can't use it in the product partition. If you do the reverse engineering, system will give the exact library which using the non-sdk interfaces...

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
  • what do you need to do to reverse engineer? I am guessing you are saying find the exact libraries used by the non-sdk interface. In this case that's the libraries that libnativehelper uses. – Naman Jain Sep 29 '21 at 14:30