Skip to content

Instantly share code, notes, and snippets.


Lionel Duboeuf lduboeuf

View GitHub Profile
lduboeuf / lxc shell
Created Dec 5, 2022
bash into Android lxc
View lxc shell
sudo env LD_LIBRARY_PATH=/system/lib64:/vendor/lib64 lxc-attach -n android -e -- /system/bin/sh
lduboeuf /
Created Nov 25, 2022
account migrqtion history db
import os
import re
import sqlite3
import shutil
def migrate(con, fromAccount, toAccount):
print(f'Start to migrate {fromAccount} to {toAccount}')
lduboeuf /
Last active Nov 8, 2022
test bashwget
sqlite3 -header -csv /home/phablet/.local/share/system/privileged/Contacts/qtcontacts-sqlite/contacts.db "SELECT DisplayLabels.displayLabel,Names.firstName, Names.lastName,PhoneNumbers.phoneNumber, EmailAddresses.emailAddress, Contacts.modified FROM Contacts LEFT JOIN DisplayLabels ON DisplayLabels.contactId = Contacts.contactId LEFT JOIN EmailAddresses ON EmailAddresses.contactId = Contacts.contactId LEFT JOIN Names ON Names.contactId = Contacts.contactId LEFT JOIN Nicknames ON Nicknames.contactId = Contacts.contactId LEFT JOIN PhoneNumbers ON PhoneNumbers.contactId = Contacts.contactId WHERE Contacts.collectionId = 1 ORDER BY Contacts.modified DESC;" > $OUT
echo "Exported contacts from sqlite contact backend to $OUT last modified first, as a csv file (comma separated)"
lduboeuf / address-book-app.txt
Created Nov 8, 2022
address-book-app work with local datas
View address-book-app.txt
run address-book-app with the folowing env vars
View test CBS
install `ofono-phonesim`
uncomment in `/etc/ofono/phonesim.conf`:
-->restart phone
#launch phonesim app:
DESKTOP_FILE_HINT=unity8.desktop ofono-phonesim -p 12345 -gui /usr/share/phonesim/default.xml &
lduboeuf / gist:90f0f00a633555acf2f5126a55303546
Last active Jun 2, 2022
Get/Set Account property via dbus
View gist:90f0f00a633555acf2f5126a55303546
dbus-send --system --print-reply --dest=org.freedesktop.Accounts /org/freedesktop/Accounts/User`id -u` org.freedesktop.DBus.Properties.Set string:'com.ubuntu.AccountsService.SecurityPrivacy' string:PinCodePromptManager variant:string:ClockPinPrompt
dbus-send --system --print-reply --dest=org.freedesktop.Accounts /org/freedesktop/Accounts/User`id -u` org.freedesktop.DBus.Properties.Get string:'com.ubuntu.AccountsService.SecurityPrivacy' string:'PinCodePromptManager'
View UT modem logs
#set ril log to on
sudo env LD_LIBRARY_PATH=/system/lib64:/vendor/lib64 lxc-attach -n android -e -- /system/bin/setprop 1
#in P3a (20.04) 1
sudo env LD_LIBRARY_PATH=/vendor/lib64:/system/lib64 /system/bin/logcat -b radio
View QML Profile messaging-app
on device:
sudo apt install qt5-qmltooling-plugins
DESKTOP_FILE_HINT=/usr/share/applications/messaging-app.desktop messaging-app -qmljsdebugger=port:1234
on QtCreator (not from clickable):
Create a remote device, device ip
Create a kit with that device
Analyze-> QML Profiler -> select the "device" kit and set port to 1234
View messaging-app freeze
0x0000007fb32e8c70 in syscall () from /lib/aarch64-linux-gnu/
#1 0x0000007fb35c3244 in QBasicMutex::lockInternal() ()
from /usr/lib/aarch64-linux-gnu/
#2 0x0000007fb35c32bc in QMutex::lock() ()
from /usr/lib/aarch64-linux-gnu/
#3 0x0000007fb37bbe44 in QObject::isSignalConnected(QMetaMethod const&) const
() from /usr/lib/aarch64-linux-gnu/
#4 0x0000007f9babd7c0 in QtContacts::QContactManager::disconnectNotify(QMetaMethod const&) () from /usr/lib/aarch64-linux-gnu/
#5 0x0000007fb37c5124 in QObject::~QObject() ()
from /usr/lib/aarch64-linux-gnu/
View emblem counter via dbus
to get:
dbus-send --session --print-reply \
--dest=com.canonical.Unity.Launcher \
/com/canonical/Unity/Launcher/dialer_2Dapp \
org.freedesktop.DBus.Properties.Get \
string:com.canonical.Unity.Launcher.Item \
to set: