Skip to content

Instantly share code, notes, and snippets.

@lduboeuf
lduboeuf / contact-sync
Last active April 18, 2024 13:24
Contact sync
syncevolution:
syncevolution --print-databases
syncevolution --remove-database backend=evolution-calendar database=f2636fba81f637f5591563e57913ca38cdd306d3
Buteo debug:
systemctl --user set-environment QT_LOGGING_RULES="buteo.*.debug=true"
systemctl --user restart msyncd.service
Account service:
sudo systemctl restart accounts-daemon.service
db: /home/phablet/.config/libaccounts-glib/accounts.db
@lduboeuf
lduboeuf / gist:6c4b1177d0984297ed6818c2521f78b8
Last active February 6, 2024 10:18
Test UT push notif
monitor Notifs:
dbus-monitor interface=org.freedesktop.Notifications
gdbus call --session --dest com.ubuntu.Postal --object-path /com/ubuntu/Postal/dekko2_2edekkoproject --method com.ubuntu.Postal.Post dekko2.dekkoproject_dekko \
'"{\"message\": \"foobar\", \"notification\":{\"card\": {\"summary\": \"yes\", \"body\": \"hello\", \"popup\": true, \"persist\": true}}}"'
Avec son:
gdbus call --session --dest com.ubuntu.Postal --object-path /com/ubuntu/Postal/dekko2_2edekkoproject --method com.ubuntu.Postal.Post dekko2.dekkoproject_dekko \
'"{\"message\": \"foobar\", \"notification\":{\"sound\": \"test.ogg\",\"card\": {\"summary\": \"yes\", \"body\": \"hello\", \"popup\": true, \"persist\": true}}}"'
#logs
journalctl --user -f -u lomiri-app-launch--application-click--terminal.ubports_terminal_2.0.1--.service
sudo journalctl --boot --identifier=NetworkManager
# mount rw
sudo mount -o remount,rw /
# restart lomiri
systemctl --user restart lomiri-full-greeter.service
@lduboeuf
lduboeuf / lte-battery-saver.py
Created September 26, 2023 13:16
LTE to GSM switcher
import os
import dbus
from gi.repository import GLib
from dbus.mainloop.glib import DBusGMainLoop
best_connectivity="lte"
lowest_connectivity="gsm"
sim_slot="/ril_0"
@lduboeuf
lduboeuf / get previous image
Last active April 17, 2023 09:34
UT install previous image
git clone https://git.launchpad.net/ubuntu/+source/goget-ubuntu-touch
build with crossbuilder
List of images ( channel is the path in system-image see https://system-image.ubports.com) :
goget-ubuntu-touch/obj-x86_64-linux-gnu/bin$ ./ubuntu-device-flash query --server=https://system-image.ubports.com --device=krillin --channel=ubports-touch/16.04/stable --list-images
Install:
goget-ubuntu-touch/obj-x86_64-linux-gnu/bin$ ./ubuntu-device-flash touch --server=https://system-image.ubports.com --device=krillin --revision 23 --channel=ubports-touch/16.04/stable
sudo click unregister --all-users calendar.ubports
sudo rm -rf /usr/share/click/preinstalled/calendar.ubports/
find . -name '*calendar*' -exec rm -rf {} +
sudo click install --allow-unauthenticated --all-users ./calendar.ubports_1.0.0_all.click
install `ofono-phonesim`
uncomment in `/etc/ofono/phonesim.conf`:
[phonesim]
Address=127.0.0.1
Port=12345
-->restart phone
#launch phonesim app: ( you should see a black background with activity indicator )
[Xenial]
@lduboeuf
lduboeuf / nuntium test
Created February 28, 2023 14:24
nuntium test
crossbuilder --lxd-image="ubuntu:20.04" --architecture=amd64 shell
cd /nuntium/obj-x86_64-linux-gnu
export GOPATH=$GOPATH:/home/lionel/nuntium/obj-x86_64-linux-gnu
go test github.com/ubports/nuntium/mms
dbus-update-activation-environment --systemd G_MESSAGES_DEBUG=all
dbus-update-activation-environment --systemd QT_LOGGING_RULES="*=true;qt.*=false;liblomirigestures.*=false;lomiri.components.*=false"
@lduboeuf
lduboeuf / lxc shell
Created December 5, 2022 15:19
bash into Android lxc
sudo env LD_LIBRARY_PATH=/system/lib64:/vendor/lib64 lxc-attach -n android -e -- /system/bin/sh