To update only a portion of the phone, instead of directly replacing files in the system, or if you want to apply an app installation, you can implement these requirements in recovery mode by swiping in the Update.zip package.
The resulting update package is not only much smaller than the full brush package, but also makes it easier to modify the files or applications on your phone.
The composition of the 0x01 update package
Update.zip consists of two folders, the Meta-inf folder and the System folder.
The Meta-inf folder contains three signed files, as well as a brush script update-script and update-binary files extracted from the official ROM.
The system folder contains the app folder, or the Framework folder. When you need to swipe into the system app, place the application in the system/app/directory, or in the system/framework/directory when updating the Core.odex file or Core.jar file.
Each time the update package is modified, it needs to be re-signed, and the associated three signature files will be changed accordingly.
0x2 Brush Machine Script File Modification considerations
Since only some of the files in the system are updated, the statements formatted for the system partition in the full brush machine script are deleted, the statements that mount the system partition are retained, and the statements that release the system directory files in the brush package to the phone/system directory are released:
Format ("Ext4", "EMMC", "/dev/block/mmcblk0p43", "0");
Mount ("Ext4", "EMMC", "/dev/block/mmcblk0p43", "/system");
Package_extract_dir ("System", "/system");
At the same time, the statement that updates the kernel image file Boot.img is removed:
ASSERT (Package_extract_file ("boot.img", "/tmp/boot.img"),
Write_raw_image ("/tmp/boot.img", "/dev/block/mmcblk0p40"),
Delete ("/tmp/boot.img"));
The rest of the content basically did not modify. It is important to note that if you delete statements that have related permission settings such as Set_perm or set_perm_recursive, you may cause exceptions to the system-related features, so it is recommended that you do not remove them.
Re-signing and brushing of 0x3 brush package
After placing the file in the appropriate directory on the system, as required, such as:
Or
Use Apksign or other tools to brush the brush machine package. If the phone recovery mode in the SDcard and general use of different, it is recommended in recovery mode and then push the brush in the package.
Procedures for updating system files using the update package