Not really a solution to your specific case but if you're using an old version of android and the Linux kernel you can look at known vulnerabilities and build through them if you're skilled enough. I also remember some people had gained root access on Sony phones for getting drm keys before unlocking their bootloader - because of a known Linux kernel exploit - you can try searching on XDA for that. Though be careful, because worst case you have a very fancy paper/deskweight.