5

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.

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.

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?

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

Thank you very much D

Darius Radius
  • 169
  • 3
  • 14

2 Answers2

8

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. 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. 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/)
Grace Huang
  • 5,355
  • 5
  • 30
  • 52
IIIIIIIIIIIIIIIIIIIIII
  • 3,958
  • 5
  • 45
  • 70
  • Hello, thank you very much. Actually we trying your advices and I will write result to you. Thanks!!!!!! – Darius Radius Apr 06 '17 at 22:11
  • Hi @DariusRadius, Would you like to share how can I update my own apk which is not installed through google play? and I have the system level access. Thanks. – skygeek Sep 27 '18 at 12:57
  • @skygeek the steps are pretty much the same as in this answer – IIIIIIIIIIIIIIIIIIIIII Sep 27 '18 at 13:02
  • @IIIIIIIIIIIIIIIIIIIIII okay, actually I am pretty new on this OTA thing so don't have much understanding about the zip structure and parameters to put for new or updated app. I will explore. BTW, thanks for quick reply. – skygeek Sep 27 '18 at 13:06
0

i have been developing an OTA updater android application, you should know application send request to backend server and receive a JSON file about the available update. everything iiiiiiiiiiiiiiiiiiiiii anwserd was ok on non/AB devices, but for A/B devices, the android application downloads the OTA package under /data and installation will not happen in recovery or anything, the changes will apply to the unused slot before REBOOT.

Sep
  • 147
  • 8