如何在AOSP中制作自己的OTA应用-fslota? [英] How to make own OTA app in AOSP - fslota?

查看:205
本文介绍了如何在AOSP中制作自己的OTA应用-fslota?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经从源代码构建了Android,并且在我们的设备上看起来不错.当前,我们需要制定自己的OTA流程,但我们不知道如何.

we have build Android from sources and it looks good on our device. Currently we need to make own OTA process, but we dont know how.

我们尝试实现FSLOTa( https://github.com/embest -tech/android_packages_apps_fsl_imx_demo/tree/master/FSLOta )对我们的http服务器,但是文档非常少-因此我们只是将源代码添加到源代码中并进行编译.

We try to implement FSLOTa (https://github.com/embest-tech/android_packages_apps_fsl_imx_demo/tree/master/FSLOta) against our http server, but documentation is very poor - so we simply add source to our source and compile it.

问题是,我们在框中看到了应用程序,但它什么也没做.

Problem is, that we see app in our box, but it doesnt nothing.

或者有一种方法可以修改内置的OTA应用,当我们将服务器更改为服务器时,至少会收到http请求.但是我们不知道,如何告诉http服务器将新版本-任何清单文件装箱? XML,JSON还是?有例子吗?

Or there is way to modify built in OTA app, when we change server to our server, we get http request at least. But we dont know, how tells http server to box about new version - any manifest file? XML, JSON or? Is there any example?

还是有另一种简单的方法可以将OTA更新实现为AOSP?

Or is there another simple way for implements OTA update to AOSP?

非常感谢你 D

推荐答案

我不了解FSLOTa,也不了解您正在使用的设备.但是,如果您想实施自己的OTA流程,则可以尝试以下方法(由于问题很广泛,因此只是一个简短的草案):

I dont know about FSLOTa nor do I know about the device you are working on. But If you want to implement your own OTA process you could try the following (Just a short draft since your question is very broad):

  1. 创建一个系统应用程序,该应用程序会不时检查服务器中是否有新软件包.
  2. 如果检测到新软件包,则会将其下载到您的设备中.
  3. 它将下载的update.zip复制到/cache/
  4. 然后,应用程序将创建以下文件/cache/recovery/command并将其写入--update_package=path_to_your_file. (有关更多命令,请参见/bootable/recovery.cpp)
  5. 然后它强制重新启动进入recovery
  6. 恢复将安装您的ota软件包.
  1. Create a system app that checks from time to time your server for new packages.
  2. if it detects a new package it downloads it to your device.
  3. it copies the downloaded update.zip to /cache/
  4. Then the app creates the following file /cache/recovery/command and writes --update_package=path_to_your_file in it. (For more commands see /bootable/recovery.cpp)
  5. Then it forces a reboot into recovery
  6. recovery installs your ota package.


更新: 我迅速检查了您链接的应用程序.我将检查以下内容:


Update: I quickly checked the app you linked. I would check these things:

  1. 您是否知道RecoverySystem.installPackage()被称为? ( https ://github.com/embest-tech/android_packages_apps_fsl_imx_demo/blob/master/FSLOta/src/com/fsl/android/ota/OTAServerManager.java#L282 )
  2. 您是否在RecoverySystem的logcat中看到一条消息,提示它将重新启动? (也许您有权限问题,并且不允许您的应用强制执行重新启动恢复")
  3. 您的update.zip路径正确吗? (应该在/cache/中)
  1. Do you get till the point where RecoverySystem.installPackage() is called ? (https://github.com/embest-tech/android_packages_apps_fsl_imx_demo/blob/master/FSLOta/src/com/fsl/android/ota/OTAServerManager.java#L282)
  2. Do you see a message in logcat from the RecoverySystem that it is going to reboot? (maybe you have a permission problem and your app is not allowed to force "reboot recovery")
  3. Is the path to your update.zip correct? (it should be in /cache/)

这篇关于如何在AOSP中制作自己的OTA应用-fslota?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆