I'm using Ubuntu 12.10 and I have installed Android SDK, set it's path in my user
.bashrc and it works.
The problem is that my phone requires adb to be ran by root for permissions, but running adb with sudo I get the following error:
sudo: adb: command not found
I tried to simply use
sudo -E adb start-server, but it doesn't work. Tried to add the export path line to
/root/.bashrc and (after realizing it didn't help) to
I remember I could set it on my Arch Linux, but I guess my problem now is connected to Ubuntu root account not behaving like I expect it.
What I don't understand is the following:
These don't work:
martin@alyx:~$ sudo adb devices sudo: adb: command not found
This does (typing the full path):
martin@alyx:~$ sudo /opt/android-sdk-linux/platform-tools/adb devices * daemon not running. starting it now on port 5037 * * daemon started successfully * List of devices attached CM7-Blade device
This doesn't work (using -E with sudo):
martin@alyx:~$ sudo -E adb devices sudo: adb: command not found
This works (as root):
martin@alyx:~$ sudo su root@alyx:/home/martin# adb devices List of devices attached CM7-Blade device
I'm totally confused now and I'd appreciate some clarifying on how to set a path for sudo or how else I could solve my problem.
(And please, don't say adb shouldn't be ran as root.)
Thanks in advance!
Edit: By requiring root permissions I mean that I need them because otherwise I get:
$ adb devices List of devices attached ???????????? no permissions
which doesn't occur as superuser. Sorry if it was misunderstanding.