I want to have the implementation of some methods of Android SDK's Resources class, such as getString() use my own implementation.
I can't create my own overridden/proxy version of Resources as I get the instance from Context#getResources. I think that I need to have what Byte Buddy calls as "type rebasing" in its tutorial.
Is this possible in Android? If yes, am I supposed to use the Byte Buddy Gradle plugin for Android to achieve that?
You cannot instrument classes within Android's core libraries. You can only instrument your own classes that call into Android by using
MemberSubstitution.