Sailfish OS for the Samsung Galaxy Note 4 (SM-N910C) - (treltexx)

Search This thread

edp17

Senior Member
Dec 9, 2019
179
92
Hello @edp17
Will this port work on the note 4 exynos 3g variant?
edit:
flashed the sfos on samsung galaxy note 4 sm-910h and so far everything seems to work well, minus i did not insert my sim card, and probably never will.
thank you for the port.
Hello,
I thought the port would work on all exynos variants. (Although,, couldn't prove it because I only had an SM-N910C. :) )
And now, you have just proven that the port works well on an SM-910H variant. This confirms my theory. :)
Thanks for that, congrats and enjoy Sailfish on your Note 4!
 
  • Like
Reactions: steve-marinos

steve-marinos

Member
Mar 16, 2018
14
3
Hello,
I thought the port would work on all exynos variants. (Although,, couldn't prove it because I only had an SM-N910C. :) )
And now, you have just proven that the port works well on an SM-910H variant. This confirms my theory. :)
Thanks for that, congrats and enjoy Sailfish on your Note 4!
Thank you for your hard work, yeah so far so good, need a bit of a learning curve, same like experiencing any new OS.
 

asinnerm3

Member
Jun 14, 2023
16
0
@edp17
waydroid is not running for me, not sure why, what info do you need so i can help you diagnose the issue, maybe uninstall and fresh install, then init again!
thank you.
 

edp17

Senior Member
Dec 9, 2019
179
92
@edp17
waydroid is not running for me, not sure why, what info do you need so i can help you diagnose the issue, maybe uninstall and fresh install, then init again!
thank you.
I remember, into the vendor.img I had to add a few *.so files from the LOS17.1 android base. I am not sure whether the n910c and 910h variants are using the same hardware and whether their drivers are the same. Probably these differences are causing the issue you are having. I am pretty sure if you copy the necessary libraries from a LOS17.1 android base of 910h into the vendor.img, that would sort out this problem.
 

asinnerm3

Member
Jun 14, 2023
16
0
I remember, into the vendor.img I had to add a few *.so files from the LOS17.1 android base. I am not sure whether the n910c and 910h variants are using the same hardware and whether their drivers are the same. Probably these differences are causing the issue you are having. I am pretty sure if you copy the necessary libraries from a LOS17.1 android base of 910h into the vendor.img, that would sort out this problem.
Frankly speaking and after thanking you on providing excellent support, am not too familiar in digging in the vendor.img (wouldn't know what to look at) and got me thinking, since you had to add some stuff from the LOS 17.1 why not base SFOS on LOS 17.1?
I know zero knowledge on porting/building Os so please excuse my ignorance if my question seem so.
On the bright side seems my variant is an unlucky one, I tried to flash LOS 18.1 on it and the install complaint about the variant i have even though the porter clearly state that the sm-n910H is compatible, so am not sure how bad my variant is or maybe it is messed up from a previous flash even though each time am flashing something new am doing a full wipe except my microsd.
Hope you continue your port for the Note4, if my variant was LTE compatible i would have not hesitate to daily drive it on SFOS.
 

edp17

Senior Member
Dec 9, 2019
179
92
Frankly speaking and after thanking you on providing excellent support, am not too familiar in digging in the vendor.img (wouldn't know what to look at) and got me thinking, since you had to add some stuff from the LOS 17.1 why not base SFOS on LOS 17.1?
I know zero knowledge on porting/building Os so please excuse my ignorance if my question seem so.
On the bright side seems my variant is an unlucky one, I tried to flash LOS 18.1 on it and the install complaint about the variant i have even though the porter clearly state that the sm-n910H is compatible, so am not sure how bad my variant is or maybe it is messed up from a previous flash even though each time am flashing something new am doing a full wipe except my microsd.
Hope you continue your port for the Note4, if my variant was LTE compatible i would have not hesitate to daily drive it on SFOS.
I understand what I said sounds a complex task. Especially for those are not experienced in Linux. Otherwise, it is a simple mounting an image file with read & write and then copying some files from an extracted source into it. (I admit, there could be complications like I had when I did it, so at the end it could turn into a more complex task than a copy/paste exercise.:) )
I also understand users prefer to use a 'Ready for daily driver' device where everything just works. I think community ports are experiments and for those who likes tinkering their device and using linux on a handheld device without any restrictions. And more importantly, SFOS helps you to keep your data and privacy safe from giants (Google, Facebook, etc.)

Back to your question why I didn't use Los17.1 as the base under SFOS.
When I started porting SFOS to this device, there was no Waydroid, so I've chosen an android base I was familiar with while I was porting SFOS for other devices. That's why I picked Los14.1.
Later, when Waydroid came into picture I've managed to make that work on this device with that old base. Ultimately Waydroid requires a Halium base which's very first version is based on android 9. So, it was a miracle that I could make it work on that Los14.1 base (which is android 7.1.2 and being far-far away from the required minimum android 9). :)
So, got Waydroid working but during the process also introduced some problems and I thought that's because of the old base. Therefore, started from scracth and I ported SFOS to the Note 4 again, but this time with androd 10 base (Los 17.1). I hoped those problems would be fixed on the new port, but unfortunately, all the problems remained. Therefore, I ditched that Los17.1 work and returned to the original 14.1. Luckily, since that time I've managed to fix almost all problems, so they were not at all related to the android base. :)
 
  • Like
Reactions: asinnerm3

edp17

Senior Member
Dec 9, 2019
179
92
OTA from 4.5.0.18 to 4.5.0.21 is ready
Here are the steps I followed and the commands I executed

Code:
devel-su
mask the following: (just in case any of these triggers a reboot in the middle of OTA update)
systemctl-user mask voicecall-ui-prestart.service
systemctl-user mask mission-control-5.service
systemctl-user mask booster-silica-media@.service
systemctl-user mask voicecall-manager.service
reboot
devel-su
if installed, unapply and remove all patches
if installed, uninstall patchmanager
if used, ssu dr mousetracker
if used, ssu dr chum
if used, ssu dr sailfishos-chum
ssu release 4.5.0.21
double check whether these three repos are pointing to the 4.5.0.21 version:
ssu lr
  adaptation-common should be https://releases.jolla.com/releases/4.5.0.21/jolla-hw/adaptation-common/armv7hl/
  adaptation-community-common should be https://repo.merproject.org/obs/nemo:/testing:/hw:/common/sailfishos_4.5.0.21/
  adaptation-community-treltexx should be https://repo.merproject.org/obs/nemo:/testing:/hw:/samsung:/treltexx/sailfishos_4.5.0.21/
ssu ur
zypper ref
zypper dup --details
unmask the following:
systemctl-user unmask voicecall-ui-prestart.service
systemctl-user unmask mission-control-5.service
systemctl-user unmask booster-silica-media@.service
systemctl-user unmask voicecall-manager.service
reboot
 

anjarys

Senior Member
Feb 3, 2011
306
64
Jakarta

Attachments

  • PXL_20230914_155641300.jpg
    PXL_20230914_155641300.jpg
    1.8 MB · Views: 20

edp17

Senior Member
Dec 9, 2019
179
92
I couldn't fix the LXC problem on recent releases, so, I've decided to go back to SFOS4.2.
Some fixes (wifi, netlistener flod, etc.) were included in newer releases, therefore, I've included them into the hybris-hal for 4.2. So, if you'd like to go back to 4.2 but you want wifi fixed, please flash this hybris-boot image into /boot partition. (hybris-boot-sfos42-08-wd-fixes_usbmoded-wifi-netlistener.img)
 

geek_1405

New member
Apr 14, 2024
1
0
Hi there, I was wondering if anyone would know if this also woks with the galaxy note edge since it's the same phone under the hood
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Code:
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!            Everything you do,               !!
    !!      you do at your own peril and risk.     !!
    !!                                             !!
    !!      I do not bear any responsibility       !!
    !!          for your faulty devices.           !!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!                                             !!
    !!   THIS ROM IS ONLY FOR THE EXYNOS VERSION   !!
    !!                                             !!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    First I would like to thank NoKit, monich, elros34 and all the Sailfish OS porter guys who helped me to make this port.
    Thank you very much guys!

    News 05/03/2023: OTA to SFOS 4.5.0.18

    26/10/2022: OTA to SFOS 4.4.0.72
    14/07/2022: OTA to SFOS 4.4.0.68
    08/06/2022: OTA to SFOS 4.4.0.64
    30/05/2022: OTA to SFOS 4.3 & 4.4
    22/02/2022: OTA to SFOS 4.2
    16/10/2021: Waydroid on Galaxy Note4 (SFOS 4.1)
    03/09/2021: OTA to SFOS 4.1
    23/03/2021: OTA to SFOS 4.0

    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, LOS14.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. Still in recovery, flash the LOS14.1 image
    5. Still in recovery, flash Sailfish Os image
    8. Reboot
    9. Enjoy the latest (3.3.0.16) Sailfish OS on your Note 4 (treltexx). :)
    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 based on LOS 14.1.


    Downloads:

    Problems/Solutions:
    1. Problem: LXC container doesn't start on any of these two builds.
      Solution: In TWRP install the kernel for lxc support. (This will be included into a later build.)
    2. Problem: Incoming calls are not displaying the number only the 'Private call' text.
      Solution: Install the fix for 'Private number' calls rpm. (This will be included into a later build.)


    Some useful patches:

    Apps from Openrepos
    Apart from the Jolla store there are plenty of other, community made apps in Openrepos. There is a user-friendly app to install/remove apps from this source called Storeman. It can be downloaded and install from this location: Storeman

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


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

    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.

    Battery life
    In my experience this build gives a very good battery life (I've tested with a new battery and it drops beteen 5% - 10% overnight with wifi on)

    Changelog:

    10.10.2020
    =========
    • Custom (Sailfish OS) boot logo


    09.10.2020
    =========
    • Sound fix is included, it works out of the box
    • GPS fixed!
    • S-Pen works as a mouse! :DTo make the cursor visible (thanks for elros34!) you need to install:
      1. Patchmanager 3 from openrepos
      2. mousetracker
      3. amend '/var/lib/environment/compositor/droid-hal-device.conf' file, add the -plugin evdevmouse:abs:/dev/input/event3 to the end of LIPSTICK_OPTIONS. (That line should look like this:
        Code:
        LIPSTICK_OPTIONS=-plugin evdevtouch -plugin evdevkeyboard:keymap=/usr/share/qt5/keymaps/droid.qmap -plugin evdevmouse:abs:/dev/input/event3
      4. as final step apply the moustracker patch in Settings/Patchmanager, then restart the services (pulley menu in Patchmanager) or reboot, then pull out the S-Pen and use it as a stylus/mouse.
        (Note: As patchmanager doesn't yet work when the default user is defaultuser, the instruction above works only on sfos 3.3.0.16 or the OTA updated 4.0.1.48. On fresh sfos 4.0.1.48 install you need to install mousetracker and manually apply the patch from it.)

    28.09.2020
    =========
    Work:
    • Screen
    • Touch
    • IMEI number is detected
    • Sensors (Rotation, Acceleration, Gyroscope, Magnetometer, Light & Proximity)
    • GPS (The permanent solution will be included in a future build. Now, the workaround is (do it only once): as root delete the folder /data/system/gps and then reboot. GPS should start working)
    • Notification LEDs (white, green, blue, red)
    • Wifi
    • MTP
    • Bluetooth
    • Calls incoming/outgoing
    • Messages incoming/outgoing
    • Mobile data
    • External SD card detected and mounted to /run/media/nemo/_sdcard_name_ (where _sdcard_name_ is the name of the sd card when it was formatted like 4B93-785B)
    • Home button and the Back soft button
    • Vibra
    • Pixel ratio and icons set to 2.00
    • Audio is routed to headphone if that presents
    • Camera front/rear
    • Video recording (only on the rear camera)
    • Jolla store (please skip the account creating/adding in the initial setup)
    • findutils is installed by default (updatedb and locate commands work out of the box)
    • Torch
    • can boot into TWRP recovery with the usual button combination (hold buttons: Power on + Home + Volume up)
    • Low Power Mode (AKA "sneak peek" or "ambient display") works (install instruction is in this post)
    • Sound - Please download the 'Sound fix script for Note4 (treltexx)' and save it into /home/nemo/Download, then give it executable permission and run as root or do the following:
      1. Download the 'Sound fix script for Note4 (treltexx)' and save it into /home/nemo/Download
      2. goto Settings/Developer tools, enter a Password and save it
      3. start the Fingerterm app and within, issue the following commands
      4. devel-su (press enter, then enter the password you set)
      5. chmod +x /home/nemo/Download/soundfix-treltexx.sh
      6. /home/nemo/Download/./soundfix-treltexx.sh

    Do not work:
    • USB mode selection from Settings (workaround: as root run 'systemctl restart usb-moded' command)
    • Video recording on the front camera
    • Video playback in Gallery app (You can use Kodi for playing videos)
    • Internal SD card is not mounted to /android
    • S-Pen WIP

    Extra 1: Change boot logo, Download warning image, Charring image and Download image for Sailfish OS like. :D
    Simply download the Note4-Boot-Logo-Updater_by_edp17.zip from the download section and flash it with TWRP.
    Important!: Once the zip is flashed, boot into recovery again, then you can boot into Sailfish OS.

    To revert these images back to original:
    Download the original param.bin and flash it with heimdal:
    Code:
    heimdall flash --PARAM param.bin
    Inspired by this post

    Extra 2: Desktop Linux distro install/run on the Note 4!
    1. First flash the kernel from the Downloads section (in a later build this kernel will be included)
    2. Install all the following packages:

    3. Once the packages are installed, fire up the LXC and install a distro into it (e.g. Debian SID)
    On the Note 4 the harbour-containers GUI doesn't work properly. Fortunately the desktop distro installation can be done from a command line. Here are the steps:
    • sudo lxc-create -t sfos-download -n mycontainer
      follow the instruction and set the distribution (e.g. debian) then the version (e.g. sid) then the architecture (armhf)
      example command: sudo lxc-create -t sfos-download -n mycontainer -- --arch armhf --dist debian --release sid
    • sudo lxc-start -n mycontainer
    • sudo lxc-attach -n mycontainer
    • then within the container:
    • /mnt/guest/setup_desktop.sh
    • /mnt/guest/setups/debian.sh

    4. Once the Desktop distro is installed you can start:
    I recommend to use one of these scripts as they save a little time. (Note: You need sudo installed and configured for these scripts!)

    5. Enjoy. :)

    6. More info about the Full linux distros on Sailfish OS.

    Pictures:

    treltexx-apps.jpg


    treltexx-settings.jpg


    treltexx-top-menu.jpg




    Custom boot logo and other pictures:

    logo450x800.jpg


    warning450x800.jpg


    lpm450x800.jpg


    download450x800.jpg
    2
    Looks really good, have you posted the source on github or anywhere? I made a port of UT for the snapdragon note 4 and would like to make one for the exynos variant

    Yes, all sources are available on github: here
    Please let me know when the UT is available for this device! I'd like to try it. :D
    2
    Running Windows XP (with Qemu 4.2.0) on Desktop Debian (Sid) distro within an LXC container on the Galaxy Note 4 (SFOS4.0).
    (The Qemu 4.2.0 is compiled on the device within the Desktop Linux.)

    Galaxy-Note4-Debian-Sid-in-LXC-running-Windows-XP-in-QEMU1.png


    Galaxy-Note4-Debian-Sid-in-LXC-running-Windows-XP-in-QEMU2.png
    2
    Oh, it's you again dude :D That is AWESOME

    :D I am still chasing my n7000. Once I got that I will complete that port too. Will let you know.
    2
    The first OTA update is ready. (Well, sort of :) as it requires some additional manual work.)
    Because sfos 3.4 is a stop release, the device must be OTA updated to 3.4 first.
    As I have not built a sfos 3.4 image for this device, the OTA update to version 3.4 is meant to be only an interim step.
    The manual additional work is needed because, for unknown reasons, some packages and the kernel is not deployed to the device during the update.

    The benefit of upgrading this way, rather than installing the sfos 4.0 image from scratch:
    • nemo user is kept as the default user
    • all scripts that hardcoded to use user nemo, should work without any change
    • all your data, files and apps will remain and should work as before
    • if you installed and configured a desktop Linux in an lxc container, that also should work (don't need to reinstall/reconfigure again)
    • patchmanager and installed patches like Mouse cursor, More folder icons and Notes app cover will remain working

    Here is the instruction what to do:

    Step 1 - OTA 3.3 to 3.4
    1. Boot into sfos, enable developer mode and set a password
    2. Connect the phone to a wifi network (for downloading packages)
      From this point, we will work on the PC, leave the phone connected.
    3. Connect the phone to a PC, open a console and on the PC run (enter the password when you prompted):
      Code:
      ssh nemo@192.168.2.15
    4. Switch user to root (enter the password when you prompted):
      Code:
      devel-su
    5. Check repos:
      Code:
      ssu lr
    6. Disable all repos, except: apps, hotfixes, jolla:
      Code:
      ssu dr <repo_name>
    7. Add/modify adaptation-community-common repo:
      Code:
      ssu ar adaptation-community-common http://repo.merproject.org/obs/nemo:/testing:/hw:/common/sailfishos_3.4.0.24/
    8. Add/modify adaptation-community-treltexx repo:
      Code:
      ssu ar adaptation-community-treltexx http://repo.merproject.org/obs/nemo:/devel:/hw:/samsung:/treltexx/sailfishos_3.4.0.24/
    9. In case you have the mousetracker repo
      Code:
      ssu ar mousetracker http://repo.merproject.org/obs/home:/elros34:/sailfishapps/sailfishos_3.4.0.24/
    10. Put the device in release mode:
      Code:
      ssu release 3.4.0.24
    11. Refresh packages:
      Code:
      pkcon refresh
    12. Upgrade the system:
      Code:
      version --dup
    13. Then reboot:
      Code:
      reboot

    Step 2 - OTA 3.4 to 4.0
    1. Boot into sfos, enable developer mode and set a password
    2. Connect the phone to a wifi network (for downloading packages)
      From this point, we will work on the PC, leave the phone connected.
    3. Connect the phone to a PC, open a console and on the PC run (enter the password when you prompted):
      Code:
      ssh nemo@192.168.2.15
    4. Switch user to root (enter the password when you prompted):
      Code:
      devel-su
    5. Check repos:
      Code:
      ssu lr
    6. Disable all repos, except: apps, hotfixes, jolla:
      Code:
      ssu dr <repo_name>
    7. Add/modify adaptation-community-common repo:
      Code:
      ssu ar adaptation-community-common http://repo.merproject.org/obs/nemo:/testing:/hw:/common/sailfishos_4.0.1.48/
    8. Add/modify adaptation-community-treltexx repo:
      Code:
      ssu ar adaptation-community-treltexx http://repo.merproject.org/obs/nemo:/devel:/hw:/samsung:/treltexx/sailfishos_4.0.1.48/
    9. In case you have the mousetracker repo
      Code:
      ssu ar mousetracker http://repo.merproject.org/obs/home:/elros34:/sailfishapps/sailfishos_4.0.1.48/
    10. Put the device in release mode:
      Code:
      ssu release 4.0.1.48
    11. Refresh packages:
      Code:
      pkcon refresh
    12. Upgrade the system:
      Code:
      version --dup
    13. Then reboot:
      Code:
      reboot

    Once the device is updated to 4.0 boot into TWRP and flash this kernel: 02-hybris-boot-firejail-enhanced.img
    Then boot into SFOS and install these two packages:
    Reboot again and after this, all apps and Bluetooth should work as before.

    If you have any issues, give me a shout. :)
    Good luck!