Android phone linux usb

How to connect Android 7.1 to Ubuntu Linux with USB?

I’m trying to connect a Google Pixel phone, with android 7.1, to a Ubuntu 16.04 laptop with a USB cable using mtp-tools. But the mtp doesn’t see the phone file system and gives the error message «Get Storage information failed».

Then trying the mtp tools .

In case it’s useful .

Many thanks for any advice!

5 Answers 5

Here’s what I found works:

First, ignore all the web comments you’ve seen about /etc/udev/rules.d/51-android.rules. That file isn’t needed.

Second, skip mtp-tools. They aren’t documented, and jmtpfs is far easier anyway.

Install the jmtpfs package: sudo apt-get install jmtpfs

You should see a menu titled «Use USB to. «, select «Transfer files».

On the linux computer issue:

sudo jmtpfs /media/myphone

fusermount -u /media/myphone

This works for me on a Motorola Moto Z Force Droid running Android 7.1.1:

On the phone go to Settings > Developer Options (turn on if not already turned on) > scroll down to Select USB Configuration > select Picture Transfer Protocol > then re-select Media Transfer Protocol. The phone’s internal memory and SD card memory (if any) then mount.

I did not have to install any software on the Ubuntu 16.04.3 computer that I use.

Sullivan’s answer worked for me, but only after I replaced the cable I was using. With the previous cable (2 meters long), connection was extremely slow or disconnected frequently.

Also I did the following, in addition to Sullivan’s answer:

  • Went into developers options in my Android 7.0 (Moto G5 Plus) and enabled USB debugging. Without that no connection was ever possible!

I have a Moto Z2 Force running Android 8.0.0 and am connecting to a PC running 64bit Ubuntu 16,04 LTS

I didn’t see «Developer Options» on my phone, but by selecting Settings>Connected devices>USB>Transfer files, it allows GUI file-copy from my phone. NOTE: You need to have your USB connected, or the USB options are ghosted. This does not let you load files on the phone, just copy from it. but, it’s supper easy.

I tried everything after getting into developer mode on my Google Pixel 3 Android v.10. Phone would not mount. Then: Settings, connected devices, USB (tap) then select File transfer/Android Auto. File manager automatically opened with popup «actions for this device». It opened in file manager.

Not the answer you’re looking for? Browse other questions tagged 16.04 usb android mtp or ask your own question.

Linked

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.10.8.40416

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Читайте также:  Не могу удалить значок с панели задач windows 10

Источник

How do I transfer files between Android and Linux over USB?

I want to copy some movie files from Linux to my HTC One SV Android phone (not rooted).

In Windows, my phone mount its internal and SD-card volumes automatically when I plug it in, allowing me to transfer files.

In Linux Mint 13 Mate, I always get an error when I plug my phone in with a USB cable, then it may take some minutes to mount, and it sometimes fails. I think the error was—

Error initializing camera: -60: Could not lock the device

How can I make this work?

18 Answers 18

UPDATE: There are several, better alternatives to Airdroid now. However, it seems most Linux distros are now working with MTP fairly well. I know in my experience, Mint (Ubuntu based) works out of the box, as does Manjaro (Arch based). If it doesn’t work out of the box or natively, then be sure to search your package manager for an MTP solution.

Newer versions of Android mount storage as an MTP device instead of mass storage. The benefit to this is simultaneous access on the Android device and the PC. Unfortunately, while Windows supports it natively just fine, linux solutions are fairly buggy as of right now.

Currently, the most reliable (and it still is a little flaky to get going, but once connected is fine) that I have found is go-mtpfs. Here is a link to help you get it set up. You have to mount/dismount from command line. There is also a unity launcher in that thread if you’re on Ubuntu unity, however.

The best option, though, unless you are transferring a lot of data, is to use something like AirDroid. It is a free app in the play store for local network transfers, and provides a web interface to use with your computer’s browser. It even provides a drag and drop file interface, as well as even allowing access for sms messaging, call logs, app installs, and many other things.

Источник

Esau Silva

ASP.NET, JavaScript, React and more

Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu)

If you are like me and like developing in Linux, then you will find this guide useful. When I was setting up everything for my Android development, I ran into the problem that Linux was not recognizing my Android phone, and took me some time figuring out how to make Linux recognize my phone. Finally, after some research I was able to put this little guide together and decided to share it with the rest of the world.

ADB (Android Debug Bridge) is a handy tool that comes with Android SDK that allows you to control and interface with your Android device.

Update: 06/23/17 – Updated steps in How To
Update : 07/29/13 – In step 4, Android 4.2.x and up has Developer Options hidden. Added steps to make it visible
Update : 05/27/13 – Updated platform-tools (ADB) to latest version (Revision 17)
Update : 02/04/11 – HTC changed its Vendor ID, older phones have different ID than newer phones. Refer to USB Vendor IDs table at the bottom of this tutorial to see the change.
Update : 01/02/11 – By mistake I had linked the ADB tool for OSX in step 3.1. Now it should be the correct one for Linux.
IMPORTANT Update 12/11/10 – There has been a change to the new Android SDK. ADB Tool has been moved to /android-sdk-linux_x86/plataform-tools, so if you have the old SDK, please download the new one and update your path (Step 9.2 of this tutorial). If this is your first time doing this, then disregard the update and continue with the tutorial.
Update : 09/21/10 – Working code with Ubuntu Lucid Lynx and added more USB vendor IDs.

  1. Download the latest Android SDK from Google: Android SDK
  2. Extract the TGZ file to your home/YOUR-USERNAME directory
  3. To get ADB, you need to install the SDK: Installing the SDK
    • If you are not a developer and not planning to develop, then just download the following zip file containing only the ADB tool and proceed with the tutorial: ADB
  4. Download the SDK Platform Tools for Linux and extract the zip file.
  5. On your phone, click Settings > Developer Options and make sure Android Debugging is on.
    • In Android 4.2.x and up Developer Options is hidden, to make it visible, do the following
    • Tap seven times in Build Number : Settings > About Phone > Build Number
    • You will get a message saying you have enabled Developer Options or something like that, go back to Settings and you will see Developer Options in there.
  6. Login as root and create this file: /etc/udev/rules.d/##-android.rules
    NOTE: In the above file replace ## with the number 50 if you are running Gusty/Hardy/Dapper (50-android.rules) or with the number 70 if you are running Karmic Koala/Lucid Lynx/Maverick Meerkat(70-android.rules)
    • Or simply type in terminal sudo gedit /etc/udev/rules.d/##-android.rules then enter your password
  7. The file should read:
    • For Gusty/Hardy : SUBSYSTEM==”usb”, SYSFS==”0bb4″, MODE=”0666″
    • For Dapper : SUBSYSTEM==”usb_device”, SYSFS==”0bb4″, MODE=”0666″
    • For Karmic Koala : SUBSYSTEM==”usb”, SYSFS==”0bb4″, MODE=”0666″
    • For Lucid Lynx : SUBSYSTEM==”usb”, SYSFS==”0bb4″, MODE=”0666″
    • For Maverick Meerkat : SUBSYSTEM==”usb”, ATTR==”0bb4″, MODE=”0666″

NOTE: In the above lines the code ”0bb4″ refers to a HTC device. If your phone is from a different manufacturer, replace the code with the appropriate from the table below.
NOTE: If you copy one of the lines mentioned above, make sure you replace the quotation marks with the ones in your keyboard, as these have different display code and it might give you a “no permissions” error.

  • Execute: sudo chmod a+rx /etc/udev/rules.d/70-android.rules
  • Reboot
  • To run ADB you need to add an environment variable to your bashrc file:
    • Open a terminal window and type: sudo gedit .bashrc
    • Add the following line at the end: export PATH=$:/home/YOUR-USERNAME/android-sdk-linux_x86/platform-tools
    • Save and close
  • You should be ready to go, type adb devices in a terminal window with your phone plugged in.
    If you see a serial number pop up that means you are done. Should look something like this:
  • If for some reasons when running adb devices gives you a “no permissions” error, try typing the following in terminal

    • db kill-server
    • adb start-server

    USB Vendor IDs

    Manufacturer USB Vendor ID
    Acer 0502
    Dell 413c
    Foxconn 0489
    Garmin-Asus 091E
    HTC (Older Phones) 0bb4
    HTC (Newer phones) 18d1
    Huawei 12d1
    Kyocera 0482
    LG 1004
    Motorola 22b8
    Nexus One/S 18d1
    Nvidia 0955
    Pantech 10A9
    Samsung 04e8
    Sharp 04dd
    Sony Ericsson 0fce
    ZTE 19D2

    Common ADB Commands

    – Lists which devices are currently attached to your computer

    – Drops you into a basic linux command shell on your phone with no parameters, or lets you run commands directly

    – Lets you install an Android application on your phone

    – Remounts your system in write mode – this lets you alter system files on your phone using ADB

    – Rets you upload files to your phones filesystem

    – Lets you download files off your phones filesystem

    – Starts dumping debugging information from your handset to the console – useful for debugging your apps

    If you liked this tutorial, please retweet and/or share 🙂

    Consider giving back by getting me a coffee (or a couple) by clicking the following button:

    Источник

    Как подключить телефоны Android или iPhone к Linux

    В Windows или MacOS легко подключить наш мобильный телефон к компьютеру даже между двумя системами, но если у нас есть компьютер с Linux, нам придется подготовиться к выполнению ряда шагов, которые позволят нам делать все, что мы хотим, с нашими мобильный. Неважно, есть ли у нас мобильный телефон с Android или iPhone, в обоих случаях мы покажем вам, как вы можете подключить мобильный телефон с Linux.

    С целью сделать процесс как можно более простым, мы будем шаг за шагом обучать вас тому, что мы должны делать, что позволило нам передавать файлы между устройствами или выполнять нужные нам задачи, независимо от уровня наших знаний. , Первое, что мы должны сделать, это набраться терпения, потому что Linux имеет разные распределения так как это свободное программное обеспечение, которое может усложнить решение.

    Как подключить телефоны Android к Linux

    Мы начнем с самой популярной операционной системы, в которой нам понадобится приложение, которое облегчает процесс и добавляет в него множество возможностей. Хотя сначала мы должны подготовить наш компьютер к использованию KDE Connect , программное обеспечение, которое предлагает нам много возможностей.

    • Чтобы установить KDE Connect в Linux, нам нужно открыть терминал и написать следующий код: sudo apt-get установить kde-connect
    • Как только он установлен, мы открываем его и оставляем открытым, когда подключаем наш мобильный.
    • Теперь на нашем мобильном Android мы устанавливаем KDE Connect приложение из магазина Play.
    • С помощью USB-кабеля мы подключаем наш мобильный телефон к компьютеру, а на экране KDE Connect нажимаем «запросить связь» и активируем его на мобильном телефоне.

    После установления соединения между двумя устройствами нам остается только выбрать на своем мобильном телефоне, какие файлы мы хотим отправить, и мы можем выбирать между фотографиями, видео или документами. С самого компьютера мы также сможем получить прямой доступ к файлам с помощью Инструмент SFTP через дофин.

    Подключите свой iPhone с Linux

    Процесс подключения наших iPhone с Linux требуется больше кода, хотя позже результат будет проще и удобнее, мы объясняем, что нужно делать:

    • Мы начнем с подключения нашего iPhone по кабелю к нашему компьютеру.
    • Открываем код терминала и пишем следующую строку: пара идейных пар
    • Вполне вероятно, что это не удалось, тогда мы пишем: usbmuxd -f -v
    • После этого он будет отображаться как успешно подключенный, и мы должны открыть новую консоль кода.
    • В новой консоли мы пишем следующие команды, изменяя часть, выделенную жирным шрифтом:

    sudo mkdir / медиа / iPhone
    Судо Чоун пользователь : группа по Linux / СМИ / iPhone
    ifuse / media / iPhone /

    • Чтобы закончить, мы открываем файловый браузер Dolphin и обнаруживаем, что наш iPhone готов к его использованию.

    Рекомендуется добавить ярлык местоположения, чтобы упростить процесс при следующем подключении iPhone к Linux. В случае, если прямого доступа недостаточно, мы рекомендуем вам отключить другие устройства и попробовать еще раз или повторить шаги.

    Источник

    Читайте также:  Ошибка дескриптора usb устройства windows 10 принтер
    Оцените статью