Incremental Binary Patching via Sector Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional binary patching methods require substantial memory space, which is often unavailable in memory-scarce environments like mobile electronic devices, and result in larger patches due to cyclic dependencies when overwriting old sections of the image.
Innovation Solution
Generating incremental patches as a series of delta files or sector-specific patches, where each patch is applied incrementally, taking into account changes made by previous patches, and prioritizing sectors that contribute least to the new image to minimize data loss and patch size.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If conventional patching method is used to create backup and generate new image, then complete patching can be achieved, but substantial memory space is required
Solution Approach 1:
The binary image is divided into multiple sectors, and patching is performed sector by sector in an incremental manner. This segmentation allows the system to patch the image in smaller chunks without requiring substantial memory space for backup, as each sector is patched independently and sequentially.
Solution Approach 2:
The patching process performs preliminary actions by first identifying which sectors can be copied from the old image and which require insertion, then executes the copy operations before insertion operations. This preliminary copying maximizes data reuse and minimizes the amount of data that needs to be stored during patching.
2Quantity of substance
If incremental overwriting is used to conserve memory space, then memory requirements are reduced, but patch size increases due to reduced data availability for copying
Solution Approach 1:
The system performs preliminary analysis to identify all sectors that can be copied from the old image before any overwriting occurs. By determining the copy operations in advance, the system maximizes the use of existing data and minimizes the amount of new data that must be inserted, thereby reducing patch size even though memory is constrained.
Solution Approach 2:
The system changes the parameter of data reuse by carefully selecting which sectors to copy and which to insert, optimizing the balance between memory constraints and patch size. This involves analyzing sector dependencies and determining the optimal set of copy operations that can be performed with limited memory availability.
3Quantity of substance
If sectors are overwritten incrementally during patching, then memory space is conserved, but cyclic dependencies arise reducing data reuse
Solution Approach 1:
The system performs preliminary analysis to identify all copy operations that can be performed before any overwriting occurs. By determining the complete set of copy operations in advance, the system avoids cyclic dependencies where a sector needs to be copied from another sector that will be overwritten later, thereby simplifying the patch structure while still conserving memory space.
Data Source
AI summary
An incremental patch is generated as a set of delta files or sector-specific patches, intended to be applied incrementally to an old binary image. Each sector-sized patch takes into account changes to the binary image made by previous patches in the series, such that cyclic dependencies are eliminated. The sector-sized patches are generated by applying a binary difference algorithm to the then-current partially patched image, until each sector has a corresponding delta file. The order for patching sectors may be determined by selecting sectors for patching based on first overwriting those sectors making the least contribution of data to generation of the new binary image.


