-
Sailfish Cheat Sheet
Development Commands
Connect to the device over usb (add "192.168.2.14 device" to /etc/hosts)
sudo ifconfig usb0 up deviceLog into the device. Define password in "Settings -> System settings
-> Developer mode -> Set password".ssh nemo@deviceChange user to root
su # if on SDK, or devel-su # if on deviceRemove changed IP from known_hosts
ssh-keygen -R deviceChroot to development environment
/srv/mer/sdks/sdk/mer-sdk-chrootUpdate development environment
sb2 -t <target> -m sdk-install -R zypper ref sb2 -t <target> -m sdk-install -R zypper updateBuild project
mb2 -t <target> build # finds the spec under rpm mb2 -t <target> -s rpm/<package>.spec build # specify spec yourselfCopy packages to the device
scp /RPMS/<package>.rpm nemo@device:Listen to system logs
journalctl -faSearch log for keyword 'account' ignoring the case
devel-su journalctl | grep -i accountOpen file (apk, media file, vcard, call number, etc.) with appropriate
app.xdg-open file # e.g. xdg-open image.jpgList shared library dependencies
ldd /usr/lib/qt5/qml/modulepath/libmodule.soList exported symbols
zypper in binutils && nm -D /usr/lib/library.so.0Set DConf value
dconf write /desktop/meego/background/portrait/picture_filename \'/pathto/wallpaper.jpg\'Print DConf value
dconf read /desktop/meego/background/portrait/picture_filenameList incoming hardware input events
evdev_trace -tFind folders that take more than 100MB of space
du --all --one-file-system / | awk '{if($1 > 102400) print int($1/1024) "MB" " " $2 }' # root partition du --all --one-file-system /home | awk '{if($1 > 102400) print int($1/1024) "MB" " " $2 }' # home partitionList RPM packages that take the most space in the system
rpm -qa --queryformat '%{size} %{name}\n' | sort -rn | moreExecute QML document.
pkcon install qt5-qtdeclarative-qmlscene # install qmlscene ln -s /usr/lib/qt5/bin/qmlscene /usr/bin/qmlscene # add symbolic link to path qmlscene app.qml # runDiagnostics
Saving logs is always good
devel-su journalctl -a > ~/saved.journalAdd -f to contiously listen to the log output:
devel-su journalctl -faThe systemd journal is persistent over reboots in devel branch -
otherwise edit /etc/systemd/journald.conf and setStorage=persistentPreventing journald from throttling logging from a verbose process -
edit /etc/systemd/journald.conf and setRateLimitBurst=9999 RateLimitInterval=5sVarious processes can be made more verbose by setting certain
environment variables:QT_LOGGING_RULES="*.debug=true" # any application or service using Qt Categorized Logging MSYNCD_LOGGING_LEVEL=8 # any Buteo sync plugin SSO_LOGGING_LEVEL=3 SSOUI_LOGGING_LEVEL=3 # Accounts&SSO services CONTACTSD_DEBUG=1 # contactsd instant messaging roster synchronisation daemon QTCONTACTS_SQLITE_TWCSA_TRACE=1 QTCONTACTS_SQLITE_TRACE=1 # qtcontacts-sqlite backend debug output KCALDEBUG=1 # calendar application and plugins, mkcal and KCal debug output LIPSTICK_COMPOSITOR_DEBUG=1 # homescreen debug outputVarious processes can be made more verbose by editing certain
configuration files and rebooting:/home/nemo/.config/QtProject/Messageserver.conf # email, QtMessagingFramework configuration file /home/nemo/.config/eas-sailfish.conf # Exchange ActiveSync plugin configuration fileFor example, to make the Exchange ActiveSync plugin fully verbose, first
ensure that journald won't throttle logging output (see the notes on
editing/etc/systemd/journald.confabove) and then ensure that the
/home/nemo/.config/eas-sailfish.conf file contains the following:[logging] Sailfish.eas.debug=dwc Sailfish.eas.warning=dwc Sailfish.eas.error=dwc Sailfish.easwbxml=dwc Sailfish.easnetwork=dwc Sailfish.easverbose=dwcSome processes can be made more verbose by installing specific "tracing"
packages which configure the service to be more verbose when installed
(viadevel-su pkcon install <pkgname>). Some examples include:connman-tracing bluez5-tracing connectionagent-qt5-tracingHome Screen and Compositor diagnostics
Lipstick debugs can be enabled by adding
LIPSTICK\_COMPOSITOR\_DEBUG=1
to/var/lib/environment/compositor/\*.conf.
Now restart lipstick and you have a small box at the bottom of the
screen for debugging the top most window. "Dump" button outputs data of
the top most window to the journal. "Expose" button shows current
windows.
In case screen is locked or/and touch is not responding but you have an
access to the device. Top most window can be dumped like:dbus-send --type=method_call --print-reply --dest=org.nemomobile.compositor.debug /debug org.nemomobile.compositor.debug.dumpPower Diagnostics
Go to your device command line. Download Power issues reporting
script
on your devicecurl -o power-diagnostics.sh https://git.merproject.org/mer-core/statefs-providers/blob/master/tools/power-diagnostics.sh && chmod a+x power-diagnostics.shand run it
devel-su ./power-diagnostics.sh > /home/nemo/power-state-report.txtAttach resulting /home/nemo/power-state-report.txt file and journal to
your bug report.Backup Diagnostics
On the target device go to the command line. Download there Backup
status reporting
script
and make it executable.curl -o the-vault-storage-report.sh https://git.merproject.org/mer-core/the-vault/blob/master/tools/the-vault-storage-report.sh && chmod a+x the-vault-storage-report.shExecute the command in privileged mode.
devel-su -p ./the-vault-storage-report.sh > /home/nemo/backup-status-report.txtAttach resulting /home/nemo/backup-status-report.txt file to your bug
report.Restart System Services
Restart user session
systemctl restart user@100000Restart networking. Warning! Disconnects your SSH connection.
systemctl restart connman.serviceRestart home screen
systemctl --user restart lipstickRestart keyboard
systemctl --user restart maliit-serverRestart Phone application
systemctl --user restart voicecall-ui-prestartRestart Phone middleware
systemctl restart ofono systemctl-user restart voicecall-managerPackage Handling
Root rights required
devel-suShow SW version
versionUpdate software
version --dupPkcon commands
pkcon refresh # Update repositories pkcon search name [PACKAGE_NAME] pkcon install [PACKAGE_NAME] pkcon get-details [PACKAGE_NAME] pkcon remove [PACKAGE_NAME] pkcon update [PACKAGE_NAME] pkcon install-local [FILE_NAME] pkcon repo-list pkcon repo-enable [REPO_ID] pkcon repo-disable [REPO_ID] pkcon # Lists the full command syntax and options.Zypper commands for SDK (pkcon is preferred on device)
zypper lr # list repositories zypper ref # update repositories zypper update # update packages zypper se packagename # search packages zypper in packagename # install packages zypper info packagename # check package information zypper info -t pattern patternname # check pattern information zypper verify # check dependenciesRPM commands
rpm -e <package> # remove package rpm -ql <package-name> # list files in package rpm -qlP <file> # list files in package rpm -qf <file> # find out what package file belongs to rpm -qpR <rpm-file> # find out package dependencies rpm -qR <package-name> # find out package dependencies rpm -q --whatrequires <package> # find out reverse dependencies rpm -qa | xargs rpm -qR | grep -b5 <package> # query all packages, check whether they depend on package rpm -U --oldpackage --replacepkgs --replacefiles <package> # reinstall rpm packageClear corrupted rpm database (as root):
rm -rf /var/lib/rpm/__db* ; rpm --rebuilddbClearing, Importing and Exporting User Data
Phone
Install commhistory-tool if not already installed.
pkcon install libcommhistory-qt5-toolsClear call logs, run as nemo
commhistory-tool deleteall -callsAdd call logs data, run as nemo
commhistory-tool import-json calllogs.jsonRestart Phone application to see changes in effect.
pkill voicecall-uiMessages
Remove all message conversations, run as nemo
commhistory-tool deleteall -groupsImport message data, run as nemo
commhistory-tool import-json messages.jsonRestart Messages application to see changes in effect.
pkill jolla-messagesPeople
Install vcardconverter if not already installed.
pkcon install nemo-qml-plugin-contacts-qt5-toolsImport contacts from vCard
devel-su -p vcardconverter contacts.vcfExport local contacts to vCard
devel-su -p vcardconverter --export contacts.vcfCalendar
Install icalconverter if not already installed
pkcon install nemo-qml-plugin-calendar-qt5-toolsImport events from iCal
devel-su -p icalconverter import calendar.icsImport events using Calendar import page
dbus-send --print-reply --type=method_call --dest=com.jolla.calendar.ui /com/jolla/calendar/ui com.jolla.calendar.ui.importFile string:/home/nemo/calendar.icsExport local calendar events to iCal
devel-su -p icalconverter export calendar.icsBrowser
Set the home page.
dconf write /apps/sailfish-browser/settings/home_page "'http://jolla.com'"Media
Transfer content to the device
scp *.jpg nemo@device:Pictures scp *.mp4 nemo@device:Videos scp *.pdf nemo@device:Documents scp *.ogg nemo@device:MusicHomescreen
Reset order of apps in Homescreen launcher.
rm /home/nemo/.config/lipstick/applications.menuWeather
Remove weather locations
rm /home/nemo/.local/share/sailfish-weather/weather.jsonBlocking Device Suspend
Install mcetool
zypper in mce-toolsDisable late suspend
mcetool -searlyDisable early suspend
mcetool -sdisabledRestore normal suspend policy
mcetool -senabledScreen Brightness
Install mcetool
zypper in mce-toolsSet brightness setting to maximum value
mcetool -b5Disable screen dimming when home screen or applications are open
mcetool -DonDisable screen dimming when the lock screen is open
mcetool -tdisabledGo back to normal behavior
mcetool -Doff -tenabledFor problem with unusually dark display, try disabling als-based display
brightness filteringmcetool -gdisabledReset all mce values to their defaults
systemctl stop mce.service rm /var/lib/mce/builtin-gconf.values systemctl start mce.serviceShow Dialogs
Alarm Dialog
Show timer alarm in 3 seconds (ticker=3).
timedclient-qt5 -b'TITLE=button0' -e'APPLICATION=nemoalarms;TITLE=Timer;type=countdown;timeOfDay=1;triggerTime=1395217218;ticker=3'Show clock alarm in 3 seconds (ticker=3).
timedclient-qt5 -b'TITLE=button0' -e'APPLICATION=nemoalarms;TITLE=Clock;type=event;timeOfDay=772;ticker=3'Connection Dialog
dbus-send --print-reply --type=method_call --dest=com.jolla.lipstick.ConnectionSelector / com.jolla.lipstick.ConnectionSelectorIf.openConnection string:USB Dialog
Connect cable. Make sure "Settings -> USB -> Default USB mode" is set
to "Always ask".Unresponsive App Dialog
Make app unresponsive by stopping it's execution.
kill -SIGSTOP `pgrep appname` # e.g. jolla-messagesContinue execution by calling
kill -SIGCONT `pgrep appname` # e.g. jolla-messagesSide Loading Dialog
xdg-open package.rpmCall Request Dialog
xdg-open "tel://0123456789"Supplementary Service Dialog
Type USSD
code
with Phone dialer, for example "*#31#" shows the status of caller
line restriction.Audio Warning Dialog
Change headset audio warning timeout by adding following lines to
/etc/pulse/mainvolume-listening-time-notifier.conf."timeout = 1 sink-list = sink.primary mode-list = lineout" systemctl --user restart pulseaudio.serviceNow play a song over 1 minute with normal headset in Media Player to see
a warning dialog.Reset too-loud volume warning.
/usr/bin/dconf write /desktop/nemo/audiowarning trueNow play a song over headset and turn the volume to maximum to see a
warning dialog.The Other Half Installation Dialog
Sign in to Jolla store. Attach new TOH back cover.
-
这是9天之前的……?为啥我没注意到……
-
话说我一直没搞明白的一点是这个packagekit比zypper好在哪里呢
-
@天苯 通用吧,zypper貌似只是suse系列的(貌似也可以装在红帽系列上[doge])
-
This post is deleted! -
@birdzhang 红帽系列是dnf和yum罢……
主要是看这上面说device上推荐用packagekit,SDK上推荐用zypper,packagekit看起来好像可以当各种包管理的前端,就是不了解为啥两种情况推荐的不一样…… -
@天苯 现在搞得兼容性都不错,好像都可以装。pkcon封装了这些基本的包管理接口,做成一个统一的了
-
@birdzhang 先祝鸟张大大新婚快乐。今天一哥们刷到F5121上了,用pkcon install-local装jolla-xt9中文输入法包报架构错误,我让他用zypper in就装上了。这是packagekit的BUG?
-
祝鸟张大大新婚快乐。我是那个刷到F5121的哥们
-
@天苯
pkcon有时候会出现一些莫名其妙的bug,比如提示找不到软件包、缺少依赖等,这俩是我遇到过的。看样子也是bug,突然想起nexus5上用pkcon装jolla-xt9现在也是装不上了 -
@饭盒 666,结婚这几天一直忙着没时间上论坛看看

-
@birdzhang 看来这个前端不靠谱,还是用zypper好了
-
祝鸟张新婚快乐!
-
@jollanfc 谢谢谢谢. 起这么早!

-
找到宝贝l,留名备用