-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
127 lines (90 loc) · 3.44 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
Background
==========
This is the VillainROM (HTC Hero aftermarket ROM) over-the-air (OTA) update
application.
It consists of a service and a GUI. The service periodically checks that
updates are available, and puts a notification for user.
The URL to download the updates from will be of general format
http://hostname/ROM-NAME-HERE.xml. We can hardcode the URL, but it would be
best to somehow discover the name of the OS installed (e.g. FroydVillain 1.1.1)
and put that into the URL as the last component, so that the same otaupdate.apk
can be installed on multiple ROMs.
Description of file
===================
The updates are expressed in a XML file, with the following structure:
/updates/update*
where each update contains
/name name of update
/description description of update to show to user
/url url to download the update from
/dependencies? list of dependencies
where each dependencies contains
/update name of update that must be applied first.
Complete example file:
<?xml version="1.0" encoding="UTF-8"?>
<updates>
<update>
<name>Update1.zip</name>
<description>
First OTA update description here.
</description>
<url>http://villainrom.co.uk/ota/froyd-1.1.1/Update1.zip</url>
</update>
<update>
<name>Update2.zip</name>
<description>
Second OTA update description here.
</description>
<url>http://villainrom.co.uk/ota/froyd-1.1.1/Update2.zip</url>
<dependencies>
<update>Update1.zip</update>
</dependencies>
</update>
</updates>
So, to recap: two updates, Update1.zip, Update2.zip. The Update2.zip can
only be installed after Update1.zip has been installed.
Description of the application UI
=================================
Title screen
------------
[ Logo ]
Last checked: dd-mm-yyyy
Check status: Success/Failure
[ Check now ]
Update selection screen
-----------------------
[ Name of update ] [ Apply ]
[ long textarea description ]
[ of the update ]
The application displays the list of updates available, and if requested by
user, downloads and installs some of them. The application must exclude the
updates which have already been installed.
If an update's has dependencies are not met, the "Apply" button will be
disabled. In that case, the description will be modified by the application,
and the list of the updates that must be applied first will be prepended to
the real desctiprion of the update.
Update download/apply screen
----------------------------
<update name here >
[====> 35% ]
[ Abort ] [ Apply ]
Downloads are written to /cache/otaupdater. Once apply button is pressed,
application leaves instructions for recovery to apply the update, and
reboots into recovery; or applies the update immediately without taking
the phone offline.
Update file format
==================
We support two kinds of update formats:
*.zip is the classic com.google.android.update-script
based update, and is applied via reboot to recovery.
*.ota is a zip package which contains instructions
on how to apply it online. The zip is decompressed
somewhere, and the package structure contains a
similar update-script at its root, which gets executed.
The update-script is evaluated by a java code, and
will be extended to support the commands required to
apply updates. Typically these are probably copy_dir,
chmod and delete.
After updates have been applied, the log of applied
updates will be permanently stored in /system/otaupdater
directory.