Allow the www-data user to run to run adb and abd with no password:
sudo visudo
Add to the contents of the sudoers file:
User_Alias WWW_USER = www-data Cmnd_Alias WWW_COMMANDS = /sbin/adb, /sbin/abd WWW_USER ALL = (ALL) NOPASSWD: WWW_COMMANDS
Save.
manpreet Best Answer 2 years ago
I am trying to run adb from PHP using:
but I get 126 error.
I think the problem is that php is running as 'www-data' user and does not have permissions to execute adb.
Any solutions?