How to unzip&zip the OTA update.zip

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to unzip&zip the OTA update.zip

跳至解决方案
3,603 次查看
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

标签 (4)
0 项奖励
1 解答
2,637 次查看
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 项奖励
4 回复数
2,638 次查看
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 项奖励
2,637 次查看
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 项奖励
2,637 次查看
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 项奖励
2,637 次查看
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 项奖励