Jump to content

Samsung Galaxy S5 (samsung-klte)

From postmarketOS Wiki
Revision as of 09:44, 10 June 2020 by Ichernev (talk | contribs) (Add Mainlining notes section)
Samsung Galaxy S5
Samsung Galaxy S5
Samsung Galaxy S5
Manufacturer Samsung
Name Galaxy S5
Codename samsung-klte
Released 2014
Hardware
Chipset Qualcomm MSM8974PRO-AC Snapdragon 801
CPU Quad-core 2.5 GHz Krait 400
GPU Adreno 330
Display 1080 x 1920 AMOLED
Storage 16/32 GB
Memory 2 GB
Architecture armv7
Software
Original software Android 4.4.2 (KitKat)
postmarketOS
Category testing
Pre-built images no
Mainline partial
postmarketOS kernel 3.4.113 / 5.6
Unixbench Whet/Dhry score 884.3
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
Works
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Partial
Audio
Works
Camera
No data
Camera Flash
No data
Connectivity
WiFi
Works
Bluetooth
Broken
GPS
Works
NFC
No data
Modem
Calls
No data
SMS
No data
Mobile data
No data
Miscellaneous
FDE
No data
USB OTG
No data
HDMI/DP
No data
Sensors
Accelerometer
Works
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data


Contributors

Maintainer(s)

Users owning this device


What works

  • Flash Kernel (pmbootstrap flasher flash_kernel)
  • Flash Rootfs (pmbootstrap flasher flash_rootfs)
  • Initramfs boot
  • USB Network
  • Framebuffer graphics (Splash screens)
  • SSH Connectivity
  • Touchscreen
  • Wi-Fi
  • Xwayland
  • Weston on framebuffer [broken with latest weston]
  • Plasma Mobile on framebuffer [untested with last update]
  • X11 based UIs on framebuffer work fine
  • Android container starts
  • audio works with nonfree-userland (with Android container)

What does not work

  • Audio playback without nonfree-userland
  • Bluetooth adapter is visible in rfkill list, but does not work
  • Everything else

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.

Installation

First, install pmbootstrap.

Setup device to be used:

$ pmbootstrap init
...
Vendor [samsung]: samsung <- enter this
Device codename [i9100]: klte   <- enter this
Kernel [downstream]: downstream        <- you probably want downstream for now
User interface [weston]:               <- choose any UI by your preference
...

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!

Nonfree-userland (halium) installation

Android processes running inside lxc container

To make full use of nonfree-userland intallation, which involves running Android in lxc container to make all hardware work (read more at Hybris wiki page), you need to to manually download and install custom device-specific Android/Halium system image. Building it manually takes a lot of time and free space on HDD, so I've prepared prebuilt image: https://androidfilehost.com/?fid=6006931924117913010

You need to download it, un-sparse and place in to root of userdata partition:

Un-sparse:

$ simg2img halium-klte-2019-07-09-system.img halium-klte-2019-07-09-system.img.raw

If it says "invalid sparse format or header magic" it means that the image is already unsparsed. Proceed to next step

Reboot phone to TWRP recovery and push image using ADB:

$ adb push halium-klte-2019-07-09-system.img.raw /data/system.img

Boot to a running postmarketOS system and login with SSH using USB_Network. Next commands are executed on the phone. Make sure that you have a /data mounted (check output of mount command). Ensure that Android is fully running inside an lxc container (on device, install htop, run it and switch into tree mode by pressing t) (see the picture on the right). If it does not, check if lxc-android is running (see output of rc-status command). Run logcat and see if it is printing some error logs on the screen.

Before (re)starting lxc-android, remember to remove file /tmp/lxc-android-once if it exists.

Additional info

Useful helper scripts

Default installation includes a couple of useful scripts to be used from a terminal: battery-status and set-brightness. battery-status allows you to check for battery charge level, and set-brightness allows to view/set lcd backlight brightness in range 0-255.

samsung-klte:~$ battery-status 
25
samsung-klte:~$ set-brightness 
255
samsung-klte:~$ sudo set-brightness 20
20

Mainlining Notes =

TBD

Partition layout

Partition layout:

Component support table

Component Codename Mainline kernel Since when Downstream 3.4 kernel
Debug serial msm_serial /dev/ttyMSM0 Working v4.17-rc1 yes, /dev/ttyHSL0
Volume & home buttons gpio-keys Working 5.8 yes
Regulator nodes pma8084, Maxim max77826 Working 5.8 yes
Internal storage sdhci-msm Working 5.8 yes
SD card storage sdhci-msm Working In pmOS kernel fork yes
USB Networking usb_dwc3_qcom Working 5.8 yes
Display panel-simple Working In pmOS kernel fork yes
Touchscreen synaptics rmi4-i2c Working In pmOS kernel fork yes
Touchkeys Cypress tm2-touchkey Working In pmOS kernel fork yes
Vibration motor Not working yes
Notification LED Panasonic AN30259A Working In pmOS kernel fork yes
WiFi brcmfmac + PCAL6416A GPIO Expander Working In pmOS kernel fork yes
USB OTG Not working yes
Bluetooth brcmfmac Not working no
Battery charger Maxim max77804k Not working yes
Battery fuelgauge Maxim max17048 Working In pmOS kernel fork yes
GPU drm_msm Working in pmOS kernel fork works with libhybris (test_hwcomposer_7_1_caf)
Audio Not working with libhybris (pulseaudio-modules-droid)
Modem qcom-q6v5-mss Not working powers up with libhybris
Sensors Not working yes (libhybris's test_sensors)

Links

postmarketOS packages:

Mainline kernel patches:

Development branch:

Extra:

Photos