[Q] Single usb cable - adb & multiple devices - Android Q&A, Help & Troubleshooting

Hi,
Does anyone know if any cable is available where you can plug multiple devices into one end of the cable, the other into the computer, and when you install an application from say, Eclipse, it installs it to all the connected devices in one go?
I have about 4 devices running various versions of Android I use for testing, and when I have them all set up together, it gets tedious manually pushing the code from Eclipse to all the devices.

I would think you'd be able to use ADB over wifi. However, since I'm not a developer, take my advice with a grain of salt.

Hi,
this is physically impossible as this would blow your USB port on the PC. If every device tries to draw 500mAh and the port only gives 500mAh there would either be no connection or the USB port would just melt
ADB over WiFi sounds reasonable though...

TheSSJ said:
Hi,
this is physically impossible as this would blow your USB port on the PC. If every device tries to draw 500mAh and the port only gives 500mAh there would either be no connection or the USB port would just melt
ADB over WiFi sounds reasonable though...
Click to expand...
Click to collapse
I tried adb over Wifi but it's been a bit strange for me, occasionally my USB connection isn't recognized later, or the adb connection randomly drops.
It still has the same problem as I need to manually initiate a push from Eclipse to every phone.

Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Moving to Q&A

Eclipse ALWAYS will ask you for the device to install a project (if there are various).

I don't know eclipse since I don't dev but I know a little about ADB and I doubt it has any built in way to install to multiple devices. But you could make a script to make it easy from the command line with multiple cables. Something like this but set the proper serial numbers.
Run it like this "multiinstall.sh some.apk"
#!/bin/bash
adb -s aa1231 install $1
adb -s 324eo4 install $1
adb -s 238642 install $1
adb -s 366284 install $1

Related

Charging via USB A->Mini B possible

Hi,
Yesterday I found out, that a Mini Usb-B connector fits
in the Socket of the Touch HD. But before I blow it up,
I want ask first if charging works, or will it burn?
I searched the forums but couldnt find the answer,
I think it will be great if this question with the appropriate
answer is in the FAQ after that.
thanks Avalun.
works fine
hi,
thanks for the answer, but can you tell me how to I
can block that Ubuntu creates a new eth device if I
plug in the HD? Somehow it doesn't matter which option I select
if I use the standard USB Cable.
thanks in advance.
That's a whole different question!
I'm not a linux user so I can only go by what I read back when I had a TYTN. You could try http://multisync.sourceforge.net/news.php but SynCE seems a lot newer http://www.synce.org/moin/
See also this thread http://forum.ppcgeeks.com/showthread.php?t=55209
hi stuart,
thanks for the answer, nice to know that I actually can sync with my ubuntu netbook but my problem is the following:
i am using wireless lan (ath0) with my ubuntu and if i plug my cell with a generic usb cable in (for charging), then it creates a eth1 device, changes the routing table and nameservers, no matter
which option I select on the Blackstone.
so i have to switch them back every time.
Sometimes I only want to plug it in for charging, and it should do nothing else.
ok i found it out, how to avoid that it sets the route automatically:
If you have the Gnome Network Manager running on Ubuntu, it will setup your device as the new default network connection. Check what ethernet device was given to your device with by running the following command in a terminal after you have connected your device:
/sbin/ifconfig -a | grep 80:00:60:0f:e8:00 | cut -d " " -f 1
then add the next line to /etc/network/interfaces:
Click to expand...
Click to collapse
iface <interface of your device> inet dhcp
Click to expand...
Click to collapse
This will make Gnome Network Manager ignore the interface. Then restart the networking with the command:
sudo /etc/init.d/networking restart
Click to expand...
Click to collapse
You are going to need to disable any firewalls or configure them. I don't know how to do this, but I have seen lists of the necessary ports.
from:
http://ubuntuforums.org/showpost.php?p=6258719&postcount=6/

[Q] Pushing files via adb from one android device to another

As long as I have the requisite SDK files and a terminal on an Android device, or if I'm doing this programmatically in an app I'd develop, can I use adb to push a file from one device to another that's connected via USB? The devices will be a Nexus 4 and probably a Nexus 7. The N7 would be the sender, fwiw. I'm hoping that it's not required that the device executing the adb push commands be a computer as opposed to a mobile device.
I'm assuming that I can find a cable that's micro USB (if that's what it's called) at both ends to connect the two devices.
Is it possible to do the same thing via a Bluetooth connection? Or can adb only recognize a device connected via USB?
maigre said:
As long as I have the requisite SDK files and a terminal on an Android device, or if I'm doing this programmatically in an app I'd develop, can I use adb to push a file from one device to another that's connected via USB? The devices will be a Nexus 4 and probably a Nexus 7. The N7 would be the sender, fwiw. I'm hoping that it's not required that the device executing the adb push commands be a computer as opposed to a mobile device.
I'm assuming that I can find a cable that's micro USB (if that's what it's called) at both ends to connect the two devices.
Is it possible to do the same thing via a Bluetooth connection? Or can adb only recognize a device connected via USB?
Click to expand...
Click to collapse
If you tried this you would need a usb otg cable for connecting the devices. But I don't think ADB client software exists on phones just computers. Why would you want his when Android has multiple better choices? Turn on NFC and tap the device backs together for example.
shadowofdarkness said:
If you tried this you would need a usb otg cable for connecting the devices. But I don't think ADB client software exists on phones just computers. Why would you want his when Android has multiple better choices? Turn on NFC and tap the device backs together for example.
Click to expand...
Click to collapse
I have adb on my Nexus devices. I didn't even put it there, though BusyBox might have. It's in /system/bin. I can execute commands from a terminal. But I haven't tried it with another device. I'll get an OTG cable.
I'd use NFC or make one of the devices a ftp server, but that doesn't meet the needs of the project I’m working on. This isn't for personal use or convenience. I need to have one device send another a file within a certain physical environment that precludes those things.
maigre said:
I have adb on my Nexus devices. I didn't even put it there, though BusyBox might have. It's in /system/bin. I can execute commands from a terminal. But I haven't tried it with another device. I'll get an OTG cable.
I'd use NFC or make one of the devices a ftp server, but that doesn't meet the needs of the project I’m working on. This isn't for personal use or convenience. I need to have one device send another a file within a certain physical environment that precludes those things.
Click to expand...
Click to collapse
Hello Maigre,
Have you finished your experiment with the OTG cable ? I would try to do the same kind of operation.
And if I add and USB cable to the USB-OTG cable, do you know if it's working ? (I found only a micro-USB male to USB female OTG cable, and I would use it with a USB male to micro-USB male cable).
Thank you in advance,
Greg

[Q] USB ADB to multiple devices

Hi,
I need to connect to at least 20 devices via USB adb, but I understand that the maximum is 15 when using the defaults.
I further understand that one can run multiple adb servers on your host by issuing adb -P <port-no>. What I do not understand is how to change some devices' listening port to something else. I'm mainly using Samsung devices
Can anybody assist me with this?
Thanks
krugerrc

Help extracting data from Android Device

Hi, I hope I am posting in the right section? I found the site really difficult to navigate having never used the site before. If its in the wrong place please can a mod move it.
Ok so I have an Android Set Top Box (STB) and I am trying to extract all the data from it. It is an mxp pro 4k. I don't want a backup of the data I want to extract full images of the device for analysing with forensic tools. The problem is I can't seem to communicate with it. I have the full SDK that is up to date, once navigated to the platform tools folder I opened a command line and typed
Code:
adb devices
after plugging in a USB cable to the OTG port. No prompts appeared on the screen to trust any connections like my iPhone does when I connect it. Adb devices returns no results. So I tried wireless adb, I typed
Code:
adb connect 192.168.x.x
and it said connected. Then when running the devices command I had the ip and port then the word device. I then get a shell by using
Code:
adb shell
Which i then elevate to root by using
Code:
su
. Then when i try an adb pull or adb backup I get a message saying error device offline.
Im new to Android so not even sure I am doing it right. I have done a lot of reading and research but seem to be stuck with the basics. To confirm USB debugging is turned on.

Connect Android phone over Wi-Fi using ADB

(Many will consider this question a duplicate of similar questions but I don't think this question should be marked as duplicate because the answer requested here is different than others.)
I am searching for the solutions since many years and read a lot of pages on internet and StackOverflow but hasn't found any solution.
Once an non-rooted Android phone is authorized over USB using ADB then how to connect it over Wi-Fi every time without ever connecting the phone over USB?
I know that executing
Code:
adb start-server
then
Code:
adb tcpip 5555
and then
Code:
adb connect <IP.address.of.phone>
will connect the phone over Wi-Fi IF it is connected using USB when issuing these commands.
According to the answers/forums, there are 2 ways to connect Android phone over Wi-Fi:
The user has to first connect to USB even though the device is already authorized.
The phone needs to be rooted.
But I think, what I want to achieve, as per the question, must be possible because if ADB can connect over USB and then Wi-Fi, then there must be some way to accomplish with directly connecting over Wi-Fi if computer is already authenticated. The missing thing is to know what exactly ADB is doing when switching from USB to Wi-Fi. I think, it could be getting authorization again. But what if we store the authorization information (finger print? or encryption key?) once and use it every time to connect over Wi-Fi? (Please note that when first time authenticating the computer over USB, its finger print is showed in the Android phone, and it never asks again until the authorization is revoked/invalidated somehow. So, I think the requirement here is to revalidate the computer.)
I viewed the ADB repository and read the text files mentioning how ADB works. In one txt file I read that
Code:
adbd
(ADB Daemon) is started on port 5555 on the Android phone/emulator when
Code:
adb connect ___
command is executed. Is there anyway to manually start the daemon through a terminal app on the installed on phone? I tried 'adb', 'adbd' and 'setprop' commands in the Termux app but these commands doesn't exist. According to the txt files of the repository, the ADB on computer is sending the commands to the Android device/emulator and can start 'adbd' or set/open the port 5555 using
Code:
setprop service.adb.tcp.port 5555
command. Is there a way to do this on Android phone using a terminal app on a non-rooter phone?
Somebody who has knowledge of networking, Android and C/C++ language may be able to answer. One can look in the GitHub repo of ADB source code if they want to know what is happening during the connection process.
I'm a little late to answer your question at the time you asked it, but if it still helps the OP, non-rooted Android 10 and below allowed wireless adb connections AFTER a USB connection was first established (adb start-server && adb tcpip 5555 && adb connect [IP]:5555), but that changed (for the better) in Android 11 and above with the new new Developer options Wireless debugging random port assignments (adb connect [IP]:[PORT] or adb pair [IP]:[PORT] [PIN]) such that the adb wireless connection never needs USB cable ever again.
Given Android 11 allows Developer options Wireless debugging via a random port, and Android 12 new Developer options Wireless debugging allows that to be accessed even easier with a new Developer options Wireless debugging tile, the only thing missing is a way to get, after the fact, the random port assignment that Android uses for the adb wireless connection to your PC.
Here are some related posts about that subject which may help the OP.
[adb,scrcpy,vysor] What ports does Android 12 randomly set when Wi-Fi connecting via Wireless debugging adb "pair" or "connect" commands?
(PSA) Using the new Android 12 TILE for 'Developer options' 'Wireless debugging' to establish adb connection over Wi-Fi without USB
What's the difference between Windows/Android adb "connect" versus adb "pair" when mirroring Android 12 over Wi-Fi onto a Windows PC?
The only question that's missing an answer preventing a perfect solution is...
Does anyone know how to obtain that random Android port address from the PC?

Categories

Resources