??????在Ubuntu中没有Android开发权限

时间:2013-01-02 12:17:26

标签: android ubuntu

我用这个答案来解决这个问题 - set up device for development (?????? no permissions),这对我有帮助。但是存在以下问题 - 重新启动系统后,我必须执行以下命令:

sudo service udev restart
sudo killall adb
sudo ~/android-sdk-linux/platform-tools/adb start-server

一切都很好。但我该如何解决呢?重启系统后,我不想每次都执行它。

1 个答案:

答案 0 :(得分:0)

首先打开终端并输入gksudo gedit /etc/rc.local并修改文件,如下所示

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

PASSWORD='yourPasswordHere'

echo $PASSWORD | sudo -S service udev restart
echo $PASSWORD | sudo -S killall adb
echo $PASSWORD | sudo -S ~/android-sdk-linux/platform-tools/adb start-server

exit 0

现在,请在重新启动系统后尝试adb devices。确保使用您的登录密码替换yourPasswordHere。我没有测试过。希望这会有所帮助。