赞
踩
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
def WriteFullOTAPackage(input_zip, output_zip): 372 # TODO: how to determine this? We don't know what version it will 373 # be installed on top of. For now, we expect the API just won't 374 # change very often. Similarly for fstab, it might have changed 375 # in the target build. 376 script = edify_generator.EdifyGenerator(3, OPTIONS.info_dict) 377 378 recovery_mount_options = OPTIONS.info_dict.get("recovery_mount_options") 379 oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties") 380 oem_dicts = None 381 if oem_props: 382 oem_dicts = _LoadOemDicts(script, recovery_mount_options) 383 384 target_fp = CalculateFingerprint(oem_props, oem_dicts and oem_dicts[0], 385 OPTIONS.info_dict) 386 metadata = { 387 "post-build": target_fp, 388 "pre-device": GetOemProperty("ro.product.device", oem_props, 389 oem_dicts and oem_dicts[0], 390 OPTIONS.info_dict), 391 "post-timestamp": GetBuildProp("ro.build.date.utc", OPTIONS.info_dict), 392 } 393 394 device_specific = common.DeviceSpecificParams( 395 input_zip=input_zip, 396 input_version=OPTIONS.info_dict["recovery_api_version"], 397 output_zip=output_zip, 398 script=script, 399 input_tmp=OPTIONS.input_tmp, 400 metadata=metadata, 401 info_dict=OPTIONS.info_dict) 402 403 assert HasRecoveryPatch(input_zip) 404 405 metadata["ota-type"] = "BLOCK" 406 407 ts = GetBuildProp("ro.build.date.utc", OPTIONS.info_dict) 408 ts_text = GetBuildProp("ro.build.date", OPTIONS.info_dict) 409 script.AssertOlderBuild(ts, ts_text) 410 411 AppendAssertions(script, OPTIONS.info_dict, oem_dicts) 412 device_specific.FullOTA_Assertions()
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。