Reputation: 189
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
Upvotes: 5
Views: 6083
Reputation: 287
I think the Lineage OS Updater package is a good answer to your question. LineageOS is a branch of AOSP and is committed to fully open source development of all parts of the Android OS. As part of this commitment, the community has developed a full over-the-air update cycle including a client application and a few server side projects.
In my recent experience, I could fully embed the LineageOS updater with the AOSP project and certainly, it works! There are a few steps toward fully embedding. I tried to describe it via the following question. How to use Lineage OS OTA in AOSP projects?
The project works for both full and incremental updates, but only adapted to A/B devices. I do not think you can easily use it in non-A/B devices.
Upvotes: 1
Reputation: 371
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.
Upvotes: 0
Reputation: 4088
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):
update.zip
to /cache/
/cache/recovery/command
and writes --update_package=path_to_your_file
in it. (For more commands see /bootable/recovery.cpp)recovery
Update: I quickly checked the app you linked. I would check these things:
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)RecoverySystem
that it is going to reboot? (maybe you have a permission problem and your app is not allowed to force "reboot recovery")Upvotes: 8