nokia 5800 udev rules to automount

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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: