Samsung Galaxy S5 mini (samsung-kminilte)

Special keycombo's
Download/Flash/ODIN mode - Press and hold &quot;volume down + home + power&quot; simultaneously. Then click volume up to confirm.

Recovery - press and hold VOL+, PWR and HOME

Problems

 * Currently, Heimdall seems to be unable to flash the device's  partition, so we can't do the entire install using just.
 * causes a complete system freeze and eventual reboot. If you comment out that line in  and replace it by , the touch screen should work.

Preparing for install
First, download the TWRP recovery ROM. You'll need both the  and the   file. First, extract the tar file to obtain. Then, put your phone in flash mode and flash using Heimdall:

$ heimdall flash --RECOVERY recovery.img --BOOT twrp-3.2.3-0-kminilte.img Now you should be able to connect to the device using.

Note: Be aware that the stock Android ROM reflashes stock recovery upon boot, wiping TWRP out if you let it start booting.

Installing system
Follow the android-recovery-zip steps, using  when the init commands asks. Heimdall is currently unable to flash the SYSTEM partition, and adb sideload method seems broken, so you will have to do  after generating the recovery and pushing it to the phone while it is booted in TWRP via.

Then just flash it via recovery as you would a normal android ROM. Currently on Samsung devices you may get an error about unmounting .log files, it seems to work on second try but due to another issue you have to make sure SYSTEM is unmounted in TWRP before attempting to do so.

If you get an error, simply run   in the chroot environment and try again.

If you get the following errors:

device-mapper: reload ioctl on  failed: No such file or directory Failed to setup dm-crypt key mapping for device /dev/block/mmcblk0p18. Check that kernel supports aes-xts-plain64 cipher (check syslog for more info). You can try to reinstall with a different cipher, by editing  and changing the   line to , re-zipping and using   again.

Installing kernel
This can be done via, but if you followed the recovery ROM steps then you don't need to do this.

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:
 * 1) start "deferred-initcalls" service
 * 2) 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  does not exist
 * Make sure "deferred-initcalls" has been started. See this page on elinux.org for more information.
 * using  or   fails with "Operation not permitted"
 * Check  for messages containing "dhdsdio_download_firmware", to see if there was an error loading the firmware

What works

 * Booting off a microSD card
 * Display
 * 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:
 * : Home button
 * : Power button
 * : Volume up button
 * : Volume down button
 * Use triggerhappy to configure what the buttons do
 * If you are running, make sure to prevent it from handling the power button, by setting   in
 * Touch keys
 * Attached via: I2C, address 0x20
 * Driver: i2c-gpio
 * Device node:
 * Back button (right of the home button)
 * (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 . Some examples:
 * full brightness red:  (check   to make sure this is correct)
 * half brightness red:
 * blink green:  (set   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
 * Flashlight
 * Write mode "Torch" / "Off" to  to turn the light on and off
 * Change brightness by writing a value from 0 to 15 to
 * See the merge request for details

Links

 * Add support for the Samsung Galaxy S5 Mini (kminilte)
 * gitlab !1127 Add wifi firmware package
 * gitlab !1150 Add flashlight support
 * more specs
 * Unofficial LineageOS repo
 * Unofficial LineageOS kernel repo
 * recent maintained kernel repo, fork of the above one