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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
|
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage[a4paper]{geometry}
\usepackage{hyperref}
\usepackage[utf8]{inputenc}
\usepackage{listings}
\usepackage{longtable}
%%\usepackage{showframe}
\title{Porting Replicant to Android 9}
\author{Denis 'GNUtoo' Carikli}
\date{\today}
\begin{document}
\maketitle
\section{
Disclaimers:
}
\begin{itemize}
\item{
Before applying for a grant in the context of the European Union's Next Generation Internet,
Joonas Kylmälä already started working on porting the Galaxy S III 4G (i9305) to Android 9.
That prior work is not funded by the grant but can be used to achieve faster the goals set
in the deliverable.
As part of that effort he managed to boot that device under Android 9, without the nonfree
software graphics libraries. He based his work on the Android Open Source Project (AOSP)
source code.
The graphical interface was way too slow to be usable, however it enabled him to validate
that the device could boot.
}
\item{
As part of the European Union's Next Generation Internet, I already started working on
porting Joonas Kylmälä's work on top of LineageOS 16, however I had one or more
complicated issues related to the Android build system that I didn't manage to solve.
However at some point I found exiting work\cite{CustomROMs} that I wasn't aware of,
which was meant to add support for the Galaxy SIII (i9300) to LineageOS.
I started basing my work on top of this work too not to waste too much time with the
build issues mentioned above (as I already spent more than one week on that issue).
}
\end{itemize}
\section{
Deliverable
}
\subsection{
First month
}
\begin{longtable}[!t]{|p{1cm}|p{6cm}|p{6cm}|}
\hline
Time estimation & Task & Comments \\
\hline
\hline
7H &
\begin{itemize}
\item{Validate that Android 9 builds under a GNU/Linux distribution
compliant with the FSF's Free Software Distribution Guidelines (FSDG)
and keep using it to make sure it keeps working.}
\end{itemize} & \\
\hline
21H &
\begin{itemize}
\item{Choose an Android distribution (like AOSP or LineageOS) to base the work on.}
\item{Add very partial support for one of the following devices:
\begin{itemize}
\item{Galaxy SIII (I9300)}
\item{Galaxy SIII 4G (I9305)}
\end{itemize}
}
\item{Make that device boot without proprietary libraries}
\item{Make sure that the kernel is also built from the Android build system}
\item{Make sure it still builds with an FSDG compliant distribution}
\item{Document the build procedure along the way}
\end{itemize} &
There is a small risk of having to change distribution and devices. \\
\hline
14H &
\begin{itemize}
\item{Find, remove and document proprietary software in the source code.}
\end{itemize} & \\
\hline
14H &
\begin{itemize}
\item{Find, remove and document privacy issues in the source code.}
\end{itemize} & \\
\hline
7H &
\begin{itemize}
\item{Make the the touch keys Linux driver work.}
\end{itemize} & Upstream the missing parts if time allows. \\
\hline
7H &
\begin{itemize}
\item{Make the Linux AAT1290 flash led driver work.}
\end{itemize} & Upstream the missing parts if time allows. \\
\hline
7H &
\begin{itemize}
\item{rebrand LineageOS as Replicant}
\end{itemize} & \\
\hline
70H &
\begin{itemize}
\item{port and cleanup the the Galaxy SIII (i9300) modem Linux driver to Linux 5.0 or later}
\end{itemize} &
A port to Linux 4.16 of the driver is available at \url{https://github.com/fourkbomb/linux/}
in the modem branch. At the beginning it can be used as a base for the work by porting
it to Linux 5.0 or later. If that port is chosen, I will then need to investigate,
possibly with the help of other upstream Linux developers, how to get rid of the hacks
that are present in this port to Linux 4.16. Depending on how it turns out, I may have to
rewrite a significant portion of the driver or other related code.
At the time of writing I'm aware of a hack with the code that resets the link between
the modem and the processor running Android\cite{HSIC-hack}, but it might not be the
only issue that may take time to address.
\\
\hline
\hline
\multicolumn{3}{|c|}{Total: 147h (~1 month) }\\
\hline
\end{longtable}
\subsection{
Second month
}
\begin{longtable}[!t]{|p{1cm}|p{6cm}|p{6cm}|}
\hline
Time estimation & Task & Comments \\
\hline
\hline
157H &
\begin{itemize}
\item{port libsamsung-ril and libsamsung-ipc to Android 9}
\item{Make the modem driver and libsamsung-ipc work together}
\end{itemize} &
The port of libsamsung-ipc and libsamsung-ril will be attempted
with a compatibility layer at first. Devices manufacturer are
probably required not to use an approach like
that\cite{hal-types}\cite{HIDL} for new devices shipping
Android 9.
This issue will need to be looked in more details at later.
This will be done to be able to focus more on the modem driver,
port and if possible work to upstream it.
Later (which is not part of this deliverable), we will then need
to look if the approach chosen is already using a "Binderized HAL"
and if not, what are the consequences of converting the code to use
it, because even if libsamsung-ipc has already been used used in
GNU/Linux, we still want to enable GNU/Linux distributions to easily
use libsamsung-ril as well.
\\
\hline
\hline
\multicolumn{3}{|c|}{Total: 157h (~1 month) }\\
\hline
\end{longtable}
\begin{thebibliography}{99}
\bibitem{CustomROMs}
\begin{itemize}
lineage-16.0 branch in \url{https://github.com/CustomROMs/android\_local\_manifests\_i9300} and associated repositories.
\end{itemize}
\bibitem{hal-types}
\url{https://source.android.com/devices/architecture/hal-types}
\bibitem{HIDL}
\url{https://source.android.com/devices/architecture/hidl/}
\bibitem{HSIC-hack}
\url{https://github.com/fourkbomb/linux/commit/5c71c549206351c16412d23c38e3d8d62763f454}
\end{thebibliography}
\end{document}
|