赞
踩
1. Android升级到较新的版本后,想用.zip升级包升回旧的版本时,在升级时会发错。这是由于android系统时对升级文件有版本检测。
2. build/tools/releasetools/ota_from_target_files:
- def main(argv):
-
- def option_handler(o, a):
- if o == "--board_config":
- pass # deprecated
- elif o in ("-k", "--package_key"):
- OPTIONS.package_key = a
- elif o in ("-i", "--incremental_from"):
- OPTIONS.incremental_source = a
- elif o in ("-w", "--wipe_user_data"):
- OPTIONS.wipe_user_data = True
- elif o in ("-n", "--no_prereq"):
- OPTIONS.omit_prereq = True
- elif o in ("-o", "--oem_settings"):
- OPTIONS.oem_source = a
- elif o in ("-e", "--extra_script"):
- OPTIONS.extra_script = a
- elif o in ("-a", "--aslr_mode"):
- if a in ("on", "On", "true", "True", "yes", "Yes"):
- OPTIONS.aslr_mode = True
- else:
- OPTIONS.aslr_mode = False
- elif o in ("-t", "--worker_threads"):
3. build/tools/releasetools/edify_generator.py 比较时间戳就是在这里
def AssertOlderBuild(self, timestamp, timestamp_text):
"""Assert that the build on the device is older (or the same as)
the given timestamp."""
self.script.append(
('(!less_than_int(%s, getprop("ro.build.date.utc"))) || '
'abort("Can\'t install this package (%s) over newer '
'build (" + getprop("ro.build.date") + ").");'
) % (timestamp, timestamp_text))
4. 如果不想系统检测版本,将ota_from_target_files文件中改为OPTIONS.omit_prereq = False
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。