Project

General

Profile

NexusSI902xInstallation » History » Version 10

Paul Kocialkowski, 01/21/2014 03:57 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 9 Paul Kocialkowski
The @fastboot@ tool 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 8 Paul Kocialkowski
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 9 Paul Kocialkowski
h2. Copying the files to the device
62
63
There are two means of pushing the system zip to the device:
64
* Using the storage of the device
65
* Using the @adb@ tool to perform sideload
66
67
h3. Using the storage of the device
68
69
1. Make sure the device is started up and has an Android system running
70
2. Connect the USB cable to both the computer and the device
71
3. Enable USB mass storage on the device
72
4. Mount the mass storage on the computer
73
6. Copy the @replicant-4.2-crespo.zip@ file at the origin of the mass storage
74
7. Safely unmount the mass storage on the computer
75
8. Disable USB mass storage on the device
76
77
h3. Installing adb
78
79
In the case of using @adb@ to perform sideload, @adb@ has to be installed. @adb@ can be installed from the repositories of your GNU/Linux distribution (if available) or from our released tools.
80
81
h4. From GNU/Linux distributions repositories
82
83
h5. Debian
84
85
<pre>
86
apt-get install android-tools-adb
87
</pre>
88
89
h3. From our released tools
90
91
1. Download the @adb@ tool, the @adb.sig@ signature and the checksum
92
2. Make sure you have added the [[ReplicantReleaseKey|Replicant release key]] to your GPG keyring
93
3. Check the signature of the @adb@ tool:
94
<pre>
95
gpg --armor --verify path/to/adb.sig path/to/adb
96
</pre>
97
4. Make sure the check succeeds, *do not run the binary if it doesn't*!
98
5. Check the checksum of the @adb@ tool:
99
<pre>
100
md5sum -c tools.md5
101
</pre>
102
6. Make sure the check succeeds for @adb@, *do not run the binary if it doesn't*!
103
104
As @adb@ 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.
105
7. Make sure @adb@ can be executed:
106
<pre>
107
chmod a+x adb
108
</pre>
109
110 1 Paul Kocialkowski
h2. Preparing the device
111
112
The next step in the installation process is to prepare the device for @fastboot@ mode.
113 6 Paul Kocialkowski
114 1 Paul Kocialkowski
1. Make sure the device is completely turned off and the USB cable is disconnected from the device
115
2. Start the device by holding the following key combination: *Volume up, Power*
116
3. Hold the key combination until the device shows *Fastboot mode*
117
4. Connect the USB cable to both the computer and the device
118
119
h3. Unlocking the bootloader
120
121
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.
122
*Beware: all data stored on the internal storage will be lost during that operation.*
123
124 8 Paul Kocialkowski
1. Unlock the bootloader:
125 1 Paul Kocialkowski
<pre>
126 8 Paul Kocialkowski
fastboot oem unlock
127 1 Paul Kocialkowski
</pre>
128
2. Confirm that you want to unlock the device (using the volume keys to navigate and the power key to select)
129 9 Paul Kocialkowski
130 1 Paul Kocialkowski
h2. Installing the images
131
132
Now that both the computer and the device are set up, it is time to actually install the images to the device.
133
134 10 Paul Kocialkowski
1. Install the recovery image to the device:
135 1 Paul Kocialkowski
<pre>
136 10 Paul Kocialkowski
fastboot flash recovery path/to/recovery.img
137 1 Paul Kocialkowski
</pre>
138 10 Paul Kocialkowski
2. Select recovery mode (using the volume keys to navigate and the power key to select)
139
3. Make sure the device reboots to recovery
140
4. Select *install zip* (using the volume keys to navigate and the power key to select)
141
142
h3. Using the storage of the device
143
144
5. Select *install zip from sdcard*
145
6. Select the system zip: *replicant-4.2-crespo.zip*
146
   Note: if your device was running Android 4.2 and later, it may be located in the *0* directory
147
7. Confirm the installation
148
149
h3. Using adb sideload
150
151
5. Select *install zip from sideload*
152
6. Back to the host computer, load the system zip with sideload:
153
<pre>
154
adb sideload path/to/replicant-4.2-crespo.zip
155
</pre>
156
7. Make sure the file is being transfered
157
158
8. Select *Go Back* (if necessary) to get back to the general menu
159
8. Select *wipe data/factory reset*
160
9. Confirm the data wipe by selecting *Yes -- delete all user data*
161
10. Select *Reboot system now* to reboot the device
162 1 Paul Kocialkowski
163
*Your device should now be running Replicant!*