The method is simple. Note that not all models are available.
Let's talk about installing eclipse and ADT.
Built-in eclipse can meet the general use of javase, but do not know why, fedora17 installed ADT-20 problems.
Therefore, you need to go to the eclipse official website and install ADT on your own.
Which cannot be debugged directly:
[Luozhuang @ luozhuangvm tools] $ sudo./ddms
Error loading ddms preferences
(Ddms: 3585): GTK-warning **: gtk_widget_size_allocate (): attempt to allocate widget with width-5 and height 17
(Ddms: 3585): GTK-warning **: gtk_widget_size_allocate (): attempt to allocate widget with width-5 and height 17
09:30:20 E/ddms: insufficient permissions for Device
Com. Android. ddmlib. adbcommandrejectedexception: insufficient permissions for Device
At com. Android. ddmlib. adbhelper. setdevice (adbhelper. Java: 752)
At com.android.ddmlib.adbhelper.exe cuteremotecommand (adbhelper. Java: 373)
At com.android.ddmlib.device.exe cuteshellcommand (device. Java: 453)
At com. Android. ddmuilib. sysinfopanel. loadfromdevice (sysinfopanel. Java: 159)
At com. Android. ddmuilib. sysinfopanel. deviceselected (sysinfopanel. Java: 126)
At com. Android. ddmuilib. selectiondependentpanel. deviceselected (selectiondependentpanel. Java: 52)
At com. Android. ddms. uithread. selectionchanged (uithread. Java: 1756)
At com. Android. ddmuilib. devicepanel. policylisteners (devicepanel. Java: 772)
At com. Android. ddmuilib. devicepanel. policylisteners (devicepanel. Java: 760)
At com. Android. ddmuilib. devicepanel. Access $1100 (devicepanel. Java: 56)
At com. Android. ddmuilib. devicepanel $1. widgetselected (devicepanel. Java: 368)
At org. Eclipse. SWT. Widgets. typedlistener. handleevent (unknown source)
At org. Eclipse. SWT. Widgets. eventtable. sendevent (unknown source)
At org. Eclipse. SWT. Widgets. widget. sendevent (unknown source)
At org. Eclipse. SWT. Widgets. display. rundeferredevents (unknown source)
At org. Eclipse. SWT. Widgets. display. readanddispatch (unknown source)
At com. Android. ddms. uithread. runui (uithread. Java: 535)
At com. Android. ddms. Main. Main (main. Java: 117)
Many people say that because Linux does not have the root permission, we can see from the above results that sudo does not work.
Debugging on a real machine is simple: edit a configuration file, Set permissions, and restart the service:
[luozhuang@luozhuangVM tools]$ sudo gedit /etc/udev/rules.d/70-android.rules[luozhuang@luozhuangVM tools]$ sudo chmod 777 /etc/udev/rules.d/70-android.rules[luozhuang@luozhuangVM tools]$ sudo service udev restartRedirecting to /bin/systemctl restart udev.service
The content of the 70-android.rules file is as follows:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0666"
At last, you need to re-insert your device and run ddms to see the device.