You see this with some apps (I think ReVanced is a popular example?) and games occasionally, and I’ve never been clear on how they do it.