[ONLINE-Stable] OTA Server LP | CM, AICP, SOKP, FlexOS, RESSURECTION, TEAM-UB

What do you think ?

  • It works for you.

    Votes: 3 42.9%
  • Doesn't work for you.

    Votes: 1 14.3%
  • Can be optimized.

    Votes: 2 28.6%
  • Devs from UNOFFICIAL builds should implement.

    Votes: 2 28.6%
  • Useless for me.

    Votes: 1 14.3%

  • Total voters
    7
  • Poll closed .

BioGenX

Senior Member
Feb 16, 2015
88
54
0
  • Supported builds:
    • AICP by k2wl for i9192
    • CM12.1 by F4K for i9190, i9192, i9195
    • CM12 by F4K for i9190, i9195
    • CM12 by k2wl for i9192
    • RESURRECTION by lsdty for i9190, i9192, i9195
    • SOKP by lsdty for i9190, i9192, i9195
    • FlexOS by lsdty for i9190, i9192, i9195
    • Team-UB by tioguda for i9190, i9192
    • Blisspop by tioguda for i9190, i9192, i9195


If you enjoy nightly builds but find all the steps necessary to flash a burden like me, you would be glad that I have achieved OTA updates for UNOFFICIAL builds. I have put together an OTA script that checks every hour for latest build and passes that download link as JSON response to CM Updater OTA app in settings. Example response:
Code:
{"id":null,"result":[{"incremental":null,"api_level":"23","url":"https:\\...\cm-12.1-20150603-UNOFFICIAL serranodsxx.zip","timestamp":"1433289600","mdsum":"23dcbc0c2ba6474f64566adde9d1f6d5","changes":null,"channel":"nightly","filename":"cm-12.1-20150603-UNOFFICIAL-serranodsxx.zip"}],"error":null}
The server :
  • Supports basketbuild and androidfilehost hosted builds.
  • Is a free host, with 87% uptime.
  • Does not host builds
  • Does not build deltas
  • Builds flashable zip for every ota supported

  1. You must have TWRP recovery for ota's to work. If you don't have it, you can get it from HERE.
    If you don't want TWRP on your device, you can manual flash updates from sdcard0/cmupdater with CWM or Philz.
  2. Flash OTA zip for your device and build from http://ota.heliohost.org/zips/, you don't need to flash the zip again after an ota update as it is included in addon.d so it is restored after flash.
    *files with _launcher add Updater to appdrawer (useful for non CM builds that don't have Updates in settings>About)
    *files with _settings are CM stock


  • Server changelog:
    • new script. Once every 2 hours, generates response and zip for 10 builds in less than 30 seconds.
    • removed ota limit.
    • changed host.
    • set androidfilehost.com link limit to 5. [1/5 used]
    • added androidfilehost.com support.
    • changed build limit from 2 to 30. [7/30 used]
    • more optimization.
    • initial release.


If you want to host your own server [only one build supported], you can find the lite script for basketbuild and androidfilehost in attachments. Just add at first line $raw_url="your build's folder url" . I've added all functions in one file to be easy to set up. Just upload index.php to a folder in your host and set the link to that folder with the options bellow.

There are two ways to route OTA app to your server.
  1. Open CMupdater.apk with hexeditor, search for https://download.cyanogenmod.org/api and replace it with the link to your server(Use Paste-Replace not Paste-Insert), then add that apk to OTA_template.zip from attachments in system/priv-app/CMUpdater.
  2. Add cm.updater.uri= 'your server link' on your own build.prop file.

Thank you:
  • CyanogenMod for their work on OTA app.
  • k2wl for integrating my server link in your source.
  • All devs for keeping our devices updated.
  • julianxhokaxhiu for the insight on how the CMUpdater works.
  • Internet for php knowledge.


If you like my work, please consider donating.

Cheers !
 

Attachments

Last edited:

BioGenX

Senior Member
Feb 16, 2015
88
54
0
To do:
Will update zip with addon.d to backup CMUpdater.apk at ota flash so that there will be no need to flash updater again. DONE!

If you want more features, post.

For security and performance concern, I decided not to add control panel for users to freely add builds to server. Just ask and if possible I will add the requested build to server.

Info:
This method can be used by any device or android version. Current zip builder makes zip only for lollipop, but if requested, I can add support for KitKat as well.
 
Last edited:

k2wl

Senior Member
Apr 19, 2008
3,166
7,573
0
To do:
Will update zip with addon.d to backup CMUpdater.apk at ota flash so that there will be no need to flash updater again.
will you try to add basketbuild links to OTA script???
that way we can add aicp /cm to this script
 

parthabhatta

Senior Member
Mar 29, 2008
1,373
241
93
Calcutta
Hey @BioGenX Thanks for your effort. I have few queries.
I am on F4K latest 12.1 CM for DUOS(9192) version with F4K kernel and I have flashed your OTA ZIP and now updates menu on setting options work, though no updates are shown as there is no update now.
What is the script for for? Is it of any interest of normal use or only for Devs?
Secondly on updates being available will the entire ROM get downloaded or it will only be an incremental update.
Lastly for CWM recovery users, since you have told that only TWRP us supported, please tell is where the update zip will be stored so that we may manually flash it through C also.
Lastly thanks again.
 

BioGenX

Senior Member
Feb 16, 2015
88
54
0
Can I use the K2WL for the AICP 9.0 builds?
!This acts as official but is not official. The builds are downloaded from basketbuild.
This will work only if builds are uploaded to basketbuild.com.
The way the script works:
1. You give it basketbuild link ('https://basketbuild.com/devs/k2wl/cm12.1_i9192')
2. Searches .html for latest build ('https://basketbuild.com/filedl/devs?dev=k2wl&dl=k2wl/cm12.1_i9192/cm-12.1-20150601-UNOFFICIAL-serranodsdd.zip')
3. Provides direct download link (''https://basketbuild.com/dl/devs?dev=k2wl&dl=k2wl/cm12.1_i9192/cm-12.1-20150601-UNOFFICIAL-serranodsdd.zip) (replaces 'filedl' in link with 'dl')
3. Searches MD5 from .html
4. Passes MD5
5. Converts date from filename to unix time to get build time (This is what tells the OTA app if it's a new update)

To get any build you like you just change first link in script.
If you upload AICP to basketbuild I can add a script for it as well and make apk for it
 
Last edited:

BioGenX

Senior Member
Feb 16, 2015
88
54
0
Hey @BioGenX Thanks for your effort. I have few queries.
I am on F4K latest 12.1 CM for DUOS(9192) version with F4K kernel and I have flashed your OTA ZIP and now updates menu on setting options work, though no updates are shown as there is no update now.
What is the script for for? Is it of any interest of normal use or only for Devs?
Secondly on updates being available will the entire ROM get downloaded or it will only be an incremental update.
Lastly for CWM recovery users, since you have told that only TWRP us supported, please tell is where the update zip will be stored so that we may manually flash it through C also.
Lastly thanks again.
The server script can be used for personal use. First time I used it was on my OPENWRT router. After 2-3 week test I decided to share as it is stable.
The OTA app download entire rom. For incremental it's more complicated and and you need builds on server.
For this you need to implement a REST server. Can find more details here: http://forum.xda-developers.com/showthread.php?t=2636334

The files downloaded by CMUpdated are stored in Internal Storage/cmupdater/
 
  • Like
Reactions: parthabhatta

BioGenX

Senior Member
Feb 16, 2015
88
54
0
Can I use the K2WL for the AICP 9.0 builds?
This script only works with basketbuild.com. But if K2WL uploads AICP on basketbuild in the future, i can make a script for it too.
Also please don't ask to implement it for Androidfilehost.com as it doesn't provide MD5. Without MD5 you can't flash OTA.
 
Last edited:

fish72

Senior Member
Jun 11, 2009
551
68
28
In development:
Mod update app to flash latest f4k kernel for f4k build when flashing ota.
Just installed TWRP and your 1.1 mod.
Using i9195 (s4 mini LTE).
If I'll manually check for updates, Will it show the update that is specifically to my rom (F4k cm12.1) ?
Although my rom is based on latest june 3rd 2015, I see there's an update cm-12.1-20150603-unofficial , And I don't know if I should flash it because it's same date of rom i'm currently using....
 

BioGenX

Senior Member
Feb 16, 2015
88
54
0
Just installed TWRP and your 1.1 mod.
Using i9195 (s4 mini LTE).
If I'll manually check for updates, Will it show the update that is specifically to my rom (F4k cm12.1) ?
Although my rom is based on latest june 3rd 2015, I see there's an update cm-12.1-20150603-unofficial , And I don't know if I should flash it because it's same date of rom i'm currently using....
Did you flash v1.1_OTA_CM12.1_F4k_serranotexx.zip ?
It shows that you have connection with the server. If there is a check mark next to the available update you can't/ don't need to download/flash as you already have the latest version. If you have something like a rectangle with an arrow, I think you flashed the zip for DUOS version.
 
  • Like
Reactions: fish72

fish72

Senior Member
Jun 11, 2009
551
68
28
Did you flash v1.1_OTA_CM12.1_F4k_serranotexx.zip ?
It shows that you have connection with the server. If there is a check mark next to the available update you can't/ don't need to download/flash as you already have the latest version. If you have something like a rectangle with an arrow, I think you flashed the zip for DUOS version.
oops....I prob. did :) Thank you for the explanantion.
I think I'll need to go back to an earlier rom, Since I see some functionality problems are still in Cm12.1 (Suddenly back and options front led key does not respond.....Happend to me before on cm 12/12.1 roms......
 

BioGenX

Senior Member
Feb 16, 2015
88
54
0
If devs would add their name in ro.cm.version in build.prop (ex. from: 12.1-20150603-UNOFFICIAL-serranodsxx to 12.1-20150603-UNOFFICIAL-serranodsxx-BioGenX) there will only be one zip needed for all devices and builds as the server would identify your device and build when you request a check for updates.
 

BioGenX

Senior Member
Feb 16, 2015
88
54
0
oops....I prob. did :) Thank you for the explanantion.
I think I'll need to go back to an earlier rom, Since I see some functionality problems are still in Cm12.1 (Suddenly back and options front led key does not respond.....Happend to me before on cm 12/12.1 roms......
I had this problem a wile back. The way I clean install is by cleaning /system, /cache, /data and internal storage. This did fix it for me. Also if you flash an older version and use OTA to update, please post if it worked for you as maybe all the users that used this already have the latest version and I only checked it for DUOS, but there is no reason for it not to work. all i did was change the link to server and add basketbuild links for your device in to the server
 
Last edited:
  • Like
Reactions: fish72

fish72

Senior Member
Jun 11, 2009
551
68
28
I freshly installed about 20 times different roms for the past 2 weeks and even clean installed as you did,But it didn't solve it :( (I did most installed because of some shut down battery issues i have - But it's prob. the battery itself....)
It's ok, I'll use 10.2 for a while until cm12.1 will get some of the bugs gone.
Thank you very much Bio-G for the help you provided :)
 

BioGenX

Senior Member
Feb 16, 2015
88
54
0
I freshly installed about 20 times different roms for the past 2 weeks and even clean installed as you did,But it didn't solve it :( (I did most installed because of some shut down battery issues i have - But it's prob. the battery itself....)
It's ok, I'll use 10.2 for a while until cm12.1 will get some of the bugs gone.
Thank you very much Bio-G for the help you provided :)
Can you try to disable led illuminate in buttons in settings app ? I see this is a fix for S6 might also work for you. I also have button led illumintion disabled
 

fish72

Senior Member
Jun 11, 2009
551
68
28
Can you try to disable led illuminate in buttons in settings app ? I see this is a fix for S6 might also work for you. I also have button led illumintion disabled
Thank you very much for the tip. I will make a note to myself about it next time I'll install cm12.1
 

BioGenX

Senior Member
Feb 16, 2015
88
54
0
OTA for androidfilehost.com

Good news!

I did some research on androidfilehost.com. It seems they provide an api for direct download and they do generate MD5.
At the time of my post the site is offline, but once it's online I can begin work on my script to support androidfilehost.com as well.
Will update until today/tomorrow OTA's all the UNOFFICIAL lollipop builds for our device if all goes well.

Cheers !
 

BioGenX

Senior Member
Feb 16, 2015
88
54
0
Server may be buggy/offline for today as I am working to optimize the code even more and try to implement androidfilehost.ro in the script

Cheers!
 
  • Like
Reactions: arsm74