I'm just testing the adb and I'm wondering if this is possible.
I mean, let's say I have adb installed on a aws instance, whatever the Ip it may be.
Then from there, I want to connect to my Android device via adb I don't know if adb connect can do the trick having the external Ip of the device.
From what I've learned, seems like it is possible, but it's kind of confusing.
Also, I see it's possible to connect without having the device rooted.
But most tutorials or examples are based on wifi, I just want to know if there is a workaround or even a command which can make this possible remotely.
Any ideas?
Thanks in advance!
I would try looking into Vysor. The main purpose of this tool is to be able to control an Android device remotely, but it also provides an option to share the adb connection to the device without a root. Its a powerful tool, that as many applications.
Related
I am doing some investigation of a closed-source app using ADB. I would like to log the commands this app is making, the ADB binaries it uses are in the same directory. Would I be able to sniff the commands by faking an ADB device or maybe modding the source code of the build tools to include a log?
Best regards.
I tried using some apps on a physical android device to log the incoming packets, though I got nowhere. I expect to be able to know what this closed source app is doing on my device.
PS: I am sorry if this sounds dumb, I know ADB is open source, part of the Android Open Source Project, but I made this post to make sure I am not missing some small detail. I am not an expert in the ADB protocol so excuse my clumsiness.
Answer:
Copied from this answer to How to fetch ADB shell traffic?
It is as simple as listening on the ADB server's port through Wireshark (TCP port 5037) since all the commands pass through the adb server/daemon before going to USB.
It is also possible to sniff the USB traffic using USBPcap, as it also is unencrypted.
Hello StackOverflowers,
I am eager to try out some Android programs on my tablet in the early phase. However, I do not have root access to the Linux machine I am using (OpenSUSE 12.1). Due to this, I am having trouble to let the system find my device.
This tutorial http://developer.android.com/tools/device.html, as well as almost every post I can find online, do not mention ways to walk around the 51-android.rules setting without root. Some post even mention that, to find the device, the adb command should be run with root.
Does this mean I have no hope of on-device debugging? Thanks in advance!
I dont think you need root access for adb. Though for the device to be detected, AFAIK you need to add device details in rules.d .
If you have device and the computer on the same network, you could use adb over wifi. But to put the device in tcp mode , you need root access on phone or another computer where device can be detected.
Your device doesn't have to be rooted. After you add your device in 51-android.rules, make sure you restart adb server by using these commands:
adb kill-server
adb start-server
And one more thing, make sure you turn On Debugging Mode
So here's the thing. I use MyPhoneExplorer in USB mode which uses ADB to communicate with the phone. Whenever my phone is connected (using MyPhoneExplorer) and try to test an app in eclipse on my EMULATOR, ADB crashes, rendering both MPE and the emulator useless.
My question is: Is there any way to prevent adb from accessing one phone from multiple sources? (In this case its trying to access the phone for both Eclipse and MPE).
Weird/Confusing question I know, but would really appreciate some help.
I haven't tested this, but how about directing ABD at a given device with this:
adb -s <serialNumber> <command>
http://developer.android.com/guide/developing/tools/adb.html#directingcommands
Use adb devices to find out the serial number of your emulator.
But from what you describe it might be that ADB's device detection that's breaking things.
Is it possible to create android applications that can communicate with apps running on the computer through USB? Like some sort of reverse "adb forward".
it's possible using the adb interface. I'm not sure about the specifics, but there are apps that do it. One example would be PDAnet.
We have made a device which can act as an USB host or slave and processes the data it receives. I want to use the Android phones to send the data to it via USB.
My research leads me to conclude that we cannot use Android devices in USB Host mode without modifying the hardware or OS. Doing so is not an option as this is going to be a commercially deployed device.
However, I couldn't find any information on using the Android phone as a slave. This is already technically possible because it can connect to the PC in a similar configuration. Can we do the same via an application? If so, any information on how to achieve this will be greatly appreciated. I have full access to our device's embedded system, so custom code there should not be a problem.
This is already technically possible
because it can connect to the PC in a
similar configuration.
Only for things baked into the firmware. Your SDK application cannot invent new Linux device drivers, nor does it have any access to the Android device side of the adb connection.
Can we do the same via an application?
Since you have not said what you are trying to do, this is impossible to answer in a definitive fashion.
Say, for example, the "device which can act as an USB host or slave and processes the data it receives" wants screenshots off of the Android device. That is eminently possible via adb, because adb has a protocol for that built in. All you would need to do is have your device connect to the Android device via the adb protocol and request screenshots, no different than does DDMS or hierarchyviewer.
So, I would look at the problem from a different perspective: if you can accomplish it via DDMS, you can do it via your custom device. If you can accomplish it via adb shell commands, you can do it via your custom device. If you cannot accomplish your goals via existing interfaces, though, since you have no way to invent new ones over USB, you will be stuck.
Conceivably, you could plug your custom device into a Bluetooth or WiFi dongle, then use those on Android for communication.