{"id":24216689,"url":"https://github.com/martinstyk/android-rro","last_synced_at":"2025-06-30T21:38:47.322Z","repository":{"id":92845651,"uuid":"465663764","full_name":"MartinStyk/Android-RRO","owner":"MartinStyk","description":"Sample app and runtime resource overlay for android 31","archived":false,"fork":false,"pushed_at":"2022-03-03T14:31:50.000Z","size":3115,"stargazers_count":6,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T20:12:39.879Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MartinStyk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-03T10:03:19.000Z","updated_at":"2025-01-29T14:54:29.000Z","dependencies_parsed_at":"2023-04-26T10:17:25.571Z","dependency_job_id":null,"html_url":"https://github.com/MartinStyk/Android-RRO","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MartinStyk/Android-RRO","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartinStyk%2FAndroid-RRO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartinStyk%2FAndroid-RRO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartinStyk%2FAndroid-RRO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartinStyk%2FAndroid-RRO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MartinStyk","download_url":"https://codeload.github.com/MartinStyk/Android-RRO/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartinStyk%2FAndroid-RRO/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262855258,"owners_count":23375304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-14T04:33:19.555Z","updated_at":"2025-06-30T21:38:47.313Z","avatar_url":"https://github.com/MartinStyk.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Android-RRO\nSample app and runtime resource overlay for android 31\n\n## Use case\nInstall standard app (without elevated system permissions) and change it's resources using separate RRO APK (with elevated root permission). \nInstall and activate RRO in Android OS runtime, without messing with build time static RROs. There is no need to change anything in Android OS, you can do it with standard system image (without Google play) on emulator\n\n## How to\n### Prepare emulator\n* Create an AVD virtual device with Android 31 target image. Choose a version without Google Play, otherwise you will not be able to grant root permissions\n* Run emulator from command line: ``emulator -avd {EMU_NAME} -writable-system``, for example ``emulator -avd Pixel_5_API_31 -writable-system``\n\n### Install Target App\n* Build an app from MyTarget directory\n* Install it on your device, the same way you always do\n\n### Build overlay\n* Open MyOverlay directory\n* Let's build an overlay APK \n```\naapt2 compile -v --dir res/ -o Overlay.flata\n\naapt2 link -v --no-resource-removal \\\n-I ~/AppData/Local/Android/Sdk/platforms/android-31/android.jar \\\n--manifest AndroidManifest.xml \\\n-o myoverlays.apk.u Overlay.flata\n```\n* We have unaligned apk file ``myoverlays.apk.u``, let's align it using \n```\nzipalign 4 myoverlays.apk.u myoverlays.apk\n```\n* Finally, we need to sign our APK, I use standard debug certificate\n```\nprintf 'android' | jarsigner -keystore ~/.android/debug.keystore  myoverlays.apk androiddebugkey \n```\n### Install overlay\n* Overlays are placed in system directories, and we need root permission to di it\n* We will be placing our overlay to `/product/overlay` folder\n* Prepare target file system, run \n```\nadb root\nadb remount\nadb shell remount\n```\n* Copy overlay using \n```\nadb push myoverlays.apk product/overlay\n```\n\n\u003e Note: use `buildOverlay.sh` script to automate steps from Build and install overlay section \n\n### Enable overlay\n* After overlay install/reinstall you need to reboot your device\n```\nadb reboot\n```\n* Verify your overlay is installed, you should see mappings defined by overlay and it's status. Run\n```\nadb root\nadb shell cmd overlay dump com.example.myoverlay\n```\n* Overlay is not enabled by default, enable it using\n```\nadb shell cmd overlay enable --user current com.example.myoverlay\n\n```\n* You should see changes in your application\n\n\u003e Note: use `setupOverlay.sh` script to automate steps from enable overlay section \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinstyk%2Fandroid-rro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartinstyk%2Fandroid-rro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinstyk%2Fandroid-rro/lists"}