Skip to content

Instantly share code, notes, and snippets.

syncevolution --print-databases backend=caldav username=<username> password=<pwd> syncURL=https://<url>
@lduboeuf
lduboeuf / contact-sync
Last active May 17, 2024 09:42
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 / 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"
#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
#debug glogs:
systemctl --user set-environment G_MESSAGES_DEBUG=all
@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
@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
@lduboeuf
lduboeuf / account-migration.py
Created November 25, 2022 21:27
account migrqtion history db
#!/usr/bin/python3
import os
import re
import sqlite3
import shutil
def migrate(con, fromAccount, toAccount):
print(f'Start to migrate {fromAccount} to {toAccount}')