-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tex
292 lines (277 loc) · 10.9 KB
/
main.tex
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
\documentclass[journal,12pt,twocolumn]{IEEEtran}
\usepackage{setspace}
\usepackage{gensymb}
\singlespacing
\usepackage[cmex10]{amsmath}
\usepackage{amsthm}
\usepackage{mathrsfs}
\usepackage{txfonts}
\usepackage{stfloats}
\usepackage{bm}
\usepackage{cite}
\usepackage{cases}
\usepackage{subfig}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{enumitem}
\usepackage{mathtools}
\usepackage{tikz}
\usepackage{circuitikz}
\usepackage{verbatim}
\usepackage[breaklinks=true]{hyperref}
\usepackage{tkz-euclide} % loads TikZ and tkz-base
\usepackage{listings}
\usepackage{color}
\usepackage{array}
\usepackage{longtable}
\usepackage{calc}
\usepackage{multirow}
\usepackage{hhline}
\usepackage{ifthen}
\usepackage{lscape}
\usepackage{chngcntr}
\DeclareMathOperator*{\Res}{Res}
\renewcommand\thesection{\arabic{section}}
\renewcommand\thesubsection{\thesection.\arabic{subsection}}
\renewcommand\thesubsubsection{\thesubsection.\arabic{subsubsection}}
\renewcommand\thesectiondis{\arabic{section}}
\renewcommand\thesubsectiondis{\thesectiondis.\arabic{subsection}}
\renewcommand\thesubsubsectiondis{\thesubsectiondis.\arabic{subsubsection}}
\renewcommand\thetable{\arabic{table}}
% correct bad hyphenation here
\hyphenation{op-tical net-works semi-conduc-tor}
\def\inputGnumericTable{} %%
\lstset{
%language=C,
frame=single,
breaklines=true,
columns=fullflexible,
literate=
{->}{$\rightarrow{}$}{1}
{~}{$\sim$}{1},
}
%\lstset{
%language=tex,
%frame=single,
%breaklines=true
%}
\begin{document}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{problem}{Problem}
\newtheorem{proposition}{Proposition}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{example}{Example}[section]
\newtheorem{definition}[problem]{Definition}
\newcommand{\BEQA}{\begin{eqnarray}}
\newcommand{\EEQA}{\end{eqnarray}}
\newcommand{\define}{\stackrel{\triangle}{=}}
\bibliographystyle{IEEEtran}
\providecommand{\figcap}[3]{
\begin{figure}[!ht]
\centering
\includegraphics[width=\columnwidth]{#1}
\caption{#2}
\label{fig:#3}
\end{figure}
}
\providecommand{\mbf}{\mathbf}
\providecommand{\pr}[1]{\ensuremath{\Pr\left(#1\right)}}
\providecommand{\qfunc}[1]{\ensuremath{Q\left(#1\right)}}
\providecommand{\sbrak}[1]{\ensuremath{{}\left[#1\right]}}
\providecommand{\lsbrak}[1]{\ensuremath{{}\left[#1\right.}}
\providecommand{\rsbrak}[1]{\ensuremath{{}\left.#1\right]}}
\providecommand{\brak}[1]{\ensuremath{\left(#1\right)}}
\providecommand{\lbrak}[1]{\ensuremath{\left(#1\right.}}
\providecommand{\rbrak}[1]{\ensuremath{\left.#1\right)}}
\providecommand{\cbrak}[1]{\ensuremath{\left\{#1\right\}}}
\providecommand{\lcbrak}[1]{\ensuremath{\left\{#1\right.}}
\providecommand{\rcbrak}[1]{\ensuremath{\left.#1\right\}}}
\theoremstyle{remark}
\newtheorem{rem}{Remark}
\newcommand{\sgn}{\mathop{\mathrm{sgn}}}
\providecommand{\abs}[1]{\left\vert#1\right\vert}
\providecommand{\res}[1]{\Res\displaylimits_{#1}}
\providecommand{\norm}[1]{\left\lVert#1\right\rVert}
\providecommand{\mtx}[1]{\mathbf{#1}}
\providecommand{\mean}[1]{E\left[ #1 \right]}
\providecommand{\fourier}{\overset{\mathcal{F}}{ \rightleftharpoons}}
\providecommand{\system}[1]{\overset{\mathcal{#1}}{ \longleftrightarrow}}
\newcommand{\solution}{\noindent \textbf{Solution: }}
\newcommand{\cosec}{\,\text{cosec}\,}
\providecommand{\dec}[2]{\ensuremath{\overset{#1}{\underset{#2}{\gtrless}}}}
\newcommand{\myvec}[1]{\ensuremath{\begin{pmatrix}#1\end{pmatrix}}}
\newcommand{\mydet}[1]{\ensuremath{\begin{vmatrix}#1\end{vmatrix}}}
\let\vec\mathbf
\def\putbox#1#2#3{\makebox[0in][l]{\makebox[#1][l]{}\raisebox{\baselineskip}[0in][0in]{\raisebox{#2}[0in][0in]{#3}}}}
\def\rightbox#1{\makebox[0in][r]{#1}}
\def\centbox#1{\makebox[0in]{#1}}
\def\topbox#1{\raisebox{-\baselineskip}[0in][0in]{#1}}
\def\midbox#1{\raisebox{-0.5\baselineskip}[0in][0in]{#1}}
\vspace{3cm}
\title{Installation of De-Googled Android on Smartphones}
\author{Gautam Singh}
\maketitle
\tableofcontents
\bigskip
\begin{abstract}
This document contains an illustration of the process to install
De-Googled Android-based operating systems.
\end{abstract}
\section{Important Disclaimer}
\begin{enumerate}[label=\thesection.\arabic*
,ref=\thesection.\theenumi]
\item The steps presented in this manual may vary for different phones and
OEMs. Here, we have considered a \textbf{OnePlus 6} (\textit{enchilada}) and
presented the corresponding steps.
\item This guide is \textbf{not} a substitute for any official documentation
from the OEM of the phone or the communities behind the custom ROMs. Please
consult the official installation guides from the respective websites.
\item The author(s) of this document are \textbf{not} responsible for bricked
devices, dead SD cards, thermonuclear war, or you getting fired because the
alarm app failed.
\item Your warranty will be void if you tamper with any part of your device/
software.
\item This document deals with the installation of LineageOS and /e/OS on
phones that ship with stock Android ROMs.
\end{enumerate}
\section{Requirements}
\begin{enumerate}[label=\thesection.\arabic*
,ref=\thesection.\theenumi]
\item An Android phone.
\item A laptop/desktop, preferably running Windows or MacOS. Linux may work,
but not always, since drivers released by the OEM are usually not
compatible with Linux.
\item A USB C to USB cable (essentially the charging cable) of your
phone.
\item (Optional) USB 2.0/3.0 hub. Some phones may work only on older USB
ports, so this might be handy.
\end{enumerate}
\section{Setting Up}
\begin{enumerate}[label=\thesection.\arabic*
,ref=\thesection.\theenumi]
\item Download the appropriate drivers for your phone from the website of the
OEM.
\item Download the latest Android SDK platform tools
\begin{lstlisting}
$ wget https://dl.google.com/android/repository/platform-tools-latest-darwin.zip -O ~/Downloads/platform-tools.zip
\end{lstlisting}
Unzip the downloaded \texttt{platform-tools.zip} file, which contains the
fastboot and adb binaries.
\item Download the script to ensure consistency of paritions
\begin{lstlisting}
$ wget https://mirrorbits.lineageos.org/tools/copy-partitions-20220613-signed.zip
\end{lstlisting}
\item Download the recovery and rootfs .img files to flash onto your phone,
as shown:
\begin{enumerate}
\item LineageOS
\begin{lstlisting}
$ wget https://mirrorbits.lineageos.org/recovery/enchilada/20230124/lineage-20.0-20230124-recovery-enchilada.img
$ wget https://mirrorbits.lineageos.org/full/enchilada/20230124/lineage-20.0-20230124-nightly-enchilada-signed.zip
\end{lstlisting}
\item /e/ OS
\begin{lstlisting}
$ wget https://images.ecloud.global/dev/enchilada/recovery-e-1.7-s-20230111250406-dev-enchilada.img
$ wget https://images.ecloud.global/dev/enchilada/e-1.7-s-20230111250406-dev-enchilada.zip
\end{lstlisting}
\end{enumerate}
\item Finally, do not forget to take a backup of all your data on the phone
(if needed).
\end{enumerate}
\section{Unlocking the Bootloader}
\textbf{Note:} If you have already unlocked the bootloader, please skip this
section.
\begin{enumerate}[label=\thesection.\arabic*
,ref=\thesection.\theenumi]
\item In your Android phone, go to
\begin{lstlisting}
Settings -> About Phone.
\end{lstlisting}
\item Tap on Build Number 7 times (or as many times as required by the phone)
to enable developer mode. See Fig. \ref{fig:build-no}
\figcap{figs/build-number.jpg}{Build number of the phone in Android.}{build-no}
\item Navigate to
\begin{lstlisting}
Settings -> Developer Options
\end{lstlisting}
and toggle the following options:
\begin{enumerate}
\item OEM Unlocking (Fig. \ref{fig:oem})
\item USB Debugging (Fig. \ref{fig:adb})
\end{enumerate}
\figcap{figs/devops1.jpg}{OEM unlocking in developer options.}{oem}
\figcap{figs/devops2.jpg}{USB debugging in developer options.}{adb}
\item Plug in the phone to your laptop and open a terminal window.
\item Run the following commands and approve USB debugging when the pop-up
appears on the phone, as in Fig. \ref{fig:usb-debugging}
\begin{lstlisting}
$ adb kill-server
$ adb reboot bootloader
\end{lstlisting}
\item The phone will then reboot to its bootloader, as shown in Fig.
\ref{fig:bootloader}. To verify this, in the same terminal, run
\begin{lstlisting}
$ fastboot devices
\end{lstlisting}
A serial number corresponding to your device should appear.
\figcap{figs/usb-debugging.jpg}{Pop-up dialog to approve USB debugging from a system.}{usb-debugging}
\item To unlock the bootloader, run
\begin{lstlisting}
$ fastboot oem unlock
\end{lstlisting}
and navigate to the option to unlock the bootloader using volume keys, as in
Fig. \ref{fig:unlock-bootloader}. To enter your choice, press the power button.
\figcap{figs/bootloader.jpg}{The bootloader of the OnePlus 6 (enchilada).}{bootloader}
\figcap{figs/unlock.jpg}{Unlocking the bootloader of the OnePlus 6 (enchilada).}{unlock-bootloader}
\item The phone will reboot into Android after performing a full wipe of
the data. Enable USB debugging as before and reboot into the bootloader.
\end{enumerate}
\section{Flashing and Booting Custom ROMs}
\begin{enumerate}[label=\thesection.\arabic*
,ref=\thesection.\theenumi]
\item Flash the recovery file to the boot partition.
\begin{lstlisting}
$ fastboot flash boot /path/to/recovery.img
\end{lstlisting}
\item Reboot to recovery mode, using any one of the following (see Fig.
\ref{fig:recovery-fastboot}).
\begin{enumerate}
\item From fastboot, either using
\begin{lstlisting}
$ fastboot reboot recovery
\end{lstlisting}
or navigating to \texttt{Recovery Mode} using the volume and power keys.
\item By long pressing the power and volume up button when the device
powered off.
\end{enumerate}
\figcap{figs/recovery.jpg}{Toggle to recovery mode in fastboot.}{recovery-fastboot}
\item \label{item:sideload}
Once booted to recovery, as in either Fig. \ref{fig:los-recovery} or Fig.
\ref{fig:eos-recovery}, navigate to
\begin{lstlisting}
Apply Update -> Apply From ADB -> ADB Sideload
\end{lstlisting}
From the computer terminal, type
\begin{lstlisting}
$ adb sideload /path/to/copy-partitions.zip
\end{lstlisting}
When the file is uploaded, exit status 0 displays on the phone, and on the
computer \texttt{Total xfer: 1.00x} will appear on the terminal.
\figcap{figs/eos-recovery.jpg}{/e/OS recovery interface.}{eos-recovery}
\figcap{figs/los-recovery.jpg}{LineageOS recovery interface.}{los-recovery}
\item Go to recovery, and navigate to
\begin{lstlisting}
Advanced -> Reboot to Recovery
\end{lstlisting}
to reboot to recovery again.
\item Once back in recovery, sideload the rom zip file as in step
\ref{item:sideload}. Optionally, you may choose to flash a root patch such
as SuperSU or Magisk to root your phone at this point.
\item When the sideload is done, go back to the main menu, and press
\texttt{Reboot System Now} to reboot to the new OS. See Fig. \ref{fig:eos} and
Fig. \ref{fig:los}.
\figcap{figs/eos.png}{/e/OS interface.}{eos}
\figcap{figs/los.png}{LineageOS interface.}{los}
\end{enumerate}
\end{document}