Giter Club home page Giter Club logo

lineageota's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lineageota's Issues

Invoke Method error with Flight

Hi,

Recently I started taking a look at making my own private LineageOS build server, and I decided I wanted to have some method to automatically receive new builds daily for my phone without having to manually check an actual file listing from Apache2 and try and find the one with the newest date modified somewhere in there. That's when I came across LineageOTA (formerly CMOta).

I set everything up as best as I could, and it's on a fresh Apache2 install using Let's Encrypt for SSL. However, I receive a 500 Internal Server Error from Composer when any update checks are done. The address of this can be found here and the error message provided is "Undefined offset: 0 (8)".

Thank you for your time creating an amazing reverse engineering of the OTA service used by the CMUpdater app, and thanks in advance for any help provided!

Clarification on ROM Integration

Hi,

I've read the README on ROM integration. From what I understand, in order to integrate, after the ROM is built (e.g., lineage-17.1-20210207-...zip), I need to extract the zip file, mount the system.new.dat file, modify the build.prop file within that mounted drive with the lineage.updater.url location pointing to my server, unmount and rebuild the zip file?

Thank you for any clarification. If that is the case, it does seem much more simple to modify packages/apps/Updater/res/values/strings.xml prior with my server location.

I just wanted to clarify, because I feel I'm missing something big-time (which I probably am since I am super new to building my own ROMs). However, I love the idea of just having my phone point to my own OTA server; and then any modification or new ROM I make I can just push the zip to my OTA server and my phone will pick up the update.

Update composer.json to resolve warning message

Composer 1.8.4 (perhaps other versions as well) throw the following warning when installing:

Deprecation warning: require.julianxhokaxhiu/DotNotation is invalid, it should not contain uppercase characters. Please use julianxhokaxhiu/dotnotation instead. Make sure you fix this as Composer 2.0 will error.

Legacy support for CM

I see the following error when checking for updates with cm-11.

[Wed Jan 18 20:46:05.823317 2017] [core:notice] [pid 1630] AH00094: Command line: '/usr/sbin/apache2'
[Wed Jan 18 23:20:52.677424 2017] [:error] [pid 2804] [client 192.168.1.4:54081] PHP Parse error: syntax error, unexpected '}' in /var/www/html/CyanogenModOTA/src/CmOta.php on line 138

404 error

localhost/LineageOTA returns a 404 for me.
I copied it to var/www/html, and that doesn't bring up a 404, but I'm not sure if the actual updater server bit will still work.
Is it meant to be in var/www/html, or do I need to do something for it to work in var/www?

url doesn't have the path prepended

When I fetch from http://example.com/lineageos/ota/api/v1/device/nightly/05793c8c55 notice that the stanza that comes back in the response doesn't have the leading "lineageos/ota/" prepended to it:

`
{
"incremental" : "94a030a813",
"changes" : "http://example.com/builds/full/lineage-14
"timestamp" : 1486238453,
"channel" : "nightly",
"api_level" : "25",
"filename" : "lineage-14.1-20170204-UNOFFICIAL-.zip",
"md5sum" : "56d72db24b15ebe799d2b0b61f66db02",
"romtype" : "nightly",
"datetime" : 1486238453,
"url" : "http://example.com/builds/full/lineage-14.1-2
}

`

[QUESTION] Use for other roms

I was wondering if there's a way to use this with roms that aren't Lineage? I tried with my build of BlissRoms and when I check the API it just returns {"id":null,"result":[],"error":null}. I'm using nginx and the config is below in case it has issues

server {
        root /var/www/LineageOTA;

        index index.php;

        server_name ota.mysite.tld;

        proxy_set_header Forwarded "host=$host;proto=https";

        location ~ \.php$ {
                fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
                fastcgi_index index.php;
                include /etc/nginx/fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }

        location ~ /\.ht {
                deny all;
        }

        location /builds {
                autoindex on;
                autoindex_exact_size off;
                try_files $uri $uri/ /index.php?$args;
        }

        listen [::]:443 ssl http2; # managed by Certbot
        listen 443 ssl http2; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/mysite.tld-0001/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/mysite.tld-0001/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}

server {
        listen 80;
        listen [::]:80;
        server_name ota.mysite.tld;
        return 301 https://$server_name$request_uri;
}

Updater isnt finding any updates

I apologize for the second submitted issue, but for some reason I am unable to get the updater to actually pull the latest OTA that I have uploaded. Its attempting to pull from the direct ip of the URL that I set but it doesn't actually find the updated zip.

I tried adding it to the updater string like this
https://androidota.adamski2003.lol/api/v1/{device}/{type}/{incr}

I've tried adding it to my devices properties.mk like this

OTA

PRODUCT_PROPERTY_OVERRIDES +=
lineage.updater.uri=https://androidota.adamski2003.lol/api/v1/{device}/{type}/{incr}

I've tried adding it to my build.prop manually before signing the zip as well but nothing seems to actually work?
I have the lineageota docker running properly and it is creating the /api page correctly as well so I am unsure whats wrong.
https://androidota.adamski2003.lol/api

adapt new snapshot filename schema

the new cm snapshot filename is like this cm-13.0-20160419-SNAPSHOT-ZNH0EAO2O0-bacon.zip, with an extra version of ZNH0EAO2O0, this makes our ota server 500 error:

500 Internal Server Error

Undefined offset: 0 (8)

#0 /app/src/Helpers/Build.php(215): flight\Engine->handleError(8, 'Undefined offse...', '/app/src/Helper...', 215, Array)
#1 /app/src/Helpers/Build.php(62): JX\CmOta\Helpers\Build->removeTrailingDashes(Array)
#2 /app/src/Helpers/Builds.php(130): JX\CmOta\Helpers\Build->__construct('cm-13.1-2016041...', '/app/builds/ful...')
#3 /app/src/Helpers/Builds.php(49): JX\CmOta\Helpers\Builds->getBuilds()
#4 /app/vendor/mikecao/flight/flight/core/Loader.php(123): JX\CmOta\Helpers\Builds->__construct()
#5 /app/vendor/mikecao/flight/flight/core/Loader.php(80): flight\core\Loader->newInstance('\JX\CmOta\Helpe...', Array)
#6 /app/vendor/mikecao/flight/flight/Engine.php(69): flight\core\Loader->load('builds', true)
#7 /app/vendor/mikecao/flight/flight/core/Dispatcher.php(191): flight\Engine->__call('builds', Array)
#8 /app/vendor/mikecao/flight/flight/core/Dispatcher.php(191): flight\Engine->builds()
#9 /app/vendor/mikecao/flight/flight/Flight.php(76): flight\core\Dispatcher::invokeMethod(Array, Array)
#10 /app/src/CmOta.php(108): Flight::__callStatic('builds', Array)
#11 /app/src/CmOta.php(108): Flight::builds()
#12 /app/vendor/mikecao/flight/flight/core/Dispatcher.php(160): JX\CmOta\CmOta->JX\CmOta{closure}()
#13 /app/vendor/mikecao/flight/flight/core/Dispatcher.php(143): flight\core\Dispatcher::callFunction(Object(Closure), Array)
#14 /app/vendor/mikecao/flight/flight/Engine.php(313): flight\core\Dispatcher::execute(Object(Closure), Array)
#15 /app/vendor/mikecao/flight/flight/core/Dispatcher.php(191): flight\Engine->_start()
#16 /app/vendor/mikecao/flight/flight/core/Dispatcher.php(142): flight\core\Dispatcher::invokeMethod(Array, Array)
#17 /app/vendor/mikecao/flight/flight/core/Dispatcher.php(48): flight\core\Dispatcher::execute(Array, Array)
#18 /app/vendor/mikecao/flight/flight/Engine.php(64): flight\core\Dispatcher->run('start', Array)
#19 /app/vendor/mikecao/flight/flight/core/Dispatcher.php(191): flight\Engine->__call('start', Array)
#20 /app/vendor/mikecao/flight/flight/core/Dispatcher.php(191): flight\Engine->start()
#21 /app/vendor/mikecao/flight/flight/Flight.php(76): flight\core\Dispatcher::invokeMethod(Array, Array)
#22 /app/src/CmOta.php(80): Flight::__callStatic('start', Array)
#23 /app/src/CmOta.php(80): Flight::start()
#24 /app/index.php(35): JX\CmOta\CmOta->run()
#25 {main}

Add an option to use a different builds directory

Hi.

Currently I'm publishing my releases here on github and I want to keep this as an alternative way. Also I don't want to invest too much into a webspace for my projct and I don't like free webhosts too much either with all their advertising. So it would be awesome if your OTA-Updater could serve the needed files from a different location (eg. github) than the default /builds/full and /builds/delta directory.
Honestly I'm not sure how much really needs to be changed, cause many of the commands you used (ex. filesize) should work with http(s);// urls.
Maybe you can look into this and give me a short response.
If you don't want to (or don't have the time for it) would you like me to provide a pull request for this or should I just fork and don't bother you anymore?

wkr ADT

Scan for zips in the subdirectories of builds/full/

Is it possible to implement the search for build zips also in the subdirs of builds/full/? At the moment all the zips must be inside that folder and, when many builds of many devices are present, the folder becomes messy.

With this feature enabled one can organize the builds in the respective device folder:

  • builds/full/bacon/
  • builds/full/onyx/
  • builds/full/thea/
  • ...

changelog for legacy updater unavailable

I am unable to download/view the changelog with the legacy CM Updater (cm-11.0). CM Updater just times out when attempting to download the changelog. When I look at the unit test for cm-11.0, this is what I see below. I noticed that there is no link for the changelog in the response for the unit test. This was working a while back, so I'm not exactly sure what changed.

{ id: null,
response:
[ { incremental: '49e89cf66b',
api_level: '19',
url: 'http://192.168.1.5/CyanogenModOTA/builds/full/cm-11-20170508-NIGHTLY-p3110.zip',
timestamp: 1494254395,
md5sum: '1c970862c206ceb43d7de6ccf3c2363a',
changes: '',
channel: 'nightly',
filename: 'cm-11-20170508-NIGHTLY-p3110.zip',
romtype: 'nightly',
datetime: 1494254395 } ],
error: null }

Creating Delta Builds

There is no documentation on how to name delta builds. How would you name delta builds for this api?

It seems at least the current Lineage 17.1 needs HTTPS

Well, when I used HTTP only (with an invalid SSL cert) the updater showed an "problem" and could not perform the update query. Changing the url inside the props to HTTPS and providing an valid SSL cert fixed that. I guess that should be noted in the README.md...

Change web root for Docker image behind reverse proxy

As far as I can tell, there is no way to tell the Docker image what its web root is.

  • The dockerized app is always running on /
  • It's possible to forward https://example.com/~user/ota/ to http://192.168.0.42/ , however, there is no way to pass the ~user/ota/ part using the Forwarded header.
  • As such, the URLs that LineageOTA generates will be incorrect.

It would be nice if there was a way to specify the web root either via the environment or as a header.

I noticed that there is code to read it from ro.build.ota.url, but that doesn't seem to be present in the .prop files I got from docker-lineage-cicd.

URL Wrong when using apache reverse proxy

I am running this behind an apache reverse proxy, and i needed to edit the sourcefiles to get the proper url. I am using docker to run the ota-server, and the download url for the files are the defined target of the proxy (eg. 127.0.0.1:6677). Therefore the device can't download the updates (but can see them via the api)

If i preserve the host, the ip changes to the host but the protocoll is http instead of my apache's https. Also subdirectories are not preseved.

Did i do the proxy wrong, or is this an actual bug?

cm-11 and $params

There seems to be an issue with commit 5037df2 and my cm-11.0 device. The new update is available in cm-11 updater, but it can't connect to download the update. If I revert the commit above, then it works as expected. There seems to be an issue with returning true when $params=NULL on cm-11.0. Perhaps it is because the params are extracted differently with cm-11.0.

The requested URL /api was not found on this server.

Am I missing something?

I'm using Apache on CentOS with the php5_module. The server is up. If I browse to it, I am redirected the the builds directory but when I run the CyanogenModOTAUnitTest I get:

"The requested URL /api was not found on this server."

Statistics

Hi there. Your project is enormous. Are you planning any kind of statistics?
For example how much pings and how much downloads?
I know, that this kind of statistics is a bit inaccurate, but it will be pretty good to have one.

LineageOS 20 support: not working with self-signed certificates

I'm trying to get this to work on lineage-20.

REST server is functional and lists (boot.im rom.zipo rom.zip.sha256sum rom.prop):
image

UnitTest fails with "undefined" That I don't know how to interpret

>> npm run test
>[email protected] test
>node tests/lineage.js

undefined

Here is my tests/lineage.js

>> cat tests/lineage.js
var unirest = require('unirest'),
OtaHost = 'https://192.168.2.2/LineageOTA'; // Place here you OTA Server Url

// Provide a list of current LineageOS available updates
var getLineageList = function(){
unirest
.get(OtaHost + '/api/v1/fajita/UNOFFICIAL/77433d9635') // optional: add /<incremental_hash> to get delta updates instead
.headers({
'Cache-control' : 'no-cache',
'Content-type' : 'application/json',
'User-Agent' : 'com.cyanogenmod.updater/3.0'
})
.end(function(response){
console.log( response.body );
});
}

getLineageList();

But chrome gets an answer that seems to make sense :
image

And finaly Lineage UpdatesActivity is not happy as it not getting the list it wants (phone is connected on home lan)

> logcat * | grep -i updatesactivity
06-17 16:55:28.255 10365 10365 D UpdatesActivity: Checking https://192.168.2.2/LineageOTA/api/v1/fajita/unofficial/eng.dwardo.20230611.131437
06-17 16:55:28.496 10365 22491 E UpdatesActivity: Could not download updates list

HTTP 403

Hello,

I setup the project on my server.
All installation looks good. I enabled mod_write and php7.0
The build is doing the correct GET :

[15/Jun/2018:22:12:08 +0000] "GET /DfxOTA/api/v1/herolte/dfx/dd4c8a80f4 HTTP/1.1" 403 551 "-" "Dalvik/2.1.0 (Linux; U; Android 7.1.2; SM-G930F Build/NJH47F)"

The ota build is there:
root@dfx-ota:/var/www/html/DfxOTA# ls -lisa builds/full/lineage_herolte-ota-dd4c8a80f4.zip
7098 480060 -rw-r--r-- 1 www-data www-data 491577822 Jun 15 21:50 builds/full/lineage_herolte-ota-dd4c8a80f4.zip
root@dfx-ota:/var/www/html/DfxOTA#

However i'm seeing HTTP Forbidden. Started to see it when added AllowOverride All. Before it server was returning 404.

Options FollowSymLinks AllowOverride All Require all denied

<Directory /var/www/html/DfxOTA>
Options FollowSymLinks
AllowOverride All
Require all denied

Any idea ?

Thanks in advance

Generic error unless change to use HTTPS

Using index.js as-is causes this error:

$ node index.js 
{ id: null, result: null, error: 'Error decoding JSON' }

If I change OtaHost to use the HTTPS endpoint (vs. HTTP) it works:

    OtaHost = 'https://download.cyanogenmod.org'; // Place here you OTA Server Url

Nginx config issue

Hello all,

I really want to get this working on my server for my lineage builds but I am unable to get it to work with my Nginx Reverse Proxy.
I am pretty sure it has to do with my Nginx config and it somehow not processing the requests with the .php script (I have pretty much no experience with php).

I have copied the config together from my other ones + some things I found around here (the part with the comment) but now I am unable to find it again.

If I go to / it redirects me to /builds/ and displays the folder structure just fine, if I access anything at /api, it returns a 404 Not Found from nginx. I tried with the LineageOS Updater as well as manually using the UnitTest and/or curl.

Any hints towards what I am doing wrong would be highly appreciated!

server {
        root /var/www/lineage-ota;

        index index.php;

        server_name lineage.ota.mydomain.com;

        proxy_set_header Forwarded "host=$host;proto=https";

        location ~ \.php$ {
                fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
                fastcgi_index index.php;
                include /etc/nginx/fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }

        location ~ /\.ht {
                deny all;
        }

        location /builds {
                autoindex on;
                autoindex_exact_size off;

                # This is cool because no php is touched for static content.
                # include the "?$args" part so non-default permalinks doesn't break when using query string
                try_files $uri $uri/ /index.php?$args;
        }

        listen [::]:443 ssl http2; # managed by Certbot
        listen 443 ssl http2; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/lineage.ota.mydomain.com/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/lineage.ota.mydomain.com/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}

server {
        listen 80;
        listen [::]:80;
        server_name lineage.mydomain.com;
        return 301 https://$server_name$request_uri;
}

setting up my own server

I am trying to set this up but I keep getting
03-03 00:00:07.884: E/UpdateCheckService(1887): Error in JSON result
03-03 00:00:07.884: E/UpdateCheckService(1887): org.json.JSONException: Value (JSONObject.java:159)
03-03 00:00:07.884: E/UpdateCheckService(1887): at org.json.JSONObject.(JSONObject.java:172)
03-03 00:00:07.884: E/UpdateCheckService(1887): at com.gummy.updater.service.UpdateCheckService.parseJSON(UpdateCheckService.java:315)
03-03 00:00:07.884: E/UpdateCheckService(1887): at com.gummy.updater.service.UpdateCheckService.getAvailableUpdatesAndFillIntent(UpdateCheckService.java:265)
03-03 00:00:07.884: E/UpdateCheckService(1887): at com.gummy.updater.service.UpdateCheckService.onHandleIntent(UpdateCheckService.java:116)
03-03 00:00:07.884: E/UpdateCheckService(1887): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
03-03 00:00:07.884: E/UpdateCheckService(1887): at android.os.Handler.dispatchMessage(Handler.java:102)
03-03 00:00:07.884: E/UpdateCheckService(1887): at android.os.Looper.loop(Looper.java:136)
03-03 00:00:07.884: E/UpdateCheckService(1887): at android.os.HandlerThread.run(HandlerThread.java:61)

Any clue what I might be missing?
I have the server set up at http://ironman.rombitch.com/GummyOTAserver/

No updates to Docker image

The Docker image https://hub.docker.com/r/julianxhokaxhiu/lineageota was last updated on Jul 3, so it does not contain new features like #76

Docker Hub stopped building automatically for free, that's probably the reason. Many projects migrated to bulding Docker images using GitHub actions, e.g. lineageos4microg/docker-lineage-cicd#188

Another option would be to ditch Docker Hub and publish on GitHub Container Registry instead, which simplifies the setup even more. See https://github.com/lineageos4microg/mini_ota/blob/main/.github/workflows/publish.yml for an example.

setting up

hi ive set it up now following your instructions is the default url location build folder
also whats api mean
ive posted on xda is this project still working for 18.1

I can't remove the docker command

So I ran the docker command once a while ago to see if I could get this to work, however ever since then I've had a problem with apache and anything using port 80. Once I learnt docker was the problem, I've run docker ps, and julianxhokaxhiu/lineageota is there, unless I've already killed it. When I reboot, it's back. I've tried docker update --restart=no name-of-container, then killing it and rebooting, but it's there again.

Please help me get rid of this, currently I can't run another apache thing, as most of the time I'd rather clone this into /var/www/html and using apache, but I can't because of this.

It would be helpful for future newbs like me if readme was also updated to reflect how to remove the docker container when it is no longer wanted.

Many thanks, and other than this, I really like this project, well done!

unique id field required soon

LineageOS is soon going to be using a new version of their "Updater" application found here:

https://github.com/gmrt/android_packages_apps_Updater

The json parser is now looking for an additional "id" field. Currently, the response for "id" is "null" with this OTA Server.

The new Updater is looking for these fields:

https://github.com/gmrt/android_packages_apps_Updater/blob/master/src/org/lineageos/updater/misc/Utils.java#L63-L68

So, the solution to fixing the OTA Server to work with the new LineageOS Updater is to generate a unique number for the "id" field.

LINEAGEOTA_BASE_PATH sourcing

Hello! Long story short, I had to make a quick modification to index.php so LINEAGEOTA_BASE_PATH could reach the API server, and i'm not sure if it's my apache configuration or something else:

When I first set the deployment up a few months ago, I needed to define env variable LINEAGEOTA_BASE_PATH for my reverse proxy, and updated to latest commit (latest tagged release that composer grabs is 2.9.0 without the change for $base_path).

I declared the variable in /etc/apache2/envvars as LINEAGEOTA_BASE_PATH=https://externalURL, however the server does not seem to see the variable, the API call would return "url":"http:\/\/internalURL:port\". Tried defining it in .htaccess as well, no dice.

I can confirm the variables in envvars were being set by viewing phpinfo() under Apache Environment:

SCRIPT_FILENAME | /var/www/LineageOTA/phpinfo.php
LINEAGEOTA_BASE_PATH | https://externalURL
HTTP_HOST | internalURL:port

index.php follows else here, but phpinfo() could resolve the variable.

if ( isset($_ENV['LINEAGEOTA_BASE_PATH']) )
        $base_path = $_ENV['LINEAGEOTA_BASE_PATH'];
    else
        $base_path = $protocol.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']);

After a bit of trial and error, I ended up modifying the file, changing:
$_ENV to $_SERVER

if ( isset($_SERVER['LINEAGEOTA_BASE_PATH']) )
        $base_path = $_SERVER['LINEAGEOTA_BASE_PATH'];

This allowed me to define the variable in /etc/apache2/sites-enabled/LineageOTA.conf with SetEnv LINEAGEOTA_BASE_PATH https://externalURL, where it is successfully read by the API server ("url":"https:\/\/externalURL\"), and downloads are able to commence on my phone with the corresponding prop.

I'd forgotten about this modification until I decided to redeploy the api server into my main Jenkins container, sure enough the same issue became visible again, and I made the same change to allow the variable to reach the server after troubleshooting Apache. Am I missing something in Apache2 regarding environment variables? Anyone had a similar experience/solution?

No builds found (correct path set?)

I'm running the docker image with
docker run --restart=always -p 80:80 -v $PATH_TO_PRODUCT_OUT_DIR:/var/www/html/builds/full julianxhokaxhiu/lineageota

(with the out dir path being $lineageostree/out/target/product/Z00T/).

When I open http://gentoo64.lan/api in browser, or execute your testing script,

$ node index.js 

I get

{ id: null, response: [], error: null }

Should this configuration work?

Build files are available, permissions are world-readable:

$ ls -1 *.zip
cm_Z00T-ota-11941fc1b3.zip
cm_Z00T-ota-206e51b4fc.zip
cm_Z00T-ota-aa40168665.zip
cm_Z00T-ota-be33dd970c.zip
cm_Z00T-ota-d311bfda02.zip
cm_Z00T-ota-f996a4b825.zip
lineage-13.0-20170127-UNOFFICIAL-Z00T.zip
lineage-13.0-20170211-UNOFFICIAL-Z00T.zip
lineage-13.0-20170221-UNOFFICIAL-Z00T.zip
lineage-13.0-20170225-UNOFFICIAL-Z00T.zip
lineage-13.0-20170227-UNOFFICIAL-Z00T.zip

JSON reading error From api.uri

It' my public ota uri:
https://ota.xunt123.com/api
the api request returns response:
{ "id": null, "result": [ { "incremental": "", "api_level": "", "url": "https://ota.xunt123.com//builds/full/lineage-17.1-20210420-UNOFFICIAL-chiron.zip", "timestamp": 1618754135, "md5sum": "2de1555284dc81423a2210dbec4e0fce", "changes": "", "channel": "unofficial", "filename": "lineage-17.1-20210420-UNOFFICIAL-chiron.zip", "romtype": "unofficial", "datetime": 1618754135, "version": "17.1", "id": "95772cd1701d011d020ee673daef215799142a89ca007fb12dcff04a9ea49b57", "size": 763338807 } ], "error": null }

While checking ota updates, the lineagenos updater(version:lineage-17.1) reports error:
2021-04-18 22:12:12.291 1264-1264/system_process V/SettingsProvider: Notifying for 0: content://settings/system/screen_brightness 2021-04-18 22:12:13.010 5402-5402/org.lineageos.updater D/UpdatesActivity: Checking https://ota.xunt123.com/api 2021-04-18 22:12:14.229 5402-5402/org.lineageos.updater D/UpdatesActivity: List downloaded 2021-04-18 22:12:14.229 5402-5402/org.lineageos.updater D/UpdatesActivity: Adding remote updates 2021-04-18 22:12:14.233 5402-5402/org.lineageos.updater E/UpdatesActivity: Could not read json org.json.JSONException: No value for response at org.json.JSONObject.get(JSONObject.java:399) at org.json.JSONObject.getJSONArray(JSONObject.java:594) at org.lineageos.updater.misc.Utils.parseJson(Utils.java:133) at org.lineageos.updater.UpdatesActivity.loadUpdatesList(UpdatesActivity.java:246) at org.lineageos.updater.UpdatesActivity.processNewJson(UpdatesActivity.java:293) at org.lineageos.updater.UpdatesActivity.access$400(UpdatesActivity.java:70) at org.lineageos.updater.UpdatesActivity$4.lambda$onSuccess$1$UpdatesActivity$4(UpdatesActivity.java:338) at org.lineageos.updater.-$$Lambda$UpdatesActivity$4$Qra7D5MFC6cMp3CFdgMPYQ47iUw.run(Unknown Source:8) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:940)

It seems like that the response json is not wanted.

system/build.prop is removed from lineage-15 zips

I have build lineage-15.0 and noticed that the generated zip file no longer contains "system/build.prop". This is causing the zip file from showing up on the OTA server. We may no longer count on build.prop being available for parsing.

Notified on a new rom even though the latest rom is installed.

Currently the OTA server returns the file modification time on the webserver of any roms in the builds folder. This means the last build listed on the server will always appear to be newer than the latest installed build as $this->timestamp = filemtime( $this->filePath ); in Build.php will always be later than the ro.build.date.utc field in build.prop in the rom. As a result you get prompted to download the latest rom even though its already installed.

Removing the filemtime test and replacing it with the ro.build.date.utc in build.prop fixes this admittedly cosmetic issue.

Not working on php 7.4

[email protected] test
node tests/lineage.js

500 Internal Server Error

Undefined offset: 0 (8)

#0 /var/www/LineageOTA/src/Helpers/Build.php(258): flight\Engine->handleError()
#1 /var/www/LineageOTA/src/Helpers/Build.php(70): JX\CmOta\Helpers\Build->removeTrailingDashes()
#2 /var/www/LineageOTA/src/Helpers/Builds.php(153): JX\CmOta\Helpers\Build->__construct()
#3 /var/www/LineageOTA/src/Helpers/Builds.php(49): JX\CmOta\Helpers\Builds->getBuilds()
#4 /var/www/LineageOTA/vendor/mikecao/flight/flight/core/Loader.php(125): JX\CmOta\Helpers\Builds->__construct()
#5 /var/www/LineageOTA/vendor/mikecao/flight/flight/core/Loader.php(81): flight\core\Loader->newInstance()
#6 /var/www/LineageOTA/vendor/mikecao/flight/flight/Engine.php(101): flight\core\Loader->load()
#7 /var/www/LineageOTA/vendor/mikecao/flight/flight/core/Dispatcher.php(198): flight\Engine->__call()
#8 /var/www/LineageOTA/vendor/mikecao/flight/flight/Flight.php(77): flight\core\Dispatcher::invokeMethod()
#9 /var/www/LineageOTA/src/CmOta.php(111): Flight::__callStatic()
#10 /var/www/LineageOTA/vendor/mikecao/flight/flight/core/Dispatcher.php(173): JX\CmOta\CmOta->JX\CmOta\{closure}()
#11 /var/www/LineageOTA/vendor/mikecao/flight/flight/core/Dispatcher.php(145): flight\core\Dispatcher::callFunction()
#12 /var/www/LineageOTA/vendor/mikecao/flight/flight/Engine.php(342): flight\core\Dispatcher::execute()
#13 /var/www/LineageOTA/vendor/mikecao/flight/flight/core/Dispatcher.php(198): flight\Engine->_start()
#14 /var/www/LineageOTA/vendor/mikecao/flight/flight/core/Dispatcher.php(144): flight\core\Dispatcher::invokeMethod()
#15 /var/www/LineageOTA/vendor/mikecao/flight/flight/core/Dispatcher.php(49): flight\core\Dispatcher::execute()
#16 /var/www/LineageOTA/vendor/mikecao/flight/flight/Engine.php(92): flight\core\Dispatcher->run()
#17 /var/www/LineageOTA/vendor/mikecao/flight/flight/core/Dispatcher.php(198): flight\Engine->__call()
#18 /var/www/LineageOTA/vendor/mikecao/flight/flight/Flight.php(77): flight\core\Dispatcher::invokeMethod()
#19 /var/www/LineageOTA/src/CmOta.php(69): Flight::__callStatic()
#20 /var/www/LineageOTA/index.php(60): JX\CmOta\CmOta->run()

url issue

added this link to my build prop but fails and so does test file no matter what i do
sourceforge.net/projects/tweaked-ota/files/updates/signed-ota_update.zip/download

los 18.1

delta build won't be automatically built

i run the program on my vps. xdelta3 is installed through apt-get. full packages are uploaded to builds/full, such as builds/full/cm-11-20141004-NIGHTLY-xxxx.zip. filemode 777.but it doesn't work.

no delta builds are automatically built:(

what's wrong with my steps?

thanks for replying:P @julianxhokaxhiu

hey, having a few issues getting this working

Hi, could you please hit me up on freenode when you have a moment. Having a few issues getting this working with current builds of cm-14.1

I'm NucWin on #lineageos-dev we have spoke before but i cannot for the life of me remember your irc nick.

ps all your info/social stuff on your website. but no email address to be found anywhere. hence why im here

Check if php's zip extension is enabled

Hi, I had quite a hard time to debug my installation, the problem was that the php zip extension was not enabled. Do you think it's possible to check the presence of the zip extension using if (!extension_loaded('zip')).

the error is not displayed because file_get_contents is prefixed by a @.

Builds have specific naming?

Is there a format that the builds HAVE to be? I places a custom signed build to the full folder and ran the unit test and got errors. Is there a format I am missing? I named it like a LineageOS official build and it worked. What is the format?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.