IM-A820L用CWM时开启自动更新造成Recovery循环的原因(其他泛泰机型可参考)

造成循环的关键代码在phoneinfo分区中,也就是mmcblk0p10中

00021000 CE CE EC EC 00 9C 00 B0 EB 38 00 B0 D0 25 01 B0   挝祆..半8.靶%.. 
00021010 00 9C 00 B0 D4 8B 58 09 E0 FF FF FF 24 04 F0 A7   .霸媂....$.皈 
00021020 A4 10 F0 A7 68 94 00 B0 C5 39 00 B0 04 00 00 00   .皈h.芭9..... 
00021030 57 60 E0 A7 84 1E 01 B0 84 1E 01 B0 00 00 00 00   W`唰..皠...... 
00021040 4C 66 B8 BE 00 00 00 00 E8 BD 00 B0 00 00 00 00   Lf妇....杞..... 
00021050 15 00 00 00 A0 05 F0 A7 04 11 00 00 00 00 F0 A7   .....皈......皈 
00021060 E8 BD 00 B0 24 04 F0 A7 66 AA 83 07 98 AE 00 B0   杞...皈f獌.槷.半 
00021070 EB 38 00 B0 43 00 00 00 D0 E4 00 00 13 00 00 00   8.癈...袖...... 
00021080 00 00 00 00 01 00 00 00 FF FF 00 00 00 00 00 E5   ...............錍 
00021090 43 43 D1 AF 28 00 00 00 28 00 00 00 E0 E4 00 00   C询(...(...噤.. 
000210A0 28 00 00 00 13 00 00 00 D2 F5 92 AB 01 00 00 00   (.......阴挮.... 
000210B0 FF FF 00 00 00 00 00 E5 27 BD 11 A8 28 15 D4 AF   ...........辕 
000210C0 E5 B7 11 A8 E5 B7 11 A8 98 38 93 AB 94 34 93 AB   宸.ㄥ.8摣.摣 
000210D0 D4 8B 58 09 00 9C 00 B0 EB 38 00 B0 D0 25 01 B0   詪X...半8.靶%.. 
000210E0 00 9C 00 B0 D4 8B 58 09 E0 FF FF FF 49 05 10 80   .霸媂....I..€ 
000210F0 B8 30 10 80 68 94 00 B0 C5 39 00 B0 04 00 00 00   ..€h.芭9..... 
00021100 0F AA 92 AB 84 1E 01 B0 84 1E 01 B0 00 00 00 00   .獟珓..皠...... 
00021110 1C 67 B8 BE 00 00 00 00 A8 A3 00 B0 00 00 00 00   .g妇....ǎ..... 
00021120 15 00 00 00 CC 0A 10 80 18 31 00 00 00 00 10 80   ......€.1.....€ 
00021130 A8 A3 00 B0 49 05 10 80 57 00 00 00 09 00 00 00   ǎ.癐..€W....... 
00021140 B7 3A 00 B0 1B 07 10 80 00 00 00 00 00 00 00 00   .....€........ 
00021150 00 00 00 00 03 00 00 00 68 AC 00 B0 14 08 10 80   ........h....€ 
00021160 CC 02 10 80 3C 02 10 80 EC 04 10 80 84 1E 01 B0   ..€<..€..€..皠 
00021170 84 1E 01 B0 00 00 00 00 C4 94 00 B0 00 00 00 00   ......臄..... 
00021180 00 00 00 00 00 00 00 00 1D 43 00 B0 A8 A3 00 B0   .........C.皑.. 
00021190 00 00 00 00 00 00 00 00 72 BB 00 00 00 00 00 00   .......r...... 
000211A0 A5 4D 00 B0 A8 A3 00 B0 FF FF FF FF 72 BB 00 00   .皑.....r.. 
000211B0 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00   ................ 
000211C0 D5 9C 86 06 A8 A3 00 B0 EB 38 00 B0 00 00 00 00   諟.ǎ.半8..... 
000211D0 00 00 00 70 85 BB 00 00 0E 00 00 00 9D 13 10 80   ...p吇........€ 
000211E0 6F 9C 00 00 85 BB 00 00 0E 00 00 00 00 00 00 00   o..吇.......... 
000211F0 00 00 00 00 04 00 00 00 04 00 00 00 60 43 01 B0   ............`C.. 

这段代码的作用似乎就是开机进入Recovery,也就是说造成循环

解决办法就是将其全部置零

dd if=/dev/zero bs=512 seek=264 count=1 conv=notrunc of=/dev/block/mmcblk0p10

对CWMRecovery的修改,只要添加文件sbin\postrecoveryboot.sh
#!/sbin/sh

# get out of recovery loop
# by SuKY
busybox dd if=/dev/zero bs=512 seek=264 count=1 conv=notrunc of=/dev/block/mmcblk0p10

如此便可自动跳出Recovery循环

提醒:使用CWM虽然不能自动OTA,但是我没记错的话OTA包其实就是/sdcard/image/update.zip


奉上个人使用的Recovery,根据本人的机子修改了时间

若要修改,只需要改init.rc中的

	sysclktz 0
将0改为合适的数值即可(换算很麻烦的,还是自行尝试吧)
CWMRecovery.img

恩,你没看错,下面的的确是binx刷机包哦,本人试过,求测试
CWMRecovery.binx

密码均为suky

转载请注明出处:http://blog.csdn.net/su_ky/article/details/7740281

你可能感兴趣的:(c,测试)