Use ADB (Android Debug Bridge) on your Android over the network

I don't know if it will be out of habit, habit or because mtpfs is not quite "stable" as I would like, but to pass files or interact with my Nexus I generally use ADB.

I create in my Arch a Wifi using create_ap and voila, I have linked my smartphone with my laptop, I can copy files, interact, etc. Valid to clarify that on certain computers making this script work to create a wifi is a bit complicated, an example of this is my father's Dell laptop, which has an Atheros and not Broadcom ... driver that does not come by default in Debian or Arch repos , my answer for him is always the same ... if you want to use the wifi of your laptop without problems, or download the driver and install manually, or if you find it complex, maybe you need an HP laptop (for I have had 2 and I've never had a problem) instead of your Dell.

The point is that once the smartphone and the computer are connected to the same Wi-Fi network, we can interact with the Android device with ADB no need for data cable, all over the same network.

linux-android-600x325

The first is have ADB installed on the Linux computer, in ArchLinux I simply put:

sudo pacman -S android-tools

In Ubuntu it would be:

sudo apt-get install android-tools-adb

In addition, it is necessary have your Android device rooted.

To tell Android that adb will be listening over the network, first we access a terminal of it and put the following:

su setprop service.adb.tcp.port 5555 stop adbd start adbd

What it does is tell the cell's adb daemon to listen for requests on port 5555.

Once Android is configured, we now go to our Linux, we write in a terminal:

adb start-server adb tcpip 5555 adb connect : 5555

Ready, now let's see if the computer recognizes it:

adb devices

And will I always listen to the network on port 5555?

Yes of course, unless for a security measure (and also advisable!) You want to put it as it comes by default, for this we execute the following on the cell phone:

su setprop service.adb.tcp.port -1 stop adbd start adbd

And well this has been everything. It is really useful to avoid having to always walk with the MicroUSB cable, right? 😀

Thanks to Akiel from humanOS for the tip.

android robots


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   robert said

    Lately, even WIFI is being bad for your health,… a wireless network is essential for PCs since they are in constant motion.

    Speaking of other things ... (THERE IS ... ALARM) in the world of Free Software, especially Linux Software, who lately keep discovering VIRUS Bash that could have left the door wide open and intruders and hackers completely take over your computer.
    According to the statement from the company Trend Micro, a global provider of security solutions,… taking advantage of this Bash flaw, it could have already affected more than half a thousand web servers and other devices connected to the Internet.
    Experts in digital security have sounded the alarm after detecting a serious security flaw that affects a very common open source program called 'bash', software used to control the command line in Linux, they recommend to users monitor the patches and updates that appear on the computer (official) and apply immediately. IT administrators using Linux are advised to immediately disable the "bash" command sequences, while to web page operators they recommend applying the patch as soon as possible if the "bash" is encrypted, or rewriting the command sequence away from "bash". FOR MORE INFORMATION… READ THE SOURCE… OF INFORMATION. I hope they DO NOT ERASE this worrying news!
    Until when will Linux Software continue to use the old-fashioned GNU tool where Bash is hosted?,… It is about time that they change this GNU tool for the BSD tool that is the safest in the world.

    Edited by moderator: robet, if you put a link back to that same site (actuality.rt.com) we will consider it as if you were promoting it and doing SPAM. There is no need for each comment you make to add that link.

    1.    French said

      It does not happen orange, it is not necessary to be alarmist, they speak of BASH, as if the shell were the CMD of WInbug's, nothing to see, apply the patches and closed matter.
      Respects

    2.    Staff said

      Robet, if you replicate this (biased) news of "good will" at least try not to add more things on your part, because it shows that it is not a subject that you master.
      - This you mention is a BUG (A mere programming error, one of those that no pound system), not a VIRUS, nor are there viruses currently in windows.
      - It was corrected in a matter of hours, it is a matter of updating.
      - You suggest changing Bash, claiming that it is outdated, but what you offer is an even older tool.

      1.    robert said

        Staff… .Robet, if you replicate this (tendentious) news of “goodwill” at least try not to add more things on your part?, ……. IT IS NOT REPLICATE…., It is to inform the news and prevent with the source of information about what is happening lately in the world of Free Software (Linux), ... taking fragments of their information from the source so that those who are experts in Linux can solve the problems, since many in the world use Linux and it is not possible Being exposed to those intruders, you didn't add anything!

        About the GNU tool where Bash is located, maybe it is a suggestion of possible solutions with the Bash violation.
        GRACE…. TO THE AUTHOR… OF THIS ARTICLE… WHO DOES NOT DELETE THIS COMMENT OF THE NEWS SPLASHING THE FREE SOFTWARE (Linux).

    3.    George said

      Outdated tool? GNU is later than BSD, and vastly newer than UNIX. As it will be the question that those who do not want systemd prefer to migrate even to BSD to respect the "UNIX traditions". Who is the old-fashioned now?

  2.   nobody said

    I don't understand why Android stopped working as USB Mass Storage device. I am not quite getting used to these modernities and I have ended up installing an FTP server to which I connect, reluctantly, when I have no choice but to access the phone to upload or download a file.

    Better than an FTP server it would have been an SSH server but I haven't found it. Still I think it is better than installing a new service on the computer and learning an instruction manual with specific commands to interact with an Android device.

    A greeting.

    1.    Juanmi said
      1.    James_Che said

        Great application, now I will not have to use Windwos to access my cell phone files, thanks. The MTP I have never managed to work for me in any distro. I tried a long time ago on Debian and Arch, now I have been using Chakra for a long time and I have KDE connect installed at once but I have not been able to do file transfer with that, it has only worked once telling me that I had a missed call XD

      2.    nobody said

        Thank you. I'm tempted to try it. I usually avoid the Google store and applications that do not work without giving them access to all the information on the phone. Practically all I have installed is free software from an alternative repository.

  3.   mrCh0 said

    What bitter comments there are lately. The tip that is shared is very good and interesting. Thank you very much for the information, it will surely serve many of us!

  4.   Yasser Meneses said

    (Without the intention of bothering) Well, it seems to me that the tip is the best way to complicate the transfer of files, because it is easier using an app called wifi file transfer, which what it does is that from the web browser you can access the phone folders and thus be able to manipulate the files.

    1.    KZKG ^ Gaara said

      You do not offend at all.

      The problem (or detail) is that this tip is NOT only for copying, with adb you can do everything ... restart the device, change ROM, manage it in any way imaginable 😉

  5.   tax3718 said

    The tip is very much appreciated, but with ES File Explorer I am doing great, I control the entire network and even other equipment such as the satellite receiver and the family phones.

  6.   raalso7 said

    I'm going to try, but we'll see if it works with gingerbread ...