Can not flash factory img:

simhagen

Member
Nov 25, 2015
12
1
0
Hi,

at some point I messed up the flahs of LineageOS and now I would like to get back to the stock img but it does not work anymore. I tried
flash-all.bat but with the same error as shown below.

Code:
C:\Users\XXXX>fastboot flash bootloader "C:\Users\XXX\smartphone\sargo-qp1a.191105.003\bootloader-sargo-b4s4-0.2-5736883.img"
target reported max download size of 268435456 bytes
sending 'bootloader' (8349 KB)...
OKAY [  0.279s]
writing 'bootloader'...
(bootloader) Flashing Pack version b4s4-0.2-5736883
(bootloader) Flashing partition table for Lun = 0
(bootloader) Flashing partition xbl_b
(bootloader) Flashing partition xbl_config_b
(bootloader) Flashing partition tz_b
(bootloader) Flashing partition aop_b
(bootloader) Flashing partition hyp_b
(bootloader) Flashing partition keymaster_b
(bootloader) Flashing partition cmnlib_b
(bootloader) Flashing partition cmnlib64_b
(bootloader) Flashing partition abl_b
(bootloader) Flashing partition devcfg_b
(bootloader) Flashing partition qupfw_b
(bootloader) Flashing partition storsec_b
OKAY [  0.586s]
finished. total time: 0.865s

C:\Users\XXX>fastboot reboot-bootloader
rebooting into bootloader...
OKAY [  0.047s]
finished. total time: 0.047s

C:\Users\XXX>fastboot flash radio "C:\Users\XXX\smartphone\sargo-qp1a.191105.003\radio-sargo-g670-00025-190805-b-5781381.img"
target reported max download size of 268435456 bytes
sending 'radio' (73196 KB)...
OKAY [  1.673s]
writing 'radio'...
(bootloader) Flashing Pack version SSD:g670-00025-190805-B-5781381
(bootloader) Flashing partition modem_b
OKAY [  0.555s]
finished. total time: 2.244s

C:\Users\XXX>fastboot reboot-bootloader
rebooting into bootloader...
OKAY [  0.038s]
finished. total time: 0.053s

C:\Users\XXX>fastboot -w update "C:\Users\XXX\smartphone\sargo-qp1a.191105.003\image-sargo-qp1a.191105.003.zip"
target reported max download size of 268435456 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.img'
archive does not contain 'system.sig'
W/        (15016): Zip: unable to truncate file to 485105848: File too large
failed to extract 'vendor.img': I/O Error
Erase successful, but not automatically formatting.
File system type raw not supported.
Erase successful, but not automatically formatting.
Can't determine partition type.
FAILED (remote: variable not found)
--------------------------------------------
Bootloader Version...: b4s4-0.2-5736883
Baseband Version.....: g670-00025-190805-B-5781381
Serial Number........: 97AAY1041S
--------------------------------------------
checking product...
OKAY [  0.053s]
checking version-bootloader...
OKAY [  0.063s]
checking version-baseband...
OKAY [  0.069s]
sending 'boot' (65536 KB)...
OKAY [  1.520s]
writing 'boot'...
FAILED (remote: Failed to write to partition Not Found)
finished. total time: 2.006s

Thank you in advance!

Simon
 
Last edited:

Horgar

Senior Member
Nov 2, 2012
445
200
43

sic0048

Senior Member
Jun 25, 2010
910
465
83
Is the drive that you have the zip file saved on nearing it's storage capacity? I suspect it is.

They key line in your log is, "Zip: unable to truncate file to 485105848: File too large" You will get this file if there isn't enough room to properly unzip the file completely. It takes up a decent amount of space on the hard drive.
 
  • Like
Reactions: simhagen

simhagen

Member
Nov 25, 2015
12
1
0
Ok, so far so good. I tried it on Windows with the newest version, same problem. Than I switched to Linux and it worked up to the point "Sending sparse 'vendor_b' 1/3 (262140 KB)" than it gets stuck and nothing happens.

Code:
[[email protected] MyApplication]$ sudo fastboot flash bootloader /home/XXXX/Downloads/sargo-pd2a.190115.029/bootloader-sargo-b4s4-0.1-5262905.img
Sending 'bootloader_b' (8349 KB)                   OKAY [  0.340s]
Writing 'bootloader_b'                             (bootloader) Flashing Pack version b4s4-0.1-5262905
(bootloader) Flashing partition table for Lun = 0
(bootloader) Flashing partition xbl_b
(bootloader) Flashing partition xbl_config_b
(bootloader) Flashing partition tz_b
(bootloader) Flashing partition aop_b
(bootloader) Flashing partition hyp_b
(bootloader) Flashing partition keymaster_b
(bootloader) Flashing partition cmnlib_b
(bootloader) Flashing partition cmnlib64_b
(bootloader) Flashing partition abl_b
(bootloader) Flashing partition devcfg_b
(bootloader) Flashing partition qupfw_b
(bootloader) Flashing partition storsec_b
OKAY [  0.541s]
Finished. Total time: 1.074s
[[email protected] MyApplication]$ sudo fastboot reboot bootloader
Rebooting into bootloader                          OKAY [  0.015s]
Finished. Total time: 0.065s
[[email protected] MyApplication]$ sudo fastboot flash radio /home/XXXX/Downloads/sargo-pd2a.190115.029/radio-sargo-g670-00011-190213-b-5306579.img
Sending 'radio_b' (72988 KB)                       OKAY [  2.230s]
Writing 'radio_b'                                  (bootloader) Flashing Pack version SSD:g670-00011-190213-B-5306579
(bootloader) Flashing partition modem_b
OKAY [  0.880s]
Finished. Total time: 3.315s
[[email protected] MyApplication]$ sudo fastboot reboot bootloader
Rebooting into bootloader                          OKAY [  0.015s]
Finished. Total time: 0.065s
[[email protected] MyApplication]$ sudo fastboot update -w /home/XXXX/Downloads/sargo-pd2a.190115.029/image-sargo-pd2a.190115.029.zip
--------------------------------------------
Bootloader Version...: b4s4-0.1-5262905
Baseband Version.....: g670-00011-190213-B-5306579
Serial Number........: xxxxxx
--------------------------------------------
extracting android-info.txt (0 MB) to RAM...
Checking 'product'                                 OKAY [  0.051s]
Checking 'version-bootloader'                      OKAY [  0.052s]
Checking 'version-baseband'                        OKAY [  0.052s]
Setting current slot to 'b'                        OKAY [  0.063s]
extracting boot.img (64 MB) to disk... took 0.284s
archive does not contain 'boot.sig'
Sending 'boot_b' (65536 KB)                        OKAY [  1.990s]
Writing 'boot_b'                                   OKAY [  0.729s]
extracting dtbo.img (8 MB) to disk... took 0.056s
archive does not contain 'dtbo.sig'
Sending 'dtbo_b' (8192 KB)                         OKAY [  0.340s]
Writing 'dtbo_b'                                   OKAY [  0.133s]
archive does not contain 'dt.img'
archive does not contain 'recovery.img'
extracting vbmeta.img (0 MB) to disk... took 0.000s
archive does not contain 'vbmeta.sig'
Sending 'vbmeta_b' (4 KB)                          OKAY [  0.120s]
Writing 'vbmeta_b'                                 OKAY [  0.064s]
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 'boot_other.img'
archive does not contain 'odm.img'
archive does not contain 'product.img'
extracting system.img (2271 MB) to disk... took 11.015s
archive does not contain 'system.sig'
Sending sparse 'system_b' 1/9 (262140 KB)          OKAY [  7.389s]
Writing 'system_b'                                 OKAY [  0.370s]
Sending sparse 'system_b' 2/9 (262140 KB)          OKAY [  7.840s]
Writing 'system_b'                                 OKAY [  0.370s]
Sending sparse 'system_b' 3/9 (262140 KB)          OKAY [  7.830s]
Writing 'system_b'                                 OKAY [  0.370s]
Sending sparse 'system_b' 4/9 (262140 KB)          OKAY [  7.760s]
Writing 'system_b'                                 OKAY [  0.370s]
Sending sparse 'system_b' 5/9 (262140 KB)          OKAY [  7.870s]
Writing 'system_b'                                 OKAY [  0.370s]
Sending sparse 'system_b' 6/9 (262140 KB)          OKAY [  7.810s]
Writing 'system_b'                                 OKAY [  0.370s]
Sending sparse 'system_b' 7/9 (262140 KB)          OKAY [  7.810s]
Writing 'system_b'                                 OKAY [  0.370s]
Sending sparse 'system_b' 8/9 (258620 KB)          OKAY [  7.690s]
Writing 'system_b'                                 OKAY [  0.370s]
Sending sparse 'system_b' 9/9 (232288 KB)          OKAY [  7.020s]
Writing 'system_b'                                 OKAY [  1.920s]
archive does not contain 'system_ext.img'
extracting system_other.img (391 MB) to disk... took 1.914s
archive does not contain 'system.sig'
Sending sparse 'system_a' 1/2 (262140 KB)          OKAY [  7.850s]
Writing 'system_a'                                 OKAY [  0.370s]
Sending sparse 'system_a' 2/2 (138668 KB)          OKAY [  4.200s]
Writing 'system_a'                                 OKAY [  1.380s]
extracting vendor.img (523 MB) to disk... took 2.502s
archive does not contain 'vendor.sig'
Sending sparse 'vendor_b' 1/3 (262140 KB)
 

simhagen

Member
Nov 25, 2015
12
1
0
Is the drive that you have the zip file saved on nearing it's storage capacity? I suspect it is.

They key line in your log is, "Zip: unable to truncate file to 485105848: File too large" You will get this file if there isn't enough room to properly unzip the file completely. It takes up a decent amount of space on the hard drive.
Should not be the issue since nothing was on the phone to begin with, other than the first running system.
 

sic0048

Senior Member
Jun 25, 2010
910
465
83
Should not be the issue since nothing was on the phone to begin with, other than the first running system.
It's not the space on the phone. You don't download and install these factory images from your phone. You have to download them to a computer and install them that way. If you computer is short on storage space, it will give the same error when it tries to upzip the factory image during the installation process. I've had it happen to me before and had to clear up space on my computer in order to finish flashing a factory image.

For example, if you have ADB installed on your C: drive and your C: drive doesn't have several GB of storage space available, you will get this error. It won't help if you have space available on other drives, because ADB only interacts with the folder it is installed on. So having 100 GB free on another drive won't help as an example.
 
Last edited:

simhagen

Member
Nov 25, 2015
12
1
0
It's not the space on the phone. You don't download and install these factory images from your phone. You have to download them to a computer and install them that way. If you computer is short on storage space, it will give the same error when it tries to upzip the factory image during the installation process. I've had it happen to me before and had to clear up space on my computer in order to finish flashing a factory image.
That as wll should not be the case or the unzip will be larger than 30 GB? That is the space left on my notebook
 

sic0048

Senior Member
Jun 25, 2010
910
465
83
That as wll should not be the case or the unzip will be larger than 30 GB? That is the space left on my notebook
No. As long as that space is available on your main drive (see my edit above), 30 GB should be plenty of space. I'm thinking it takes around 5 GB if I remember correctly.
 
Last edited:
  • Like
Reactions: simhagen

simhagen

Member
Nov 25, 2015
12
1
0
Hi,

so with the last post the update of fastboot worked fine and the flashing went well. Thanks! Stange thing was, it did not work under Linux it stopped at flashing vendor_b (nothing happend for half an hour or so, tried it several times with different Android 10 versions):

Code:
extracting vendor.img (523 MB) to disk... took 2.502s
archive does not contain 'vendor.sig'
Sending sparse 'vendor_b' 1/3 (262140 KB)
under Windows I didn't get this problem. So system is up and running again.

Thank you!
 

Horgar

Senior Member
Nov 2, 2012
445
200
43
Hi,

so with the last post the update of fastboot worked fine and the flashing went well. Thanks! Stange thing was, it did not work under Linux it stopped at flashing vendor_b (nothing happend for half an hour or so, tried it several times with different Android 10 versions):



under Windows I didn't get this problem. So system is up and running again.

Thank you!
Glad to hear you're sorted. It took me a while to work out I just needed to update fastboot. Someone on XDA helped me with it.