Project

General

Profile

NexusSI902xInstallation » History » Version 8

Paul Kocialkowski, 01/21/2014 03:34 PM

1 7 Paul Kocialkowski
h1. Nexus S (I902x) Installation
2 1 Paul Kocialkowski
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
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 available. Moreover, it is assumed that anyone performing the installation knows how to use command lines in a terminal and has basic knowledge about it.
8
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 8 Paul Kocialkowski
1. Find out what the latest image is: check out the @Last image@ part of the general table on [[NexusSI902x]]
14
2. Download *all* the files listed for the device (including the checksum and the signatures) on [[ReplicantImages]] for the latest image
15
2. Make sure you have added the [[ReplicantReleaseKey|Replicant release key]] to your GPG keyring
16
3. Check the signature of the files:
17
<pre>
18
gpg --armor --verify path/to/replicant-4.2-crespo.sig path/to/replicant-4.2-crespo.zip
19
gpg --armor --verify path/to/recovery.img.sig path/to/recovery.img
20
</pre>
21
4. Make sure the check succeeds, *do not install anything if it doesn't*!
22
5. Check the checksum of the files:
23
<pre>
24
md5sum -c crespo.md5
25
</pre>
26
6. Make sure the check succeeds, *do not install anything if it doesn't*!
27
28
h2. Installing fastboot
29
30
The @fastboot@ program is required to flash the recovery image to the device. @fastboot@ can be installed from the repositories of your GNU/Linux distribution (if available) or from our released tools.
31
32
h3. From GNU/Linux distributions repositories
33
34
h4. Debian
35
36
<pre>
37
apt-get install android-tools-fastboot
38
</pre>
39
40
h3. From our released tools
41
42
1. Download the @fastboot@ tool, the @fasboot.sig@ signature and the checksum
43
2. Make sure you have added the [[ReplicantReleaseKey|Replicant release key]] to your GPG keyring
44
3. Check the signature of the @fastboot@ tool:
45
<pre>
46
gpg --armor --verify path/to/fastboot.sig path/to/fastboot
47
</pre>
48
4. Make sure the check succeeds, *do not run the binary if it doesn't*!
49
5. Check the checksum of the @fastboot@ tool:
50
<pre>
51
md5sum -c tools.md5
52
</pre>
53
6. Make sure the check succeeds for @fastboot@, *do not run the binary if it doesn't*!
54
55 1 Paul Kocialkowski
As @fastboot@ is built as a 32 bit binary, you will need to install compatibility libraries for 32 bits executables if your computer is running on a 64 bit architecture.
56 8 Paul Kocialkowski
7. Make sure @fastboot@ can be executed:
57 1 Paul Kocialkowski
<pre>
58 2 Paul Kocialkowski
chmod a+x fastboot
59 1 Paul Kocialkowski
</pre>
60
61
h2. Preparing the device
62
63
The next step in the installation process is to prepare the device for @fastboot@ mode.
64 6 Paul Kocialkowski
65 1 Paul Kocialkowski
1. Make sure the device is completely turned off and the USB cable is disconnected from the device
66
2. Start the device by holding the following key combination: *Volume up, Power*
67
3. Hold the key combination until the device shows *Fastboot mode*
68
4. Connect the USB cable to both the computer and the device
69
70
h3. Unlocking the bootloader
71
72
If this is the first time you are flashing an operating system to your device, you'll have to unlock it first. If this is not the case, you can skip that part.
73
*Beware: all data stored on the internal storage will be lost during that operation.*
74
75 8 Paul Kocialkowski
1. Unlock the bootloader:
76 1 Paul Kocialkowski
<pre>
77 8 Paul Kocialkowski
fastboot oem unlock
78 1 Paul Kocialkowski
</pre>
79
2. Confirm that you want to unlock the device (using the volume keys to navigate and the power key to select)
80
81
h2. Installing the images
82
83
Now that both the computer and the device are set up, it is time to actually install the images to the device.
84
85
1. Open a terminal in the folder containing @fastboot@ and run:
86
<pre>
87 3 Paul Kocialkowski
sudo ./fastboot flash boot path/to/boot.img
88 5 Paul Kocialkowski
sudo ./fastboot flash recovery path/to/recovery.img
89 4 Paul Kocialkowski
sudo ./fastboot flash system path/to/system.img
90 1 Paul Kocialkowski
sudo ./fastboot flash userdata path/to/userdata.img
91
sudo ./fastboot erase cache
92
</pre>
93
94
*Your device should now be running Replicant!*