Earlier quoted context omitted.
What you probably want is this combined with some privilege escalation technique. If you feel like doing the work, have at it.[1] 1: https://www.cvedetails.com/vendor/1224/Google.html
If I already had a working privilege escalation strategy, wouldn't I just be able to run that from a terminal emulator program on the phone? Or using an adb shell? My problem is exactly that there is no privilege escalation vulnerability in my version of the OS (that I know of)
https://github.com/dirtycow/dirtycow.github.io/wiki/Vulnerab...