Project

General

Profile

GalaxySIIGTI9100G » History » Version 61

Denis 'GNUtoo' Carikli, 04/03/2020 04:24 AM

1 19 Denis 'GNUtoo' Carikli
h1. Galaxy S II (GT-I9100G)
2 2 Denis 'GNUtoo' Carikli
3 20 Denis 'GNUtoo' Carikli
{{>toc}}
4
5 21 Denis 'GNUtoo' Carikli
|/9. !galaxys2.png! | *Device* | Galaxy S II (GT-I9100G) |
6 20 Denis 'GNUtoo' Carikli
| *Manufacturer* | Samsung |
7 21 Denis 'GNUtoo' Carikli
| *Release date* | ? |
8 22 Denis 'GNUtoo' Carikli
| *Codename* | @i9100G@ ? |
9 20 Denis 'GNUtoo' Carikli
| *Status* | Not supported yet |
10 23 Denis 'GNUtoo' Carikli
| *Variants* | GSM: GT-I9100G |
11 20 Denis 'GNUtoo' Carikli
| *Latest images* | None |
12
13 17 Denis 'GNUtoo' Carikli
h2. History
14
15 56 Denis 'GNUtoo' Carikli
Long time ago, we had reports that the "Galaxy SII" had an unsigned bootloader, but we didn't manage to confirm to which exact model it applied to, or if people assumed that the bootloader of the GT-I9100 was unsigned because it uses Xloader which is GPLv2. Samsung also published the source code of various Xloader versions they used on the GT-I9100G for different Android versions. However until now we weren't able to confirm that any device were able to run unsigned bootloaders. Though we verified that at least the bootloader of the I9100G_CHN_CHN is signed.
16
17 17 Denis 'GNUtoo' Carikli
h2. Rationale
18 1 Denis 'GNUtoo' Carikli
19 57 Denis 'GNUtoo' Carikli
* Uses the samsung-ipc protocol
20 17 Denis 'GNUtoo' Carikli
* The modem probably uses MIPI, so it should be isolated
21
* 1G of ram => it should be enough for Replicant 6 and 9
22 1 Denis 'GNUtoo' Carikli
23 34 Denis 'GNUtoo' Carikli
h2. Wiki pages
24
25
* [[I9100GBootloader]]: Research on bootloader freedom for the GT-I9100G
26
27
h2. Various IRC logs of research on it.
28 24 Jens Korte
29 61 Denis 'GNUtoo' Carikli
TODO:
30
* Read the log below and remove what is not relevant
31
* Add what is relevant in various pages of the Replicant wiki or Wikidata and point to that if it's in another page that this one (or wikidata).
32
33 24 Jens Korte
(02:15:44 AM) sensiblemn: wait, the pandaboard uses roughly the same omap SoC and has a free software x-loader here: [https://github.com/thalamus/omap-x-loader]
34 14 Kurtis Hanna
(02:24:29 AM) sensiblemn: that x-loader README say TI will sign our builds of x-loader if it needs to be signed. i guess that's better than what our current situation is with Samsung's BL1 where we don't have the source code and Samsung never has said anywhere as far as I can see that they would sign someone's BL1 if they were able to write one using free software.
35
(02:24:45 AM) ggoes left the room (quit: Quit: WeeChat 2.3).
36
(02:25:16 AM) ggoes [~gregf@fsf/staff/ggoes] entered the room.
37
(02:25:17 AM) sensiblemn: oh, Galaxy S II GT-I9100G uses the same SoC as the pandaboard, which is what that x-loader source code is for.
38
(02:58:04 AM) CcxWrk left the room (quit: Ping timeout: 252 seconds).
39
(03:00:23 AM) CcxWrk [~ccx@asterix.te2000.cz] entered the room.
40
(03:25:36 AM) sensiblemn: https://web.archive.org/web/20130613110712/http://gitorious.org/x-loader/x-loader/blobs/master/README
41
(03:26:58 AM) sensiblemn: "X-Loader can be signed by Texas Instruments IFT and installed to Nand flash to achieve Nand booting."
42
(07:17:23 PM) sensiblemn: GNUtoo: ah, it seems like some OMAP devices are GP and others are HS, so the question is whether we can find smartphones and tablets that are GP. Looks like the Blaze Tablet released by TI is GP. https://wiki.tizen.org/Tizen_IVI_Getting_Started_Guide_For_PandaBoard#x-loader_config_files There's also this curious part... "download the MShield signing tool and use the commands below. Contact your TI representative to get access to this tool."
43
(07:22:26 PM) sensiblemn: also this very odd looking OMAP Blaze cell phone seems to be GP rather than HS. https://www.slashgear.com/texas-instruments-omap-blaze-on-sale-now-1485657/
44
(07:23:30 PM) sensiblemn: https://www.ebay.com/itm/TI-Stereo-Camera-Blaze-development-Plattform-im-Wert-von-1-800USD/131690215016
45
(07:24:04 PM) sensiblemn: https://web.archive.org/web/20180903060622/http://omapedia.org/wiki/OMAP4_Blaze
46
(06:20:47 AM) sensiblemn: GNUtoo: "I've sent an email to Samsung, requesting the relevant patches to  X-Loader in order for it to successfully initialize the I9100G-board." https://blog.the-leviathan.ch/?p=408
47
(06:22:23 AM) sensiblemn: > "So, did Samsung cooperate?"
48
(06:22:23 AM) sensiblemn: "They've uploaded the x-Loader code for the i9100g"
49
(08:47:20 PM) sensiblemn: GNUtoo: i just got a report from a postmarketOS developer saying that booting works with that free software x-loader repo for the i9100G that I found. they had to make a one line commit to get it building, but it boots. https://github.com/hpagseddy/i9100g_xloader/commit/0505138dd163959443f09b7178142c0472f60582
50
(08:48:24 PM) sensiblemn: so early reports suggest that we found a Galaxy S2 that has a free software bootloader. they said it doesn't even need to be signed with signGP.c.
51
(10:36:35 PM) hpagseddy[m]: So i have an i9100g and compiled this without any errors in case you guys are interested https://github.com/hpagseddy/i9100g_xloader
52
(10:49:32 PM) freekurt: thanks for jumping in here hpagseddy. we have been trying for quite some time to find a way to liberate the first stage bootloader on Exynos4 SoC based i9100 and i9300 devices. this is great news that the i9100G seems to have a free software first stage bootloader.
53
(10:51:08 PM) hpagseddy[m]: Yep, also there is a thing that i9100g is based on TI OMAP
54
(10:51:24 PM) freekurt: we had some hopes that xboot would work, which seems to be a first stage bootloader, but we haven't been able to get it to work. https://redmine.replicant.us/projects/replicant/wiki/Exynos4Bootrom
55
(10:52:04 PM) hpagseddy[m]: So you guys decided to move on OMAP based S2?
56
(10:53:38 PM) hpagseddy[m]: Which is i9100g
57
(10:54:33 PM) freekurt: we had confirmed that 4 OMAP devices had unsigned bootloaders, but they all have less than 1GB Ram, which isn't very suitable for forks of AOSP 9 and 10. https://redmine.replicant.us/projects/replicant/wiki/Upstream#Bootloader-status
58
(10:55:04 PM) hpagseddy[m]: I think they would be ok with AOSP 10
59
(10:55:24 PM) hpagseddy[m]: Small lags may occur with play store but else will be all good
60
(10:58:08 PM) freekurt: 512 MB of RAM seems rough for AOSP 10, especially when we are trying to get it to work with 2D acceleration. 1GB should be much better.
61
(10:58:52 PM) hpagseddy[m]: Yep, i9100g has 1GB of ram which can handle 2D and 3D
62
(10:59:21 PM) hpagseddy[m]: Well 3D would not be that much good but enough
63
(10:59:41 PM) hpagseddy[m]: Since i used that phone as my main untill 2016 :)
64
(11:00:18 PM) freekurt: we are trying to base everything on mainline linux though for Replicant 9 and 10, so even though we apparently have the freedom of the bootloader sorted out on the i9100G we would then need to decide if we want to work on mainlining the kernel for it, which doesn't seem to have been started.
65
(11:01:14 PM) hpagseddy[m]: Yeah but since it is TI OMAP 4430 which has same SoC with Droid 4, it is highly possible
66
(11:01:15 PM) freekurt: i would assume though that a fair number of the components already are in mainline though. we just don't know how much of it is there currently without doing more research.
67
(11:01:27 PM) hpagseddy[m]: Btw Droid 4 has mainline
68
(11:02:42 PM) hpagseddy[m]: i9100g uses same display and digitizer with i9100, has a broadcom wifi but sadly a PowerVR GPU
69
(11:02:52 PM) hpagseddy[m]: That is all i can remember of
70
(11:04:05 PM) hpagseddy[m]: At the other hand, Droid 4 solved that GPU issue with using binaries which is(i think) against Replicant’s nature :)
71
(11:05:16 PM) freekurt: we have the Droid 4 mainline dts listed here, but GNUtoo reported on the wiki that it requires a signed Linux kernel in the boot chain https://redmine.replicant.us/projects/replicant/wiki/Upstream#Other-devices-with-some-upstream-support
72
(11:05:55 PM) freekurt: <hpagseddy[m] "At the other hand, Droid 4 solve"> yes, it is against our nature. :-)
73
(11:05:55 PM) hpagseddy[m]: So that is where i9100g’s advantage rises
74
(11:06:11 PM) freekurt: <hpagseddy[m] "So that is where i9100g’s advant"> exactly
75
(11:07:44 PM) hpagseddy[m]: I can test stuff, i need a serial cable for further logs but else i’ll be all good
76
(11:08:25 PM) sunilmohan left the room (quit: Ping timeout: 268 seconds).
77
(11:09:10 PM) freekurt: i recently found out that someone was able to get the i9100 to boot with Linux 5.4.5 https://redmine.replicant.us/projects/replicant/wiki/Upstream#Replicant-supported-Samsung-Exynos-devices
78
(11:09:58 PM) juhse left the room (quit: Remote host closed the connection).
79
(11:10:07 PM) freekurt: so perhaps with the droid 4 being in the upstream kernel and with this i9100 updated downstream kernel, the work won't be too awful difficult to get the i9100G supported in mainline.
80
(11:10:26 PM) hpagseddy[m]: So you can check display will work
81
(11:10:48 PM) hpagseddy[m]: Since it uses same display and even same connectors
82
(11:11:06 PM) hpagseddy[m]: I know it because i am using i9100 display on my i9100g :)
83
(11:11:17 PM) hpagseddy[m]: Besides capacitive buttons, all functional
84
(11:11:48 PM) hpagseddy[m]: Even capacitive connector plugged in so if i do some kernel hacks i can get them working too
85
(11:11:50 PM) freekurt: we really appreciate your willingness to do testing if we decide to proceed with trying to mainline this device, which has yet to be determined.
86
(11:14:38 PM) freekurt: it seems as though this device would be quite attractive to other pmOS devs as well, now that the freedom of the bootloader appears to have been determined.
87
(11:15:19 PM) hpagseddy[m]: I hope so, i was the only maintainer over 2 years :)
88
(11:15:27 PM) hpagseddy[m]: Of this device
89
(11:15:37 PM) freekurt: :-) thanks for holding down the fort!
90
(11:15:52 PM) hpagseddy[m]: But if the device gets mainlined, things will definitely change
91
(11:16:27 PM) freekurt: do you know the precise name of the modem that it uses?
92
(11:16:39 PM) hpagseddy[m]: Sadly no
93
(11:16:58 PM) freekurt: i think there is a command you can run in android that will tell you
94
(11:17:16 PM) freekurt: but i forget what it is. i'll try to find it.
95
(11:17:29 PM) hpagseddy[m]: If you can provide it, i can tell the output
96
(11:23:17 PM) freekurt: hpagseddy: can you enter ServiceMode to determine what kind of modem it uses like was done here? https://www.anandtech.com/show/6386/samsung-galaxy-note-2-review-t-mobile-/9
97
(11:27:59 PM) freekurt: i'm trying to figure out what the code is to enter the service menu.
98
(11:29:52 PM) sunilmohan [~quassel@swecha/sunilmohan] entered the room.
99 24 Jens Korte
(11:31:36 PM) freekurt: looks like it is <notextile>*#32489#</notextile>
100 14 Kurtis Hanna
(11:32:06 PM) freekurt: based on the bottom of this random website https://secretspecs.com/model/samsung/samsung-gt-i9100g/secret-code/
101
(11:34:02 PM) freekurt: i'm sorry, but i don't know how to navigate to the modem information, but it should look like this https://www.anandtech.com/Gallery/Album/2402#7
102
(11:34:43 PM) freekurt: hpagseddy: ^
103
(11:35:53 PM) hpagseddy[m]: Sorry, i had electricity outage
104
(11:36:06 PM) hpagseddy[m]: Give me 10 minutes
105
(11:36:32 PM) freekurt: no rush at all! please take your time. sorry to hear that.
106
(11:39:09 PM) mmu_man left the room (quit: Ping timeout: 260 seconds).
107
(11:54:03 PM) testman left the room (quit: Quit: The Lounge - https://thelounge.chat).
108
(11:59:27 PM) testman [~testman@cpe-92-37-70-209.dynamic.amis.net] entered the room.
109
(11:59:47 PM) sunilmohan left the room (quit: Ping timeout: 268 seconds).
110 24 Jens Korte
(02/01/2020 12:06:23 AM) hpagseddy[m]: <freekurt "looks like it is <notextile>*#32489#"></notextile> Didnt work
111 14 Kurtis Hanna
(12:07:44 AM) sunilmohan [~quassel@c-71-197-225-149.hsd1.wa.comcast.net] entered the room.
112
(12:07:45 AM) sunilmohan left the room (quit: Changing host).
113
(12:07:45 AM) sunilmohan [~quassel@swecha/sunilmohan] entered the room.
114
(12:12:20 AM) sunilmohan left the room (quit: Ping timeout: 265 seconds).
115
(12:14:06 AM) ggoes [~gregf@fsf/staff/ggoes] entered the room.
116
(12:16:46 AM) sunilmohan [~quassel@c-71-197-225-149.hsd1.wa.comcast.net] entered the room.
117
(12:16:46 AM) sunilmohan left the room (quit: Changing host).
118
(12:16:46 AM) sunilmohan [~quassel@swecha/sunilmohan] entered the room.
119
(12:23:11 AM) freekurt: thanks for reporting back. i don't have any more time right now to keep looking for the proper code. will likely ping you sometime later about it.
120
(12:24:20 AM) hpagseddy[m]: its ok i found the code
121
(12:24:38 AM) troulouliou_dev [~troulouli@unaffiliated/troulouliou-dev/x-4757952] entered the room.
122
(12:27:24 AM) freekurt: oh nice. if you are able to find the modem type please let us know.
123
(12:27:42 AM) hpagseddy[m]: So i am at the main menu
124
(12:27:57 AM) hpagseddy[m]: what kind of modem name am i searching for?
125
(12:29:48 AM) sensiblemn:  XMM6262 is an example of an intel based cellular modem
126
(12:30:10 AM) sensiblemn: actually, i'm mistaken about that
127
(12:30:24 AM) sensiblemn: CMC221 is intel if i'm not mistaken
128
(12:30:31 AM) sensiblemn: MDM9615 is qualcomm
129
(12:30:51 AM) sensiblemn: i don't know if all cell modem names follow the same naming structure
130
(12:33:06 AM) sensiblemn: some other qualcomm modems start with IPQ, MSM, QCS, and SDM
131 24 Jens Korte
(12:33:21 AM) sensiblemn: <notextile>*i think*</notextile>
132 14 Kurtis Hanna
(12:33:23 AM) hpagseddy[m]: SP6260?
133
(12:37:10 AM) freekurt: yeah, that might be it. https://forum.xda-developers.com/showpost.php?p=76556946&postcount=38
134
(12:37:25 AM) freekurt: looks like that page suggests that the i9300T has that modem
135
(12:37:44 AM) hpagseddy[m]: oh nice
136
(12:38:39 AM) hpagseddy[m]: it was really hard to navigate throught service mode without menu and back keys
137
(12:39:20 AM) hpagseddy[m]: So the fullname is like SP6260_T1_01.1300
138
(12:44:13 AM) hpagseddy[m]: What if itis "XMM6260"???
139
(12:44:19 AM) hpagseddy[m]:  * What if it is "XMM6260"???
140
(12:44:59 AM) sensiblemn: are you seeing that in service mode?
141
(12:47:36 AM) hpagseddy[m]: no
142
(12:47:52 AM) hpagseddy[m]: i just saw SP6260_T1_01.1300
143
(12:48:22 AM) hpagseddy[m]: since the numbers match and XMM6260 used in S2
144
(12:48:31 AM) hpagseddy[m]: i made a conclusion like this
145
(12:51:03 AM) forkbomb: i'm pretty sure it would be XMM6260 or XMM6262, same as i9300
146
(12:51:21 AM) sensiblemn: oh, that sounds convenient!
147
(12:51:50 AM) hpagseddy[m]: Perfect
148
(12:51:55 AM) forkbomb: the i9300T is just a Telstra branded i9300 afaik
149
(12:52:15 AM) hpagseddy[m]: that device could be the true open source phone \o/
150
(12:52:17 AM) sensiblemn: forkbomb: we are wondering about the i9100G though
151
(12:52:49 AM) hpagseddy[m]: <freekurt "yeah, that might be it. https://"> i9300T has the same SP6260 naming as i9100g as this shows
152
(12:53:10 AM) sensiblemn: you're correct
153
(12:54:16 AM) sensiblemn: also, not sure if this is the correct defconfig, but this kernel from samsung suggests it is xmm6260 also https://github.com/LineageOS/android_kernel_samsung_t1/blob/10ca03795f659f6f1fa995e8c300a08c3a133354/arch/arm/configs/android_t1_omap4430_r03_eng_defconfig#L1097
154
(12:55:09 AM) hpagseddy[m]: t1, thats correct
155
(12:55:18 AM) hpagseddy[m]: but the defconfig isnt
156
(12:55:48 AM) hpagseddy[m]: https://github.com/LineageOS/android_kernel_samsung_t1/blob/10ca03795f659f6f1fa995e8c300a08c3a133354/arch/arm/configs/cyanogenmod_i9100g_defconfig
157
(12:55:52 AM) hpagseddy[m]: this is for the device
158
(12:56:01 AM) forkbomb: hpagseddy[m]: ah, the i9100G is different i think
159
(12:56:06 AM) forkbomb: it's OMAP based
160
(12:56:10 AM) hpagseddy[m]: other one was for the development board??
161
(12:56:15 AM) hpagseddy[m]: Yes it is
162
(12:56:23 AM) hpagseddy[m]: TI OMAP4430, same as Droid 4
163
(12:56:58 AM) sensiblemn: actually, this looks like the correct defconfig for it, still says xmm6260 https://github.com/LineageOS/android_kernel_samsung_t1/blob/cm-12.1/arch/arm/configs/android_t1_omap4430_r03_eng_defconfig#L1097
164
(12:57:38 AM) hpagseddy[m]: i think so
165
(12:57:48 AM) hpagseddy[m]: if it has t1 then it is i9100g
166
(12:58:17 AM) sensiblemn: dang, i messed that last link up. this is it. final answer. https://github.com/LineageOS/android_kernel_samsung_t1/blob/10ca03795f659f6f1fa995e8c300a08c3a133354/arch/arm/configs/cyanogenmod_i9100g_defconfig#L1107
167
(12:59:16 AM) hpagseddy[m]: ah yes
168
(12:59:34 AM) TheJollyRoger left the room (quit: Ping timeout: 240 seconds).
169
(12:59:50 AM) hpagseddy[m]: the other one is most likely development board or prototype configs
170
(01:00:57 AM) sensiblemn: forkbomb: did you hear that we seem to have found a free software first stage bootloader for the i9100G and that it doesn't seem to require any signature checks?
171
(01:01:27 AM) hpagseddy[m]: yes i compiled and ran it on my device with no problem
172
(01:01:59 AM) hpagseddy[m]: also fixed the old build a bit
173
(01:02:02 AM) hpagseddy[m]: >So i have an i9100g and compiled this without any errors in case you guys are interested https://github.com/hpagseddy/i9100g_xloader
174
(01:05:55 AM) forkbomb: no, i didn't. very nice!
175
(01:06:35 AM) hpagseddy[m]: well i dont know how to use it so just compiled and flashed with odin
176
(01:06:45 AM) hpagseddy[m]: also one line fix hehe
177
(01:07:33 AM) hpagseddy[m]: it compiled with no problem on 4.6 gcc
178
(01:14:47 AM) sensiblemn: hpagseddy: it is my understanding that, since x-loader is EOL, and since Replicant wants to upstream as much code as we can, we would have to upstream what x-loader is doing into u-boot SPL, which i don't know how long it would take to do. the fact that very similar devices are already in upstream u-boot likely will help though, if we decide to pursue it.
179
(01:16:01 AM) hpagseddy[m]: Since it is open source, it is ok to keep it untill we have the device booted in my opinion
180
(01:16:17 AM) sensiblemn: yes, for sure.
181
(01:17:00 AM) hpagseddy[m]: but well last decision is yours since you guys are the replicant devs :)
182
(01:22:29 AM) sensiblemn: hpagseddy: have you tested LineageOS 13 on the device before? https://forum.xda-developers.com/galaxy-s2/development/rom-lineageos-13-0-t3620246
183
(01:23:21 AM) hpagseddy[m]: yes it had several issues but performance was good
184
(01:23:33 AM) hpagseddy[m]: it had audio error which was so annoying
185
(01:23:41 AM) hpagseddy[m]: 12.1 was best
186
(01:24:22 AM) sensiblemn: what kind of audio error?
187
(01:25:51 AM) hpagseddy[m]: audio was some kind of disorted
188
(01:39:01 AM) sensiblemn: hpagseddy: did you notice any other issues?
189
(01:39:11 AM) sensiblemn: with 13?
190
(01:40:13 AM) hpagseddy[m]: Gps doesnt work
191
(01:40:18 AM) hpagseddy[m]: Night mode doesnt work
192
(01:16:15 AM) GNUtoo: do we have a git for u-boot or only a tarball?
193
(01:16:16 AM) hpagseddy[m]: sensiblemn: https://forum.xda-developers.com/galaxy-s2/development/guide-repair-totally-sleep-dead-boot-t1701471
194
(01:16:20 AM) hpagseddy[m]: i only know this page
195
(01:17:01 AM) hpagseddy[m]: search u-boot in the page for faster result
196
(01:17:19 AM) hpagseddy[m]: also this https://blog.the-leviathan.ch/?p=408
197
(01:18:33 AM) hpagseddy[m]: so i know it uses u-boot but cant find a link either
198
(01:18:35 AM) GNUtoo: thanks
199
(01:18:56 AM) hpagseddy[m]: you're welcome
200
(01:19:56 AM) sensiblemn: GNUtoo: this looks like omap-usb-tool but it was recently updated https://github.com/LukasTomek/omapboot
201
(01:21:37 AM) hpagseddy[m]: hmm, he forked this repo from https://github.com/kousu/omapboot
202
(01:22:03 AM) hpagseddy[m]: so he added sd card booting
203
(01:22:09 AM) hpagseddy[m]: and some fixed
204
(01:22:13 AM) hpagseddy[m]: fixes*
205
(01:22:25 AM) GNUtoo: https://git.paulk.fr/omap-usb-boot.git
206
(01:22:29 AM) GNUtoo: but it seems down right nw
207
(01:22:32 AM) GNUtoo: *right now
208
(01:23:33 AM) GNUtoo: xloader from IRC logs: https://github.com/hpagseddy/i9100g_xloader
209
(01:23:54 AM) GNUtoo: (thanks hpagseddy[m] )
210
(01:24:22 AM) hpagseddy[m]: you're welcome
211
(01:24:51 AM) hpagseddy[m]: i just fixed one line and decided to fork it
212
(01:26:17 AM) GNUtoo: Yes, I'll try to look into that a bit later, I'm just writing down the important infos in the wiki right now
213
(01:26:23 AM) GNUtoo: *look into the details
214
(01:26:59 AM) GNUtoo: And if you tested it on the device, then yours is known to work
215 3 Denis 'GNUtoo' Carikli
01:56 <@GNUtoo> Did LineageOS or Cyanogenmod support it at some point?
216
01:57 < hpagseddy[m]> Cyanogenmod untill 13.0
217
01:57 < hpagseddy[m]> Omnirom 4.4 and 5.0.2
218
01:57 <@GNUtoo> ok, that explains why LineageOS has some stuff on it but nothing on the wiki
219
01:57 < hpagseddy[m]> thats all i remember and tested
220 7 Denis 'GNUtoo' Carikli
[...]
221 1 Denis 'GNUtoo' Carikli
01:58 < hpagseddy[m]> GNUtoo: yeah they just forked it and it just stays there
222 7 Denis 'GNUtoo' Carikli
[...]
223
01:59 < hpagseddy[m]> but 12.1 is still cyanogen
224
02:00 < sensiblemn> there was an attempt made at 14.1 but it seems like it was unsuccessful because it wouldn't boot
225
02:00 < sensiblemn> https://github.com/xdaamg/android_device_samsung_i9100g/tree/cm-14.1
226
02:00 < hpagseddy[m]> also someone rebased cm11 to lineage 11
227 24 Jens Korte
228 45 Denis 'GNUtoo' Carikli
h2. Partitions
229 28 Denis 'GNUtoo' Carikli
230
The PIT  of the Galaxy SII (GT-I9100G) can be found in the [[GalaxySIII9100GPit]] page.
231
232 36 Denis 'GNUtoo' Carikli
|_. PIT |_. Linux name |_. mount point |_. partition type |_. block device |_. Description |
233 45 Denis 'GNUtoo' Carikli
| MLO |\2. Not visible on Linux | | | First stage of bootloader |
234 51 Denis 'GNUtoo' Carikli
|\2. EFS | | | mmcblk0p1 | modem data partition |
235
|\2. SBL1 | | | mmcblk0p2 | |
236 52 Denis 'GNUtoo' Carikli
|\2. SBL2 | | Empty | mmcblk0p3 | |
237 51 Denis 'GNUtoo' Carikli
|\2. PARAM  | | | mmcblk0p4 | |
238
|\2. KERNEL | None | zImage | mmcblk0p5 | boot partition, See [[IsorecRecoveryIssue]] for more details |
239
|\2. RECOVERY | None | | mmcblk0p6 | recovery partition, See [[IsorecRecoveryIssue]] for more details |
240
|\2. CACHE| | | mmcblk0p7 | Android cache partition |
241
|\2. MODEM| | | mmcblk0p8 | modem firmware partition |
242
|\2. FACTORYFS| | | mmcblk0p9 | Android system partition |
243
|\2. DATAFS| | | mmcblk0p10 | Android application data |
244
|\2. UMS | | | mmcblk0p11 | user data (music, pictures, etc) |
245
|\2. HIDDEN | | | mmcblk0p12 | contains some data, and Samsung APK |
246 35 Denis 'GNUtoo' Carikli
247
This was constructed from the PIT, TODO: check the partitions content
248
249 46 Denis 'GNUtoo' Carikli
h3. MLO
250
251 53 Hpag Seddy
On a I9100G_CHN_CHN with Android 2.3.6 with the OMAP reported as being in HS mode we have:
252 46 Denis 'GNUtoo' Carikli
<pre>
253
--- Entry #0 ---
254
Binary Type: 0 (AP)
255
Device Type: 2 (MMC)
256
Identifier: 1
257
Attributes: 0 (Read-Only)
258
Update Attributes: 0
259
Partition Block Size/Offset: 0
260
Partition Block Count: 0
261
File Offset (Obsolete): 0
262
File Size (Obsolete): 0
263
Partition Name: X-loader
264
Flash Filename: MLO
265
FOTA Filename: 
266
</pre>
267
268
This doesn't give any indication of where is MLO, but it's clearly visible with an hexadecimal editor like vbindiff.
269
270 48 Denis 'GNUtoo' Carikli
|_. Offset from mmcblk0 |_. size |_. comments |
271 46 Denis 'GNUtoo' Carikli
| 0x20000 (256k) | 256k | MLO + potentially other stuff |
272
| 0x40000 (512k) | 256k | MLO + potentially less other stuff |
273
274
275 47 Denis 'GNUtoo' Carikli
Though SBL1 and SBL2 have location and size reported my the bootloader with heimdall print-pit:
276 46 Denis 'GNUtoo' Carikli
<pre>
277
--- Entry #2 ---
278
Binary Type: 0 (AP)
279
Device Type: 2 (MMC)
280
Identifier: 2
281
Attributes: 0 (Read-Only)
282
Update Attributes: 0
283
Partition Block Size/Offset: 49152
284
Partition Block Count: 4096
285
File Offset (Obsolete): 0
286
File Size (Obsolete): 0
287
Partition Name: SBL1
288
Flash Filename: Sbl.bin
289
FOTA Filename: 
290
</pre>
291
292
<pre>
293
--- Entry #3 ---
294
Binary Type: 0 (AP)
295
Device Type: 2 (MMC)
296
Identifier: 3
297
Attributes: 0 (Read-Only)
298
Update Attributes: 0
299
Partition Block Size/Offset: 53248
300
Partition Block Count: 4096
301
File Offset (Obsolete): 0
302
File Size (Obsolete): 0
303
Partition Name: SBL2
304
Flash Filename: 
305
FOTA Filename: 
306
</pre>
307
308 27 Denis 'GNUtoo' Carikli
h2. Recovery
309
310
The device is not supported by TWRP, but it was supported by cyanogenmod recoveries:
311
312
https://web.archive.org/web/20190328070606/http://download.cyanogenmod.org:80/?device=i9100g
313 1 Denis 'GNUtoo' Carikli
314 41 Denis 'GNUtoo' Carikli
That recovery is a zImage. Note that this recovery may not be FSDG compliant, so the first step would be to make a Replicant recovery for this device/
315 31 Denis 'GNUtoo' Carikli
316 43 Denis 'GNUtoo' Carikli
h2. CyanogenMod support and stock Android with the version that has a signed bootloader
317
318
According to the "I9100G CyanogenMod installation instructions":https://web.archive.org/web/20161224202727/https://wiki.cyanogenmod.org/w/Install_CM_for_i9100g , "Users running Android 2.3 on their I9100G MUST first upgrade to stock Android 4.x before installing CyanogenMod, or the device won't boot into the system due to it relying on a newer bootloader. A 4.1 bootloader is recommended."
319
320
However this approach has several issues.
321
322
The update doesn't work anymore. 
323
324
It also requires you to put a SIM card in the device, which results in privacy issues.
325
326
In addition to that, it requires you to give the device a network connection, knowing that the device is running a proprietary Android distribution.
327
328
Once you do that it still fails with "Processing failed".
329
330
Right before the failure you can see "Signup for a Samsung account" on the top of the window with "Terms and conditions".
331
332 44 Denis 'GNUtoo' Carikli
So it probably tries to access some page like https://bada.com/contents/deviceterms/china/208.txt which doesn't exist anymore, and it probably does that to show terms and conditions which were probably unacceptable. 
333
334
They might also have legally prevented you to work on some part of Replicant if you agreed to them, depending on the country you are located in or you intend to travel to.
335 43 Denis 'GNUtoo' Carikli
336
This is most probably not an issue with the versions that don't have a signed bootloader as the first stage bootloader could simply be replaced by a free software xloader.
337 5 Denis 'GNUtoo' Carikli
338 60 Denis 'GNUtoo' Carikli
h2. Bootloaders
339 59 Denis 'GNUtoo' Carikli
340 60 Denis 'GNUtoo' Carikli
See [[GTI9100GBootloaderFreedom]] and [[GTI9100GBootloaderInterface]]
341 15 Denis 'GNUtoo' Carikli
342 53 Hpag Seddy
h2. Hardware
343
344
As far is we get from what we've seen on the motherboard itself, here are our guesses about chips and what they do:
345
346 55 Hpag Seddy
* 6030B1A5 21ZEDL9G2 G1 --- Power IC based on sellers on the web
347
* TWL6040A2 22AH9SW G2 --- Audio codec made by TI https://www.alldatasheet.com/datasheet-pdf/pdf/862981/TI1/TWL6040A2.html
348
* I9811 V 1.0B XG626 F2076538  --- Modem IC
349
* SAMSUNG 210 KMVYLOOOLM-B503 --- EMMC Chip 16GB based on this forum thread https://www.mcrf.ru/forum/showthread.php?t=40277
350
* K3PE7E700D-XGC1 --- DDR DRAM chip, most likely 1GB
351 16 Denis 'GNUtoo' Carikli
352 5 Denis 'GNUtoo' Carikli
h2. Links
353
354 26 Denis 'GNUtoo' Carikli
* "Official support for CyanogenMod":https://web.archive.org/web/20161225042527/https://wiki.cyanogenmod.org/w/I9100g_Info
355 8 Denis 'GNUtoo' Carikli
* "Unofficial LineageOS 13 for the I9100G":https://forum.xda-developers.com/galaxy-s2/development/rom-lineageos-13-0-t3620246
356 9 Denis 'GNUtoo' Carikli
** "Source code for it":https://github.com/xdaamg
357 12 Denis 'GNUtoo' Carikli
* Infos on the bootloader: https://forum.xda-developers.com/galaxy-s2/development/guide-repair-totally-sleep-dead-boot-t1701471
358 11 Denis 'GNUtoo' Carikli
* "Infos on xloader and how to make a serial port adapter":https://blog.the-leviathan.ch/?p=408
359 13 Denis 'GNUtoo' Carikli
* https://forum.xda-developers.com/showpost.php?p=65159962&postcount=276