Jump to content

Samsung Galaxy S5 mini (samsung-kminilte): Difference between revisions

From postmarketOS Wiki
George99g (talk | contribs)
The device boots and the codename is kminilte.
Halamix2 (talk | contribs)
mNo edit summary
 
(41 intermediate revisions by 16 users not shown)
Line 2: Line 2:
| manufacturer = Samsung
| manufacturer = Samsung
| name = Galaxy S5 mini
| name = Galaxy S5 mini
| codename = kminilte
| codename = samsung-kminilte
| image = File:Samsung Galaxy S5 mini.png
| image = File:Samsung Galaxy S5 mini.png
| imagecaption = Samsung Galaxy S5 mini
| imagecaption = Samsung Galaxy S5 mini
| releaseyear = 2014
| releaseyear = 2014
| originalsoftware = Android 4.4.2 on Linux 3.10
| originalsoftware = Android
| cpu = Exynos 3470 Quad
| originalversion = 4.4.2 (Linux 3.10)
| chipset = Samsung Exynos 3470
| cpu = Quad-core 1.4 GHz Cortex-A7
| gpu = Mali-400MP4
| gpu = Mali-400MP4
| storage = 16GB
| storage = 16GB
| display = 720x1280 AMOLED
| display = 720x1280 AMOLED
| memory = 1.5GB
| memory = 1.5GB
| architecture = armv7
| type = Handset
| status_usbnet = Y
| status_flashing = Y
| status_touch = Y
| status_screen = Y
| status_wifi = Y
| status_xwayland = N
| status_fde = Y
| status_mainline = N
| status_battery =
| status_3d =
| status_accel =
| status_audio =
| status_bluetooth =
| status_camera =
| status_gps =
| status_mobiledata =
| status_sms =
| status_calls =
| status_nfc = -
| booting = yes
}}
}}
== Basic info ==


Device: Samsung Galaxy S5 mini (SM-G800F; European version)
== Users owning this device ==
{{Device owners}}


Cortex A7 (32 bit ARM), quad core 1.4GHz; 1.5GB RAM, 16GB storage.
== How to enter flash mode ==


* [http://www.gsmarena.com/samsung_galaxy_s5_mini-6252.php more specs]
Press and hold {{button|Volume Down}} + {{button|Home}} + {{button|Power}} simultaneously. Then click {{button|Volume Up}} to confirm.
* [https://github.com/cm-3470/android_device_samsung_kminilte Unofficial LineageOS repo]
 
* [https://github.com/cm-3470/android_kernel_samsung_kminilte Unofficial LineageOS kernel repo]
== How to enter recovery mode ==
 
Press and hold {{button|Volume Up}} + {{button|Home}} + {{button|Power}} simultaneously.
 
== Problems ==
* <code>udevadm trigger</code> causes a complete system freeze and eventual reboot. If you comment out that line in <code>start_weston.sh</code> and replace it by <code>udevadm trigger --attr-match=name=sec_touchscreen</code>, the touch screen should work.
 
== Installation ==
First, [[Installing_pmbootstrap|install pmbootstrap]].
 
Setup device to be used:
<syntaxhighlight lang="shell-session">
$ pmbootstrap init
Channel [edge]:
Vendor [samsung]: samsung      <- enter this
Device codename [i9100]: kminilte  <- enter this
...
</syntaxhighlight>
 
Build the rootfs image:
<syntaxhighlight lang="shell-session">
$ pmbootstrap install
</syntaxhighlight>
 
Then in order to flash it put your device in download mode, and plug it in USB. Then do:
 
<syntaxhighlight lang="shell-session">
$ 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


=== How to enter flash mode ===
This time, don't hold any button, let it reboot to Linux!
</syntaxhighlight>


Press and hold &quot;volume down + home + power&quot; simultaneously. Then click volume up to confirm.
It should boot, and show the Samsung splash screen. After that you should be able to [https://wiki.postmarketos.org/wiki/USB_Network setup and connect via SSH]


=== Problems ===
=== Getting Wifi to work ===


* Currently, Heimdall seems to be unable to flash the device's <code>SYSTEM</code> partition, so we can't do the entire install using just <code>pmbootstrap flasher</code>.
Wifi requires firmware blobs to be installed:
* <code>udevadm trigger</code> causes a complete system freeze and eventual reboot. If you comment out that line in <code>start_weston.sh</code> and replace it by <code>udevadm trigger --attr-match=name=sec_touchscreen</code>, the touch screen should work.


=== Preparing for install ===
  apk add firmware-samsung-kminilte


First, [https://eu.dl.twrp.me/kminilte/ download the TWRP recovery ROM]. You'll need both the <code>.img.tar</code> and the <code>.img</code> file. First, extract the tar file to obtain <code>recovery.img</code>. Then, put your phone in flash mode and flash using Heimdall:


<pre>$ heimdall flash --RECOVERY recovery.img --BOOT twrp-3.1.1-1-kminilte.img</pre>
After installation, either reboot the device, or:
Now you should be able to connect to the device using <code>adb</code>.
# start "deferred-initcalls" service
# restart networkmanager and / or wpa_supplicant and / or whatever you want to do with networking


=== Installing system ===
When using networkmanager, you should now be able to connect to a network:


Follow [https://github.com/ata2001/android-recovery-zip the android-recovery-zip steps], substituting <code>samsung-g800f</code> for <code>your-device</code> in all the commands. If you get an error <code>lddtree not found</code>, simply run <code>apk add lddtree</code> in the chroot environment and try again.
  nmtui


If you get the following errors:
==== Troubleshooting Wifi  ====


<pre>device-mapper: reload ioctl on  failed: No such file or directory
* ''Interface <code>wlan0</code> does not exist''
Failed to setup dm-crypt key mapping for device /dev/block/mmcblk0p18.
** Make sure "deferred-initcalls" has been started. See [https://www.elinux.org/Deferred_Initcalls this page on elinux.org] for more information.
Check that kernel supports aes-xts-plain64 cipher (check syslog for more info).</pre>
* ''using <code>wlan0</code> or <code>p2p0</code> fails with "Operation not permitted"''
You can try to reinstall with a different cipher, by editing <code>install_options</code> and changing the <code>CIPHER</code> line to <code>CIPHER=&quot;aes-cbc-plain64&quot;</code>, re-zipping and using <code>adb sideload</code> again.
** Check <code>dmesg</code> for messages containing "dhdsdio_download_firmware", to see if there was an error loading the firmware


=== Installing kernel ===
== What works ==


This can be done via <code>./pmbootstrap.py flasher flash_kernel</code>
* 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 ([https://pdf1.alldatasheet.com/datasheet-pdf/view/1080839/ALPS/HSCDTD008A/+00JQ95BXvKPTcKVHIalYvpL+/datasheet.pdf Datasheet])
** Attached via: I2C, address 0x0c
** Driver: hscd_i2c
* Audio jack events
* Physical buttons
** Driver: gpio-keys
** Device node: <code>/dev/input/event8</code>
*** <code>KEY_HOMEPAGE</code>: Home button
*** <code>KEY_POWER</code>: Power button
*** <code>KEY_VOLUMEUP</code>: Volume up button
*** <code>KEY_VOLUMEDOWN</code>: Volume down button
** [[Troubleshooting:HID_buttons#Using_triggerhappy_to_handle_HID_input_events|Use triggerhappy]] to configure what the buttons do
** If you are running <code>elogind</code>, make sure to prevent it from handling the power button, by setting <code>HandlePowerKeyIgnore</code> in <code>logind.conf</code>
* Touch keys
** Attached via: I2C, address 0x20
** Driver: i2c-gpio
** Device node: <code>/dev/input/event1</code>
*** <code>KEY_BACK</code> Back button (right of the home button)
*** <code>254</code> (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 <code>/sys/class/leds/$led</code>. Some examples:
*** full brightness red: <code>echo 48 > /sys/class/leds/led_r/brightness</code> (check <code>max_brightness</code> to make sure this is correct)
*** half brightness red: <code>echo 24 > /sys/class/leds/led_r/brightness</code>
*** blink green: <code>echo 1 > /sys/class/leds/led_g/blink</code> (set <code>delay_{on,off}</code> afterwards to control timing)
* Vibration motor
* Gyroscope
** Chip: Invensense MPU 6515 (No datasheet found so far, [https://invensense.tdk.com/wp-content/uploads/2015/02/PS-MPU-9250A-01-v1.1.pdf this is the successor product MPU 9250])
** Attached via: I2C, address 0x68
** Driver: inv-mpu-iio
* Wifi
** Needs to get ip via <code>udhcpc -i wlan0</code> after trying to connect via <code>nmtui</code>
* Flashlight
** Write mode "Torch" / "Off" to <code>/sys/class/flashlight/rt-flash-led/mode</code> to turn the light on and off
** Change brightness by writing a value from 0 to 15 to <code>/sys/class/flashlight/rt-flash-led/torch_brightness</code>
** See {{MR|1150|pmaports}} for details


It should boot, and show the Samsung splash screen. After that you should be able to [https://github.com/postmarketOS/pmbootstrap/wiki/Boot-process connect via telnet]
== Links ==
===pmaports===
* {{Device package|samsung-kminilte}}
* {{Firmware package|samsung-kminilte}}
===PRs===
* {{MR|1467}} Add support for the Samsung Galaxy S5 Mini (kminilte)
* {{MR|1127|pmaports}} Add wifi firmware package
* {{MR|1150|pmaports}} Add flashlight support
* {{MR|5890|pmaports}} Add heimdall flashing support
===Specs===
* [http://www.gsmarena.com/samsung_galaxy_s5_mini-6252.php more specs]
* [https://github.com/cm-3470/android_device_samsung_kminilte Unofficial LineageOS repo]
* [https://github.com/cm-3470/android_kernel_samsung_kminilte Unofficial LineageOS kernel repo]
* [https://github.com/Spookcity/android_kernel_samsung_kminilte recent maintained kernel repo, fork of the above one]

Latest revision as of 11:41, 1 February 2025

Samsung Galaxy S5 mini
Samsung Galaxy S5 mini
Samsung Galaxy S5 mini
Manufacturer Samsung
Name Galaxy S5 mini
Codename samsung-kminilte
Released 2014
Type handset
Hardware
Chipset Samsung Exynos 3470
CPU Quad-core 1.4 GHz Cortex-A7
GPU Mali-400MP4
Display 720x1280 AMOLED
Storage 16GB
Memory 1.5GB
Architecture armv7
Software
Original software Android
Original version 4.4.2 (Linux 3.10)
postmarketOS
Category testing
Pre-built images no
Mainline no
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
No data
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
No data
Audio
No data
Camera
No data
Camera Flash
No data
Connectivity
WiFi
Works
Bluetooth
No data
GPS
No data
Modem
Calls
No data
SMS
No data
Mobile data
No data
Miscellaneous
FDE
Works
USB OTG
No data
HDMI/DP
No data
Sensors
Accelerometer
No data
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data


Users owning this device


How to enter flash mode

Press and hold Volume Down + Home + Power simultaneously. Then click Volume Up to confirm.

How to enter recovery mode

Press and hold Volume Up + Home + Power 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:

  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 wlan0 does not exist
  • 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
  • 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 pmaports!1150 for details

Links

pmaports

PRs

Specs