I was following some tutorials on how to create custom Runtime Resource Overlay (RRO) APKs, but I am not able to enable mine.
adb shell cmd overlay list
...
com.example.mytarget
--- com.example.myoverlay
Google said that ---
mean that it is installed, but has errors and can’t be enabled.
adb shell cmd overlay dump com.example.myoverlay
com.example.myoverlay:0 {
mPackageName...........: com.example.myoverlay
mOverlayName...........: null
mUserId................: 0
mTargetPackageName.....: com.example.mytarget
mTargetOverlayableName.: null
mBaseCodePath..........: /system/product/overlay/myoverlays.apk
mState.................: STATE_MISSING_TARGET
mIsEnabled.............: true
mIsMutable.............: true
mPriority..............: 2147483647
mCategory..............: null
mIsFabricated..........: false
}
IDMAP OF com.example.myoverlay
<missing idmap>
The documentation said that
mState.................: STATE_MISSING_TARGET
means that "Your target is not installed". This sounds kind of like a loop and I don’t know what I should do.
The code:
Tree:
└── MyOverlays
├── AndroidManifest.xml
└── res
└── xml
└── overlays.xml
AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="https://schemas.android.com/apk/res/android"
package="com.android.systemui">
<application android:hasCode="false" />
<overlay android:targetPackage="com.android.systemui"
android:targetName="res.values.colors.xml"
android:resourcesMap="@xml/overlays"
android:priority="1"/>
</manifest>
overlays.xml:
<overlay xmlns:android="http://schemas.android.com/apk/res/android" >
<item target="color/global_actions_lite_background" value="#FFBF360C" />
<item target="color/notification_primary_text_color" value="#55FF0000" />
</overlay>
And followed this guide to build it: https://github.com/MartinStyk/Android-RRO
Android : 12.1
Device : Sony Xperia 1
ROM : LineageOs