If we want to get the update without a stock rom, we should know how the update engine get the URL of the OTA update. I’ll show how to MITM (man in the middle) the update engine.
Stock rooted rom
First, we need a stock rooted rom.
Install stock rom with the flashable zip
Flash TWRP
Flash magisk
Erase userdata
In bootloader : fastboot -w
Proxy and system certificate
Launch burp on your computer and listen on your LAN
Boot without any SIM card, skip as much as possible steps, just enter a PIN.
Enable developper mode, adb and disable automatic system update
Install magisk manager with adb adb install magisk/MagiskManager-v7.5.1.apk
Well, I managed to have the url without the phone. But I used the same cookie and the exact same gzip POST data. (and I didn’t look deeply in what is in it)
Edit : the cookie is … useless
Edit2 : I am trying to get an OTA URL for a different build. But it doesn’t work for the moment. I have to wait to have the stock 0110 (or another version). If someone want to try and have a different version, please send me the gzipped post data
Edit3 : I’ll upload the script if it works for the next update. Script uploaded. We just have to try if it works with the next update
Is the blob the checkin process sends by any change the crazy structure described in this blog?
I am actually not sure, but if it is, then you’d have to reverse engineer and recreate one of the best protected parts of proprietary interfaces google put into their closed gapps. in order to have your phone pretend to google that it’s a different phone.
Actually, the same request always give the OTA URL. If it works with the next update we don’t really care what’s inside (we’ll do diff from A0105)
edit : And I think the “important” part at the end is encrypted with the public key mentioned before. If I use my own public key, I’ll be able to see what’s inside. I just don’t really care if the same request always works (we don’t need full update thanks to your payload_dumper ! )
well, one hope is that someone will post it here in the forum in acceptable time
one option that might work is to have LOS or whatever you like in slot A, and flash the latest stock into slot B, then boot up slot B once just to find out the update URL, then reboot into A and download on the PC.
issues might be that slot B might not actually boot unless you erase userdata first - I had that problem in the past when trying a stock downgrade, it wouldn’t boot unless i forced a factory reset first.
the script will stop working after some time because some cookies/session IDs encrypted in it run out
the script will continue working but only ever give you the same next version, not a delta update across 2 or more firmware versions
the script will give an updated URL allowing to “jump over” the next firmware to the latest
the same as 3, but only once or twice, then get stuck as in 2 requiring to run the updates one-after-the-other (and boot the new system to get the next updates URL)
we saw 2 “jump over the fox” updates so far, but at least one of them involved an update that was pulled back after a single week
only time will tell
actually, you could try to downgrade to A.0101 and see if you get a skipover URL
It would seem, that the request is using googles play API.
It would be interesting to know if it finds updates, without having a google account on the phone.
Here is a python-implementation of the play-api:
It would likely require some modifications to work for requesting the OTA-URL.