Take the 2-minute tour ×  Trying to run a script when my phone
is plugged in via USB, a made a udev rule looks like this in
/etc/udev/rules.d/85-lazydroid.rule  ATTRS{idVendor}=="22b8",
ATTRS{idProduct}=="428c", RUN+="/home/joel/.lazydroid"  And the
script .lazydroid looks like this:  exec adb forward tcp:8080
tcp:8080 & exec chromium-browser --new-window &  The script
itself runs fine. The trick is I can't get the script to run up
on insertion of the phone.  And it's the right ID according to:
lsusb | grep Motorola  Bus 002 Device 042: ID 22b8:428c Motorola
PCS  Any ideas?  [EDIT] Ok, know i know the udev rule is
running, creates the symlink, made som changes to the rule, see
below:  SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8",
ATTRS{idProduct}=="428c", SYMLINK+="phone", RUN+="/bin/sh
/home/joel/.lazydroid.sh"  But still the script wont run. And
still if I run i separately it runs perfect.  share|improve this
question add comment  3 Answers  up vote 2 down vote accepted
You can test if your rule will be hit o