Project

General

Profile

RecoveryInstallationWithHeimdall » History » Version 45

Denis 'GNUtoo' Carikli, 04/07/2019 03:30 PM
recovery: fix typos in commands

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 16 Denis 'GNUtoo' Carikli
11 1 Denis 'GNUtoo' Carikli
h2. Prerequisites 
12
13
This guide applies only to the following devices:
14 13 Denis 'GNUtoo' Carikli
* Galaxy S 3 (I9300)
15 1 Denis 'GNUtoo' Carikli
* Galaxy S 3 4G (I9305)
16 39 Denis 'GNUtoo' Carikli
* Galaxy Nexus (I9250)
17 1 Denis 'GNUtoo' Carikli
* 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 42 Denis 'GNUtoo' Carikli
1. From the command line, go inside the directory that has the downloaded 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 41 Denis 'GNUtoo' Carikli
gpg --verify recovery-<yourdevice>.img.asc
63 1 Denis 'GNUtoo' Carikli
</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
2. Remove the device's "external case":https://en.wikipedia.org/wiki/Mobile_phone_accessories#Cases or protection if it has one.
77 39 Denis 'GNUtoo' Carikli
78
*If your smartphone is the Galaxy Nexus (I9250)*:
79
3. Start the device by holding the following key combination:  *Volume down, Power*.
80
4. Hold the key combination until the device shows a green "Start".
81
82
*For all other devices*:
83
3. Start the device by holding the following key combination: *Volume down, Select, Power*,
84
4. Hold the key combination until the device shows a *Warning* message.
85
5. Confirm that you want to download a custom OS using volume up
86 33 Denis 'GNUtoo' Carikli
6. Make sure the device is in *Downloading* mode
87
88 39 Denis 'GNUtoo' Carikli
You can then connect the USB cable to both the computer and the device
89
90 1 Denis 'GNUtoo' Carikli
h2. Installing the images
91
92
Now that both the computer and the device are set up, it is time to actually install the images to the device.
93
94 42 Denis 'GNUtoo' Carikli
1. From the command line, return inside the directory that has the downloaded files:
95 11 Denis 'GNUtoo' Carikli
The emplacement where the files are downloaded might be different for you.
96
If it is the case, adjust the command below accordingly:
97
<pre>
98
cd "${HOME}/Downloads/"
99 1 Denis 'GNUtoo' Carikli
</pre>
100
101
2. Installing the recovery
102
103 43 Denis 'GNUtoo' Carikli
You can then proceed to the installation of the recovery by using the commands in the table below.
104 1 Denis 'GNUtoo' Carikli
105 44 Denis 'GNUtoo' Carikli
When installing or upgrading Replicant, use the commands in the *"For installing Replicant"* column. This will make sure that the device is rebooted right into the recovery. It does that by also installing the recovery in the boot partition.
106 1 Denis 'GNUtoo' Carikli
107 44 Denis 'GNUtoo' Carikli
Once in the recovery you can then proceed to the installation or upgrade of Replicant with the [[MinorVersionUpgrade]] instructions.
108
109
In case you only want to update the recovery, without updating or installing Replicant, use the commands in the *"For updating the recovery"*. This will make sure that your Replicant installation is not modified by them.
110
111 43 Denis 'GNUtoo' Carikli
|_. Devices |_. For installing Replicant |_. For updating the recovery |
112 45 Denis 'GNUtoo' Carikli
|_. Galaxy Nexus (I9250) |  <pre>heimdall flash --boot path/to/recovery-<yourdevice>.img --recovery path/to/recovery-<yourdevice>.img</pre> |    <pre>heimdall flash --recovery path/to/recovery-<yourdevice>.img</pre> |
113
|_. Galaxy S 3 (I9300) |/5. <pre>heimdall flash --BOOT path/to/recovery-<yourdevice>.img --RECOVERY path/to/recovery-<yourdevice>.img</pre> |/5. <pre>heimdall flash --RECOVERY path/to/recovery-<yourdevice>.img</pre> |
114 43 Denis 'GNUtoo' Carikli
|_. Galaxy S 3 4G (I9305) |
115
|_. Galaxy Note 2 (N7100) |
116
|_. Galaxy Note 8.0 (N5100) |
117
|_. Galaxy Note 8.0 Wi-Fi (N5110) |
118 45 Denis 'GNUtoo' Carikli
|_. Galaxy Tab 2 7.0 (P3100) |/4. <pre>heimdall flash --KERNEL recovery-<yourdevice>.img --RECOVERY recovery-<yourdevice>.img</pre> |/4. <pre>heimdall flash --RECOVERY recovery-<yourdevice>.img</pre> |
119 43 Denis 'GNUtoo' Carikli
|_. Galaxy Tab 2 7.0 Wi-Fi (P3110) |
120
|_. Galaxy Tab 2 10.1 (P5100) |
121 34 Denis 'GNUtoo' Carikli
|_. Galaxy Tab 2 10.1 Wi-Fi (P5110) |
122
123
h2. Troubleshooting
124
125
h3. Making sure that the device is connected in download mode
126 35 Denis 'GNUtoo' Carikli
127 34 Denis 'GNUtoo' Carikli
You can run the following command to verify if the device is in download mode:
128
<pre>
129 38 Denis 'GNUtoo' Carikli
lsusb
130 34 Denis 'GNUtoo' Carikli
</pre>
131
132
If it is you will then have one line that will be somewhat similar to that one:
133
<pre>
134
Bus 004 Device 002: ID 04e8:685d Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II] (Download mode)
135
</pre>
136 36 Denis 'GNUtoo' Carikli
137 37 Denis 'GNUtoo' Carikli
h3. Heimdall failing with "ERROR: Protocol initialisation failed!"
138 36 Denis 'GNUtoo' Carikli
139
It is pretty easy to end up with heimdall failling like that:
140
<pre>
141
Heimdall v1.4.2
142
143
Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
144
http://www.glassechidna.com.au/
145
146
This software is provided free of charge. Copying and redistribution is
147
encouraged.
148
149
If you appreciate this software and you would like to support future
150
development please consider donating:
151
http://www.glassechidna.com.au/donate/
152
153
Initialising connection...
154
Detecting device...
155
Claiming interface...
156
Setting up interface...
157
158
Initialising protocol...
159
ERROR: Protocol initialisation failed!
160
161
Releasing device interface...
162
</pre>
163
164
In that case disconnect and reconnect the USB cable from the computer and try again.