Samsung Galaxy S4 (samsung-jflte)

Supported models
GT-I9505 - SGH-I337M - SGH-M919 - GT-I9505G (smaller /system partition)

This page is only for versions of the Galaxy S4 that use the Qualcomm Snapdragon 600 SoC, see https://en.wikipedia.org/wiki/Samsung_Galaxy_S4#Model_variants

Watch out, some versions have bootloaders that can't be unlocked, although the locked versions have a bootloader that contains a bug.

Contributors

 * i9505_someone (rrooij on GitHub)
 * GrantM11235

What works

 * Compiling the latest lineageos kernel with some patches applied
 * Booting a graphical screen when installing PostmarketOS as recovery zip in TWRP.
 * Network connection via USB and SSH access
 * Screen works
 * Brightness can be changed by echoing a value to /sys/class/backlight/panel/device/backlight as root
 * Wifi with properietary blobs
 * Touch screen
 * Wayland
 * X11
 * Keyboard and mouse with USB OTG adapter (Hotplug works)
 * Initramfs password entry for full disk encryption

What does not work

 * Touch screen requires a reboot to work in some rare cases
 * 3D acceleration
 * Wayland default on screen keyboard

How to enter flash mode
Press volume down + the power button to enter Download Mode. It is now possible to use Heimdall for flashing.

Installation

 * 1)  Install pmbootstrap
 * 2) pmbootstrap init
 * 3) pmbootstrap install
 * 4) Put your S4 in Download Mode (Volume Down + Power) and connect it with USB
 * 5) pmbootstrap flasher flash_kernel
 * 6) After the kernel is flashed, the device will reboot. Hold the volume down button while it boots up to re-enter Download Mode
 * 7) pmbootstrap flasher flash_rootfs

Wifi
Once the device has been successfully initialized, enable it:

$ sudo ip link set wlan0 up Configure wpa_supplicant (only necessary on encrypted networks):

$ wpa_passphrase $YOUR_SSID | sudo tee /etc/wpa_supplicant/wlan0.conf &lt;enter passphrase here and press Enter&gt; Connect to network using wpa_supplicant:

$ sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wlan0.conf If your network uses DHCP, start the DHCP client:

$ sudo udhcpc -i wlan0

Hardware / sensors detail
Output from  on jfltespr sph-l720t: hwtest output (jfltespr)

For reference, sensor information from sensors sandbox (f-droid) on jfltespr sph-l720t; note that in addition to hardware-based sensors, it presumably includes software-based / derived sensors: sensor details (sensorssandbox)

Links

 * Kernel used: https://github.com/LineageOS/android_kernel_samsung_jf
 * Teardown: https://www.ifixit.com/Teardown/Samsung+Galaxy+S4+Teardown/13947