Project

General

Profile

InstallationHeimdall » History » Version 15

Denis 'GNUtoo' Carikli, 01/03/2018 06:34 PM

1 1 Denis 'GNUtoo' Carikli
h1. ReplicantInstallationHeimdall
2
3
*Warning: installing an operating system, such as Replicant, may void your device's warranty and will erase the data stored on the device.*
4
5
h2. Prerequisites 
6
7 9 Denis 'GNUtoo' Carikli
In order to install Replicant on your device, it is assumed that you have a computer running a GNU/Linux operating system and everything necessary to connect your device to the computer through USB. Moreover, it is assumed that anyone performing the installation knows how to use the command line in a terminal and has basic knowledge about it.
8 1 Denis 'GNUtoo' Carikli
9
h2. Downloading the files
10
11
The first step in the installation process is to download and set up the files that will be used to install Replicant to the device. The files must be downloaded on your computer first.
12
13 10 Denis 'GNUtoo' Carikli
1. First find the latest image for your device in [[ReplicantImages#Images|ReplicantImages]]. For instance for a Galaxy S2, the table will have <pre>Galaxy S 2 (I9100)</pre> in the device column.
14
2. Download *all* the files listed for your device (including the checksum and the signatures) on [[ReplicantImages#Images|ReplicantImages]] for the latest image.
15 11 Denis 'GNUtoo' Carikli
3. Make sure you have added the [[ReplicantReleaseKey|Replicant release key]] to your GPG keyring
16
17
h2. Check the signature of the recovery
18
19
4. First identify the recovery file and its corresponding signature file:
20
The recovery file will look like that:
21 12 Denis 'GNUtoo' Carikli
<pre>
22
recovery-<yourdevice>.img
23
</pre>
24 13 Denis 'GNUtoo' Carikli
And the its corresponding signature file will look like that:
25 12 Denis 'GNUtoo' Carikli
<pre>
26
recovery-<yourdevice>.img.asc
27
</pre>
28 15 Denis 'GNUtoo' Carikli
29
For instance for the Samsung Galaxy S2, the file will be named like that:
30
* recovery-i9100.img
31
* recovery-i9100.img.asc
32
33 12 Denis 'GNUtoo' Carikli
5. From the command line, go inside the directory that has the dowloaded files:
34
<pre>
35
cd "${HOME}/Downloads/"
36
</pre>
37 14 Denis 'GNUtoo' Carikli
6. Then check the signature of the recovery (Don't forget to  sure to substitute "<yourdevice>" with the actual device name):
38 12 Denis 'GNUtoo' Carikli
<pre>
39 1 Denis 'GNUtoo' Carikli
gpg --armor --verify recovery-<yourdevice>.img.asc recovery-<yourdevice>.img
40 11 Denis 'GNUtoo' Carikli
</pre>
41 1 Denis 'GNUtoo' Carikli
Make sure the check succeeds, *do not install anything if it doesn't*!
42
43
h2. Installing heimdall
44
45
The heimdall tool is required to flash the recovery image to the device.
46
Instructions to install heimdall: [[ToolsInstallation#Heimdall|ToolsInstallation]]
47
48
h2. Copying the files to the device
49
50
There are two means of pushing the system zip to the device:
51
* Using the storage of the device
52
* Using the ADB tool to perform sideload
53
54
h3. Using the storage of the device
55
56
You can either complete this step by using the device's internal storage or by using an external microSD card.
57
58
h4. Using the internal storage
59
60
1. Make sure the device is started up and has an Android system running
61
2. Connect the USB cable to both the computer and the device
62
3. Enable USB mass storage on the device
63
4. Mount the mass storage on the computer
64
5. Copy the @replicant-6.0-i9300.zip@ file at the origin of the mass storage
65
6. Safely unmount the mass storage on the computer
66
7. Disable USB mass storage on the device
67
68
h4. Using a microSD card
69
70
1. Connect the microSD card to the computer (e.g. using an USB card reader)
71
2. Mount the microSD card on the computer
72
3. Copy the @replicant-6.0-i9300.zip@ file at the origin of the microSD card
73
4. Safely unmount the microSD card on the computer
74
5. Disconnect the microSD card from the computer
75
6. Insert the microSD card in the device (make sure it is turned off before inserting the card)
76
77
h3. Installing ADB
78
79
Instructions to install ADB: [[ToolsInstallation#ADB|ToolsInstallation]]
80
81
h2. Preparing the device
82
83
The next step in the installation process is to prepare the device for heimdall mode.
84
85
1. Make sure the device is completely turned off and the USB cable is disconnected from the device
86
2. Start the device by holding the following key combination: *Volume down, Select, Power*
87
3. Hold the key combination until the device shows a *Warning* message
88
4. Confirm that you want to download a custom OS (using volume up)
89
5. Make sure the device is in *Downloading* mode
90
4. Connect the USB cable to both the computer and the device
91
92
h2. Installing the images
93
94
Now that both the computer and the device are set up, it is time to actually install the images to the device.
95
96
1. Install the recovery image to the device:
97
<pre>
98
heimdall flash --BOOT path/to/recovery-i9300.img --RECOVERY path/to/recovery-i9300.img
99 6 Denis 'GNUtoo' Carikli
</pre>
100 1 Denis 'GNUtoo' Carikli
This should also automatically reboot the device to the recovery.
101
102
h3. Data wipe
103
104
A data wipe is necessary if you switch from the factory image or a different Android distribution to Replicant. You also need to do a data wipe when upgrading to a new major release (e.g. from Replicant 4.2 to Replicant 6.0). Only when updating to a new minor release (e.g. from Replicant 6.0 0001 to Replicant 6.0 0002), a data wipe is usually not required.
105
106
3. Select *Factory reset*
107
4. Select *Wipe data (keep media)*
108
5. Confirm the data wipe by selecting *Yes*
109
6. Press the back key (if necessary) to get back to the general menu
110
111
7. Select *Apply update*
112
113
h3. Using the storage of the device
114
115
h4. Using the internal storage
116
117
8. Select *Choose from emulated*
118
9. Select the system zip: *replicant-6.0-i9300.zip*
119
   Note: if your device was running Android 4.2 and later, it may be located in the *0* directory
120
121
h4. Using a microSD card
122
123
8. Select *Choose from sdcard1*
124
9. Select the system zip: *replicant-6.0-i9300.zip*
125
   Note: if your device was running Android 4.2 and later, it may be located in the *0* directory
126
127
h3. Using ADB sideload
128
129
8. Select *Apply from ADB*
130
9. Back to the host computer, load the system zip with sideload:
131
<pre>
132
adb sideload path/to/replicant-6.0-i9300.zip
133
</pre>
134
10. Make sure the file is being transfered
135
136
h3. Completing the installation
137
138
11. Press the back key (if necessary) to get back to the general menu
139
16. Select *Reboot system now* to reboot the device
140
141
*Your device should now be running Replicant!*