当前位置:   article > 正文

2020-12-17_can't install this package 安卓升级

can't install this package 安卓升级

Can't install this package (Tue Jun 27 12:29:30 CST 2017) over newer build (Mon Jun 26 17:20:32 CST 2017)

问题原因:安卓升级时发现新包的时间戳小于本地系统的时间戳。

由于script.AssertOlderBuild检查时间戳导致升级失败。

build/core/Makefile调用了此脚本,只需要加入相应的参数不检查时间即可。

或者直接注释这一行

/AN/build/make/tools/releasetools/ota_from_target_files.py

  1. def WriteFullOTAPackage(input_zip, output_zip):
  2. 372 # TODO: how to determine this? We don't know what version it will
  3. 373 # be installed on top of. For now, we expect the API just won't
  4. 374 # change very often. Similarly for fstab, it might have changed
  5. 375 # in the target build.
  6. 376 script = edify_generator.EdifyGenerator(3, OPTIONS.info_dict)
  7. 377
  8. 378 recovery_mount_options = OPTIONS.info_dict.get("recovery_mount_options")
  9. 379 oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties")
  10. 380 oem_dicts = None
  11. 381 if oem_props:
  12. 382 oem_dicts = _LoadOemDicts(script, recovery_mount_options)
  13. 383
  14. 384 target_fp = CalculateFingerprint(oem_props, oem_dicts and oem_dicts[0],
  15. 385 OPTIONS.info_dict)
  16. 386 metadata = {
  17. 387 "post-build": target_fp,
  18. 388 "pre-device": GetOemProperty("ro.product.device", oem_props,
  19. 389 oem_dicts and oem_dicts[0],
  20. 390 OPTIONS.info_dict),
  21. 391 "post-timestamp": GetBuildProp("ro.build.date.utc", OPTIONS.info_dict),
  22. 392 }
  23. 393
  24. 394 device_specific = common.DeviceSpecificParams(
  25. 395 input_zip=input_zip,
  26. 396 input_version=OPTIONS.info_dict["recovery_api_version"],
  27. 397 output_zip=output_zip,
  28. 398 script=script,
  29. 399 input_tmp=OPTIONS.input_tmp,
  30. 400 metadata=metadata,
  31. 401 info_dict=OPTIONS.info_dict)
  32. 402
  33. 403 assert HasRecoveryPatch(input_zip)
  34. 404
  35. 405 metadata["ota-type"] = "BLOCK"
  36. 406
  37. 407 ts = GetBuildProp("ro.build.date.utc", OPTIONS.info_dict)
  38. 408 ts_text = GetBuildProp("ro.build.date", OPTIONS.info_dict)
  39. 409 script.AssertOlderBuild(ts, ts_text)
  40. 410
  41. 411 AppendAssertions(script, OPTIONS.info_dict, oem_dicts)
  42. 412 device_specific.FullOTA_Assertions()
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/119297
推荐阅读
相关标签
  

闽ICP备14008679号