Project

General

Profile

Replicant 6 on Samsung Galaxy S2.english.md

Fil Lupin, 03/08/2019 09:32 AM

Download (11.5 KB)

 
1
Translation in english of https://framagit.org/feinstaub/tp64/blob/master/weitere/workshop-smartphone/mobile-os-installieren/2017-10-replicant6-auf-samsung-s2/README.md
2

    
3

    
4
Replicant 6 on Samsung Galaxy S2
5
=================================
6

    
7
OK
8

    
9
<!-- toc -->
10

    
11
- [Background](#Background)
12
- [Installation](#Installation)
13
  * [Create working directory](#create-working-directory)
14
  * [Download files](#download-files)
15
  * [Install Heimdall](#install-heimdall)
16
  * [Install adb](#install-adb)
17
  * [Copying files to the device](#copying-files-to-the-device)
18
  * [Prepare device](#prepare-device)
19
  * [Install images](#install-images)
20
  * [Setup](#setup)
21
- [File transfer](#file-transfer)
22
  * [USB mass storage does not seem to work](#usb-mass-storage-does-not-seem-to-work)
23
  * [via ADB](#via-adb)
24
- [Reverse Thethering (helping the smartphone to access the Internet via USB)](#reverse-thethering-helping-the-smartphone-to-access-the-internet-via-usb)
25
  * [Preparation](#preparation)
26
  * [Root access for ADB](#root-access-for-adb)
27
  * [Copy and start script](#copy-and-start-script)
28
  * [Create a new Internet connection with plasma (was not possible)](#create-a-new-internet-connection-with-plasma-was-not-possible)
29
- [End of 2017: Hardware error](#end-of-2017-hardware-error)
30

    
31
<!-- tocstop -->
32

    
33
Background
34
----------
35

    
36
* Replicant website: https://www. replicant. us/
37
* Material:
38
    * Device: Samsung Galaxy S2
39
    * Computer with openSUSE Linux Tumbleweed
40
    * USB cable (normal to Micro-USB)
41
* Implementation: 2017 => SUCCESS
42

    
43
Installation
44
------------
45
Sources:
46

    
47
* Wiki page about the device: https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100
48
* installation guide: https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100Installation
49
    * "Moreover, it is assumed that anyone performing the installation knows how to use command lines in a terminal and has basic knowledge about it."
50

    
51
### Working directory attach
52

    
53
    $ mkdir ~/dev/replicant_s2/
54
    $ cd ~/dev/replicant_s2/
55

    
56
### Files download
57

    
58
Source: https://redmine.replicant.us/projects/replicant/wiki/ReplicantImages#Replicant-60-0002-images files:
59

    
60
* replicant-6.0-i9100.zip, approximatively 270 MB
61
* replicant-6.0-i9100.zip.asc
62
* recovery-i9100.img, approximatively 5 MB
63
* recovery-i9100.img.asc
64
* i9100.sha256
65

    
66
Release keys import:
67

    
68
    $ gpg --recv-key 5816A24C10757FC4
69

    
70
    key 16D1FEEE4A80EB23:
71
    5 signatures not checked due to missing keys
72
    gpg: key 16D1FEEE4A80EB23: public key "Replicant project release key <contact@replicant.us>" imported
73
    gpg: marginals needed: 3  completes needed: 1  trust model: pgp
74
    gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
75
    gpg: Total number processed: 1
76
    gpg:               imported: 1
77

    
78
Downloads - signature verifcation:
79

    
80
    $ gpg --armor --verify replicant-6.0-i9100.zip.asc replicant-6.0-i9100.zip
81

    
82
    gpg: Signature made So 10 Sep 2017 16:55:49 CEST
83
    gpg:                using RSA key 0F30D1A02F73F70A6FEE048E5816A24C10757FC4
84
    gpg: Good signature from "Wolfgang Wiedmeyer <wolfgang@wiedmeyer.de>" [unknown]
85
    gpg:                 aka "Wolfgang Wiedmeyer <wreg@wiedmeyer.de>" [unknown]
86
    gpg:                 aka "Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>" [unknown]
87
    gpg: WARNING: This key is not certified with a trusted signature!
88
    gpg:          There is no indication that the signature belongs to the owner.
89
    Primary key fingerprint: 0F30 D1A0 2F73 F70A 6FEE  048E 5816 A24C 1075 7FC4
90

    
91
    $ gpg --armor --verify recovery-i9100.img.asc recovery-i9100.img
92

    
93
    gpg: Signature made So 10 Sep 2017 16:55:46 CEST
94
    gpg:                using RSA key 0F30D1A02F73F70A6FEE048E5816A24C10757FC4
95
    gpg: Good signature from "Wolfgang Wiedmeyer <wolfgang@wiedmeyer.de>" [unknown]
96
    gpg:                 aka "Wolfgang Wiedmeyer <wreg@wiedmeyer.de>" [unknown]
97
    gpg:                 aka "Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>" [unknown]
98
    gpg: WARNING: This key is not certified with a trusted signature!
99
    gpg:          There is no indication that the signature belongs to the owner.
100
    Primary key fingerprint: 0F30 D1A0 2F73 F70A 6FEE  048E 5816 A24C 1075 7FC4
101

    
102

    
103
Downloads - test sums verify:
104

    
105
    $ sha256sum -c i9100.sha256
106

    
107
    recovery-i9100.img: OK
108
    replicant-6.0-i9100.zip: OK
109

    
110

    
111
### Heimdall installation
112

    
113
Heimdall is a Flash program for Samsung devices.
114

    
115
Installation from openSUSE: https: // software.opensuse.org/package/heimdall with 1 Click Install from:
116

    
117
* Repository **hardware** / version 1.4.2
118

    
119
### adb installation
120

    
121
ADB = Android Debug Bridge
122

    
123
    $ sudo zypper install android-tools
124

    
125
### Files on the device copy
126

    
127
* Device connect with USB with the computer
128
* Previous operating system: Android 4.1.2
129
* Settings > Wirelessly and networks > other settings > USB connection > mass warehouse procedure activate > warehouse with PC connect
130
* "USB is connected. Remove the cable"
131
* Disconnect cable. Click again. Connect cable.
132
* "Warehouses with PC connect"> OK. Wait a few seconds.
133
* Plasma Device Notifier> Open with file manager
134
* The file **replicant-6.0-i9100.zip** in the root directory (= copy a highest level(plain)).
135

    
136
* Plasma: "Savely Remove" device
137
* Device: "USB warehouses switch off"
138

    
139
### Device preparation
140
WARNING. Here begins the possible complete overrun on the device.
141

    
142
* "Make sure the device is completely turned off and the USB cable is disconnected from the device "
143
    * Switch off, USB cables distinguish
144
* "Start the device by holding company the following key combination: to volume down, Select, power"
145
    * "Volume down " (left side button), "Home button" (middle button in front below), "Power button" (right side)
146
    * Hold these buttons make a warning appears: "Warning!! A custom OS can cause critical of problem in phone and installed applications "
147
* "Volume up: Continue" select.
148
* The screen displays
149
    "ODIN MODE
150
    PRODUCT NAME: GT-i9100
151
    CUSTOM BINARY DOWNLOAD: NO
152
    CURRENT BINARY: SAMSUNG OFFICIAL
153

    
154
    Downloading...
155
    Do not turn off target !!"
156

    
157
* "Connect the USB cable to both the computers and the device
158

    
159
### Images installation
160

    
161
Flash with Heimdall (duration: 10 seconds)
162

    
163
    $ heimdall flash --KERNEL recovery-i9100.img
164

    
165
    Heimdall v1.4.2
166

    
167
    Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
168
    http://www.glassechidna.com.au/
169

    
170
    This software is provided free of charge. Copying and redistribution is
171
    encouraged.
172

    
173
    If you appreciate this software and you would like to support future
174
    development please consider donating:
175
    http://www.glassechidna.com.au/donate/
176

    
177
    Initialising connection...
178
    Detecting device...
179
    Claiming interface...
180
    Setting up interface...
181

    
182
    Initialising protocol...
183
    Protocol initialisation successful.
184

    
185
    Beginning session...
186

    
187
    Some devices may take up to 2 minutes to respond.
188
    Please be patient!
189

    
190
    Session begun.
191

    
192
    Downloading device's PIT file...
193
    PIT file download successful.
194

    
195
    Uploading KERNEL
196
    100%
197
    KERNEL upload successful
198

    
199
    Ending session...
200
    Rebooting device...
201
    Releasing device interface...
202

    
203
Device restarts. One sees a yellow exclamation mark with the Samsung-start screen.
204
Then one sees the following screen:
205

    
206
    Replicant
207
    RECOVERY
208

    
209
    - Reboot system now
210
    - Apply update
211
    - Factory reset
212
    - Advanced
213

    
214
* select **Factory reset** ("A data wipe is necessary if you switch from the factory image or a different Android distribution to Replicant")
215
* select **Wipe data (keep media)**
216
* select **YES**
217
* Wait (a few seconds)
218
* Press "Back" (to the main menu)
219
* select **Apply update**
220
* select **Choose from sdcard0**
221
* select **replicant-6.0-i9100.zip**
222
* Wait (a few minutes). One sees an installation animation, a yellow progress beam and status text editions.
223
    * with approximatively 25% it does not go on for a while. Then it is finished suddenly and one sees the "Replicant RECOVERY" screen again
224

    
225
* "If you did the data wipe ani step 2, you wants need to do a factory reset ace wave:"
226
    * Select **Factory reset**
227
    * Select **Full factory reset**
228
    * Confirm the factory reset by selecting **Yes**
229
    * Press the **back key** (if necessary) to get back to the general menu
230
* Select **Reboot system now** to reboot the device
231

    
232
* **Your device should now be running Replicant!**
233
    * However, one still sees the Samsung-start screen with the yellow exclamation point.
234
        * TODO: Is this normal?
235
    * Then appears the Replicant boat screen and remains surely for a long time (more than 1 minute)
236
    * Then below a progress beam appears where 85 apps are prepared (more than 3 minutes)
237

    
238
### Configuration
239

    
240
* Language choice
241
    * English (United States)
242
* Date and time
243
    * Amsterdam, Berlin (GMT+1:00)
244
    * configure Date and time
245
* "SIM card missing" message
246
    * Skip
247
* Choose screen lock
248
    * PIN: 0000
249
* Replicant features
250
    * Enable Privacy guard? -> only not.
251
* READY
252

    
253
* After a few clicks
254
    * e.g., camera functions
255
    * Root access for RepWifi configuration. However, it works only if the Wifi adapter is connected.
256
* start again.
257

    
258
File transfer
259
-------------
260

    
261
### USB degree Storage does not seem to go
262
(TODO)
263

    
264
### via ADB
265
* Developer Options> Debugging> Android Debugging (Enable adb)> Confirm of computer fingerprint
266

    
267
    $ adb devices
268

    
269
    List of devices attached
270
    00095da2148b6f  device
271

    
272
    $ adb push BoxCat_Games_-_19_-_Mission\ \(freemusicarchive.org\).mp3 /storage/611C-161B/Music
273

    
274
* Where from one knows "/storage/611C-161B"? See file manager
275
* Music works.
276

    
277
Reverse Thethering (which Smartphone via USB help to Internet)
278
--------------------------------------------------------------
279

    
280
* Why? Because no WLAN works or not be applied.
281
* STATUS: up to now failed
282
* After this manual: https: // redmine.replicant.us/projects/replicant/wiki/ReplicantUSBNetworking
283

    
284

    
285

    
286
### Preparations
287

    
288
    $ cd ~/dev/replicant_s2/
289
    $ mkdir tether
290
    $ cd tether
291
    $ wget https://git.replicant.us/replicant/user-scripts/plain/networking/usb/usb_networking_device.sh
292

    
293
### Root access for ADB
294
Settings> Developer Options (second from below)> **Android debugging** (about in the middle)> enable
295

    
296
    $ adb devices
297
    $ adb shell
298
    $ adb root
299
    restarting adbd as root
300

    
301
Settings> Developer Options (second from below)> **Root access** (approx. 10 options from above)> "Apps and ADB"
302

    
303
    $ > logout
304
    $ adb remount
305
    remount succeeded
306

    
307
### Script copy and start
308

    
309
    $ adb push usb_networking_device.sh /data/
310
    $ adb shell chmod a+x /data/usb_networking_device.sh
311
    $ adb shell /data/usb_networking_device.sh start1
312
    Starting Replicant USB networking, phase 1
313

    
314
It poppt a new connection on, but it does not work (no connection found)
315

    
316
### New Internet Connection with plasma attach (did not go)
317

    
318
1. In the network manager applet, create a new "Ethernet" or "Wired" connection.
319
2. In the tab for IPv4 settings, select the method "Shared to other computers".
320
3. Save the connection, preferably with a distinguishable name (The name can be changed at the top of the edit window).
321
4. Select this connection for your device. (todo: what is it?)
322

    
323
    $ adb shell /data/usb_networking_device.sh start2
324
    error: insufficient permissions for device
325
--> TODO
326

    
327
reconnect
328

    
329
or: without start1:
330

    
331
    $ adb shell /data/usb_networking_device.sh start2
332
    Starting Replicant USB networking, phase 2
333
    Clearing network configuration
334
    400 0 destroyNetwork() failed (Machine is not on the network)
335
    200 0 Interface IP addresses cleared
336
    Configuring DHCP, please wait
337
    ifconfig: ioctl 8913: No such device
338

    
339

    
340
WAIT: https://redmine.replicant.us/boards/9/topics/6915
341

    
342
In the end of 2017: hardware error
343
----------------------------------
344

    
345
Suddenly the mobile radio-connection does not function anymore. No net. Thus no phone or data transfer possible.
346