Скрипт для безопасного освобождения места на rootfs:
#!/bin/sh
# N900 script to safely free space on rootfs
# (c) 2010 by Thomas Tanner <thomas@tannerlab.com>
# licensed under GPLv3
# version 0.3 (25. March 2010)
if test "`id -u`" -ne 0; then
echo "Error: This script must be run as root!"
echo "Please make sure that the package rootsh from extras is installed"
echo "and execute \"sudo sh $0\" in Terminal"
exit 1
fi
# move root stuff to /home
dirs="usr/share/icons usr/share/nokia-maps usr/share/fonts usr/share/locale usr/lib/locale var/lib/apt"
#optional: usr/share/themes var/lib/dpkg
if test -d /home/var/cache/apt; then
# keep existing apt cache
rm -rf /var/cache/apt
ln -s /home/var/cache/apt /var/cache/apt
else
dirs="$dirs var/cache/apt"
fi
(cd / && du -sc $dirs)
for d in $dirs; do
test -L /$d && continue
echo moving /$d
rm -rf /home/$d
mkdir -p /home/$d
cp -a /$d /home/$d/..
rm -rf /$d
ln -s /home/$d /$d
done
echo "success"
Включение профиля без звука:
#!/bin/sh
# включает профиль без звука
dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"silent"
# выдаёт сообщение Profile is set to Silent, текст можно менять
dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Profile is set to Silent"
Включение общего профиля:
#!/bin/sh
# включает общий профиль
dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"general"
# выдаёт сообщение Profile is set to General, текст можно менять
dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Profile is set to General"
Переключения телефона в режим 3G:
#!/bin/sh
dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:2
dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Network mode is set to 3G"
Переключения телефона в режим 2G:
#!/bin/sh
dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1
dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Network mode is set to 2G"
Переключения телефона в режим 2G/3G(dual mode):
#!/bin/sh
dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:0
dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Network mode is set to Dual"
Отключение интернет соединения:
#!/bin/sh
dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true
dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Internet connection is disconnected"
Отключение сети оператора связи:
#!/bin/sh
dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:false
dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Mobile network is disconnected"
Подключение к сети оператора связи:
#!/bin/sh
dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:true
dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Mobile network is connected"
Сброс счетчика передачи данных по GPRS:
#!/bin/sh
gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_rx_bytes
gconftool-2 -u /system/osso/connectivity/network_type/GPRS/gprs_tx_bytes
gconftool-2 -s /system/osso/connectivity/network_type/GPRS/gprs_reset_time --type=string $(date +%s)
Заблокировать телефон(включить блокировку экрана):
#!/bin/sh
dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_open string:"com.nokia.mce" string:"/com/nokia/mce/request" string:"com.nokia.mce.request" string:"devlock_callback" uint32:'3'
Разблокировать телефон(выключить блокировку экрана):
#!/bin/sh
dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_close string:"com.nokia.mce" string:"/com/nokia/mce/request" string:"com.nokia.mce.request" string:"devlock_callback" uint32:'0'
Перезагрузить телефон:
Включить телефон в режим 2G и включенным Wi-Fi:
#!/bin/sh
#
# auto2g by J.LeFebvre
#
# Automatically sets 2G cellular mode when a valid WiFi connection is running
# This helps conserve battery life
#
# If an automatic connection to 3G is required when not on WiFi then uncomment the two dbus commands under "set to 3G" line
#
if `/sbin/ifconfig wlan0 2>/dev/null | grep -q RUNNING`; then
if `dbus-send --system --print-reply --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_selected_radio_access_technology | grep -q 'byte 2'`; then
if (/bin/ping -c 1 www.google.com > /dev/null); then
# set to 2G
dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1
dbus-send --system --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:'2G (GSM) cellular mode set'
fi
fi;
else
if `dbus-send --system --print-reply --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_selected_radio_access_technology | grep -q 'byte 1'`; then
# set to 3G
# dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:2
# dbus-send --system --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:'3G cellular mode set'
echo > /dev/null
fi
fi
Позвонить на номер:
dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"$1" uint32:0
Измените $1 на любой номер, по вашему желанию, или если эта команда будет выполняться как shell скрипт, то вы можете просто запустить скрипт и ввести номер как опцию, например dbus-send-call 7921XXXXXXX
Открыть приложение телефон:
dbus-send --type=method_call --dest=com.nokia.HildonDesktop.AppMgr /com/nokia/HildonDesktop/AppMgr com.nokia.HildonDesktop.AppMgr.LaunchApplication string:"rtcom-call-ui"
Завершить телефонный звонок:
dbus-send --system --dest=com.nokia.csd.Call --print-reply /com/nokia/csd/call com.nokia.csd.Call.Release
если, если в момент выполнения команды вы ни с кем не разговариваете, то ничего не произойдёт
Отправить/получить почту:
dbus-send --type=method_call --dest=com.nokia.modest /com/nokia/modest com.nokia.modest.SendReceive
Узнать свой IMEI:
dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.SIM /com/nokia/phone/SIM/security Phone.Sim.Security.get_imei
Открыть ссылку в браузере:
dbus-send --system --type=method_call --dest=com.nokia.osso_browser /com/nokia/osso_browser/request com.nokia.osso_browser.load_url string:"google.com"
Изменить сообщение о статусе:
dbus-send --type=method_call --print-reply --dest=org.freedesktop.Telepathy.MissionControl /org/freedesktop/Telepathy/MissionControl org.freedesktop.Telepathy.MissionControl.SetPresence uint32:2 string:"I'm here"
Открыть файл в медиаплеере:
dbus-send --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:"file:///$1"
имя файла ввести как опцию или заменить $1
Приостановить проигровании в медиаплеере:
dbus-send --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.pause
Вывести уведомление:
dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Text of Notification"
Have trouble with Windows - reboot, have trouble with LINUX - be root!