Ubuntu connects to phone via ADB

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.