nokia 5800 udev rules to automount
October 24, 2010 Leave a comment
create a file in this location
kdesudo kate /etc/udev/rules.d/80-nokiaphone.rules
add this … save and exit
ACTION=="add", SUBSYSTEMS=="usb",ATTRS{idVendor}== "0421", ATTRS{idProduct}=="0156", NAME="%k", SYMLINK+="Nokia 5800 Linux Rulez", OWNER="peace", GROUP="disk", MODE="0777", RUN+="/bin/mkdir /mnt/Nokia_5800"
ACTION=="add", SUBSYSTEMS=="usb",ATTRS{idVendor}== "0421", ATTRS{idProduct}=="0156",SYMLINK+="Nokia 5800 Linux Rulez", RUN+="/bin/mount -t vfat -o umask=000,utf8,sync,flush, /dev/%k /mnt/Nokia_5800"
ACTION=="remove", SUBSYSTEMS=="usb",ATTRS{idVendor}== "0421", ATTRS{idProduct}=="0156", RUN+="/bin/umount /mnt/Nokia_5800"
ACTION=="remove", SUBSYSTEMS=="usb",ATTRS{idVendor}== "0421", ATTRS{idProduct}=="0156", RUN+="/bin/rmdir /mnt/Nokia_5800"
Now you can restart udev rules with
sudo udevadm control --reload-rules
Plug in your nokia 5800 et voilà your phone is already mounted on /mnt/Nokia_5800
note if you have another usb nokia stuff just do
lsusb | grep -i Nokia
and you should get something like that
Bus 001 Device 040: ID 0421:0156 Nokia Mobile Phones
- 0421 is the idVendor
- 0156 is the idProduct

