Samsung Galaxy SII (samsung-i9100)

Contributors

 * ollieparanoid
 * veggie
 * timbz

What does not work yet

 * Audio
 * Bluetooth
 * Modem
 * MHL (Video-out)
 * See "Hardware specifications" for ideas how to get them working.

Installation
Follow the Installation instructions.

Wifi
- Create conf for wpa_supplicant

$ wpa_passphrase "SSID" "password" > wifi

Note : If you are connecting to a hidden wireless network, make sure to add line "scan_ssid=1" after the ssid line in your generated conf file

- Connect to wifi AP

$ sudo wpa_supplicant -i wlan0 -c wifi &

- Get ip address from dhcp server (in another terminal)

$ sudo udhcpc -i wlan0

To set wifi connection to start automatically on boot, please refer here wifi

Modem
Using Ofono: Best way seems to get Samsung IPC modem support from the patchset https://lists.ofono.org/pipermail/ofono/2012-September/013766.html (but it was not accepted) and does not build https://github.com/tssk/pmbootstrap/commits/device-samsung-i9100_modem. I would appreciate help from someone that understands C.

Second idea was to build Andoird RIL + Samsung RIL and get ofono working with ofono-ril support - https://redmine.replicant.us/projects/replicant/wiki/Samsung-RIL.

GPS
https://univers-libre.net/posts/galaxy-s2-gps-on-replicant.html

https://redmine.replicant.us/projects/replicant/wiki/GSD4t

https://github.com/mnalis/gsd4t_parser

https://redmine.replicant.us/boards/21/topics/897

Setting the hardware clock
If you have already setup chrony and if your hardware clock doesn't have the time set you can set it with,

Setting the display brightness
To adjust display brightness write a value between 0-255 to file given below,

Reading Accelerometer sensor
Accelerometer sensor data can read from following file

SoC
Samsung Exynos 4 Dual 45 nm (GT-I9100, SHW-M250S/K/L) source

CPU
1.2 GHz dual-core ARM Cortex-A9 (GT-I9100, GT-I9105, GT-I9100G, SHW-M250S/K/L) source

GPU
ARM Mali-400 MP4 (GT-I9100, SHW-M250S/K/L) source

WiFi / Bluetooth / FM radio
Broadcom BCM4330 (SWB-B42) Bluetooth 4.0 Dual Band WLAN FM source source

Driver? - https://wireless.wiki.kernel.org/en/users/drivers/brcm80211

Firmware - https://android.googlesource.com/platform/hardware/broadcom/wlan/+/master/bcmdhd/firmware/bcm4330/

Memory
1 GB RAM

Storage
16 GB or 32 GB flash memory

Removable storage
microSD (up to 128 GB SDXC)

Modem

 * XMM6260
 * aka "X-GOLD 626", and it's also used in Nexus 7
 * it seems to be supported by the mainline kernel (big questionmark here)

Audio

 * Yamaha MC1N2
 * The Android kernel exposes the alsa API.
 * But when you play with the volume sliders in alsamixer, nothing happens
 * /dev/snd/hwC0D0 implements hardware-specific controls (via ioctl) (check the link for a free software Android userspace driver)
 * We could write a daemon, that watches the alsa sound levels, and unmutes channels (speaker, headphones etc.) via hwC0D0 as necessary. (This will only work with the downstream kernel, the sound is probably not implemented in the upstream kernel at all?)
 * Maybe all this is overkill and the strategy from Audio works as well.

Light / proximity sensor
the CM3663 sensor is being use and there is no driver in mainline. A downstream driver is available here.

MHL

 * Fairchild FSA3200UMX switch
 * Maxim MAX8997 PMIC
 * Silicon Image 9244 transmitter
 * Should be all supported to a certain extent in mainline 4.15 kernel (of course the device is still stuck to 3.0 for the time being)

Serial / UART
It is not exactly clear yet where to find UART / serial on the device. For possible location see second image below (red rectangle). Nevertheless a good instruction on hardware teardown is available here. Follow this guide until step 5, than proceed with removing the black cover from the circuit board (see first image below).

Photos

 * Initramfs asking for the password via telnet
 * Weston with various programs opened
 * postmarketOS demo menu (XWayland)
 * Firefox (XWayland)
 * Weston-smoke demo
 * Weston-smoke demo running on a d710
 * xfce-ui running on i9100