View Single Post
edp17's Avatar
Posts: 592 | Thanked: 706 times | Joined on Jul 2019 @ UK
#1
Sailfish OS for the Samsung Galaxy S4 (GT-I9505) - (jfltexx)

Code:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!            Everything you do,               !!
!!      you do at your own peril and risk.     !!
!!                                             !!
!!      I do not bear any responsibility       !!
!!          for your faulty devices.           !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Requirements:
Before you start to download anything, please read all this through carefully.
The first requirement is your device must be rooted and you should be able to install a custom recovery (preferably TWRP) onto it.

Installation instructions:
1. Download all files, LOS17.1 zip, Sailfish OS zip and twrp2.8.7.img to the external SD card on the phone
2. Reboot into TWRP (Hold buttons: Power on + Home + Volume up)
At this point you should install TWRP 2.8.7 as the installation work the best with this recovery.
Once you flashed TWRP 2.8.7, please reboot into recovery and continue the process.

3. Do a factory reset
4. Format data to remove any encryption or other residues
5. Still in recovery, flash the LOS17.1 image
6. Still in recovery, flash Sailfish Os image
7. Reboot
8. Enjoy the latest (4.4.0.72) Sailfish OS on your S4 (jfltexx).
You will need patience as the first boot will take for a while. Then you can go through the initial Sailfish OS set up.

This Sailfish OS Android HAL is based on LOS 17.1.

Downloads:
Debug/login/troubleshooting:
In Ubuntu, connect USB cable. telnet 192.168.2.15 2323 or SSH defaultuser@192.168.2.15.

Notes:
  • On Sailfish OS, as it is a Linux system, you cannot install/run any android apps. (Although WayDroid is WIP)

How to make a backup/restore with TWRP:
You can boot into TWRP with the usual button combination (Hold buttons: Power on + Home + Volume up) and can make backup/restore.

14/07/2022
=========
Work:
  • Screen
  • Touch
  • IMEI number detection
  • Calls incoming/outgoing
  • Messages incoming/outgoing
  • Mobile data
  • Wifi
  • Sensors (GPS, Acceleration, Gyro, Magnetometer, Proximity) - GPS tested working with PureMaps (for car navigation) and Stellarium (for positioning)
  • Pixel ratio and icons set to 1.75
  • Sound adjusting with volume rockers
  • Apps do start (Firejail/Sailjail)
  • Jolla Store
  • Charging icon displayed properly
  • Home button
  • Back button
  • Recent apps button (pulls down/rolls up the Top menu)
  • External SD card mounted on /run/media/defaultuser/C1FF-1113 (C1FF-1113 is an example only, it can be different on your device do a df -h to double check what's available in /run/media/defaultuser/)
  • Network storage can be mounted (install cifs package)
  • MTP
  • USB modes
  • SSH
  • LEDs (except white)
  • LXC container (desktop Linux Debian installed in it - demo screen-shot)
  • Vibra
  • Audio routing to headphones if connected
  • OTA update

Do not work: (all of these WIP)
  • Bluetooth
  • Camera (and all related stuff e.g. torch)
  • Video playing/recording
  • Waydroid

Known bugs:
  • SIM not detected
    Solution: restart ofono manually (in command line like Fingerterm): devel-su systemctl restart ofono
  • Device keeps booting even if it is shut down from the os
    Solution: Take out the battery (you can put it back straight away, it will stay switched off)
  • When the device is switched off and connected to a charger, it boots up but the OS is unstable
    Solution: Charge it when it is booted into the OS
  • When the battery is flat and the device is connected to a charger, it goes into a boots loop
    Solution: Boot into recovery, charge the device until the battery has a few percentages, then boot into the OS and charge it fully
Most of the charging issues can be avoided if you don't let the battery run out.


Extra: Desktop Linux distro install/run on the Galaxy S4!
(You might need to install sudo: devel-su zypper in sudo)
  • go to command line (e.g. Fingerterm)
  • get a root shell:
    devel-su
  • download and install lxc-templates-desktop-1.1-4.noarch.rpm:
    zypper in lxc-templates-desktop-1.1-4.noarch.rpm
  • add repo for qxcompositor:
    ssu ar elros34 https://repo.sailfishos.org/obs/home...ishos_armv7hl/
  • update repos:
    zypper ref
  • install qxcompositor:
    zypper in qxcompositor
  • download and install qxdisplay:
    zypper in qxdisplay-0.1-2.armv7hl.rpm
  • download and install harbour-containers-0.4-1.armv7hl.rpm:
    zypper in harbour-containers-0.4-1.armv7hl.rpm
  • create a container named Debian and install Debian Sid Desktop Linux into it:
    lxc-create -t sfos-download -n Debian
    debian
    sid
    armhf
  • start container:
    lxc-start -n Debian
  • Manually change the the text "/usr/share/sailfish-containers/guest" to "/usr/share/harbour-containers/scripts/guest" (without quotes) in the /var/lib/lxc/Debian/config file.
  • attach installed desktop:
    lxc-attach -n Debian
  • run the initial setup:
    /mnt/guest/setup_desktop.sh
  • run another setup:
    /mnt/guest/setups/debian.sh
  • if you want to access the desktop via VNC, install vncserver:
    apt install tightvncserver
  • this is required since sfos 4.4:
    apt install dbus-x11
  • download Xwayland.armhf.libc-2.29.bin binary, rename it to Xwayland and copy into the desktop distro:
    cp /home/defaultuser/Downloads/Xwayland.armhf.libc-2.29.bin /home/.lxc/Debian/opt/bin/Xwayland
  • set it to be executable:
    chmod +x /home/.lxc/Debian/opt/bin/Xwayland
  • download debian-mouse.sh script.
  • in fingerterm, start the script as user: debian-mouse.sh Debian p
  • wait until the desktop Linux appears in a window

More info about the Full linux distros on Sailfish OS.

App Icon to start Desktop distro:
Create a 'Debian.desktop' file in /usr/share/applications/ with the following content (please realise the location of debian-mouse.sh script):
Code:
[Desktop Entry]
Type=Application
Name=Debian-Sid
Exec=/usr/bin/droid/lxc-scripts/debian-mouse.sh Debian p
Icon=debian

[X-Sailjail]
Sandboxing=Disabled
The icon named 'debian' is this icon that I copied into /usr/share/icons/hicolor/86x86/apps/

Any questions, comments and suggestions are welcome.

Last edited by edp17; 2023-01-25 at 16:34. Reason: Wifi fixed - 4.4.0.72 build uploaded
 

The Following 4 Users Say Thank You to edp17 For This Useful Post: