@Tor I have a question related to the same topic.
I am working on a custom lint detector to find unused string resources for specific use cases and am trying to use most of the code from UnusedResourceDetector.
What I see is the unused resource detector does not scan for resources that are used in the layout files, preferences xml or any other xml file. At least thats what seems after scanning the code.
I went on to write and run a unit test and it fails to detect the string resource used in the layout xml. But when I run ./gradlew lintDebug on the project it works fine and scans all the xml's to tag the resources as used. I have attached a file with my unit test and the error message at the bottom for your reference. Not sure if there is any plugin to scan and mark the resources.