How to unzip&zip the OTA update.zip

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to unzip&zip the OTA update.zip

Jump to solution
3,567 Views
lqll
Contributor III

Hello

My environment is i.MX6Q,Android 4.4.2.

I want to customise OTA update.zip,as Android_Frequently_Asked_Questions.pdf 's section How do I customize the reference OTA application said.
I generate update.zip by this command:

make dist -j4

and this update.zip can update my device system well in recovery.But when I unzip this update.zip then zip again without doing any modify,I found the file size changed and I can't do update,

My unzip and zip command is below:

unzip -d update update.zip

zip -r update2.zip update

pastedImage_11.png

Then I signed the update2.zip by the command below:

java -Xmx2048m -jar ~/android-4.4.2_sdi_in/out/host/linux-x86/framework/signapk.jar -w ~/android-4.4.2_sdi_in/device/fsl/common/security/testkey.x509.pem ~/android-4.4.2_sdi_in/device/fsl/common/security/testkey.pk8 update2.zip update-signed.zip

This update-signed.zip still not has the same size compare to update.zip,and still can't pass recovery to update system.

pastedImage_14.png

So my question is how to unzip&zip update.zip correctly?

Thank You

Qiulong Li

Labels (4)
0 Kudos
1 Solution
2,601 Views
lqll
Contributor III

I found unzip the update.zip always make problem,so now I open it and then modify what I want in winRAR. This way can work.

View solution in original post

0 Kudos
4 Replies
2,602 Views
lqll
Contributor III

I found unzip the update.zip always make problem,so now I open it and then modify what I want in winRAR. This way can work.

0 Kudos
2,601 Views
gary_bisson
Senior Contributor III

Hi,

It looks like your zip command is wrong. Isn't creating an unwanted update/ folder at the root of the archive?

I think it should be:

cd update/ && zip -r ../update2.zip * && cd -

Regards,

Gary

0 Kudos
2,601 Views
lqll
Contributor III

Hi Gary

Thanks for your reply

My update2.zip does't have the update folder.

Now I can use winRAR in Windows 7 to open update.zip directly and modify update.zip without doing the operations :unzip the update.zip to a folder and then zip again,and it works.

But I still want to do the normal unzip&zip way,where is my wrong?

Thank You

Qiulong Li

0 Kudos
2,601 Views
gary_bisson
Senior Contributor III

Hi Quilong Li,

Ok, when I tried your command on my machine the update folder was in the update2.zip archive. I'm not sure what could be the difference then, in my case I use unzip/zip extensively with no problem. What is your zip version? Mine is 3.0, not sure if it helps.

Regards,

Gary

0 Kudos