One of the many tools in the toolbox of the Android phone developer is that of downloading OTAs. An OTA is an Over The Air zip file that contains an update for your Android phone. This zip file will have a lot of very useful information and files in it, which you can use to develop custom roms for the phone. If you can get ahold of one, it can also serve as a great backup to your system, provided that you have the stock boot image/recovery image, so you can flash back to this OTA you downloaded.
NOTE: Not all OTA’s are created equal. Sometimes they are small and only include a few files, not the whole system, and don’t make a very useful download because you cannot use them as a backup or pull enough information to create a custom rom. However, if you plan to use it for that purpose, try to grab one that updates the Android version of your phone.
The downside to grabbing these OTA updates is that your phone may not have any, or after accepting one, it may be a long, long time before another OTA update. Either way, here is how I grabbed one for the CAT S42G.
It was brand new in the box, and I already knew that it would come with Android 10 preinstalled. I also knew that there would be an OTA update waiting for it, which was a system update to Android 12. I knew this because I owned one before opening this one. Another way you might know this is by looking up the phone online, such as GSM arena. If it says that it came with Android 10, but is upgrade-able to Android 12, you can be pretty sure that what you open in the box is the original software, and that it will eventually take an OTA to update to Android 12. I say eventually because sometimes they take them in series, as incremental ones, and sometimes they just go to the latest one. It depends on the company and carrier mods, etc.
Turning on the phone, go through the setup, without a sim card, and don’t connect to the WiFi, so that the phone has no internet connection.
Then, go to settings, and enable developer mode by clicking rapidly on the build number until it says you have enabled developer mode.
Go to the developer mode, and turn on ADB (Android debugging), and connect the phone to your computer.
On the computer, open a terminal (I use Linux), and start a logcat like so:
$ adb logcat |tee ota.txt
You may need to accept on the phone touch screen, depending on your brand and settings. This starts pulling a log of everything the phone is doing and displaying it to you in the terminal, as well as writing it down in a file called ota.txt.
On the phone, enable the WiFi, connect to a network, and go to the settings and check for an update. Since there was an update in my case, it says the update information and started downloading it.
At this point, I turned off the WiFi to prevent the full download of the OTA update. On the computer terminal, I pressed control-c, to stop the logcat from logging.
Now I reviewed the large text file by grepping the information I was looking for:
$ cat ota.txt |grep zip
This showed me every line in the file with the word zip in it. There were roughly 50 lines that met this criteria, some of which were useless, like this one:
11-14 12:20:42.538 10007 10037 I FirebaseCrashApiImpl: FirebaseCrashApiImpl created by ClassLoader dalvik.system.DelegateLastClassLoader[DexPathList[[zip file “/data/user_de/0/com.google.android.gms/app_chimera/m/00000004/DynamiteModulesC.apk”],nativeLibraryDirectories=[/data/user_de/0/com.google.android.gms/app_chimera/m/00000004/DynamiteModulesC.apk!/lib/armeabi-v7a, /data/user_de/0/com.google.android.gms/app_chimera/m/00000004/DynamiteModulesC.apk!/lib/armeabi, /system/lib, /product/lib]]]
But, as I scroll through there, I found this one:
11-14 12:20:40.767 2559 2961 I SystemUpdate: [Control,InstallationControl] Update URL changed from “” to “https://ota.googlezip.net/packages/ota-api/package/cf1f7c3fa1596c87f045cee1508823c98667fa06.zip”.
Sometimes, you can type your command like this:
$ cat ota.txt |grep zip |grep http
To only get lines with both the word zip and http in them, which makes an even shorter list, usually only 4 or 5, typically. Looking at the line with the OTA update in it, I could use the computer to download just the OTA itself:
$ wget https://ota.googlezip.net/packages/ota-api/package/cf1f7c3fa1596c87f045cee1508823c98667fa06.zip
–2023-11-14 08:25:01– https://ota.googlezip.net/packages/ota-api/package/cf1f7c3fa1596c87f045cee1508823c98667fa06.zip
Resolving ota.googlezip.net (ota.googlezip.net)… 2001:4860:4802:32::70, 216.239.32.112
Connecting to ota.googlezip.net (ota.googlezip.net)|2001:4860:4802:32::70|:443… connected.
HTTP request sent, awaiting response… 302 Found
Location: https://ota-cache1.googlezip.net/packages/data/ota-api/package/cf1f7c3fa1596c87f045cee1508823c98667fa06.zip?always_serve=yes&baany=all&ipbypass=yes&mm=49&ms=aya [following]
–2023-11-14 08:25:02– https://ota-cache1.googlezip.net/packages/data/ota-api/package/cf1f7c3fa1596c87f045cee1508823c98667fa06.zip?always_serve=yes&baany=all&ipbypass=yes&mm=49&ms=aya
Resolving ota-cache1.googlezip.net (ota-cache1.googlezip.net)… 2001:4860:3::4, 209.85.137.4
Connecting to ota-cache1.googlezip.net (ota-cache1.googlezip.net)|2001:4860:3::4|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 1406052757 (1.3G) [application/octet-stream]
Saving to: ‘cf1f7c3fa1596c87f045cee1508823c98667fa06.zip’
cf1f7c3fa1596c87f04 100%[===================>] 1.31G 1.06MB/s in 12m 19s
2023-11-14 08:37:22 (1.81 MB/s) – ‘cf1f7c3fa1596c87f045cee1508823c98667fa06.zip’ saved [1406052757/1406052757]
alaskalinuxuser@alaskalinuxuser-CF-52NKE102M:~/Documents/phones/catS42g$
Now you have an OTA zip file that you can work with! You may wonder what to do with it, well, you could try using adb sideload to fix another phone that you dorked up while messing around, or you can use tools like dumpyara. Other options are unzipping it and breaking down the payload.bin file to get what you need.