一、 错误提示 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 $ ./flash-all.sh Sending 'bootloader' (3124 KB) OKAY [ 0.310s] Writing 'bootloader' OKAY [ 0.492s] Finished. Total time: 0.900s rebooting into bootloader OKAY [ 0.003s] Finished. Total time: 0.003s Sending 'radio' (45489 KB) OKAY [ 1.650s] Writing 'radio' OKAY [ 3.249s] Finished. Total time: 4.994s rebooting into bootloader OKAY [ 0.006s] Finished. Total time: 0.006s extracting android-info.txt (0 MB) to RAM... -------------------------------------------- Bootloader Version...: HHZ20h Baseband Version.....: M8974A-2.0.50.2.30 Serial Number........: 040123e21846f170 -------------------------------------------- Checking product OKAY [ 0.100s] Checking version-bootloader OKAY [ 0.100s] Checking version-baseband OKAY [ 0.100s] extracting boot.img (8 MB) to disk... took 0.092s archive does not contain 'boot.sig' archive does not contain 'dtbo.img' archive does not contain 'dt.img' archive does not contain 'odm.img' archive does not contain 'product.img' extracting recovery.img (9 MB) to disk... took 0.157s archive does not contain 'recovery.sig' extracting system.img (996 MB) to disk... took 50.548s archive does not contain 'system.sig' archive does not contain 'vbmeta.img' archive does not contain 'vendor.img' CreateProcess failed: 系统找不到指定的文件。 (2) fastboot: error: Cannot generate image for userdata
二、解决方法 重点在最后一部分,这里的原因是如下,因此解决方法如下 :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 image-hammerhead-lmy48b.zip里面的也解压出来。还要修改flash-all.bat 否则可能会出现, 1,写入system.img失败之类的(提示找不到或者内存不足之类的) 2,把32G刷成16G(5.x之后的官方刷机包都有这个问题) flash-all.bat里的 fastboot -w updated image-hammerhead-lmy48b.zip 修改为: fastboot flash recovery recovery.img fastboot flash boot boot.img fastboot flash system system.img ::下面是清除个人数据的(双WIPE)。 如果要保留数据升级,则不要下面2行。 fastboot flash cache cache.img fastboot flash userdata userdata.img fastboot reboot
三、警示 这是adb tools的问题,所以不要从第三方处下载该工具,应该时时从官方地址 下载 adb tools。实际上,在升级了官方adb之后,刷入同样的固件,log 就和之前的不一样了。如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 $ ./flash-all.sh Sending 'bootloader' (3124 KB) OKAY [ 0.359s] Writing 'bootloader' OKAY [ 0.511s] Finished. Total time: 1.068s Rebooting into bootloader OKAY [ 0.001s] Finished. Total time: 0.001s Sending 'radio' (45489 KB) OKAY [ 2.420s] Writing 'radio' OKAY [ 3.270s] Finished. Total time: 5.883s Rebooting into bootloader OKAY [ 0.025s] Finished. Total time: 0.026s -------------------------------------------- Bootloader Version...: HHZ20h Baseband Version.....: M8974A-2.0.50.2.30 Serial Number........: 040123e21846f170 -------------------------------------------- extracting android-info.txt (0 MB) to RAM... Checking 'product' OKAY [ 0.099s] Checking 'version-bootloader' OKAY [ 0.100s] Checking 'version-baseband' OKAY [ 0.099s] extracting boot.img (8 MB) to disk... took 0.436s archive does not contain 'boot.sig' Sending 'boot' (9156 KB) OKAY [ 0.445s] Writing 'boot' OKAY [ 0.793s] archive does not contain 'dtbo.img' archive does not contain 'dt.img' extracting recovery.img (9 MB) to disk... took 0.124s archive does not contain 'recovery.sig' Sending 'recovery' (10014 KB) OKAY [ 0.529s] Writing 'recovery' OKAY [ 0.861s] archive does not contain 'vbmeta.img' archive does not contain 'vbmeta_system.img' archive does not contain 'vendor_boot.img' archive does not contain 'super_empty.img' archive does not contain 'odm.img' archive does not contain 'product.img' extracting system.img (996 MB) to disk... took 20.688s archive does not contain 'system.sig' Sending 'system' (1020657 KB) OKAY [ 32.324s] Writing 'system' OKAY [ 72.269s] archive does not contain 'system_ext.img' archive does not contain 'vendor.img' archive does not contain 'vendor_dlkm.img' Erasing 'userdata' OKAY [ 2.990s] mke2fs 1.45.4 (23-Sep-2019) Creating filesystem with 7137786 4k blocks and 1785856 inodes Filesystem UUID: 5fd59846-f762-11ea-bd1a-1bfdadabbc5a Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000 Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done Sending 'userdata' (180 KB) OKAY [ 0.115s] Writing 'userdata' FAILED (remote: 'Bogus size sparse and chunk header' ) fastboot: error: Command failed
四、开机无限循环 如上,在刷入 userdata
时报错 remote: 'Bogus size sparse and chunk header'
,这是在之前刷入的第三方固件修改了分区设置。因此要先格式化,再单独刷写 userdata.img
。 一下内容从 youness.net 拷贝。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 I noticed that I had a specific error at the end of the procedure : Writing ‘userdata’ FAILED (remote: ‘Bogus size sparse and chunk header’) If you are facing the same issue, try formatting the userdata partition and flash it separately. I had the issue because I installed different OS on my device that altered my partitions. Boot in bootloader mode with the buttons ON and Volume down – Then format the partition: fastboot format userdata mke2fs Locate the userdata.img in your zip or source files, then flash it: fastboot flash userdata userdata.img Reboot the tablet, now it should boot correctly to the home page: fastboot reboot
参考链接