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