Samsung Galaxy SII (samsung-i9100)

From postmarketOS Wiki
Samsung Galaxy S II
First photo ever released of postmarketOS (from the original introduction post).
First photo ever released of postmarketOS (from the original introduction post).
Manufacturer Samsung
Name Galaxy S II
Codename samsung-i9100
Released 2011
Type handset
Hardware
Chipset Samsung Exynos 4210 Dual
CPU Dual-core 1.2 GHz Cortex-A9
GPU Mali-400 MP4
Display 480x800 AMOLED
Storage 16/32 GB
Memory 1 GB
Architecture armv7
Software
Original software Android
Original version 2.3.4
postmarketOS
Category testing
Pre-built images no
Mainline partial
Unixbench Whet/Dhry score 542.5
Features
Flashing
Works
USB Networking
Works
Internal storage
SD card
Battery
Works
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Works
Audio
Camera
Camera Flash
Connectivity
WiFi
Works
Bluetooth
Works
GPS
NFC
Modem
Calls
SMS
Mobile data
Miscellaneous
FDE
Partial
USB OTG
HDMI/DP
Sensors
Accelerometer
Works
Magnetometer
Ambient Light
Proximity
Hall Effect
Haptics
Barometer
U-Boot
Primary Bootloader
Works
Secondary Bootloader
Mainline
Broken
Internal Storage
SD card
USB Host
USB Peripheral
Display
Buttons
Running Xfce

Contributors

  • ollieparanoid
  • veggie
  • timbz

Device Owners


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.

 $ pmbootstrap flasher flash_rootfs
 $ pmbootstrap flasher flash_kernel

Usage

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,

localhost:~# hwclock -w  # Write the current system time to the hardware clock

Setting the display brightness

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

localhost:~# echo 0 > /sys/class/backlight/panel/brightness #set the display to its lowest brightness

localhost:~# echo 255 > /sys/class/backlight/panel/brightness #set the display to maximum brightness

Reading Accelerometer sensor

Accelerometer sensor data can read from following file

localhost:~$ cat /sys/class/accelerometer/accelerometer/acc_file

Hardware specifications

Note This device is supported by Replicant. With some more research we should be able to get most stuff running with their free software userland drivers.

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 [1]

Storage

16 GB or 32 GB flash memory [2]

Removable storage

microSD (up to 128 GB SDXC) [3]

Modem

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

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) [7] (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 [8]
  • Maxim MAX8997 PMIC [9]
  • Silicon Image 9244 transmitter [10]
  • 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

Pressing home key during early boot enables bootloader debug output. To get kernel logs through 619 kOhm micro-usb serial debugging cable it is required to set the environmental variable SWITCH_SEL to 3 in bootloader SBL shell. To enter SBL shell hold the RETURN key in minicom/picocom/your favorite UART program when starting the device, until you get the SBL> prompt. From there you can then change the CMDLINE and boot with:

 setenv SWITCH_SEL 3
 setenv CMDLINE loglevel=7 console=ttySAC2,115200
 saveenv
 boot

Setting SWITCH_SEL somehow enables serial output on the USB connector.

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

See also