Search code examples
androidandroid-sourcelineageosover-the-air

How to use Lineage OS OTA in AOSP projects?


I am going to develop an OTA update manager for client side through AOSP project. The Lineage OS developers have already developed an OTA manager for this purpose (please find the following GitHub repo):

https://github.com/alidoostnia/android-OTA-Lineage-Version

I have a plan to customize the lineage version for AOSP, but I am not sure how to do this. There are many dependencies on the Lineage OS OTA such as the followings:

import org.json.JSONException;
import org.lineageos.updater.download.DownloadClient;
import org.lineageos.updater.misc.Constants;
import org.lineageos.updater.misc.Utils;

I do not know how to localize these libraries and packages. Is there any guideline on how I can do this?

Any solution, example code or clue is highly appreciated.


Solution

  • Through the build process of AOSP, I made a few errors and tried to replace the subjected packages with the compatible ones in AOSP. It takes removing a few methods from the JAVA codes and replacing a few color codes from XML files.

    You need to only add the Updater package of Lineage OS in your AOSP project through the path packages/apps and make a few necessary changes within the root make file of AOSP and Android.bp file in my Updater package. You then execute an incremental build using the mm Updater command. After these steps, the Updater of Lineage appears in the Settings app of AOSP.

    On the client side, the Lineage Updater package provides a very straightforward document on how we can customize the server information. Please visit the following repo and its readme file: https://github.com/LineageOS/android_packages_apps_Updater