Git Product home page Git Product logo

proj186-xiaomi-ota-using-small-resources's Introduction

proj186-xiaomi-OTA-using-small-resources

资源受限下OTA静默升级系统

项目名称

资源受限下OTA静默升级系统

支持单位 (可选内容)

小米移动

项目描述

在存储资源受限的硬件平台上,实现操作系统的静默升级,在做到用户无感知的同时,充分利用到平台的存储资源。linux系统中常用的基于AB分区的OTA升级系统可做到系统升级用户无感知,但总有一半存储空间未加以利用;而Non-AB系统虽能完全利用存储空间,但需要设备进入recovery模式,用户在此期间无法使用设备,另外,virtual AB升级对AB升级进行了一定程度的改变,需要升级系统的时候,将新系统的数据和现在的数据进行对比校验,将差异部分写入另外一个分区,而不是系统分区,之后,利用新数据启动系统,如果系统顺利启动,那么就将差异数据写入到系统分区,启动失败则抛弃差异数据,用原来系统分区的数据启动。Virtual AB机制既有A/B分区的可靠性优点,也无需像A/B分区那样占据大量的额外空间. 有没有一种机制, 比Virtual AB还能有更少占用系统分区存储,却能达到用户无感知的升级方案呢?请为资源受限的设备,提供OTA静默升级,设计实现一套新方案.

所属赛道

2022全国大学生操作系统比赛的“OS功能挑战”赛道

参赛要求

• 以小组为单位参赛,最多三人一个小组,且小组成员是来自同一所高校的本科生或研究生(2022年春季学期或之后毕业的大一~大四的本科生或研究生)

• 如学生参加了多个项目,参赛学生选择一个自己参加的项目参与评奖

• 请遵循“2022全国大学生操作系统比赛”的章程和技术方案要求

项目导师

• 杨冬东:[email protected]

• 王刚:[email protected]

难度

中等

特征

  1. 使用 c / c++ / rust 语言,推荐使用rust实现

  2. 系统用户无感知,即升级过程不干扰用户的正常使用,这项可通过特征5保证

  3. 存储空间最大程度的加以利用,增加用户可用空间大小,降低产品成本,提升用户体验

  4. 满足ARM aarch64 / riscv 架构支持

  5. 升级过程中,控制各项系统资源占用,例如处理器、内存、带宽等需要给予合理阈值的限制

  6. 在满足特征5的情况下,尽量减少系统升级总体耗时,以减少设备发热、耗电

  7. 升级包应当签名,升级程序须验证升级包的合法性

  8. 升级包应当加密,升级程序须在验证升级包的合法性后再解密出真实数据

  9. 处理升级失败的情况,如签名错误、解密失败,电源中断、网络掉线等等异常情况

  10. 处理版本的回退,如禁止高版本降级到低版本

  11. 升级失败汇总处理,如出错则回退到旧版本

  12. 支持定期查询、自动更新和用户手动查询、更新两种模式

文档

  1. https://source.android.google.cn/devices/tech/ota/dynamic_partitions/implement

  2. https://source.android.google.cn/devices/tech/ota/virtual_ab/implement-patches?hl=en

  3. virtual AB: https://source.android.com/devices/tech/ota/virtual_ab/

  4. https://doc.rust-lang.org/book/

License

GPLv2

Apache 2.0

预期目标

注:下面的内容是建议内容,不要求必须全部完成。选择本项目的同学也可与导师联系,提出自己的新想法,如导师认可,可加入预期目标

第一题

编写升级包生成工具,包括但不限于打包、分析、签名、验签、加密、解密、压缩、解压缩等

第二题

搭建后台升级服务器,实际可以用本地局域网环境模拟

第三题

系统联网后,在更新界面可查询到OTA服务器推送的新版本,包括版本号、包大小等信息

第四题

系统联网后,可在后台按照设定好的升级周期自动完成查询、更新操作,无需用户介入

第五题

实现比VirtualAB更节省空间的静默升级方案, 可以引入super分区,采用dm-snapshot等技术来进行升级

proj186-xiaomi-ota-using-small-resources's People

Contributors

chyyuu avatar

Stargazers

Chiro Liang avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.