Use RRO on a precompiled "car-ui-lib" Android library

In the context of Android 14 Source code, I want to use RRO on car-ui-lib for apply some changes on resource files. The problem is that the libray is precompiled and positioned inside the directory prebuilts/sdk/current/aaos-libs/car-ui-lib.aar. If I open in the archive manager the aar file inside the "res/" directory there is the overlayable.xml file that permit me to overlay the wanted resources, but when i compile my RRO package with the correct target package ("com.android.car.ui") and target name ("car-ui-lib"), taken directly from the library, the system does not recognize it as correct. My idea is that the library is not directly installed on the system and the RRO mechanism does not work for this.

This is my AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.reply.settings_rro">

    <application android:hasCode="false" />
    <overlay
        android:isStatic="false"
        android:priority="10"
        android:resourcesMap="@xml/overlays"
        android:targetName="car-ui-lib"
        android:targetPackage="com.android.car.ui" />
</manifest>

This is the Android.bp file used to compile the RRO:

package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

android_app {
    name: "SettingsRRO",
    resource_dirs: ["res"],
    certificate: "platform",
    platform_apis: true,
    manifest: "AndroidManifest.xml",
    aaptflags: [
        "--no-resource-deduping",
        "--no-resource-removal",
    ],
}

Am I doing something wrong and if so where? Because with the same way of operating, I managed to modify the resources of some system apps.

Upvotes: 0

Views: 122

Answers (2)

Android_Geek
Android_Geek

Reputation: 1

are you trying to place your app which targets car-ui-lib as a pre-built app ?

And have you tried replacing your android.bp file with the content below

runtime_resource_overlay {
name: "ExampleRROFolder",
product_specific: true,
}
  1. I would suggest you to build your apk and sign it with google provided test keys which are present in /Android/Sdk/build-tools/34.0.0 and then push the apk to emulator and try enabling RRO. It will work. Or if you are trying to Use RRO in a OEM based emulator sign the apk with that specific OEM signature keys.

Upvotes: 0

Wonil
Wonil

Reputation: 6717

https://source.android.com/docs/automotive/hmi/car_ui/customize#configure-rros

this document explains how to use RRO for Car UI library. Did you check this document?

Upvotes: 0

Related Questions