No description or website provided.
Python

README.md

LineageOS Updater Backend

Copyright (c) 2017 The LineageOS Project

Initial set up:

  1. Requires python3, mongoengine and flask.
  2. Requires a mongoDB instance set up and accessible.
  3. Copy config.json.example to config.json and modify to your needs.
  4. Copy local_config.py.example to local_config.py and modify to your needs (flask config options).
  5. Run: ./app.py from this directory.

To add entries a simple script has been added called addrom.py:
usage: addrom.py [-h] -f FILENAME -d DEVICE -v VERSION -dt DATETIME -t ROMTYPE -m MD5SUM
Alternatively addon.py can be included in another python script and the addrom() method can be called programatically.

Listens on port 5000 by default, this can be changed in local_config.py

Example API Calls:

Obtaining rom list for a device:
/api/v1/<device>/<romtype>
Request data (optional):
{"ro.build.date.utc": "<utc_timestamp>", "romversion": "<romversion>"}

<device> - Name of device. Example: d2vzw
<romtype> - Type of rom. Example: nightly
<romversion> - Version of rom. Example: 14.1(optional)
<utc_timestamp> - Timestamp for current build on device. Taken from build.prop usually. Example: 1483179136(optional)

Requesting a file:
/api/v1/requestfile/<id>
<id> - Id of requested file. Obtained from json in the api call above. Example: 586bce6c07f9d87b152c3215

TODO

  • Lots I'm sure