# Invalid zip file format when flashing



## schwim (Sep 14, 2017)

Hi there everyone!

I tired of resolving Lineage OS' vendor mismatch issue on updates so I thought I'd flash the stock 8.0 onto my Nexus 5X.  I wiped the cache and went to install the zip, but got the messages:

I'm following step 7 in this guide. I have tried both the downloaded zip and the zip inside the extracted downloaded zip.

Invalid zip file format!
Error installing zip file ' /sdcard/bullhead-opt4.170623.006-factory-e876a276.zip'
Updating partition details...
...done

And that's it.

Could someone tell me how I might work my way around this?

Thanks for your time!


----------



## TheFixItMan (Sep 14, 2017)

invalided zip can mean all sorts of things

it could be but not limited to

The zip is corrupted - download the zip file again
The zip is not meant for your phone
You have incorrectly edited the zip
The updater script is incorrect
The update binary is not for your phone
The zip is not a flashable zip - look inside and make sure there is a  META-INF folder - if not its definitely not a flashable zip


----------



## Ibuprophen (Sep 14, 2017)

schwim said:


> Hi there everyone! I tired of resolving Lineage OS' vendor mismatch issue on updates so I thought I'd flash the stock 8.0 onto my Nexus 5X.  I wiped the cache and went to install the zip, but got the messages: I'm following step 7 in this guide. I have tried both the downloaded zip and the zip inside the extracted downloaded zip. Invalid zip file format! Error installing zip file ' /sdcard/bullhead-opt4.170623.006-factory-e876a276.zip' Updating partition details... done. And that's it. Could someone tell me how I might work my way around this? Thanks for your time!

Click to collapse



Did you try asking this question within that specific thread? 

https://forum.xda-developers.com/nexus-5x/general/guides-how-to-guides-beginners-t3206930

I feel, as a developer myself, that a good developer have an unwritten obligation to provide any/all "Reasonable" support that's needed by a member. 

_There's also good members (who are more experienced) that also provides assistance to those who need it even though their not obligated to do so._

I've always encouraged members to ask for assistance with anything, that already has a support thread, to ask within that thread first. 

I hope i had explained this okay via text...  


*~~~~~~~~~~~~~~~*
*I Am The Egg Man,
They Are The Egg Men.
I Am The Walrus!
Coo Coo Cachoo!*

*I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.
PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE*


----------



## AndroidSamsungFreak (Apr 24, 2018)

The zip you downloaded is a factory IMAGE. Means you have to flash it via fastboot


----------



## sekyuku (Jun 8, 2018)

*hey i have the same problem*

hi, i have huawei GR5 2017 (honor 6x) and i acidently delated the data from twrp, then i've downloaded and tried to intall too many firmware of my phone, but it fails every time, i tried many files, i tried to unzip them and compress them again with winrar or 7z, but it fails too.
please, help me, i'm stucked and can't do anything. :crying: :crying: :crying: :crying:
if  it can help: when i open internal storage, i only find those two folde,and the obb' folder is empty.


----------



## GetMeADrinkSpider (Apr 12, 2021)

sekyuku said:


> *hey i have the same problem*
> 
> hi, i have huawei GR5 2017 (honor 6x) and i acidently delated the data from twrp, then i've downloaded and tried to intall too many firmware of my phone, but it fails every time, i tried many files, i tried to unzip them and compress them again with winrar or 7z, but it fails too.
> please, help me, i'm stucked and can't do anything. :crying: :crying: :crying: :crying:
> if  it can help: when i open internal storage, i only find those two folde,and the obb' folder is empty.

Click to collapse



im sure you solved this problem a few years ago... I'm doing this for the forum... (The script file he's talking about is going to be hidden.. in the Meta folder. You just have to show all hidden files from the top of the directory, and then you can find those files. 
I personally tried to edit the file and when i rezipped, it said 'incorrect zip format' 
I'm not sure if i overdeleted critical parts. whatever,...


----------



## steve.rand (Oct 17, 2021)

Found this because I ran into the same problem again and couldn't remember the fix. I was zipping the directory i'd extracted so the resulting zip file had the folder within it, rather than the first tree of contents. Zipping the files into a new zip rather than zipping the directory to a new zip was my solution. Easy mistake to make!


----------

