[Honor 5X Guides, News, & Discussion] E:V:A:
It seem that there is a lot of confusion about how to update your phone with

the "OTA"s provided in the Stock firmware threads and from Huawei's own

support websites.

Rant Warning:

ALL Huawei Support website are totally useless to find any FW updates for any of their devices you have. They only ever show a few and most of the time none.

Once you do find FW (from another source like XDA) the accompanying "changelog.xml" file doesn't tell you anything about what the update is actually doing. They also don't tell you anything about any applied security patches. In addition it often tell you different things depending on the language you're reading. JFC!!​

[EOR]

One problem is that we keep on using the term OTA for something that is essentially always

an OTA. Instead what we call it, should depend on what it is doing. What can it be doing?

1. A full factory update, that can wipe all, usually using the "dload" bootloader folder. Using /dload/UPDATE.APP of your SD-card.

2. A partial update that uses an Edify installation script in:

/META-INF/com/google/android/updater-script

but also has a one or more SOMETHING.APP in it. These are all coming in the form of an update.zip.

How to Manually update from update.zip?

0. Do not try to flash update.zip with TWRP/CWM, only use Stock Recovery.
1. Dial: *#*#2846579#*#*
2. Choose option called "Software Upgrade" and then "SDCard Upgrade" and confirm with OK.

1. Go to: Settings > Updater > "New version" > Quick Download
2. When you see the progress bar starting after a few %, hit "Pause".
3. Now open the File browser and got to the "Local" tab.
4. Navigate to the file: "Internal Storage" > "HwOUC"
5. You will see another folder with a 5-digit number, XXXXX.

This is the actual "v" number used in the URL query to fetch the OTA.
It simply corresponds to the XXXXX in:
http://update.hicloud.com:8180/TDS/data/files/p3/s15/G79/g0/vXXXXX/f1/full/update.zip

6. Save time (and your data-plan) by manually downloading this file. (You should get ~10 MB/s on a good day.)
7. Inside the XXXXX folder, you will find a file called "update.zip".
Now you need to replace that file with your recently downloaded one.
8. Used adb to tranfer the file to your device

wget --show-progress -d http://update.hicloud.com:8180/TDS/data/files/p3/s15/G79/g0/vXXXXX/f1/full/update.zip -O XXXXX.zip
adb devices
adb shell rm -fr /sdcard/HwOUC/*
adb shell mkdir /sdcard/HwOUC/XXXXX
adb push XXXXX.zip /sdcard/HwOUC/XXXXX/update.zip
# Note: speed is ~7 MB/s, so a 1.4GB OTA will take about 200 sec to transfer.

9. Enable WiFi or Mobile Data again, then hit "Resume" in the Updater.
10. The progress bar will instantly hit 100% and you will be asked to
restart right away or wait until later.
(You only have 15 seconds to decide!)
11. Your phone will reboot a few times to optimize (!?) the system.

Thanks to @shashank1320 useful but hard to read post.

Other very useful things to know about Huawei's updates.

Let's look at the last part (the file) of the Huawei update URL.

http://update..././././././././vXXXXX/f1/full/update.zip

1. To get a list of files in, and the MD5 of the OTA, use "filelist.xml".

2. To get the changelog of the OTA, use: "changelog.xml".

3. To get the "precheck-script" that does the "apply_patch_check" for

each file, use: "precheck-script". Not all updates has this.​

Question: Where the fcuk is the latest update?

Answer:

Quoting THIS article on how updates are pushed.

.

Question: WTF does that OTA do?

Answer:

If the OTA is not a UPDATE.APP, but an update.zip, then simply extract it,

and navigate to: /META-INF/com/google/android/ and open the updater-script.

For example, this line:

# v80166
assert(file_getprop("/system/build.prop", "ro.build.fingerprint") == "HONOR/KIW-L21/HNKIW-Q:5.1.1/HONORKIW-L21/C432B140:user/release-keys" ||
file_getprop("/system/build.prop", "ro.build.fingerprint") == "Android/msm8916_64/msm8916_64:6.0.1/MMB28B/d0090306503211916:user/test-keys");

tell you that you will not be able to use this (v80166) update, unless

your ro.build.fingerprint matches any of the shown strings. Clearly,

this FULL OTA was meant as an update to KIW-L21C432B140 build only.

​

New Proposal

I propose to start using the following terminology instead of just "OTA".

- DLOAD for anything that is factory reset and bootloader flashable, with no previous dependencies. (Everything that uses /dload/UPDATE.APP.)

- PATCH for anything incremental, that depend on some previous or particular state of the phone FW.

- FULL for any update that can be used to skip all previous PATCH's within the same Build (B-number). Like a cumulative update.

Let's call this "type".

In addition we should try standardize our OTA file-naming scheme. Since the current method make it

nearly impossible to distinguish between various OTA patches, we should use something like this:

<"model">_<v-number>_<type>_<build_ref>.zip
# For Example:
KIW-L21C432_v80166_FULL_C432B370CUSTC432D002.zip

And the file description should also say something about what the update does, since Huawei's changelog does not.

Something like:

Where "ASPL" is referring to the resulting Android Security Patch Level date.

Finally, if someone can also squeeze in what exact security patches has been applied that would be huge!

​

Anyway, just some ideas I throw together to try to clear up this firmware nightmare.

(And yeah , this is not meant for you kernel devs!)