Reference
ubuntu14.04 Android Studio to connect the phone
$sudo lsusb
Get ID for
003 025: ID 12d2:107b Huawei Technologies Co., Ltd.
Create a phone driver profile
$sudo vim/etc/udev/rules.d/wuyi-android.rules$sudo vim/etc/udev/rules.d/70 -android.rules
The contents of the two files are
subsystem=="usb", attrs{idvendor}=="12d2", attrs{ idproduct}=="107b", mode="0666"
Where idvendor,idproduct fill in the corresponding ID
To change permissions:
$sudochmod a+rx/etc/udev/rules.d/Wuyi-android.rules$sudochmod a+rx/etc/udev/rules.d/-android.rules
Restarting the USB device
$sudo /etc/init.d/udev restart
Or
$sudo service udev restart
Restart ADB server
kill-server$ adb start-server
Phone settings-about phone, multiple tap the version number,
To turn on the phone developer mode,
Developer options, turn on USB debugging, phone popup confirmation box, confirm USB debugging on this computer
Open Terminal
$ADB Services
You can see the connected phone
[XW ~]$ adb deviceslist of devices attached d8ydu16a22000831 device
Then you can use the ADB command to manipulate the phone.
$ADB-S d8ydu16a22000831push/home/xw/haha/sdcard/-S d8ydu16a22000831 pull/sdcard/download/haha/home/xw/
END
Ubuntu connects to phone via ADB