Android Update Engine Analysis (20) Why is the differential package smaller than the full package, but the upgrade time is longer?

Insert image description here

This article is original by Guyongqiangx (guyongqiangx). Please indicate the source when reprinting.

Original link: https://blog.csdn.net/guyongqiangx/article/details/132343017

0. Introduction

From time to time, students ask questions about the upgrade speed in the OTA discussion group and VIP Q&A group. One of the typical questions is:

Why are differential packages smaller than full packages, but take longer to upgrade?

Compared with full packets of hundreds of M or even several G, differential packets are relatively small, sometimes as small as only a few M. Such small differential packets mean that they carry very little payload data and write very little data. It should take very little time. But why in reality, when the differential upgrade is performed, the differential package is very small, but the upgrade time is longer than that of a much larger full package upgrade.

A similar topic appeared in the VIP Q&A group some time ago. After several discussions, this issue was finally clarified. This article specifically explores this question and reveals the answer for you.

In this article, full upgrade is also called full package upgrade, and differential upgrade is also called incremental upgrade. therefore:

  • Full upgrade = whole package upgrade, full package = whole package
  • Incremental upgrade = differential upgrade, incremental package = differential package

This article is based on android-11 for demonstration, but it is also applicable to other Android versions that support A/B partition upgrade.

core code

Guess you like

Origin blog.csdn.net/guyongqiangx/article/details/132343017