SailfishOS 3 for Photon Q and siblings

Search This thread

elros34

Senior Member
May 25, 2016
100
53
Code:
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it!

SailfishOS 3 for Photon Q
Continuation from 2.0 thread to keep most important information in first post. Thanks to vevgeniev for initial port, without it I would never buy Photon Q.

Repo with my apps is added to image. Packages can by installed via terminal:
Code:
devel-su zypper in "package name"

Images
Idy83AA.png

Installation

OTA
Read about Stop Releases and make backup using TWRP

Code:
/usr/share/sfos-moto_msm8960_jbbl-adaptation/upgrade.sh
# after reboot execute pkcon refresh to update all repositories

For any issues with upgrade.sh script download more up-to-date version, add --verbose argument or execute commands from real-upgrade.sh manually: https://build.sailfishos.org/packag...bl:4.4.0.68/sfos-moto_msm8960_jbbl-adaptation

At first boot tracker might slow down phone and eat a lot of storage. If it's too resource hungry move your media files out of device or create .nomedia empty file to exclude particular directory from tracker. Then force reset it:
Code:
tracker reset --hard


Custom Bootlogo
vevgeniev created a custom bootlogo:
Instruction how to use it

Known issues
  • Half screen mirror glitch occurs sometimes. Blank/unblank display fixes it
  • Sometimes removing files does not have any effect, i.e. free space doesn't increase and sdcard can't be unmounted. Could be easily triggered by mtp or dd usage. For sdcard access use FileZilla (SFTP).
  • QProcess:startDetached can hang randomly. Workaround added to fingerterm. Looks like it's bug in Qt and it is not photon q specific: https://together.jolla.com/question/202337/bug-fingerterm-terminal-freezes-after-opening-new-window
  • There are no 2.XG, 3.XG network indicators.
  • glReadPixels() return empty content in some cases. This means no screen recording, screenshots and thumbnails in browser. Workaround for screenshots added to lipstick.
  • All bugs at first boot are features.

FAQ
Q: How to run apk?
A: It's not android, you can't

Q: Can I switch between hardware keyboard layouts?
A: Default xkb layout switch shortcut: "shift + sym". You need to also set second keyboard layout:
dconf write /desktop/lipstick-jolla-home/layout "'us,ru'"
In newer releases layouts can be enabled in settings and switched via "shift + space"
Tips
  • Fast way to restart lipstick:
    shift + tab + k
  • Alt + Tab like switching (if you have sailfishos-alttab-patch installed):
    OK + tab
  • To disable volume media keys:
    dconf write /apps/photonq-helper/mediaKeysEnabled 0
  • batt_health can cause reported battery capacity decrease which I am not sure works correctly at least on my aging battery. It's disabled since 3.3.0 in 2 places in /init.target.rc. Therefore btry will not report Aged Capacity anymore.
  • To use h264 (hardware accelerated) decoder in youtube set in about:config media.mediasource.webm.enabled to false
  • user name is still 'nemo' instead 'defaultuser' even for latest releases

Changelog
4.4.0.68
* Partially usable browser. Javascript doesn't cause crash on almost all sites like in 4.0-4.3 sfos. Tabs in landscape mode are unusable.
* Using browser probably breaks video encoding/decoding ('vid_dec_open() max number of clientslimit reached' in dmesg). Killing minimediaservice/browser usually helps.
* Disabled sailjail, and enabled start up boosters back.
* Few general sfos bugs more (see patchmanager catalogue for my patches)

4.3.0.15 - No for daily use, just required Stop Release
4.2.0.21 - No for daily use, just required Stop Release
4.1.0.24 - No for daily use, just required Stop Release

4.0.1.48
  • Broken browser

3.4.0.24 - Latest usable version
  • Fix memory leak when taking screenshot
  • Add workaround for remembering wlan state after reboot in airplane mode
  • Media keys works only in locked screen

3.3.0.16
  • NFC pn544 plugin added
  • batt_health disabled in /init.target.rc
  • glibc 2.30, gcc 8.3

3.1.0.12
  • kernel: hold volume up/down to select next/previous song
  • droid-hal-init: disable mpdecision due to constant cpu usage

3.0.3.9
  • Patch glibc for 3.0 kernel

3.0.2.8
  • Handle system and data partition automatically
  • New methods to wake up sensors

3.0.1.11
  • kernel: Fix crashes caused by new firewall rules
  • kernel: Experimental multi LUNs support
  • droidmedia: Fix random audio/video fail in browser
  • usb-moded: Mass storage was dropped in upstream. Use patched one


XDA:DevDB Information
SailfishOS 3 for Photon Q, ROM for the Motorola Photon Q 4G LTE

Contributors
elros34, vevgeniev
Source Code: https://github.com/elros34?utf8=✓&tab=repositories&q=msm8960&type=&language=

ROM OS Version: 4.4.x KitKat
ROM Kernel: Linux 3.0.x
Based On: CyanogenMod

Version Information
Status:
Alpha

Created 2018-11-23
Last Updated 2019-08-20
 
Last edited:

drkdeath5000

Senior Member
Jan 17, 2010
332
21
Thanks for maintaining this for our devices @elros34

I have been meaning to try Sailfish for some time on my RAZR HD (xt926) and i finally got around to it the other day only to find that it wont boot up.

As per the 2.0 thread i can flash CM11 and that will boot and work fine but once i flash Sailfish over the top it wont boot past the bootloader unlocked logo. I have tried both the xt907 and photonq zips but neither will boot.
The xt907 zip did shown some signs of something happening since the led would light up either orange or white but after leaving it for 45 mins with no other signs of life i gave up on it.

Please find attached a list of my device drivers using the following command:

Code:
ls -alR /dev

Are there any chances of this running on my xt926 ?
 

elros34

Senior Member
May 25, 2016
100
53
Thanks, so it has xt907 like partition table, you can't use photon q image. LED glowing means system is booting.
Boot to TWRP then:
Code:
rm /data/.stowaways/sailfishos/init_disable_telnet
Now reboot, connect phone to usb and telnet to it:
Code:
telnet 192.168.2.15 2323
In windows you can use putty but it's hard to copy logs from it.
Then wait a while so logs are complete and run:
Code:
dmesg
journalctl --no-page
logcat
evdev_trace -I
 

drkdeath5000

Senior Member
Jan 17, 2010
332
21
Thanks, so it has xt907 like partition table, you can't use photon q image. LED glowing means system is booting.
Boot to TWRP then:
Code:
rm /data/.stowaways/sailfishos/init_disable_telnet
Now reboot, connect phone to usb and telnet to it:
Code:
telnet 192.168.2.15 2323
In windows you can use putty but it's hard to copy logs from it.
Then wait a while so logs are complete and run:
Code:
dmesg
journalctl --no-page
logcat
evdev_trace -I

Thanks @elros34

Please find attached the various logs from my xt926.

Note i'm still running Sailfish 2.1.3.7, i figured it would be easier to start with that but if needed i can re-run these on 3.0.0.8

I have no idea what most of it means for the most part but a few errors did stand out to me in particular

Code:
Dec 12 20:20:16 Sailfish systemd[1407]: Failed to start The lipstick UI.

Could this possibly explain why its not booting any further?
 

elros34

Senior Member
May 25, 2016
100
53
Lipstick fails to start because xt926 use different touchscreen driver. Change "/dev/touchscreen" to "/dev/input/event1" in /var/lib/environment/compositor/droid-hal-device.conf

Also paste output of:
Code:
udevadm info -a /dev/input/event1
 
Last edited:

drkdeath5000

Senior Member
Jan 17, 2010
332
21
Lipstick fails to start because xt926 use different touchscreen driver. Change "/dev/touchscreen" to "/dev/input/event1" in /var/lib/environment/compositor/droid-hal-device.conf

Also paste output of:
Code:
udevadm info -a /dev/input/event1

Thanks @elros34 its working now after changing the touchscreen driver boots up fine. I'm not seeing any immediate issues but will see how i get on with it. First impressions are very good, a really nice os i'm actually surprised at how fast and fluid it is.

Here is the output of

Code:
udevadm info -a /dev/input/event1

Code:
sh-3.2# udevadm info -a /dev/input/event1

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/i2c-3/3-0048/input/input1/event1':
    KERNEL=="event1"
    SUBSYSTEM=="input"
    DRIVER==""

  looking at parent device '/devices/i2c-3/3-0048/input/input1':
    KERNELS=="input1"
    SUBSYSTEMS=="input"
    DRIVERS==""
    ATTRS{name}=="melfas-ts"
    ATTRS{phys}=="3-0048/input0"
    ATTRS{properties}=="2"
    ATTRS{uniq}==""

  looking at parent device '/devices/i2c-3/3-0048':
    KERNELS=="3-0048"
    SUBSYSTEMS=="i2c"
    DRIVERS=="melfas-ts"
    ATTRS{drv_debug}=="Debug Setting: 0"
    ATTRS{drv_reset}=="Reset: HIGH"
    ATTRS{hw_irqstat}=="Interrupt line is HIGH."
    ATTRS{ic_reflash}=="No firmware loading in progress."
    ATTRS{irq_enabled}=="Interrupt: 1"
    ATTRS{latency_debug}=="Latency Debug Setting: 0"
    ATTRS{latency_times}==""
    ATTRS{latency_values}=="Touch Latency Time: Average 0uS, High 0uS,0 interrupts of 0 were slow"
    ATTRS{name}=="melfas-ts"

  looking at parent device '/devices/i2c-3':
    KERNELS=="i2c-3"
    SUBSYSTEMS=="i2c"
    DRIVERS==""
    ATTRS{name}=="QUP I2C adapter"

I'll also see if i can convert some of the other xt925 and xt926 users for testing.
 

elros34

Senior Member
May 25, 2016
100
53
Could somebody check what "getprop ro.product.device" returns for xt926 or xt907 with sailfish installed?
 
Last edited:

nfs22

Member
Jun 1, 2016
30
15
mounting /dev/mmcblk0p39 on /data failes

Hi,

at first i would like to thank you for building SFOS3 for the Photon Q series, i bought another XT907 to finally get SF running on this pretty nice and tiny handset.
As @drkdeath5000 i stuck at the bootloader unlocked screen but with another problem as the touchscreen driver for his XT926.
I think it's a problem with the partition table here the error from /init.log

mount: mounting /dev/mmcblk0p39 on /data failed: No such file or directory

I followed the installation instructions you provided and flashed cm11, which is booting without issues. I already tried it with and without wiping dalvik/cache, with and without booting to cm11 first. So i would really appreciate your help. If i can provide some more detail just tell me.

Best regards
André
 

elros34

Senior Member
May 25, 2016
100
53
rkdeath5000 get further because he used old xt907 image, you can't use photon q image in XT907.
I have tried to support all devices in one image. I even prepared untested script to update kernel but need a nice way to distingnues between devices. No feedback so far.
Few days ago I came up with different an idea how to auto detect correct partitions in all devices but so far I am struggling with some serious issue in 3.0.2 so I am not sure when I will release it.
 
  • Like
Reactions: nfs22 and moodroid

nfs22

Member
Jun 1, 2016
30
15
Thank you for your fast response,

as you recommended Version Alpha3 is running but of course i would like to run SFOS3 :) So i would like to help you in any way possible.

Best regards
André
 

elros34

Senior Member
May 25, 2016
100
53
If you could test whether this image works (boots without issue and touchscreen works) then it would be great. This is image I just built with new method to detect correct partitions but without all needed patches for middleware so other bugs are not important for now.
 
  • Like
Reactions: nfs22

nfs22

Member
Jun 1, 2016
30
15
Thank you so much! I can hardly tell you how happy you made me :) I always wanted i tiny handset running on SFOS and finally after i already had given up on that your rom make it happen.
I just started some basic testing on it, as i want to wait for the screen protector before starting to really use it so i'll give you a feedback on the rom later.
 

elros34

Senior Member
May 25, 2016
100
53
3.0.2.8 Released as OTA and new image probably for all moto_msm8960_jbbl devices.
Also I created new patch for Alt+Tab (OK + Tab key) like switching between windows. It's added to my obs repo.
 
Last edited:
  • Like
Reactions: moodroid

nfs22

Member
Jun 1, 2016
30
15
So far the new version alpha9 installs without issues on the XT907. Right now i have just one problem, as in version alpha8 I'm not able to send text messages (SMS). I tried different sim cards from two different networks, so i think it's a problem within the ROM. How could i help you on this? Maybe collecting some logs?
 

moodroid

Senior Member
Jun 7, 2011
137
31
Thanks so much for 3.0.2.8 - works great. Really hope you're able to give us a 3.0.3 with the updated browser.
Don't know if you have any interest/knowledge on Maemo Leste or PMOS, but since you're the most knowledgeable person on the Photon Q, just wondered if you could hazzard a guess as to how possible it might be to get them working on this device further down the line?
Thanks again.
 

elros34

Senior Member
May 25, 2016
100
53
Yes, updated browser is tempting so I will definitely bring 3.0.3 when it will be available for ported devices.

Unfortunately I have never ported Leste or Postmarketos so I have limited knowledge here.
With Photon there are several issue like: no sim without modification and no flex cable to buy. Also we are stuck with android drivers and ancient 3.0 kernel with no chance for upstream. It means to run anything (in usable form) other than android we need libhybris. I think there are better devices with more active developers for these systems: droid 4 - have ongoing upstream efforts, Fxtec pro1 for sure will have 4.x or even 5.x kernel. That's why you will not find photon in actively supported devices in postmarketos or leste site.

- Leste use hildon-desktop (x window manager) so it would be probably not trivial to get libhybris based ui acceleration if it's possible at all. Is that os even daily usable?
- After a quick read of Postmarketos wiki looks like it support wayland based compositor like weston so it is a good sign. I was able to run libhybris accelerated weston in ubuntu chroot in sailfish. It has some touch issues but it may be because I run it nested in lipstick. From what I understand if device doesn't have upstream kernel then postmarketos requires ported halium and lxc containers. That might be not possible because of 3.0 kernel but you will never know until you try.

Take everything I said with a grain of salt and start porting. For halium you will probably need newer base than cm11. There are few important commits which are needed otherwise kernel will not work.
 
  • Like
Reactions: moodroid

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Code:
    * I am not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or you getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this ROM
    * before flashing it!

    SailfishOS 3 for Photon Q
    Continuation from 2.0 thread to keep most important information in first post. Thanks to vevgeniev for initial port, without it I would never buy Photon Q.

    Repo with my apps is added to image. Packages can by installed via terminal:
    Code:
    devel-su zypper in "package name"

    Images

    Installation

    OTA
    Read about Stop Releases and make backup using TWRP

    Code:
    /usr/share/sfos-moto_msm8960_jbbl-adaptation/upgrade.sh
    # after reboot execute pkcon refresh to update all repositories

    For any issues with upgrade.sh script download more up-to-date version, add --verbose argument or execute commands from real-upgrade.sh manually: https://build.sailfishos.org/packag...bl:4.4.0.68/sfos-moto_msm8960_jbbl-adaptation

    At first boot tracker might slow down phone and eat a lot of storage. If it's too resource hungry move your media files out of device or create .nomedia empty file to exclude particular directory from tracker. Then force reset it:
    Code:
    tracker reset --hard


    Custom Bootlogo
    vevgeniev created a custom bootlogo:
    Instruction how to use it

    Known issues
    • Half screen mirror glitch occurs sometimes. Blank/unblank display fixes it
    • Sometimes removing files does not have any effect, i.e. free space doesn't increase and sdcard can't be unmounted. Could be easily triggered by mtp or dd usage. For sdcard access use FileZilla (SFTP).
    • QProcess:startDetached can hang randomly. Workaround added to fingerterm. Looks like it's bug in Qt and it is not photon q specific: https://together.jolla.com/question/202337/bug-fingerterm-terminal-freezes-after-opening-new-window
    • There are no 2.XG, 3.XG network indicators.
    • glReadPixels() return empty content in some cases. This means no screen recording, screenshots and thumbnails in browser. Workaround for screenshots added to lipstick.
    • All bugs at first boot are features.

    FAQ
    Q: How to run apk?
    A: It's not android, you can't

    Q: Can I switch between hardware keyboard layouts?
    A: Default xkb layout switch shortcut: "shift + sym". You need to also set second keyboard layout:
    dconf write /desktop/lipstick-jolla-home/layout "'us,ru'"
    In newer releases layouts can be enabled in settings and switched via "shift + space"
    Tips
    • Fast way to restart lipstick:
      shift + tab + k
    • Alt + Tab like switching (if you have sailfishos-alttab-patch installed):
      OK + tab
    • To disable volume media keys:
      dconf write /apps/photonq-helper/mediaKeysEnabled 0
    • batt_health can cause reported battery capacity decrease which I am not sure works correctly at least on my aging battery. It's disabled since 3.3.0 in 2 places in /init.target.rc. Therefore btry will not report Aged Capacity anymore.
    • To use h264 (hardware accelerated) decoder in youtube set in about:config media.mediasource.webm.enabled to false
    • user name is still 'nemo' instead 'defaultuser' even for latest releases

    Changelog
    4.4.0.68
    * Partially usable browser. Javascript doesn't cause crash on almost all sites like in 4.0-4.3 sfos. Tabs in landscape mode are unusable.
    * Using browser probably breaks video encoding/decoding ('vid_dec_open() max number of clientslimit reached' in dmesg). Killing minimediaservice/browser usually helps.
    * Disabled sailjail, and enabled start up boosters back.
    * Few general sfos bugs more (see patchmanager catalogue for my patches)

    4.3.0.15 - No for daily use, just required Stop Release
    4.2.0.21 - No for daily use, just required Stop Release
    4.1.0.24 - No for daily use, just required Stop Release

    4.0.1.48
    • Broken browser

    3.4.0.24 - Latest usable version
    • Fix memory leak when taking screenshot
    • Add workaround for remembering wlan state after reboot in airplane mode
    • Media keys works only in locked screen

    3.3.0.16
    • NFC pn544 plugin added
    • batt_health disabled in /init.target.rc
    • glibc 2.30, gcc 8.3

    3.1.0.12
    • kernel: hold volume up/down to select next/previous song
    • droid-hal-init: disable mpdecision due to constant cpu usage

    3.0.3.9
    • Patch glibc for 3.0 kernel

    3.0.2.8
    • Handle system and data partition automatically
    • New methods to wake up sensors

    3.0.1.11
    • kernel: Fix crashes caused by new firewall rules
    • kernel: Experimental multi LUNs support
    • droidmedia: Fix random audio/video fail in browser
    • usb-moded: Mass storage was dropped in upstream. Use patched one


    XDA:DevDB Information
    SailfishOS 3 for Photon Q, ROM for the Motorola Photon Q 4G LTE

    Contributors
    elros34, vevgeniev
    Source Code: https://github.com/elros34?utf8=✓&tab=repositories&q=msm8960&type=&language=

    ROM OS Version: 4.4.x KitKat
    ROM Kernel: Linux 3.0.x
    Based On: CyanogenMod

    Version Information
    Status:
    Alpha

    Created 2018-11-23
    Last Updated 2019-08-20
    2
    rkdeath5000 get further because he used old xt907 image, you can't use photon q image in XT907.
    I have tried to support all devices in one image. I even prepared untested script to update kernel but need a nice way to distingnues between devices. No feedback so far.
    Few days ago I came up with different an idea how to auto detect correct partitions in all devices but so far I am struggling with some serious issue in 3.0.2 so I am not sure when I will release it.
    2
    I added more information to upgrade steps. You just need to be sure that patched glibc-2.25+git5+3.0.0 is available to install before running version --dup.

    Thanks again. All sorted. I think the browser seems better, but then your sailfish_ubu_chroot stuff works so well it's tempting to just use chromium anyway.
    For anyone else attempting this, I had to 'mv /etc/firmware /etc/firmware.bak' before starting else it gets stuck in a loop at about 88% complaining that /etc/firmware (or a subdirectory) already exists. Not sure if that was the right thing to do, but it seems to be working OK.
    1
    Could somebody check what "getprop ro.product.device" returns for xt926 or xt907 with sailfish installed?

    On my XT907 it returns scorpion_mini
    1
    I seems that latest gst-droid improvements makes browser crash more than usual so I decided to downgrade gst-droid and related packages. If you already upgraded system to 3.3.0 then:
    Code:
    zypper ref adaptation-community
    zypper dup --from adaptation-community
    I have also uploaded 3.3.0 image.