Samsung Galaxy S5 mini (samsung-kminilte)

== Users owning this device ==
== How to enter flash mode ==
Press and hold + + simultaneously. Then click to confirm.
== How to enter recovery mode ==
Press and hold + + simultaneously.
== Problems ==
* udevadm trigger causes a complete system freeze and eventual reboot. If you comment out that line in start_weston.sh and replace it by udevadm trigger --attr-match=name=sec_touchscreen, the touch screen should work.
== Installation ==
First, install pmbootstrap.
Setup device to be used:
$ pmbootstrap init
Channel [edge]:
Vendor [samsung]: samsung <- enter this
Device codename [i9100]: kminilte <- enter this
...
Build the rootfs image:
$ pmbootstrap install
Then in order to flash it put your device in download mode, and plug it in USB. Then do:
$ pmbootstrap flasher flash_rootfs
 Hold "Volume down" + "Home" buttons at the end of the process,
 so that when phone reboots put it in flashing mode again 
$ pmbootstrap flasher flash_kernel
 This time, don't hold any button, let it reboot to Linux!
It should boot, and show the Samsung splash screen. After that you should be able to setup and connect via SSH
=== Getting Wifi to work ===
Wifi requires firmware blobs to be installed:
 apk add firmware-samsung-kminilte
After installation, either reboot the device, or:
# start "deferred-initcalls" service
# restart networkmanager and / or wpa_supplicant and / or whatever you want to do with networking
When using networkmanager, you should now be able to connect to a network:
 nmtui
==== Troubleshooting Wifi ====
* Interface wlan0 does not exist
** Make sure "deferred-initcalls" has been started. See this page on elinux.org for more information.
* using wlan0 or p2p0 fails with "Operation not permitted"
** Check dmesg for messages containing "dhdsdio_download_firmware", to see if there was an error loading the firmware
== What works ==
* Booting off a microSD card
* Display
** Currently not displaying working desktop
* Touchscreen
* USB Networking
* Full disk encryption
* Proximity sensor
* Light sensor
* Heart rate sensor
* Magnetic sensor
** Chip: ALPS HSCDTD0008A (Datasheet)
** Attached via: I2C, address 0x0c
** Driver: hscd_i2c
* Audio jack events
* Physical buttons
** Driver: gpio-keys
** Device node: /dev/input/event8
*** KEY_HOMEPAGE: Home button
*** KEY_POWER: Power button
*** KEY_VOLUMEUP: Volume up button
*** KEY_VOLUMEDOWN: Volume down button
** Use triggerhappy to configure what the buttons do
** If you are running elogind, make sure to prevent it from handling the power button, by setting HandlePowerKeyIgnore in logind.conf
* Touch keys
** Attached via: I2C, address 0x20
** Driver: i2c-gpio
** Device node: /dev/input/event1
*** KEY_BACK Back button (right of the home button)
*** 254 (name neither listed by libinput, nor linux/input.h) Other button (left of the home button)
** The left button cannot be used for triggerhappy right now, since it doesn't support configuring numeric key codes
* Notification LED
** Chip: Samsung KTD 2026
** Attached via: I2C, address 0x30
** Driver: ktd2026
** This is an RGB LED. The red, green and blue channels can be controlled individually though led_r, led_g and led_b in /sys/class/leds/$led. Some examples:
*** full brightness red: echo 48 > /sys/class/leds/led_r/brightness (check max_brightness to make sure this is correct)
*** half brightness red: echo 24 > /sys/class/leds/led_r/brightness
*** blink green: echo 1 > /sys/class/leds/led_g/blink (set delay_{on,off} afterwards to control timing)
* Vibration motor
* Gyroscope
** Chip: Invensense MPU 6515 (No datasheet found so far, this is the successor product MPU 9250)
** Attached via: I2C, address 0x68
** Driver: inv-mpu-iio
* Wifi
** Needs to get ip via udhcpc -i wlan0 after trying to connect via nmtui
* Flashlight
** Write mode "Torch" / "Off" to /sys/class/flashlight/rt-flash-led/mode to turn the light on and off
** Change brightness by writing a value from 0 to 15 to /sys/class/flashlight/rt-flash-led/torch_brightness
** See for details
== Links ==
===pmaports===
* 
* 
===PRs===
* Add support for the Samsung Galaxy S5 Mini (kminilte)
* Add wifi firmware package
* Add flashlight support
* Add heimdall flashing support
===Specs===
* more specs
* Unofficial LineageOS repo
* Unofficial LineageOS kernel repo
* recent maintained kernel repo, fork of the above one