As far as I know, RAW is the unprocessed data read directly from the image sensor. I.e., simply the numerical values of voltage generated by light striking each photo pixel. The only processing done by the phone up to this point is the conversion from analog (voltage) to a number (digital). It does not include the conversion of that data into colorful .jpgs. That is the "secret sauce" unique between all camera/phone makers and once "baked in," is irreversible.
Now RAW file formats, the way those numbers are arranged and stored in a file (like ProRAW), vary from company to company (Canon vs Nikon vs Apple...). I'm not totally sure, but I assume apps like Lightroom get direct access to the camera's raw data pipeline since is worked with older iphones without ProRAW capability.