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

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.

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!

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.

Android Device Chooser: Cannot Detect Device

I am trying to use my Nexus 4 to run a hello world app. I'm using the Java ADT with Eclipse.
I cannot detect the device.
Nexus 4: Android 4.4.2
Java ADT: build v22.3.0-887826
Windows 7 Professional x64
Java JDK: jdk-7u51-windows-x64
ADB v1.0.31
Project build target is 4.4.2 (API 19). Minimum required version is API 8.
./adb devices shows no devices.
I am in USB debugging mode on the device. I have allowed installation of non-play-store apps.
My computer detects the phone as a media device (MTP), not as a camera (PTP).
I do not get a prompt asking me if I accept an RSA key.
Things I have tried:
Download USB drivers from here: http://developer.android.com/sdk/win-usb.html#top then:
Start > Properties > Device Manager > Portable Devices > Nexus 4 > Properties > Update Driver > Browse > {Download Folder}
I get a popup telling me that the drivers are up to date.
Changing the cable
Changing the USB port
Restarting Eclipse
Restarting the adb server (kill-server > start-server > devices)
Restarting the phone
Restarting the computer
Editing android_winusb.inf, as described here: USB driving on Android - new devices
I have tried everything I've seen on these pages:
http://developer.android.com/tools/device.html
http://androidsecurity.wordpress.com/2013/06/05/install-google-nexus-4-adb-usb-drivers-on-windows-android-studio/
Android Device Chooser -- device not showing up
How do I deploy HelloWorld app to HTC Eris Droid?
EDIT: I tried to enable ADB over wifi. So I installed ADB WiFi off the play store. It needs root permission, so I tried to root my phone using Kingo Root. Kingo Root does not work. It's giving me the message "No Device Connected!". I can transfer files from the device, and it gets detected when I plug it in, so I don't know it what capacity it "is not connected".
EDIT2: I tried to enable ADB over wifi as described here: How can I connect to Android with ADB over TCP?
adb tcpip 5555 gives me "error: device not found". Looks like inability to detect the device is a common failure mode. I suspect that fixing that will let everything else work as intended.
Android debugging via usb can be a bit hit-and-miss. I have one phone that never connects, one that rarely connects, and one that seems to work pretty much every time (I still have to do the 'unplug/replug/restart' shuffle from time to time)
I would suggest investigating WiFi ADB. If it works with your device (not all devices support it) then it'll save you a lot of time in the long term:
Install one of the various WiFi debug apps from the market
Run it and note the IP address and port it gives you
Navigate to where your android sdk platfrom tools are installed (a default Windows install should be C:\Android\sdk\platform-tools
Type adb connect [ipaddress]:[portno] (ex adb connect 192.168.1.100:5555)
If your device supports wifi debugging, it should show up in Eclipse within a couple of seconds, and you never need to do the plug in/unplug/restart shuffle again!
You don't need any third-party application. See this answer and set-up WiFi debugging with ADB.
EDIT:
You don't need root also.
Check my answer here: You should install the correct drivers its really easy by following the steps from the video
Hope that helps! :)

Build ADB for an Android Device

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.

MK802 - Android 4.0 Mini PC - not listed with 'adb devices' command - how to install my app

I recently purchased the MK802; Android 4.0 Mini PC. However, I am unable to install the apps I developed. I have tried using the 'adb devices' command but the device does not appear on the list. I have also downloaded the Andorid 4.0 SDK (the version used in th MK802) on my computer but still no luck. I also made sure to enable 'USB Debugging' and 'Unknown Sources' in the device settings.
I realize I can load my app from an SD card (but I would have to buy one); or that I can download my app onto the device by making it available on a server or the android marketplace but these options seem like too much effort just to install an app.
Any suggestions or recommendations would be greatly appreciated.
Simply adb over USB doesn't work (for now)
The only thing that you can do is: USE WIRELESS ADB!
This widget can help you on enabling it.
Once you got everything up and running do an
adb connect xxx.xxx.xxx.xxx
using as IP the ip address of the MK802. Once connected run an
adb shell
as usual to access the remote shell. Still the system is in heavy development (at least allwinner told so)
EDIT: Using a shorter USB cable could solve the issue!
I managed to connect mine to ADB, even using the included USB cable.
Connect you computer to the dongle's OTG port (it's marked on the dongle).
Go into settings and enabled ADB debugging.
And finally (here's the trick) enable the special Connect to PC setting.
Google for the drivers. Installing the Android SDK will not ensure that your device gets detected.
Connect device
Install drivers downloaded from internet
Disconnect & reconnect
ADB !
In all likelihood, this will solve things for you.

Categories

Resources