Build ADB for an Android Device - android

I would like to control one android device with another. I have a Samsung Galaxy S III with the USB Host adapter, and would like to control another android phone via ADB. I've looked into this SO post:
build android adb for arm processor
but this isn't necessarily for and Android Host.
Does anyone know how one would go about building ADB for Android? Has it already been done?
Also, would it be "easier" to build ADB against a Linux distro running on the device under emulation? Would control of the device USB port by an emulation app be possible?
Any feedback is much appreciated!

I found a project with this purpose:
p2p-adb.
It has an on-the-device adb executable, so one can 'debug'/control other phones with a phone.

Related

Asus ME 172v usb debugging in MAC

I am usingASUS Memo Pad ME172V.
I am using Android Studio for application Development in MAC.
When i am plugging my USB Cable in MAC,then my device is not getting listed in devices available for debugging.
Can anyone provide any inputs on this?
Ok found a solution for this, a custom built adb binary.
Such as the one provided here
So using the adb.mac file provided execute adb.mac devices command in the terminal, it will shut down your currently running adb server and restart it's own. The basic idea seems to be that this Asus device has an intel chipset, so googling their most popular x86 phone : zenfone2 with adb you can find a cutom adb such as the one I linked to. More info on Building adb and fastboot command from AOSP source code, can be found here. In short a custom AOSP on a device seems to in rare cases require a custom adb, at least on OSX. Hope this helps!

How is my Android phone automatically recognized by adb on Ubuntu?

I am moving from Windows over to Ubuntu 14.04 for my Android application development. By biggest worry was to figure out how to make Android devices work with adb on Ubuntu. Various articles on the Internet talk about creating /etc/udev/rules.d/51-android.rules file and adding specific information for each Android device.
However, I didn't do any of that. I just plugged in my Android phone to the USB port and typed "adb devices." There was a question on my phone about trusting the attached computer. After I said yes, adb listed that device as usable.
I tried plugging in another phone. Once again, adb just recognized the device.
I don't see any rules for USB under /etc/udev/rules.d directory and I certainly didn't create one. I am just curious on how adb automatically recognized my devices.

Connect Android Studio with android via AirDroid

My computer seems to be too slow to run the android studio emulator (it wanted me to install some hardware acceleration), so I can't test apps there. Also my USB Cord doesn't work, I am wondering if it is possible to test apps in Android Studio via airdroid(http://web.airdroid.com/). I'm not sure how to set this up, however, since I don't really know how to configure android Studio to get this to work: as android studio only seems to work via a USB connection (which is not working for me). To sum it all up: I want to test apps on my phone via airdroid from android studio, and I need to know how to configure this.
Thanks.
As i know, AirDroid doesn't support ADB. But if really don't have a USB, you can use some Apps like WiFi ADB to get ADB work over WiFi
But if you are accidently using CyanogenMod or any other Mods which have ADB over Network, it could be natively supported
Download e.g. Shell Terminal Emulator (on Google Play). Open it and run
adb tcpip 5555
Open the terminal in Android Studio and write
adb connect ip_to_android_phone:5555
OBS!
Some devices require root access, while others don't.

adb does not recognize Android 4.0.4 device

I have two Android phones
Alcatel One Touch 4030D, Android version 4.1.1, kernel version 3.4.0
Highscreen Spark, Android version 4.0.4, kernel version 3.0.21-perf.
adb devices detects the Alcatel phone, but not the Highscreen phone.
I tried to run adb kill-server; adb start-server, but it didn't help. Switching between different connection modes (Media device (MTP), USB storage) didn't help either. USB debugging is enabled.
Here are the screenshots of the Developer options settings:
How can I make adb recognize the Highscreen device?
Update 1 (03.08.2013 19:00 MSK): Adding the line 0454 to adb_usb.ini didn't help.
Update 2 (03.08.2013 19:59 MSK): My attempt to follow the official Google recommendations failed because I couldn't find the drivers for the Highscreen Spark device.
If you could setup an ADT on Linux or Mac, it will work out of the box.
We were able to connect all sorts of devices to adb easily with ADT on Linux/Mac.
If you haven't managed to connect it through usb, you can try the network connection.
Add your device to the same network, then type in the command prompt:
adb connect your_device_ip_address
Hey try to dig for drivers at Official website.
May be search other sites for USB drivers, that may help you to come out of your problem.
I had the same problem .Try it again by activating the usb mass storage.
Without adb driver for device (in your case Highscreen Spark) it is almost impossible to create a bridge(connection) between your program and device, as adb (Android Debug bridge) makes a connection between your PC/laptop to your android device And without Adb in windows Pc/Laptops its not easily possible to debug.
Because of this, Companies like samsung, lg, htc are providing adb drivers to users for easy debugging, if you dont have a adb driver for Your Device you have only one choice left , Change your operating System into linux and then see the magic.
I had this same problem. Turns out, the issue was the USB Port I plugged in to. The port directly on my laptop does not allow for ADB to see the device. The port on the back of my docking station does allow ADB to see the device. I believe it has to do with USB 3.0 vs. 2.0. I believe 3.0 blocks the protocol ADB needs to use.
You will actually require the device drivers to connect it, so try insatalling Highscreen Spark's PC Suite.
If that dosen't work or you don't find the PC Suite you can download Moborobo from here which is a universal PC Suite for smart phones and connect the device with it and then try connecting the device from abd
It may be a problem with your adb.exe. I had the same problem earlier for connecting HCL G1 tablet. I also added lines in android_winusb.ini, but could not connect yet. Then I found out this link. I got solution by changing the adb.exe file. Try this link : http://www.slatedroid.com/topic/37692-adb-drivers-problem/ Or just download the adb.exe from following link and replace it with you adb.exe file. http://sdrv.ms/NepKED It is also suggested run this command to make adb_usb.ini effective for respective adb after modifying. echo 0x2207 >> %USERPROFILE%.android\adb_usb.ini
Try these drivers
x86
x64
It works for me.
After head banging for more than a day - a small thing saved my life on my RK3066 based device:
after you update the adb_usb.ini and everything else,
and after you do a
adb kill-server
do a
adb usb
and only then do a
adb devices
saved my life
By the way
Adding the line 0454 to adb_usb.ini didn't help.
you should be adding 0x454
I was having issues with my android phone showing up when I typed adb devices but found out that it was the usb cable which caused the issue, members in my family have two different android phones each with their own charging cable. I was using one phone with the other phones usb cable just because it was the nearest and I didn't think it would make a difference but it did.
Try a different usb cable and that might help.
I have the same issue in the past but i don't found the driver on my computer today, so :
You can go on http://www.alcatelonetouch.com and find the call center for your land.
Call them , and explain the issue , they have to send you a driver to connect your phone to the computer. This drivers is very easy to install.
I have make that and i can use it for debbuging
I whish you good luck... Sorry for my English

Connect USB device to Android Emulator?

We've been looking into Android 3.1+ and its ability to read/write to USB devices connected to the OTG/Host port.
I've found some code examples that allow me to detect and read/write to a USB HID device, but at the moment, I simply don't have a physical 3.1+ compatible device to deploy and remotely debug on.
Does anyone know how I can attach my HID device to the emulator, via the PC/Eclipse so the app can detect and read/write to/from the device?
I've tried listing the currently connected USB Devices but it shows none, as you'd no doubt guess.
Any ideas?
Cheers
The Android emulator is based on QEMU. Even if the emulator version is so ancient, there appears to be support for passing USB devices from the host. It does not seem to be available for ARM devices though, the emulated ARM machine does not have a USB controller. (I have already tried enabling all USB host controllers for the goldfish_armv7 kernel based on Linux 3.4, without luck. The default emulator goldfish_armv7 kernel does not even have Host USB enabled.)
If you are not limited to ARM and can use x86, then I suggest to check out http://www.android-x86.org/, its images can be used with a standard QEMU i386 (or x86_64) machine. This also yields better performance by using the KVM extension on Linux.
To passthrough a USB device with of vendor ID 1234 and device ID abcd, you can run the emulator command:
emulator -avd x86-machine -qemu -usb -usbdevice host:1234:abcd
Or, when using QEMU:
qemu-system-i386 -m 1G -cdrom android-x86.iso -usb -usbdevice host:1234:abcd
You will need read/write permissions for /dev/bus/usb/XXX/YYY, for that you can create a udev rule such as:
SUBSYSTEM!="usb", GOTO="end_skip_usb"
ATTRS{idVendor}=="1234", ATTRS{idProduct}=="abcd", TAG+="uaccess"
LABEL="end_skip_usb"
Now, upon insertion of the USB device, your emulator should recognize a USB device. This is tested for a Linux installation with a Android x86 4.3 image.
AFAIK this isn't possible. Android emulators do not emulate many things that exist in real devices... but this reminds me of an attempt to run ADB over Bluetooth.
This isn't a direct positive answer to your question but perhaps it can help you find a workaround the way I did: Install an "emulator" on a physical x86 netbook (dual-boot) and use the links referred to in my posts to accomplish what you are trying to do via WiFi or Bluetooth.
Hope this helps.
Create android Virtual Machine on virtualBox or vm player with this image.
Connect USB and connect with Eclipse using ADB connect (your device IP).
Installed android guest in virtualbox with Windows 7 host using image android-x86-4.0-r1-eeepc.iso from here (because my company's computer locked bios and I couldn't enable the vt-x emulation I had to install a version prior to 4.4). Then pluged in a usb drive, opened VM - Settings - USB in Virtualbox Manager, clicked the second icon on the right with a plus sign on it, chose the usb drive. Virtualbox then installed driver for the USB drive. After it finished, booted the android VM. Started OpenManager, went to mnt/USB, and files of the usb drive were there!

Categories

Resources