Project

General

Profile

SB30 OTA Guide » History » Version 3

Lion Wang, 08/06/2021 10:04 AM

1 1 Lion Wang
h1. SB30 OTA Guide
2
3 3 Lion Wang
%{color:red}1. Modify device/inoco/sb30/device.mk
4 1 Lion Wang
Update OTA url (persist.vendor.otaurl) to customer's server.
5 3 Lion Wang
For example, update OTA url to "https://www.custurl.com"%
6 1 Lion Wang
7 3 Lion Wang
<pre>
8 1 Lion Wang
persist.vendor.otaurl=https://www.custurl.com/download/SB30.json
9 3 Lion Wang
</pre>
10 1 Lion Wang
11 3 Lion Wang
12
%{color:red}2. Apply "sb30_ota.patch"
13
sb30_ota.patch can download from%
14
15 1 Lion Wang
https://support.innocomm.com/redmine/attachments/download/3/sb30_ota.patch
16
17
18 3 Lion Wang
%{color:red}3. Build OTA package
19 1 Lion Wang
$ export INOCO_RPI=yes
20
$ source build/envsetup.sh
21
$ lunch sb30-userdebug
22
$ make -j8
23
$ make otapackage
24 3 Lion Wang
$ export INOCO_RPI=%
25
<pre>
26 1 Lion Wang
The ota package will be located at out/target/product/sb30/sb30-ota-???.zip
27 3 Lion Wang
</pre>
28 1 Lion Wang
29
30 3 Lion Wang
%{background:lightgreen}OTA by local
31
ABOTAUpdate App > Option menu > Pick File > Select "sb30-ota-???.zip"%
32 1 Lion Wang
33 3 Lion Wang
34
%{background:lightgreen}OTA by server
35
Extract "sb30-ota-???.zip", you can find version/hash/size/incremental information as below to modify SB30.json.%
36
37 1 Lion Wang
For example, extract sb30-ota-eng.lin.zip:
38
39 3 Lion Wang
<pre>
40 1 Lion Wang
sb30-ota-eng.lin/payload.bin (This is the OTA download file)
41
sb30-ota-eng.lin/payload_properties.txt
42
FILE_HASH=KrcnrqCzAIcnnjc1ysoVY0jpIgDPsVPB9oGjjyg34fI=
43
FILE_SIZE=411430579
44
METADATA_HASH=ePssh8AaT6JuDcQznmqq/kHi+ZwSUr2tBXEXwq4xLnQ=
45
METADATA_SIZE=110793
46
47
sb30-ota-eng.lin/META-INF/com/android/metadata
48
post-build-incremental=1581318174
49
Upload SB30.json to https://www.custurl.com/download/
50
Upload payload.bin to https://www.custurl.com/download/
51 3 Lion Wang
</pre>
52 1 Lion Wang
53
SB30.json:
54 3 Lion Wang
<pre><code class="xml">
55 1 Lion Wang
{
56
    "master":{
57
        "version":"1581318174",
58
        "url":"https://www.custurl.com/download/payload.bin",
59
        "description":"This is Note for Master, upgrade to version 1581318174",
60
        "FILE_HASH":"KrcnrqCzAIcnnjc1ysoVY0jpIgDPsVPB9oGjjyg34fI=",
61
        "FILE_SIZE":411430579,
62
        "METADATA_HASH":"ePssh8AaT6JuDcQznmqq/kHi+ZwSUr2tBXEXwq4xLnQ=",
63
        "METADATA_SIZE":110793
64
    }
65
}
66 3 Lion Wang
</code></pre>
67 1 Lion Wang
68 3 Lion Wang
69
ABOTAUpdate App will compare %{color:red}"version"(the value of ro.build.version.incremental)% 
70
from this content and then use %{color:red}TAG% "url" as downloading path.
71
If your firmware version is %{color:red}NUM_VERSION_A% and then you will download version_a+.bin as your new firmware.
72
If your firmware version can't be found through %{color:red}JSON% file, and your firmware version is older than %{color:red}NUM_VERSION_B%,
73
 then you will download "master" url specified version_b.bin as your new firmware.
74
75
Sample Content of SB30.json
76
<pre><code class="xml">
77 1 Lion Wang
{
78
79
    "master":{
80
        "version":"NUM_VERSION_B",
81
        "url":"https://www.custurl.com/download/version_b.bin",
82
...
83
    },
84
    "NUM_VERSION_A":{
85
        "version":"NUM_VERSION_A+",
86
        "url":"https://www.custurl.com/download/version_a+.bin",
87
...
88
    }
89
}
90 3 Lion Wang
</code></pre>