make otapackage 素材包太大导致的失败

2024-06-20 06:58

本文主要是介绍make otapackage 素材包太大导致的失败,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

该错误是由于android默认采用的是ZIP,因此当生成素材包的中间文件超出4G则会导致一系列的错误,解决方法可以采用ZIP64。

diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py

index 5a0a411..e2982cd 100755

--- a/tools/releasetools/add_img_to_target_files.py

+++ b/tools/releasetools/add_img_to_target_files.py

@@ -334,7 +334,7 @@ def AddImagesToTargetFiles(filename):

 

   common.ZipClose(input_zip)

   output_zip = zipfile.ZipFile(filename, "a",

-                               compression=zipfile.ZIP_DEFLATED)

+                               compression=zipfile.ZIP_DEFLATED, allowZip64=True)

 

   has_recovery = (OPTIONS.info_dict.get("no_recovery") != "true")

 

diff --git a/tools/releasetools/img_from_target_files.py b/tools/releasetools/img_from_target_files.py

index 84e0e63..bd72337 100755

--- a/tools/releasetools/img_from_target_files.py

+++ b/tools/releasetools/img_from_target_files.py

@@ -70,7 +70,7 @@ def main(argv):

     sys.exit(1)

 

   OPTIONS.input_tmp, input_zip = common.UnzipTemp(args[0])

-  output_zip = zipfile.ZipFile(args[1], "w", compression=zipfile.ZIP_DEFLATED)

+  output_zip = zipfile.ZipFile(args[1], "w", compression=zipfile.ZIP_DEFLATED, allowZip64=True)

   CopyInfo(output_zip)

 

   try:

diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py

index c7a6a34..e1bd62d 100755

--- a/tools/releasetools/ota_from_target_files.py

+++ b/tools/releasetools/ota_from_target_files.py

@@ -1243,7 +1243,7 @@ def WriteABOTAPackageWithBrilloScript(target_file, output_file,

   # Stage the output zip package for package signing.

   temp_zip_file = tempfile.NamedTemporaryFile()

   output_zip = zipfile.ZipFile(temp_zip_file, "w",

-                               compression=zipfile.ZIP_DEFLATED)

+                               compression=zipfile.ZIP_DEFLATED, allowZip64=True)

 

   # Metadata to comply with Android OTA package format.

   oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties", None)

@@ -2131,11 +2131,11 @@ def main(argv):

     if os.path.exists(args[1]):

       os.unlink(args[1])

     output_zip = zipfile.ZipFile(args[1], "w",

-                                 compression=zipfile.ZIP_DEFLATED)

+                                 compression=zipfile.ZIP_DEFLATED, allowZip64=True)

   else:

     temp_zip_file = tempfile.NamedTemporaryFile()

     output_zip = zipfile.ZipFile(temp_zip_file, "w",

-                                 compression=zipfile.ZIP_DEFLATED)

+                                 compression=zipfile.ZIP_DEFLATED, allowZip64=True)

 

   # Non A/B OTAs rely on /cache partition to store temporary files.

   cache_size = OPTIONS.info_dict.get("cache_size", None)

-- 


这篇关于make otapackage 素材包太大导致的失败的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1077424

相关文章

Docker镜像pull失败两种解决办法小结

《Docker镜像pull失败两种解决办法小结》有时候我们在拉取Docker镜像的过程中会遇到一些问题,:本文主要介绍Docker镜像pull失败两种解决办法的相关资料,文中通过代码介绍的非常详细... 目录docker 镜像 pull 失败解决办法1DrQwWCocker 镜像 pull 失败解决方法2总

pip无法安装osgeo失败的问题解决

《pip无法安装osgeo失败的问题解决》本文主要介绍了pip无法安装osgeo失败的问题解决,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一... 进入官方提供的扩展包下载网站寻找版本适配的whl文件注意:要选择cp(python版本)和你py

MySQL安装时initializing database失败的问题解决

《MySQL安装时initializingdatabase失败的问题解决》本文主要介绍了MySQL安装时initializingdatabase失败的问题解决,文中通过图文介绍的非常详细,对大家的学... 目录问题页面:解决方法:问题页面:解决方法:1.勾选红框中的选项:2.将下图红框中全部改为英

Nginx启动失败:端口80被占用问题的解决方案

《Nginx启动失败:端口80被占用问题的解决方案》在Linux服务器上部署Nginx时,可能会遇到Nginx启动失败的情况,尤其是错误提示bind()to0.0.0.0:80failed,这种问题通... 目录引言问题描述问题分析解决方案1. 检查占用端口 80 的进程使用 netstat 命令使用 ss

pip install jupyterlab失败的原因问题及探索

《pipinstalljupyterlab失败的原因问题及探索》在学习Yolo模型时,尝试安装JupyterLab但遇到错误,错误提示缺少Rust和Cargo编译环境,因为pywinpty包需要它... 目录背景问题解决方案总结背景最近在学习Yolo模型,然后其中要下载jupyter(有点LSVmu像一个

C#多线程编程中导致死锁的常见陷阱和避免方法

《C#多线程编程中导致死锁的常见陷阱和避免方法》在C#多线程编程中,死锁(Deadlock)是一种常见的、令人头疼的错误,死锁通常发生在多个线程试图获取多个资源的锁时,导致相互等待对方释放资源,最终形... 目录引言1. 什么是死锁?死锁的典型条件:2. 导致死锁的常见原因2.1 锁的顺序问题错误示例:不同

Golan中 new() 、 make() 和简短声明符的区别和使用

《Golan中new()、make()和简短声明符的区别和使用》Go语言中的new()、make()和简短声明符的区别和使用,new()用于分配内存并返回指针,make()用于初始化切片、映射... 详细介绍golang的new() 、 make() 和简短声明符的区别和使用。文章目录 `new()`

Xshell远程连接失败以及解决方案

《Xshell远程连接失败以及解决方案》本文介绍了在Windows11家庭版和CentOS系统中解决Xshell无法连接远程服务器问题的步骤,在Windows11家庭版中,需要通过设置添加SSH功能并... 目录一.问题描述二.原因分析及解决办法2.1添加ssh功能2.2 在Windows中开启ssh服务2

Redis连接失败:客户端IP不在白名单中的问题分析与解决方案

《Redis连接失败:客户端IP不在白名单中的问题分析与解决方案》在现代分布式系统中,Redis作为一种高性能的内存数据库,被广泛应用于缓存、消息队列、会话存储等场景,然而,在实际使用过程中,我们可能... 目录一、问题背景二、错误分析1. 错误信息解读2. 根本原因三、解决方案1. 将客户端IP添加到Re

安卓链接正常显示,ios#符被转义%23导致链接访问404

原因分析: url中含有特殊字符 中文未编码 都有可能导致URL转换失败,所以需要对url编码处理  如下: guard let allowUrl = webUrl.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) else {return} 后面发现当url中有#号时,会被误伤转义为%23,导致链接无法访问