I'm developing custom AOSP based ROM and I'd like to be able to change some system apps looks (colors and other resources) using RRO framework, by installing a standalone app in system/vendor/overlay
, rather than rebuilding the whole system app.
I started with SystemUI app, trying to change the quick settings panel background, as well as other elements, for which I defined custom colors in frameworks/base/packages/SystemUI/res/values/colors.xml
.
I'm following this tutorial. I'm building AOSP for Pixel device (sailfish), branch android-8.1.0_r28
specifically.
The problem is, that this doesn't work when I install my overlay app in the system/vendor/overlay
of the Pixel device - neither the overridden system_primary_color
, nor any other colors, that I have defined, build, and installed along with the SystemUI app in system/priv-app/
(I'm rebooting the device each time to take effects).
I observed, that there are already apps in the vendor/overlay/
dir: Pixel and SysuiDarkTheme. I'm not sure how these are applied and if they are interfering with what I'm trying to do, but looks like the RRO framework is there and working for other system overlay apps.
This is the AndroidManifest.xml of my overlay app:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="my.sample.package">
<application android:label="Overlay App" />
<overlay android:targetPackage="com.android.systemui"
android:priority="1"/>
</manifest>
This is the res/values/colors_overridden.xml of my overlay app:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Colors overriding Android's SystemUI -->
<color name="system_primary_color">#FFBF360C</color>
<color name="keyguard_bouncer_background">#55FF0000</color>
</resources>