Techniques are described herein for adopting a substring list creation and extraction mechanism as well as a variable-length patch mechanism to generate an Over-The-Air (OTA) image path file having a small size. This saves network resources and reduces side effects on data transmission / network service when executing image / firmware upgrading. As a result, OTA updating can be sped up, and the peak network traffic during the firmware updating may be narrowed