Project

General

Profile

RecoveryInstallationWithHeimdall » History » Version 36

Denis 'GNUtoo' Carikli, 12/02/2018 05:40 PM

1 1 Denis 'GNUtoo' Carikli
h1. Recovery installation or update trough Heimdall
2
3 16 Denis 'GNUtoo' Carikli
h2. Warning
4 1 Denis 'GNUtoo' Carikli
5 29 Denis 'GNUtoo' Carikli
Theses instructions are experimental and have not been tested yet.
6 25 Denis 'GNUtoo' Carikli
7
They also do not cover all supported devices yet, as theses devices are missing from theses instructions:
8 32 Denis 'GNUtoo' Carikli
* Galaxy S 2 (I9100): has only one partition for boot and recovery called KERNEL?
9
* Galaxy Note (N7000): has only one partition for boot and recovery called KERNEL?
10
* Galaxy Nexus (I9250): fastboot is used to update the recovery on this device.
11 16 Denis 'GNUtoo' Carikli
12 1 Denis 'GNUtoo' Carikli
h2. Prerequisites 
13
14
This guide applies only to the following devices:
15 13 Denis 'GNUtoo' Carikli
* Galaxy S 3 (I9300)
16 1 Denis 'GNUtoo' Carikli
* Galaxy S 3 4G (I9305)
17
* Galaxy Note 2 (N7100)
18 32 Denis 'GNUtoo' Carikli
* Galaxy Tab 2 7.0 (P3100)
19
* Galaxy Tab 2 7.0 Wi-Fi (P3110)
20
* Galaxy Tab 2 10.1 (P5100)
21
* Galaxy Tab 2 10.1 Wi-Fi (P5110)
22 14 Denis 'GNUtoo' Carikli
* Galaxy Note 8.0 (N5100)
23
* Galaxy Note 8.0 Wi-Fi (N5110)
24 13 Denis 'GNUtoo' Carikli
25 15 Denis 'GNUtoo' Carikli
Using the instructions of this page with a device not listed above can break it, up to the point where it is too long, complicated and expensive to repair, even for technical people.
26
27 2 Denis 'GNUtoo' Carikli
In order to install the Replicant recovery 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.
28 1 Denis 'GNUtoo' Carikli
29
h2. Downloading the files
30
31
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.
32
33 3 Denis 'GNUtoo' Carikli
1. First find the recovery 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.
34 5 Denis 'GNUtoo' Carikli
2. Then identify the recovery file and its corresponding signature file:
35 1 Denis 'GNUtoo' Carikli
The recovery file will look like that:
36
<pre>
37
recovery-<yourdevice>.img
38
</pre>
39
And the its corresponding signature file will look like that:
40
<pre>
41
recovery-<yourdevice>.img.asc
42
</pre>
43
44
For instance for the Samsung Galaxy S2, the file will be named like that:
45
* recovery-i9100.img
46
* recovery-i9100.img.asc
47 4 Denis 'GNUtoo' Carikli
48 6 Denis 'GNUtoo' Carikli
3. Download the latest recovery file and its corresponding signature file for your device on [[ReplicantImages#Images|ReplicantImages]].
49 5 Denis 'GNUtoo' Carikli
4. Make sure you have added the [[ReplicantReleaseKey|Replicant release key]] to your GPG keyring
50 4 Denis 'GNUtoo' Carikli
51
h2. Check the signature of the recovery
52 1 Denis 'GNUtoo' Carikli
53 7 Denis 'GNUtoo' Carikli
1. From the command line, go inside the directory that has the dowloaded files:
54 9 Denis 'GNUtoo' Carikli
The emplacement where the files are downloaded might be different for you.
55
If it is the case, adjust the command below accordingly:
56 1 Denis 'GNUtoo' Carikli
<pre>
57
cd "${HOME}/Downloads/"
58
</pre>
59 10 Denis 'GNUtoo' Carikli
60 7 Denis 'GNUtoo' Carikli
2. Then check the signature of the recovery (and don't forget to sure to substitute "<yourdevice>" with the actual device name):
61 1 Denis 'GNUtoo' Carikli
<pre>
62
gpg --armor --verify recovery-<yourdevice>.img.asc recovery-<yourdevice>.img
63
</pre>
64 8 Denis 'GNUtoo' Carikli
Make sure the check succeeds, *do not continue the recovery installation if it doesn't*!
65 1 Denis 'GNUtoo' Carikli
66
h2. Installing heimdall
67
68
The heimdall tool is required to flash the recovery image to the device.
69
Instructions to install heimdall: [[ToolsInstallation#Heimdall|ToolsInstallation]]
70
71
h2. Preparing the device
72
73
The next step in the installation process is to prepare the device for heimdall mode.
74
75
1. Make sure the device is completely turned off and the USB cable is disconnected from the device
76 33 Denis 'GNUtoo' Carikli
2. Remove the device's "external case":https://en.wikipedia.org/wiki/Mobile_phone_accessories#Cases or protection if it has one.
77
3. Start the device by holding the following key combination: *Volume down, Select, Power*
78
4. Hold the key combination until the device shows a *Warning* message
79
5. Confirm that you want to download a custom OS (using volume up)
80
6. Make sure the device is in *Downloading* mode
81
7. Connect the USB cable to both the computer and the device
82 1 Denis 'GNUtoo' Carikli
83
h2. Installing the images
84
85
Now that both the computer and the device are set up, it is time to actually install the images to the device.
86
87 11 Denis 'GNUtoo' Carikli
1. From the command line, return inside the directory that has the dowloaded files:
88
The emplacement where the files are downloaded might be different for you.
89
If it is the case, adjust the command below accordingly:
90
<pre>
91
cd "${HOME}/Downloads/"
92
</pre>
93
94 18 Denis 'GNUtoo' Carikli
2. Installing the recovery
95 21 Denis 'GNUtoo' Carikli
If you are installing Replicant for the first time, you need to install a recovery.
96
97
If you have one of theses devices:
98
* Galaxy S 3 (I9300)
99
* Galaxy S 3 4G (I9305)
100
* Galaxy Note 2 (N7100)
101
* Galaxy Note 8.0 (N5100)
102
* Galaxy Note 8.0 Wi-Fi (N5110)
103
104 1 Denis 'GNUtoo' Carikli
you should then run the following command to install the recovery:
105
<pre>
106
heimdall flash --BOOT path/to/recovery-<yourdevice>.img --RECOVERY path/to/recovery-<yourdevice>.img
107
</pre>
108 22 Denis 'GNUtoo' Carikli
109
Instead, if you have one of the following devices:
110 32 Denis 'GNUtoo' Carikli
* Galaxy Tab 2 7.0 (P3100)
111
* Galaxy Tab 2 7.0 Wi-Fi (P3110)
112
* Galaxy Tab 2 10.1 (P5100)
113
* Galaxy Tab 2 10.1 Wi-Fi (P5110)
114 24 Denis 'GNUtoo' Carikli
115 22 Denis 'GNUtoo' Carikli
you should then run the following command to install the recovery:
116
<pre>
117
heimdall flash --KERNEL recovery-<yourdevice>.img --RECOVERY recovery-<yourdevice>.img
118
</pre>
119
120
The command(s) above should also automatically reboot the device to the recovery.
121 12 Denis 'GNUtoo' Carikli
122 18 Denis 'GNUtoo' Carikli
2. Or updating the recovery
123
Instead if you just want to update your recovery, you should run the following command:
124 12 Denis 'GNUtoo' Carikli
<pre>
125 17 Denis 'GNUtoo' Carikli
heimdall flash --RECOVERY path/to/recovery-<yourdevice>.img
126 12 Denis 'GNUtoo' Carikli
</pre>
127
This command should also automatically reboot the device to the Replicant.
128 34 Denis 'GNUtoo' Carikli
129
130
h2. Troubleshooting
131
132
h3. Making sure that the device is connected in download mode
133 35 Denis 'GNUtoo' Carikli
134 34 Denis 'GNUtoo' Carikli
You can run the following command to verify if the device is in download mode:
135
<pre>
136
$ lsusb
137
</pre>
138
139
If it is you will then have one line that will be somewhat similar to that one:
140
<pre>
141
Bus 004 Device 002: ID 04e8:685d Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II] (Download mode)
142
</pre>
143 36 Denis 'GNUtoo' Carikli
144
h3. Heimdall failing with "ERROR: Protocol initialisation failed!
145
"
146
147
It is pretty easy to end up with heimdall failling like that:
148
<pre>
149
$ heimdall [...]
150
Heimdall v1.4.2
151
152
Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
153
http://www.glassechidna.com.au/
154
155
This software is provided free of charge. Copying and redistribution is
156
encouraged.
157
158
If you appreciate this software and you would like to support future
159
development please consider donating:
160
http://www.glassechidna.com.au/donate/
161
162
Initialising connection...
163
Detecting device...
164
Claiming interface...
165
Setting up interface...
166
167
Initialising protocol...
168
ERROR: Protocol initialisation failed!
169
170
Releasing device interface...
171
</pre>
172
173
In that case disconnect and reconnect the USB cable from the computer and try again.