OpenDelta OTA for all phones

Search This thread

werty100

Senior Member
Aug 31, 2011
828
679
Hi i have tested a lot of OTA apps and configs and they are very annoying until i stop thinking for a moment and I find a solution for having true OTAS updates and not depending from other users just like Nexus Devices OTAS.
Ok we started:
First of all we need to download Android Bundle with contains SDK and Eclipse
Here it is:
http://developer.android.com/sdk/index.html?hl=sk#download
After it is download and installed.
You are going to download my fixed source for supporting from Android 4.1.2 to 4.4.2.
https://github.com/werty100/OpenDelta
And Click on:
download.png

Them open Eclipse...
Go to file/Import:
select.png

Next and locate were is the download source
choose.png

Then Finish...
Wait until it is import....
Go to res folder, values and open config.xml:
config.png

Here are the important values for making work your OTA in your phone.
Code:
 <!-- Property to read for ROM version -->
    <string name="property_version">ro.delta.version</string>

    <!-- Property to read for device identifier -->
    <string name="property_device">ro.delta.device</string>
This should be put in build.prop:
Ex:
ro.delta.version=1.0.2
ro.delta.device=i9000

You can modificated all values but you should modificate this ones:
Code:
 <!-- URL base to find .delta files, %s is expanded to property_device value. Path is suffixed by (expanded) filename_base -->
    <string name="url_base_delta">https://delta.omnirom.org/nightlies/%s/</string>

    <!-- URL base to find .update and .sign files, %s is expanded to property_device value. Path is suffixed by (expanded) filename_base -->
    <string name="url_base_update">http://delta.omnirom.org/nightlies/%s/</string>

    <!-- URL base to find the full zip files, %s is expanded to property_device value. Path is suffixed by (expanded) filename_base -->
    <string name="url_base_full">http://dl.omnirom.org/%s/</string>
Indicates where to find the ZIP for your phone...

Also you can modificate all UI and values....
After the essentials modifications you will need to compile APK:
Go here and click on selected item..
sign.png

You will need to create your own KeyStores
keystore.png

Rellenate also this:
https://dl.dropboxusercontent.com/u/26870831/rellenate.png
Them just put destination and click finish:
finish.png

After all of this you have to modificate the Settings.apk of your rom:
Decompile with the script/tool you like more and go to:
In res/values:
String.xml
Add this:
Code:
 <string name="system_update_settings_list_item_title">System updates</string>
<string name="system_update_settings_list_item_summary" />
Paste it near baseband_version string kernel_version string etc...
Then go to public and paste this near device_info_settings:
Code:
<public type="string" name="system_update_settings_list_item_title" id="0x7f0c06d7" />
<public type="string" name="system_update_settings_list_item_summary" id="0x7f0c06d8" />
Then go to xml/device_info_settings.xml:
And copy this in the firs lines after:
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/about_settings"
  xmlns:android="http://schemas.android.com/apk/res/android">
Paste this:
Code:
<PreferenceScreen android:title="@string/system_update_settings_list_item_title" android:key="system_update_settings" android:summary="@string/system_update_settings_list_item_summary">
        <intent android:action="android.settings.SYSTEM_UPDATE_SETTINGS" />
    </PreferenceScreen>
    <PreferenceScreen android:title="@string/additional_system_update_settings_list_item_title" android:key="additional_system_update_settings">
        <intent android:targetPackage="@string/additional_system_update" android:action="android.intent.action.MAIN" android:targetClass="@string/additional_system_update_menu" />
    </PreferenceScreen>
After Compiling Settings.apk you will have full OTAS
 
Last edited:

marcomarinho

Inactive Recognized Developer
Aug 24, 2012
2,329
7,629
25
Porto
Just a quick question:
Code:
[B] <!-- URL base to find .delta files, %s is expanded to property_device value. Path is suffixed by (expanded) filename_base -->
    <string name="url_base_delta">https://delta.omnirom.org/nightlies/%s/</string>

    <!-- URL base to find .update and .sign files, %s is expanded to property_device value. Path is suffixed by (expanded) filename_base -->
    <string name="url_base_update"http://delta.omnirom.org/nightlies/%s/</string>[/B]

    <!-- URL base to find the full zip files, %s is expanded to property_device value. Path is suffixed by (expanded) filename_base -->
    <string name="url_base_full">http://dl.omnirom.org/%s/</string>

If we want to configure it to our directory, what should we inclue on .delta files & .update and .sing files?
 

marcomarinho

Inactive Recognized Developer
Aug 24, 2012
2,329
7,629
25
Porto
You can't use this for any other ROM because we don't know what we should had on .delta & .update & .sign files
 

Rebellos

Senior Recognized Developer
May 13, 2009
1,353
3,428
Gdańsk
Howdy! Some general stuff:
You should credit original developer of OpenDelta (that's Chainfire @ OmniROM)
Proper way to make own, patched version is Pulling the original repository (easiest way is using "Pull" button on GitHub there: https://github.com/omnirom/android_packages_apps_OpenDelta) and then patching it - this way you preserve all the commits history (and credits to original authors)

You can't use this for any other ROM because we don't know what we should had on .delta & .update & .sign files
There we got with an example:
https://delta.omnirom.org/nightlies/i9300/omni-4.4.3-20140605-i9300-NIGHTLY.sign
https://delta.omnirom.org/nightlies/i9300/omni-4.4.3-20140605-i9300-NIGHTLY.update
https://delta.omnirom.org/nightlies/i9300/omni-4.4.3-20140605-i9300-NIGHTLY.delta

.delta file is JSON
.sign is binary signature
.delta is binary delta data

...and
GUESS WHAT! There's an opensource stuff to generate ALL of the above.
Completely! Automagically!
https://github.com/omnirom/android_packages_apps_OpenDelta/tree/android-4.4/server/
 

marcomarinho

Inactive Recognized Developer
Aug 24, 2012
2,329
7,629
25
Porto
Howdy! Some general stuff:
You should credit original developer of OpenDelta (that's Chainfire @ OmniROM)
Proper way to make own, patched version is Pulling the original repository (easiest way is using "Pull" button on GitHub there: https://github.com/omnirom/android_packages_apps_OpenDelta) and then patching it - this way you preserve all the commits history (and credits to original authors)


There we got with an example:
https://delta.omnirom.org/nightlies/i9300/omni-4.4.3-20140605-i9300-NIGHTLY.sign
https://delta.omnirom.org/nightlies/i9300/omni-4.4.3-20140605-i9300-NIGHTLY.update
https://delta.omnirom.org/nightlies/i9300/omni-4.4.3-20140605-i9300-NIGHTLY.delta

.delta file is JSON
.sign is binary signature
.delta is binary delta data

...and
GUESS WHAT! There's an opensource stuff to generate ALL of the above.
Completely! Automagically!
https://github.com/omnirom/android_packages_apps_OpenDelta/tree/android-4.4/server/

Thanks so much :highfive:

So I just need to modify few things, generate ALL stuff and then upload it to my server right?
 
Last edited:

rirozizo

Senior Member
when it comes to these stuff (git with coding and xml and OH MY GOD!) i am a total noob.

i still don't know how do i generate these files. I understand .zip is the whole ROM, but i have no idea how i can make .update .sign and .delta and what should i put in them and all.

hehe, to me, all i see is three beautiful files here https://github.com/omnirom/android_packages_apps_OpenDelta/tree/android-4.4/server/ which i know nothing about how i can use them to get the files.

i guess i'll wait for the "tomorrow more" :)
 

Myself5

Recognized Developer
Mar 17, 2011
3,437
9,829
26
myself5.de
Sony Xperia Z3 Compact
Sony Xperia Z3v
@_MarcoMarinho_ you can find on the github readme how to generate the Delta files.

Server-side

To create the delta files on the server, you need several things, some of which can be found in the server directory. The main thing is the opendelta.sh script. It contains a configuration section which you can edit with the correct file locations on your own system. Quite likely you will need to create a wrapper script that pulls in your previous release and your current release, and pushes out the created delta files.

The script depends on xdelta3, zipadjust and minsignapk.

For the builds on your server, make a copy of the jni directory - do not compile inside jni because you may mess up the build of libopendelta.

xdelta3 can be built in (the copy of) jni/xdelta3-3.0.7 by calling ./configure and make.

zipadjust can be built in (the copy of) jni by calling:

gcc -o zipadjust zipadjust.c zipadjust_run.c -lz

dedelta (not used by the script, but maybe helpful when debugging) can be built in (the copy of) jni by calling:

gcc -o dedelta xdelta3-3.0.7/xdelta3.c delta.c delta_run.c

minsignapk Java source is in the server directory, as well as a prebuilt minsignapk.jar file that should work on most systems.

If you are however to lazy to set up all that stuff check my script on github you can find here:
https://github.com/Myself5/CarbonDelta_server_software/
(I used it for my unofficials and when we tested CarbonDelta (which is based on OpenDelta))

Check the readme on how to install it and use it.
 

marcomarinho

Inactive Recognized Developer
Aug 24, 2012
2,329
7,629
25
Porto
@_MarcoMarinho_ you can find on the github readme how to generate the Delta files.



If you are however to lazy to set up all that stuff check my script on github you can find here:
https://github.com/Myself5/CarbonDelta_server_software/
(I used it for my unofficials and when we tested CarbonDelta (which is based on OpenDelta))

Check the readme on how to install it and use it.
Thank, thanks so much, now I understand :D
-----
When I should put your repo? inside pakcages/apps?
 
Last edited:

marcomarinho

Inactive Recognized Developer
Aug 24, 2012
2,329
7,629
25
Porto
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- Output some debug strings -->
    <item type="bool" name="debug_output">false</item>

    <!-- Property to read for ROM version -->
    <string name="property_version">ro.euclidean.version</string>

    <!-- Property to read for device identifier -->
    <string name="property_device">ro.euclidean.device</string>

    <!-- %s is expanded to property_version value. .zip, .delta, .update, .sign extensions added when needed -->
    <string name="filename_base">euclidean_%s</string>

    <!-- Path deltas are stored, relative to sdcard root -->
    <string name="path_base">EuclideanDelta</string>

    <!-- URL base to find .delta files, %s is expanded to property_device value. Path is suffixed by (expanded) filename_base -->
    <string name="url_base_delta">http://euclideanrom.grn.cc/downloads/%s/delta/</string>

    <!-- URL base to find .update and .sign files, %s is expanded to property_device value. Path is suffixed by (expanded) filename_base -->
    <string name="url_base_update">http://euclideanrom.grn.cc/downloads/%s/delta/</string>

    <!-- URL base to find the full zip files, %s is expanded to property_device value. Path is suffixed by (expanded) filename_base -->
    <string name="url_base_full">http://euclideanrom.grn.cc/downloads/%s/</string>

This is my setup.
I can't figure it out why I don't receive the updates :(
 

ElArchibald

Senior Member
Jun 12, 2014
112
168
33
Simferopol
Hey guys. I want add support OTA in my builds. I'm fully understand what need to be changed on client side and how generate *.delta and *.update files, but what i need for server side?
Just place files at some path, and somehow mystical way the application will find it.. :) or need some json script, which protocol need to use, how app retrieve list of files/information from server...
Thanks in advance.
 
Hey guys. I want add support OTA in my builds. I'm fully understand what need to be changed on client side and how generate *.delta and *.update files, but what i need for server side?
Just place files at some path, and somehow mystical way the application will find it.. :) or need some json script, which protocol need to use, how app retrieve list of files/information from server...
Thanks in advance.

just add them to web server.
 
  • Like
Reactions: ElArchibald

Top Liked Posts

  • There are no posts matching your filters.
  • 17
    Hi i have tested a lot of OTA apps and configs and they are very annoying until i stop thinking for a moment and I find a solution for having true OTAS updates and not depending from other users just like Nexus Devices OTAS.
    Ok we started:
    First of all we need to download Android Bundle with contains SDK and Eclipse
    Here it is:
    http://developer.android.com/sdk/index.html?hl=sk#download
    After it is download and installed.
    You are going to download my fixed source for supporting from Android 4.1.2 to 4.4.2.
    https://github.com/werty100/OpenDelta
    And Click on:
    download.png

    Them open Eclipse...
    Go to file/Import:
    select.png

    Next and locate were is the download source
    choose.png

    Then Finish...
    Wait until it is import....
    Go to res folder, values and open config.xml:
    config.png

    Here are the important values for making work your OTA in your phone.
    Code:
     <!-- Property to read for ROM version -->
        <string name="property_version">ro.delta.version</string>
    
        <!-- Property to read for device identifier -->
        <string name="property_device">ro.delta.device</string>
    This should be put in build.prop:
    Ex:
    ro.delta.version=1.0.2
    ro.delta.device=i9000

    You can modificated all values but you should modificate this ones:
    Code:
     <!-- URL base to find .delta files, %s is expanded to property_device value. Path is suffixed by (expanded) filename_base -->
        <string name="url_base_delta">https://delta.omnirom.org/nightlies/%s/</string>
    
        <!-- URL base to find .update and .sign files, %s is expanded to property_device value. Path is suffixed by (expanded) filename_base -->
        <string name="url_base_update">http://delta.omnirom.org/nightlies/%s/</string>
    
        <!-- URL base to find the full zip files, %s is expanded to property_device value. Path is suffixed by (expanded) filename_base -->
        <string name="url_base_full">http://dl.omnirom.org/%s/</string>
    Indicates where to find the ZIP for your phone...

    Also you can modificate all UI and values....
    After the essentials modifications you will need to compile APK:
    Go here and click on selected item..
    sign.png

    You will need to create your own KeyStores
    keystore.png

    Rellenate also this:
    https://dl.dropboxusercontent.com/u/26870831/rellenate.png
    Them just put destination and click finish:
    finish.png

    After all of this you have to modificate the Settings.apk of your rom:
    Decompile with the script/tool you like more and go to:
    In res/values:
    String.xml
    Add this:
    Code:
     <string name="system_update_settings_list_item_title">System updates</string>
    <string name="system_update_settings_list_item_summary" />
    Paste it near baseband_version string kernel_version string etc...
    Then go to public and paste this near device_info_settings:
    Code:
    <public type="string" name="system_update_settings_list_item_title" id="0x7f0c06d7" />
    <public type="string" name="system_update_settings_list_item_summary" id="0x7f0c06d8" />
    Then go to xml/device_info_settings.xml:
    And copy this in the firs lines after:
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <PreferenceScreen android:title="@string/about_settings"
      xmlns:android="http://schemas.android.com/apk/res/android">
    Paste this:
    Code:
    <PreferenceScreen android:title="@string/system_update_settings_list_item_title" android:key="system_update_settings" android:summary="@string/system_update_settings_list_item_summary">
            <intent android:action="android.settings.SYSTEM_UPDATE_SETTINGS" />
        </PreferenceScreen>
        <PreferenceScreen android:title="@string/additional_system_update_settings_list_item_title" android:key="additional_system_update_settings">
            <intent android:targetPackage="@string/additional_system_update" android:action="android.intent.action.MAIN" android:targetClass="@string/additional_system_update_menu" />
        </PreferenceScreen>
    After Compiling Settings.apk you will have full OTAS
    8
    Howdy! Some general stuff:
    You should credit original developer of OpenDelta (that's Chainfire @ OmniROM)
    Proper way to make own, patched version is Pulling the original repository (easiest way is using "Pull" button on GitHub there: https://github.com/omnirom/android_packages_apps_OpenDelta) and then patching it - this way you preserve all the commits history (and credits to original authors)

    You can't use this for any other ROM because we don't know what we should had on .delta & .update & .sign files
    There we got with an example:
    https://delta.omnirom.org/nightlies/i9300/omni-4.4.3-20140605-i9300-NIGHTLY.sign
    https://delta.omnirom.org/nightlies/i9300/omni-4.4.3-20140605-i9300-NIGHTLY.update
    https://delta.omnirom.org/nightlies/i9300/omni-4.4.3-20140605-i9300-NIGHTLY.delta

    .delta file is JSON
    .sign is binary signature
    .delta is binary delta data

    ...and
    GUESS WHAT! There's an opensource stuff to generate ALL of the above.
    Completely! Automagically!
    https://github.com/omnirom/android_packages_apps_OpenDelta/tree/android-4.4/server/
    3
    I don't know how to fix it but the updater is looking for a file that reads cm-6.0.1 but looking at the json.php it shows a file with cm-13.0. the number strings need to be modified so they match up.

    Ok. I fixed it. Now opendelta is fully functional in my cm 13 build.
    Either change <string name="android_version">ro.build.version.release</string> to <string name="android_version"></string> in config.xml or change
    res.getString(R.string.filename_base), android_version); to res.getString(R.string.filename_base), ""); in Config.java

    These are the changes I done to make OpenDelta work in CM 13
    https://github.com/omnirom/android_packages_apps_OpenDelta/compare/android-6.0...apuv:android-6.0

    Also flashing from the app will work only if selinux policy is permissive. Since I build OpenDelta with the ROM I added OpenDelta to sepolicy/mac_permissions.xml and sepolicy/seapp_contexts

    https://github.com/CyanogenMod/andr...ble/cm-13.0-ZNH2K...apuv:stable/cm-13.0-ZNH2K

    Now OpenDelta is fully functional.
    3
    Just a quick question:
    Code:
    [B] <!-- URL base to find .delta files, %s is expanded to property_device value. Path is suffixed by (expanded) filename_base -->
        <string name="url_base_delta">https://delta.omnirom.org/nightlies/%s/</string>
    
        <!-- URL base to find .update and .sign files, %s is expanded to property_device value. Path is suffixed by (expanded) filename_base -->
        <string name="url_base_update"http://delta.omnirom.org/nightlies/%s/</string>[/B]
    
        <!-- URL base to find the full zip files, %s is expanded to property_device value. Path is suffixed by (expanded) filename_base -->
        <string name="url_base_full">http://dl.omnirom.org/%s/</string>

    If we want to configure it to our directory, what should we inclue on .delta files & .update and .sing files?
    2
    With this OTA guide will I have to boot into recovery to flash a OTA?