SailfishOS 3 for Photon Q and siblings

83 posts
Thanks Meter: 53
 
By elros34, Member on 23rd November 2018, 09:00 PM
Post Reply Email Thread
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"
Don't hesitate and donate if you like it


Images
Quote:

Installation
  • Download SailfishOS 3 image (open it in private mode if onedrive ask you to login) and flash it over cyanogenmod. It's compressed tarball so installation may take even 10 minutes.

OTA
Read about Stop Releases
Code:
# Transition from 3.0.2 to 3.0.3 reqires few more steps
devel-su
/bin/rm -rf /etc/firmware
ssu ar glibc-tmp http://repo.merproject.org/obs/home:/elros34:/glibc/sailfishos_3.0.3.9/
# After succesfull system upgrade remove glibc-tmp repo 
# ssu rr glibc-tmp
Code:
devel-su
RELEASE="$(curl http://repo.merproject.org/obs/nemo:/testing:/hw:/motorola:/moto_msm8960_jbbl/ 2>/dev/null | pcregrep -o1 '"sailfishos_([\d\.]+)' | tail -n1)"

ssu lr
# ^ double-triple check that no -two- enabled repos point to the same URL and all versioned repos points to correct release
ssu release $RELEASE

# You may have many of OpenRepos enabled. It's recommended to disable them, even
# though version --dup will do its best-effort to isolate repositories:
# disable openrepos
OPENREPOS="$(ssu lr | sed -n '/Enabled repositories (user)/,/Disabled/p' | awk '/openrepos/{print $2}')"
for repo in $OPENREPOS; do
    ssu disablerepo $repo
done
ssu lr

zypper clean -a
zypper ref -f

version --dup
# if above fails, try again
# version --dup

/usr/share/sfos-moto_msm8960_jbbl-adaptation/moto_msm8960_jbbl.sh

for repo in $OPENREPOS; do
    ssu enablerepo $repo
done

sync
reboot
# after reboot execute pkcon refresh to update all repositories
or if you are reckless:
Code:
/usr/share/sfos-moto_msm8960_jbbl-adaptation/upgrade.sh
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).
  • Some mp4 videos with aac fails to play due to unsupported codec format by android hal. Try my video player orangeplayer (you need gstreamer1.0-libav package)
  • QProcess:startDetached can hang randomly. Workaround added to fingerterm. Looks like it's not photon q specific: https://together.jolla.com/question/...ing-new-window
  • There are no 2.XG, 3.XG network indicators.
  • glReadPixels() always returns empty content. It means no screen recording, screenshots and thumbnails in browser. Workaround for screenshots added to lipstick.

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

Q: Can I switch hardware keyboard layout?
A: Default xkb layout switch shortcut: "shift + sym". You need to also set second keyboard layout:
Quote:

dconf write /desktop/lipstick-jolla-home/layout "'us,ru'"

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. At your own risk you can disable it in 2 places in /init.target.rc. After that btry will not report Aged Capacity anymore.

Changelog
Quote:

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=%E2%...ype=&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
The Following 6 Users Say Thank You to elros34 For This Useful Post: [ View ] Gift elros34 Ad-Free
12th December 2018, 04:52 PM |#2  
Senior Member
Thanks Meter: 21
 
More
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 ?
Attached Files
File Type: txt ls dev.txt - [Click for QR Code] (30.5 KB, 28 views)
12th December 2018, 05:51 PM |#3  
OP Member
Thanks Meter: 53
 
More
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
12th December 2018, 06:57 PM |#4  
Senior Member
Thanks Meter: 21
 
More
Quote:
Originally Posted by elros34

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?
Attached Files
File Type: txt xt926 dmesg.txt - [Click for QR Code] (112.9 KB, 8 views)
File Type: txt xt926 evdev_trace -I.txt - [Click for QR Code] (2.1 KB, 12 views)
File Type: txt xt926 journalctl --no-page.txt - [Click for QR Code] (39.6 KB, 8 views)
File Type: txt xt926 logcat.txt - [Click for QR Code] (68.0 KB, 6 views)
12th December 2018, 07:40 PM |#5  
OP Member
Thanks Meter: 53
 
More
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
12th December 2018, 09:43 PM |#6  
Senior Member
Thanks Meter: 21
 
More
Quote:
Originally Posted by elros34

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.
15th December 2018, 10:31 AM |#7  
Senior Member
Thanks Meter: 31
 
More
Absolutely love this - haven't had a single problem yet. Thank you so much elros34.
15th December 2018, 01:59 PM |#8  
OP Member
Thanks Meter: 53
 
More
Could somebody check what "getprop ro.product.device" returns for xt926 or xt907 with sailfish installed?
13th April 2019, 02:48 PM |#9  
Junior Member
Thanks Meter: 15
 
More
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é
14th April 2019, 11:11 AM |#10  
OP Member
Thanks Meter: 53
 
More
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.
The Following 2 Users Say Thank You to elros34 For This Useful Post: [ View ] Gift elros34 Ad-Free
15th April 2019, 12:15 PM |#11  
Junior Member
Thanks Meter: 15
 
More
Quote:
Originally Posted by elros34

Could somebody check what "getprop ro.product.device" returns for xt926 or xt907 with sailfish installed?

On my XT907 it returns scorpion_mini
The Following User Says Thank You to nfs22 For This Useful Post: [ View ] Gift nfs22 Ad-Free
Post Reply Subscribe to Thread

Tags
photon, sailfish, sailfishos

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes