There are two types of Flash brush: wire brush and card brush. The so-called "wire brush" is to use the Odin flash brush program to flash the machine in the download mode (commonly known as "coal mining") of the mobile phone. And"Card swipe"Is to flash the machine in the recovery (recovery) mode of the mobile phone. In this lecture, I will introduce the second method: "card brush" or "CWM brush. There are few tutorials on "card swiping" in the Forum, most of which are provided in a specific Rom. You may think that the "card swipe" method is relatively simple, and it is not worth writing a special tutorial. In fact, it is still necessary for new users to write a detailed tutorial for reference by machine friends.
"Card swipe" or "CWM": Use the clockworkmod program installed on your mobile phone to flash in recovery mode. Click it to refresh the zip package of a single signature. There is a script in the refresh box, which contains a series of commands to specify the partitions of the phone that copy different files, so as to achieve the goal of refreshing the machine. It is generally considered that card swiping is relatively safe and only involves a single flash file. It is suitable for new users to flash the machine.
The Rom publisher usually releases a rom patch to upgrade the Rom. Therefore, it is necessary to Master Card swiping so that you can update and appreciate the new features of RoM in a timely manner. At the same time, the two methods are complementary.
Card swiping is used in the following situations:
1) The clockworkmod program has been installed on the mobile phone.
2) the mobile phone can enter the recovery mode
3) Of course, your refresh package is a zip card refresh package.
Card swiping can be used in the following scenarios:
1) Complete Rom refresh
2) patch or upgrade package for Rom Flushing
3) brush the kernel or baseband
4) Click special content
For the convenience of the description, the above content to be refreshed is collectively referred to as "refresh ". The following describes the process and steps of fl 2.3.4 xxjvp in Chinese. The package name is jvp2.3.4_sunnyok_cn-2.zip ".
Installation steps:
1. Copy the QR code to the SD card of your mobile phone.
Connect your phone to your computer using a USB data cable, and choose "Large Storage" from "Settings"-"USB Settings ". After successful connection, copy the brush package jvp2.3.4_sunnyok_cn-2.zip to the root directory of the SD card. Then, remove the USB data cable from your phone.
If your mobile phone has an internal card (sdcard), copy the swipe card directly to the internal card. I897 has 13 Gb internal cards for use. Of course, you can also use an external card.
2. The mobile phone enters the recovery mode.
There are multiple ways to enter the recovery mode:
1) Shut Down, press "volume up + down" and "Power Switch". After the screen is lit, release the button and enter the "recovery" mode.
2) run the ADB command:
Install the ADB tool package on the computer (see the attachment adb-tools.rar)
Start the phone, go to "Settings"-"application"-"development" and select "USB debugging"
Connect your phone to your computer using a USB cable
Enter ADB reboot recovery in the DOS window
Enter the recovery mode
Remove USB data cable
3) Some Rom already provides the recovery function. For example, the "restart tool" application is provided in the large ROM of Li. In addition, Rom adds the recovery option to the "shutdown" menu of the topic file. Also, Rom has the recovery operation option in "Advanced Settings.
4) Other methods for entering the recovery mode
3. fl
1) after entering the recovery mode, you will see the following interface:
Select "Install zip from sdcard" with the volume up/down key ". See the red box. Then press the power key to confirm.
2) Go to the next page:
Use the volume up/down key to select "choose zip from sdcard ". See the red box. Then press the power key to confirm.
3) Go to the next page:
In this interface, you can see all the directories and files under the root directory on your SD card. Note: in step 1, we copied the brush package file jvp2.3.4_sunnyok_cn-2.zip to the root directory of the SD card. So now you should see the file name. See the red box section.
Choose "jvp2.3.4_sunnyok_cn-2.zip" from the upper and lower voices ". See the red box. Then press the power key to confirm.
4) Go to the next page:
Select "yes-install JVP2.3.4_SunnyOK_CN-2.zip" with the volume up/down key to confirm that this file is flushed. See the red box. Then press the power key to confirm.
5) Go to the next page. Start flashing. You will see the following progress information and green progress bar.
6) It takes about one minute to finish the flash and return to the recovery mode. The following images are displayed in the lower half of the screen. "Install from sdcard complete." indicates that the installation of the SD card is complete.
The following information appears in the upper half of the screen. This is the same as the second interface. Now select "++ go back ++" to return to the previous (first) Recovery interface. Press the power key to confirm.
7) enter the main interface.
Now you can come to wipe. Use the volume up/down key to select "Wipe data/factory reset" to clear user data, and press the power key to confirm. Use the volume up/down key to select "Wipe cache partition" to clear the cache partition data, and press the power key to confirm.
8) press the volume up/down key and select "reboot system now" to restart the phone.
9) The flash is over.
Note:
1) Let's talk about it again. Back up your data before refreshing the machine, and the battery is fully charged.
2) It is helpful to study the content in the ROM before flashing the machine. Open the ZIP file and check the file. Be aware of this.
3) What should I do if I fail to brush the machine? It doesn't matter! Refresh in recovery mode.
4) In case of a flash failure, you need to "dig coal" to "wire brush. Please refer to the flash method in [lecture 1. Therefore, you must learn to use the Odin program.
5) You must have installed clockworkmod on your mobile phone. This depends on the kernel of the last flash machine. The CWM program is also available in the Forum, but it is only applicable to a Rom. It is not recommended here.
6) The recovery (2E and 3e) function of the official Rom is limited and cannot be flushed. If your base package is an official Rom, you may need to first brush a required ROM for the base package or a specified kernel to get clockworkmod. Generally, Rom publishers have clear requirements for this in the brush guide.
7) about how to clear the previous user data and cache data:
A) if the Rom is flushed, it is recommended that the dual-wipe be flushed.
B) if it is a special patch, you do not need to brush the wipe.
C) if the upgrade package is flushed, wipe is usually required.
D) if the kernel or baseband is flushed, do not use wipe.
8) Sometimes the machine cannot be turned on after the brush, and you can try to clear the previous user data and cache data through dual-wipe. Many strange phenomena after flashing are related to the absence of wipe.
9) Some update packages are named update.zip. You can directly select "Apply update from sdcard" on the first interface to flash the machine.
10) to facilitate file management, the above-mentioned fl can also be placed in a subdirectory under the root directory. However, if you use "Apply update from sdcard" to refresh the machine with update.zip, you can only put it under the root directory.
I897 flash brush tutorial (card or CWM flash ):Course of instruction (card or cwm ).pdf)(480
KB)
ADB Toolkit:ADB-Tools.rar(349.66
KB)
How to Create a flash brush patch and a CWM Flash ROM
In the first and second lectures, we have introduced two Methods: Using the Odin Flash program to brush tar and wire in the "coal mining" mode and in the recovery (recovery) mode) in this mode, click "Zip" or "card swipe ). In the fifth lecture, I will teach you how to create or customize the Odin Rom (TAR package ). In this lecture, we will introduce the method of making Card swipe.
As mentioned at the beginning of the second lecture, "card swipe" or "CWM" is to use the clockworkmod program installed in the mobile phone to flash in recovery mode. Click it to refresh the zip package of a single signature. There is a script file in the refresh box, which contains a series of commands to specify the partitions of the phone that copy different file content, so as to achieve the goal of refreshing the machine. So how can we prepare the zip image? What is the script file?
The content of this lecture includes two parts:
1. Create a flash patch
2. Create a complete Rom
Generally, both are called "refresh. In this article, we say that "Flash patching" refers to the supplementary content of Rom. For example, you can use an English base package to fl Chinese files, replace a font, or replace a topic or desktop. They do not constitute all files that can run on mobile phones. They are only part of the Rom. Previously, update.zip is often used for propagation. When we say "Full Rom", we refer to an independent and complete Rom, which contains all the necessary elements for a rom.
1. Create a flash patch
We all know that Rom publishers usually release flash patching to upgrade Rom. After the Rom is released, you do not need to reinstall the entire ROM when you need to add, refresh, or change the ROM content or function. You just need to write the part to be updated as a "flash patch" and merge it into the mobile phone with the existing system.
Before introducing how to create a flash patch, let's take a look at an example: update the two theme files with a flash drive, and copy touchwiz30launcher.apkand systemui.apk to the/system/APP directory of your mobile phone. The refresh patch file name is cwm_update.zip.
Use winrarto open the patch file cwm_update.zip and you can see two directories:
META-INF fl script file and signature
Patch content to be copied by System
Continue to open/system, and you will see the folder/APP. Then, under/app, you will see the two topic files touchwiz30launcher.apkand systemui.apk to be copied (SEE ). Starting from the/system directory, all directory structures and location of AKP files must correspond to the content in the mobile phone.
Then go to the META-INF directory (SEE) and we see three files and a word folder COM. These three files are generated by signature operations. In Android phones, all programs that need to be flushed into the mobile phone or run on the mobile phone must be signed. Go down from com and see two files in the/META-INF/COM/Google/Android directory:
Binary file used for update-binary refresh
Updater-script fl script file
The Updater-Script script specifies what to brush, where to brush, and how to brush.
From this specific example, we can summarize the steps for creating a flash patch as follows:
1) Create a working directory: first assume it is cwm_update.
2) generate two subfolders under cwm_update: META-INF and System
Cwm_update/META-INF
Cwm_update/System
3) create a sub-folder under cwm_update/system to store the patch content. The directory structure and file placement should be exactly the same as the file structure in the mobile phone. The APK application is placed under/APP, the font is placed under/fonts, the topic is put under/framework, the touch key definition is put under/usr/keylayout, and the library file is put under/lib.
4) In the cwm_update/META-INF and then generate
META-INF/COM/Google/android
Copy the ready-made Update-binary and Updater-script to the/Android directory in other refresh packages.
My practice is to copy the entire contents of the META-INF together, there are three signature files and the binary file update-binary used for refreshing, one done, easy to do. Don't touch them any more.
5) edit the script file Updater-script, which specifies what to copy, how to copy, and where to copy. Open Updater-script in a text editor and see the following content:
Mount ("MTD", "system", "/system ");
Ui_print ("Updating system ...");
Show_progress (0.100000, 0 );
Set_progress (1.000000 );
Package_extract_dir ("system", "/system ");
Show_progress (0.900000, 10 );
Ui_print ("update complete! ");
Unmount ("/system ");
The Updater-script content of the script file is described as follows:
Mount ("MTD", "system", "/system ");
Mount MTD, system,/system(systemis the/system folder in cwm_update.zip,/system is the folder in the mobile phone space)
Ui_print ("Updating system ...");
Mobile phone screen display prompt information updating system...
Show_progress (0.100000, 0 );
Is to control the progress bar status (progress bar advances 10% after the operation is complete)
Set_progress (1.000000 );
Manually set the progress bar to 100%
Package_extract_dir ("system", "/system ");
Copy the content in the system folder of cwm_update.zip to the/System of the mobile phone.
Show_progress (0.900000, 10 );
Same as above, it controls the progress bar status (progress bar advances 90% after the operation is complete)
Ui_print ("update complete! ");
Update complete!
Unmount ("/system ");
Uninstall the mobile phone/System File System, and the flash will be finished.
Note: there must be an empty line after Unmount! This is a rule.
6. In the cwm_updatedirectory, pack meta-infand systeminto a compressed file cwm_update.zip.
7. Use the signature program auto-signto sign the cwm_update.zip file. After the production process is completed, the patch will be installed.
Note: If you want to create a flash Patch, you can use the script file as it is without any modification. In the actual production, you can directly copy the META-INF directory from the existing brush patch, even the signature process is saved. Check the content of Updater-script to avoid errors!
2. Create a complete Rom
With how to create a flash brush patch, it is not difficult for you to create a complete "card brush" Flash ROM. Compared with the preparation of Odin fl, there is no complicated RFS unpacking and packaging process, and no Linux environment is required. All the operations are done in windows. The content in the edit/system directory is straightforward, making it easy to delete and add content.
We also start from an instance, examine the ROM Structure and file placement, and then summarize the production steps to introduce the production skills.
Open the second card brush Rom http://bbs.gfan.com/android-1705916-1-1.html in my June 22 "Release custom i897 2.3.4 xxjvp Rom upgrade Chinese version" (JVP2.3.4_SunnyOK_CN-2.zip), as shown below:
The META-INF directory has been introduced in the previous section, storing the signature file and the important fl script file Updater-script.
The content in the system directory is exactly the same in your mobile phone/system directory.
Compared with the previous section, there is an additional directory updates. What is it? You can see it at a glance. The updates directory contains three files: Modem. Bin, zimage, and redbend_ua. Are you familiar with modem. Bin and zimage? They are baseband and kernel files. Another file, redbend_ua, is used for Refresh. However, it cannot be deleted.
Do not touch the last file installbusybox.
Now let's look at the Updater-Script script file. The content of Updater-script is more complicated because there is more content to be flushed into the mobile phone. The complete script file is as follows:
Show_progress (0.200000, 10 );
Set_perm (0, 0, 0777, "/sbin/Mount ");
Run_program ("/sbin/Mount", "/system ");
Set_perm (0, 0, 0777, "/sbin/Mount ");
Run_program ("/sbin/Mount", "/dev/block/stl10", "/dbdata ");
Set_perm (0, 0, 0777, "/sbin/Mount ");
Run_program ("/sbin/Mount", "cache :");
Set_perm (0, 0, 0777, "/sbin/Mount ");
Run_program ("/sbin/Mount", "/dev/block/mmcblk0p2", "/Data ");
Delete_recursive ("/system ");
Delete_recursive ("/dbdata ");
Delete_recursive ("/cache ");
Delete_recursive ("/data/Dalvik-Cache ");
Delete_recursive ("/Data ");
Mount ("MTD", "system", "/system ");
Package_extract_dir ("system", "/system ");
Package_extract_dir ("Updates", "/tmp ");
Show_progress (0.200000, 50 );
Symlink ("toolbox", "/system/bin/cat ");
Symlink ("toolbox", "/system/bin/chmod ");
Symlink ("toolbox", "/system/bin/chown ");
Symlink ("toolbox", "/system/bin/CMP ");
Symlink ("toolbox", "/system/bin/date ");
Symlink ("toolbox", "/system/bin/DD ");
Symlink ("toolbox", "/system/bin/DF ");
Symlink ("toolbox", "/system/bin/dmesg ");
Symlink ("toolbox", "/system/bin/getevent ");
Symlink ("toolbox", "/system/bin/getprop ");
Symlink ("toolbox", "/system/bin/HD ");
Symlink ("toolbox", "/system/bin/ID ");
Symlink ("toolbox", "/system/bin/ifconfig ");
Symlink ("toolbox", "/system/bin/iftop ");
Symlink ("toolbox", "/system/bin/insmod ");
Symlink ("toolbox", "/system/bin/IOCTL ");
Symlink ("toolbox", "/system/bin/ionice ");
Symlink ("toolbox", "/system/bin/kill ");
Symlink ("toolbox", "/system/bin/ln ");
Symlink ("toolbox", "/system/bin/log ");
Symlink ("toolbox", "/system/bin/ls ");
Symlink ("toolbox", "/system/bin/lsmod ");
Symlink ("toolbox", "/system/bin/mkdir ");
Symlink ("toolbox", "/system/bin/Mount ");
Symlink ("toolbox", "/system/bin/mv ");
Symlink ("toolbox", "/system/bin/nandread ");
Symlink ("toolbox", "/system/bin/netstat ");
Symlink ("toolbox", "/system/bin/newfs_msdos ");
Symlink ("toolbox", "/system/bin/y ");
Symlink ("toolbox", "/system/bin/printenv ");
Symlink ("toolbox", "/system/bin/PS ");
Symlink ("toolbox", "/system/bin/reboot ");
Symlink ("toolbox", "/system/bin/renice ");
Symlink ("toolbox", "/system/bin/RM ");
Symlink ("toolbox", "/system/bin/rmdir ");
Symlink ("toolbox", "/system/bin/rmmod ");
Symlink ("toolbox", "/system/bin/route ");
Symlink ("toolbox", "/system/bin/schedtop ");
Symlink ("toolbox", "/system/bin/sendevent ");
Symlink ("toolbox", "/system/bin/setconsole ");
Symlink ("toolbox", "/system/bin/setprop ");
Symlink ("toolbox", "/system/bin/sleep ");
Symlink ("toolbox", "/system/bin/SMD ");
Symlink ("toolbox", "/system/bin/start ");
Symlink ("toolbox", "/system/bin/Stop ");
Symlink ("toolbox", "/system/bin/Sync ");
Symlink ("toolbox", "/system/bin/top ");
Symlink ("toolbox", "/system/bin/umount ");
Symlink ("toolbox", "/system/bin/vmstat ");
Symlink ("toolbox", "/system/bin/watchprops ");
Symlink ("toolbox", "/system/bin/wipe ");
Symlink ("/system/bin/dumpstate", "/system/bin/dumpmesg ");
Symlink ("/system/bin/debugadh", "/system/bin/csview ");
Set_perm_recursive (0, 0, 0755,064 4, "/system ");
Set_perm_recursive (0, 2000,075 5, 0755, "/system/bin ");
Set_perm_recursive (0, 0, 0755,075 5, "/system/etc ");
Set_perm_recursive (1002,100 2, 0755,044 0, "/system/etc/Bluetooth ");
Set_perm_recursive (0, 2000,075 5, 0755, "/system/vendor/bin ");
Set_perm_recursive (0, 2000,075 5, 0644, "/system/vendor/etc ");
Set_perm_recursive (0, 2000,075 5, 0644, "/system/vendor/firmware ");
Set_perm_recursive (0, 2000,075 5, 0755, "/system/xbin ");
Set_perm (0, 2000,075 5, "/system/vendor ");
Set_perm (0, 2000,075 5, "/system/vendor/firmware ");
Set_perm (0, 2000,075 5, "/system/vendor/bin/launch_gps.sh ");
Set_perm (0, 2000,075 5, "/system/vendor/bin/GPSD ");
Set_perm (0, 2000,075 5, "/system/etc/Bluetooth ");
Set_perm (0, 3003,027 55, "/system/bin/netcfg ");
Set_perm (0, 3004,027 55, "/system/bin/ping ");
Set_perm (1002,100 2, 0440, "/system/etc/limits. conf ");
Set_perm (1014,200 0, 0550, "/system/etc/dhcpcd-run-hooks ");
Set_perm (0, 2000,055 0, "/system/etc/init. Goldfish. Sh ");
Set_perm (0, 0, 06755, "/system/bin/su ");
Symlink ("/system/bin/su", "/system/xbin/su ");
Set_perm (0, 0, 06755, "/system/xbin/busybox ");
Set_perm (0, 0,755, "/tmp/redbend_ua ");
Show_progress (0.200000, 60 );
Set_perm (0, 0, 0777, "/system/xbin/busybox ");
Run_program ("/system/xbin/busybox", "-- install", "-s", "/system/xbin ");
Show_progress (0.200000, 70 );
Set_perm (0, 0, 0777, "/tmp/redbend_ua ");
Run_program ("/tmp/redbend_ua", "Restore", "/tmp/MODEM. bin", "/dev/block/bml12 ");
Show_progress (0.200000, 80 );
Set_perm (0, 0, 0777, "/tmp/redbend_ua ");
Run_program ("/tmp/redbend_ua", "Restore", "/tmp/zimage", "/dev/block/bml7 ");
Show_progress (0.200000, 90 );
Set_perm (0, 0, 0777, "/tmp/redbend_ua ");
Run_program ("/tmp/redbend_ua", "Restore", "/tmp/zimage", "/dev/block/bml8 ");
Show_progress (1.000000, 0 );
Set_perm (0, 1000,075 5, "/system/xbin/busybox ");
Package_extract_file ("installbusybox", "/tmp/installbusybox ");
Set_perm (0, 0, 0777, "/tmp/installbusybox ");
Run_program ("/tmp/installbusybox ");
Unmount ("/system ");
If you are interested, you can go to the fan Feng Forum or other forums to learn the statements and syntaxes in the script file, which is not described here. Also look at the links in the reference directory. It is worth mentioning that the following two sentences use the run_program statement to copy the baseband file modem. bin to the bml12 partition, and copy the Kernel File zimage to the bml7 partition.
Run_program ("/tmp/redbend_ua", "Restore", "/tmp/MODEM. bin", "/dev/block/bml12 ");
Run_program ("/tmp/redbend_ua", "Restore", "/tmp/zimage", "/dev/block/bml7 ");
Now let's take the steps to create a complete ROM:
1) Create a working directory: first assume it is JVP-Rom.
2) generate three subfolders under the JVP-ROM: META-INF, system, and updates:
JVP-ROM/META-INF
JVP-ROM/System
JVP-ROM/updates
3) Go to find a ready-made card brush swap Rom, such as my June 22 card brush package ROM: JVP2.3.4_SunnyOK_CN-2.zip. Copy the extracted META-INF and installbusybox to the JVP-ROM directory and copy redbend_ua to the/updates folder.
4) Prepare the corresponding content in the JVP-ROM/system. You don't need to know about this. You just need to check the/system on your phone. In addition, the custom Rom must be modified and edited by/system.
5) Put the selected baseband and kernel files under the JVP-ROM/updates directory.
6. In the jvp-romdirectory, pack meta-inf,system,updatesand installbusyboxinto a compressed file jvp-rom.zip. This is the complete Rom.
Note:
1) The above is not the signature step because the signature file has been copied in step 3rd and no signature is required.
2. If you do not use the previous signature, use auto-signto sign jvp-rom.zip In the last step.
3) The above production process borrowed some elements of the existing card brush Rom, so that the production process is greatly simplified to achieve their own goals.
3. Additional content: How to fl the baseband and Kernel
1) Single-brush baseband
When the baseband is flushed, put the baseband file modem. Bin and copy the file bmlwrite in the/updates folder. The content of the script file is written as follows:
Ui_print ("");
Ui_print ("");
Ui_print ("Flashing i897 MODEM. Please wait ...");
Ui_print ("");
Package_extract_dir ("Updates", "/tmp/updates ");
Set_perm (0, 0,755, "/tmp/updates/bmlwrite ");
Run_program ("/tmp/updates/bmlwrite", "/tmp/updates/MODEM. bin", "/dev/block/bml12 ");
Ui_print ("successful! Please reboot .");
2) single-click Kernel
When the kernel is flushed, The Kernel File zimage and the copy file bmlwrite are placed in the/updates folder. The content of the script file is written as follows:
Ui_print ("");
Ui_print ("");
Ui_print ("Flashing i897 kernel. Please wait ...");
Ui_print ("");
Package_extract_dir ("Updates", "/tmp/updates ");
Set_perm (0, 0, 0755, "/tmp/updates/bmlwrite ");
Run_program ("/tmp/updates/bmlwrite", "/tmp/updates/zimage", "/dev/block/bml7 ");
Ui_print ("successful! Please reboot .");
Attachment:
1. Signature ProgramAuto-sign.rar(201.18
KB)
2. fl patch TemplateUpdate-Template.rar(146.04
KB)
3. Complete flushing Rom TemplateROM-Template.rar(349.79
KB)
4. single-click baseband TemplatePhone-Update.rar(188.23
KB)
5. single-click kernel TemplateKernel-Update.rar(188.24
KB)