4

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>
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
dud3rino
  • 517
  • 4
  • 8
  • Hey @dud3rino, did you manage to find a solution? I'm having the same issue, that is, my overlay targeting `com.android.systemui` (SystemUI) doesn't want to work, whereas another overlay I have which overlays `android` (framework-res) just works fine. – Oliver Oct 06 '19 at 19:33
  • first you can check the running user using this adb cmd `adb shell am get-current-user` – Eslam Hussein Jul 21 '20 at 13:45
  • Did you manage to solve this issue? I am struggling as well when using the vanilla Android Q emulator (without Google Play so that I can get a writable system). I could push my overlay to /system/vendor/overlay, but it still doesn't appear in the list of overlays. – narko Nov 30 '20 at 14:04

2 Answers2

0

What you are meant to do is install the overlay into your /vendor/overlay folder, then run adb shell cmd overlay list. find your application id, and then run adb shell cmd overlay enable --user 0 application.id.here

Andrew Fluck
  • 11
  • 1
  • 4
  • The overlay is still not applied after following your instructions. – Oliver Oct 07 '19 at 14:11
  • It can also vary based on vendor, you may have to look where to put the overlay for your specific phone. – Andrew Fluck Oct 07 '19 at 22:26
  • Please read my comment to the original post to understand better: https://stackoverflow.com/questions/50348669/how-to-use-rro-framework-to-tune-system-app-custom-defined-colors/52359823?noredirect=1#comment102889897_50348669 – Oliver Oct 07 '19 at 23:28
0

When using a Q emulator, I found out that this would only work for me when pushing the overlay apk to /system/product/overlay instead of /system/vendor/overlay as described in the tutorial linked above.

For being able to push the apk to /system/product/overlay you will need a writable /system partition. This can be achieved by following the steps described here: https://stackoverflow.com/a/65076881/1898527

narko
  • 3,645
  • 1
  • 28
  • 33