Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Appendix A, work with RROs
Stay organized with collections
Save and categorize content based on your preferences.
Runtime resource overlays (RROs) can either be pushed to the /vendor/overlays
folder (which is automatically read during boot) or can be installed by running
adb install
.
The latter allows faster iteration. However, this can cause the same RRO to reside in two
locations (/vendor/overlays
and /data/app
).
For pushing and rebooting, run:
$ adb root
$ adb remount
$ adb shell mkdir /vendor/overlay/<overlay-name>
$ adb push <path-to-overlay.apk-file> /vendor/overlay/<overlay-name>
$ adb reboot
For installation, run:
$ adb install <path-to-overlay.apk-file>
To confirm the RRO is available, run:
$ adb shell cmd overlay list --user current
android
[ ] com.android.sample_rro
com.android.sample.targetapp
[ ] com.android.sample.targetapp_rro
When ---
is displayed next to the newly installed RRO, this indicates that the
target APK was either not found (double-check the targetPackage
declaration on your
AndroidManifest.xml
) or some of the resources defined in the RRO don't match any
resources in the target.
Enable and disable RROs
To enable or disable a RRO, respectively, run the desired command:
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-08-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-26 UTC."],[],[],null,["# Appendix A, work with RROs\n\nRuntime resource overlays (RROs) can either be pushed to the `/vendor/overlays`\nfolder (which is automatically read during boot) or can be installed by running\n`adb install`.\nThe latter allows faster iteration. However, this can cause the same RRO to reside in two\nlocations (`/vendor/overlays` and `/data/app`).\n\nFor pushing and rebooting, run: \n\n```bash\n$ adb root\n$ adb remount\n$ adb shell mkdir /vendor/overlay/\u003coverlay-name\u003e\n$ adb push \u003cpath-to-overlay.apk-file\u003e /vendor/overlay/\u003coverlay-name\u003e\n$ adb reboot\n```\n\n\nFor installation, run: \n\n```bash\n$ adb install \u003cpath-to-overlay.apk-file\u003e\n```\n\n\nTo confirm the RRO is available, run: \n\n```bash\n$ adb shell cmd overlay list --user current\n android\n [ ] com.android.sample_rro\n com.android.sample.targetapp\n [ ] com.android.sample.targetapp_rro\n```\n\n\nWhen `---` is displayed next to the newly installed RRO, this indicates that the\ntarget APK was either not found (double-check the `targetPackage` declaration on your\n`AndroidManifest.xml`) or some of the resources defined in the RRO don't match any\nresources in the target.\n\nEnable and disable RROs\n-----------------------\n\n\nTo enable or disable a RRO, respectively, run the desired command:\n\n- Enable: \n\n `adb shell cmd overlay enable --user current \u003crro-package-name\u003e`\n\n- Disable: \n\n `adb shell cmd overlay disable --user current \u003crro-package-name\u003e`"]]