Answer the question
In order to leave comments, you need to log in
How to run adb commands from udev rule?
Good afternoon!
I wrote a rule for udev which, when a smartphone is connected, launches a script - then in the script you need to execute adb commands to automatically work with the smartphone (connect and install the application).
But as soon as I write any adb command, this script stops working.
I call the script like this:
RUN+="/bin/bash etc/udev/usb_on.sh %E{ID_SERIAL_SHORT} %E{ID_VENDOR} %E{ID_MODEL}"
Answer the question
In order to leave comments, you need to log in
as an option, fork in the udev command itself or write a service and kick it from udev
udev can just kill a task that takes more than a certain amount of time
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question