Recovery script customization (status 6 error occurs when the ZIP file is refreshed)

Source: Internet
Author: User

There was no time to look at the recovery flash contents. Yesterday, my hands were itchy and I had no flash brush for a long time.

However, I have read all the refresh kits on the hard disk, but I find that none of them are what I want, and many of the software in my custom refresh kits are outdated. After the refresh, I have to download updates one by one, it was troublesome to think about it, so I decided to create an extremely streamlined package + A software specialized brush package.

(This method is suitable for upgrading system software and installing your own software in batches)

 

It's easy to streamline the package. just delete the unwanted software.

 

Next we will define our own software specialized brush package. We recommend using the notepad ++ editing software, because there will be a file encoding problem that needs to be solved by this software.

The script is as follows:

PS: This script (only part of it is intercepted) is used to update a system software: Baidu input method and add its own software, in the data directory, I will introduce the script syntax N on the Internet. Here is a simple note: 1. mount ("partition format", "partition name", "partition mounted directory"); 2. package_extract_file ("source file", "target file"); 3. package_extract_dir ("Source directory", "target directory"); 4. set_perm (User ID, user group ID, File Permission, "target file"); 5. set_perm_recursive (User ID, user group ID, directory permission, File Permission In directory, directory); 6. delete_recursive ("directory to be deleted"); 7. unmount ("Mount directory of the partition to be detached "); ========================================================== ====================================== ===== After looking at the syntax in detail and writing it yourself, I found that the error E:/sdcard/....zip status 6 has occurred. The cause of this error is as follows: 1. an error occurred in the script syntax. Here, the error-prone columns are listed as follows: 1) Mount and unmount are spelled incorrectly. 2) the partition format of the Mount parameter is incorrect. 3) the name of the mounted partition is incorrect. userdata partitions are easily written as data partitions. 4) this is the most error-prone. 70% of the refresh errors occur because there is a space between multiple parameters in each syntax. Note that there must be no less space. For details, see: 2. the encoding format of the flash script is incorrect. This error is explained by the mother. The problem is solved using the software mentioned above: use this software to open the flash script, there is a solution in the lower right corner of notepad ++: Edit-convert file format-convert to Unix format, and save the NOTE: Some scripts are not encoded in ANSI format, you can convert the format to OK. Everything is ready !! After the script is written based on the files in the refresh folder, you can compress and package it into a zip file and refresh it to your mobile phone. (If the signature verification in your recovery is disabled, this upgrade package can be unsigned, directly package the package) boot verification, the software has been updated

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.