当前位置: 首页 > news >正文

Android14 OTA差分包升级报Package is for source build

制作好差分包,使用adb线刷模式验证ota升级,出现E:Package is for source build错误

使用adb方式验证

  • 进入recovery模式
adb reboot recovery
  • 稍等一会界面会提示
Now send the package you want to apply 
to the device with "adb sidelaod <filename>"...
  • 输入命令开始升级
adb sideload Z:\xxx\xxx\ota\update.zip

update.zip是制作好的差分包

报E:Package is for source build

Finding update package...
[   48.397027] I:Update package id: /sideload/package.zip
[   48.521958] I:1 key(s) loaded from /system/etc/security/otacerts.zip
[   48.522082] Verifying update package...
[   48.560787] I:comment is 1738 bytes; signature is 1720 bytes from end
[   48.626868] I:signature (offset: 36340, length: 6b2): 308206ae06092a864886f70d0
[   48.627340] I:whole-file signature verified against RSA key 0
[   48.627449] Update package verification took 0.1 s (result 0).
[   48.661254] Installing update...
[   48.697640] I:old spl: 2024-05-05 new spl: 2024-05-05 CHECK passes
[   48.697909] E:Package is for source build mp1V614 but expected mp1V164
[   48.731747]
[   48.789490] I:current maximum temperature: 33043
[   48.789954] I:/sideload/package.zip

这个问题使用adb线刷才有, 如果使用代码升级验证不会出现。

本地验证时,注释以下代码

  • vendor_ap_s0/bootablse/recovery/install/install.cpp
--- a/vendor_ap_s0/bootable/recovery/install/install.cpp
+++ b/vendor_ap_s0/bootable/recovery/install/install.cpp
@@ -147,20 +147,20 @@ static bool CheckAbSpecificMetadata(const std::map<std::string, std::string>& me// Incremental updates should match the current build.auto device_pre_build = android::base::GetProperty("ro.build.version.incremental", "");auto pkg_pre_build = get_value(metadata, "pre-build-incremental");
-  if (!pkg_pre_build.empty() && pkg_pre_build != device_pre_build) {
+  /*if (!pkg_pre_build.empty() && pkg_pre_build != device_pre_build) {LOG(ERROR) << "Package is for source build " << pkg_pre_build << " but expected "<< device_pre_build;return false;
-  }
+  }*/auto device_fingerprint = android::base::GetProperty("ro.build.fingerprint", "");auto pkg_pre_build_fingerprint = get_value(metadata, "pre-build");
-  if (!pkg_pre_build_fingerprint.empty() &&
+ /* if (!pkg_pre_build_fingerprint.empty() &&!isInStringList(device_fingerprint, pkg_pre_build_fingerprint, FINGERPRING_SEPARATOR)) {LOG(ERROR) << "Package is for source build " << pkg_pre_build_fingerprint << " but expected "<< device_fingerprint;return false;
-  }
+  }*/// Check for downgrade version.int64_t build_timestamp =
http://www.lryc.cn/news/547741.html

相关文章:

  • 双向选择排序算法
  • Node.js setImmediate 教程
  • MyBatis @Param 注解详解:多参数传递与正确使用方式
  • Spring实战spring-ai运行
  • STL:C++的超级工具箱(一)
  • leetcode349 两个数组的交集
  • 快速生成viso流程图图片形式
  • 鸿蒙Android4个脚有脚线
  • 【NetTopologySuite类库】geojson和shp互转,和自定义对象互转
  • 【哇! C++】类和对象(三) - 构造函数和析构函数
  • Ubuntu20.04本地配置IsaacLab 4.2.0的G1训练环境(一)
  • 浅谈汽车系统电压优缺点分析
  • Springboot基础篇(4):自动配置原理
  • Dify 开源大语言模型应用开发平台使用(一)
  • 机器学习深度学习基本概念:logistic regression和softmax
  • OpenCV计算摄影学(16)调整图像光照效果函数illuminationChange()
  • Git - 补充工作中常用的一些命令
  • 使用Python的requests库调用API并处理JSON响应的详细步骤
  • Mybatis如何通过databaseId属性支持不同数据库的不同语法
  • android edittext 防止输入多个小数点或负号
  • windows部署spleeter 版本2.4.0:分离音频的人声和背景音乐
  • 深度学习、宽度学习、持续学习与终身学习:全面解析与其在大模型方面的应用
  • 【量化科普】Arbitrage,套利
  • 删除已加入 .gitignore却仍被git追踪的文件
  • pytest框架 核心知识的系统复习
  • Spring Cloud Alibaba学习 5- Seata入门使用
  • WebAssembly技术及应用了解
  • Deepseek中的MoE架构的改造:动态可变参数激活的MoE混合专家架构(DVPA-MoE)的考虑
  • NodeJS学习笔记
  • 【交通网络拓扑图实现原理深度解析】