Android Device won't connect to ADB - android

Compiling Android Studio 1.3 on Yosemite machine to a 2013 N7 5.1.1 with USB Debugging enabled and connection set to MTP
device is detected
build is successful
Session 'app': running shows in event log
Nothing comes up on screen. Nothing installed to HD
(same process with same Android Studio machine compiles to N5 5.1.1)
EDIT- clearnig out ADB and installing drivers on Windows led to Mac detecting device correctly as N7 and this new set of errors on Mac:
PropertyFetcher: AdbCommandRejectedException getting properties for device 06d8bddc: device unauthorized.
This adbd's $ADB_VENDOR_KEYS is not set; try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
EDIT- Yosemite identifying N7 as N7 and showing "ADB connection Error: EOF" in Device Manager
Windows 10 no longer recognizing device and refusing to install any Google Drivers for "Unknown USB device"
EDIT- Attemptd to clear out ADB RSA Keys. Keys were regenerated on Android Studio restart. Device status is still "offline"
Android adb devices unauthorized
SOLUTION- Factory reset device and accept Google permission to periodically scan developer device

Had to do a factory reset on my device :(
After I enabled USB Debuginng and paired the device with my computer this new dialogue came up. This time I allowed Google to snoop on my developer device and everything worked! (I remember declining this setting months ago. I wish I had known this was A: no longer optional, B: possible to trigger somewhere in settings, C: came up as an issue in Android Studio when it was misbehaving)

Try unplugging and plugging the USB back in to the computer, and if that does not work then try to switch PTP to MTP or MTP to PTP and back again.
You can also try going to your control panel and see if your computer detects it! Also check if you have installed the appropiate drivers to run the program!
Check here also: https://developer.android.com/tools/building/building-studio.html

Check out this post http://zacktutorials.blogspot.ca/2012/08/nexus7-android-development.html which has the steps in detail.

I have this problem several times. In this case I just open Run/Edit Configurations , edit something and run app again.

I had the same problem on an ASUS Memopad after it was upgraded to Android 5.0. I did not initially see the option to "Allow Google to periodically check for security problems", so I reset it to default, then the option was offered and it connected to AS without any problems.
I have subsequently found this option under:
Google Settings/Verify Apps/Scan Device for security threats
So I would say that is the fix but it is not limited to the NEXUS 7.

Related

In Android Studio, app is running on emulator but not in physical device

I am using Android studio 3.4.1, In which my projects are not running in real device. but not having any problem in emulator.
After connecting the usb and i have run the app. then getting this error. after that device is not even listed in the available devices.
error got in logs:
Installation did not succeed.
The application could not be installed.
Installation failed due to: 'device '711KPMZ0603459' not found'
Retry
Retry also not working.
I also tried in Android studio Beta 1 and Beta 3. same problem happening.
can any one help me in this?
FYKI:
1. USB debugging enabled.
Tried USB option for File Transfer, USB tethering, No data transfer.
Tried with different cable as well.
Problem identified only after updating 3.4.1 android studio. Also facing in 3.5 Beta 1 and Beta 3.
Same kind of problem already added in Issue Tracker. https://issuetracker.google.com/issues/122892907
Kill and Restart the adb manually through Terminal using below comments. use cd to go inside platform-tools under Android sdk folder.
./adb kill-server
./adb start-server
PS: Before posting this questing here, i already tried quitting the adb in Activity Monitor (which can be opened from spot light)
Activate USB-Debugging in Developer Options and set your USB options from Charge phone to transmit Data.
Well the mark of your phone is important because in my case i use LG G5 and i could not see my device even after turning on developer mode and enabling debugger options.
I don't know the type of phone you use but you can try my solution.
After turning on USB debugging, go to tethering under the networks sections and turn on USB tethering then try again.
Hope It helps!

Android Studio is not showing physical device Lenovo K5a040 (K3 Note) and have tried almost every method?

I have tried
Installing driver
The USB debugging enabled in Developer Options
Switched from MTP to PTP device selection
Check if adb devices command shows the devices
Edit Run Configurations.
But my physical device Lenovo K5a040 is still not shown.
The problem is because of not properly installed Android Debug Bridge (ADB) USB Driver on your system.
You can Check whether it is properly installed.
Connect your Device and enable the USB debugging in device.
Right click on My Computer and open the Manage.
Go to other Devices and check whether your device is showing warning icon.(if it shows warning it is clearly says, ADB is not properly installed)
Reinstall the Android Debug Bridge (ADB) USB Driver.
Please check this link it will be helpful.
https://software.intel.com/en-us/xdk/docs/installing-android-debug-bridge-adb-usb-driver-on-windows
Hope it will help. :-)

Android device not showing on adb anymore

Hello stackoverflow mighty community,
Please help !
I have a Datalogic DL-AXIST (http://www.datalogic.com/eng/products/automatic-data-capture/mobile-computers/dl-axist-pd-702.html) which is an android device but i guess the company fiddled a bit with its core. Also I have a windows 7 toshiba pc.
Anyway my concern is that it is not showing on the adb devices chooser.
Here is what i've tried so far:
I'm using Eclipse IDE, my SDK is up to date and i can test my application on all the other devices i tried so far.
The datalogic device has Android 4.1.1, driver is correctly installed on my pc i'm sure, enabled developer options.
I tried connecting it as MTP and PTP but will not work, there is also a CD-ROM installer connection which i tried as well, followed through the installation on my pc but still does not work.
It gets even stranger, when i used the third pc connection type and installed the device with its own adb on pc, i even copied those adb files in that folder and pasted them my eclipse's own adb. This worked ! my device was recognized but it changed for a reason i do not know.
I tried uninstalling the device driver and re-installing it from windows device manager, tried rebooting device and restarting eclipse and pc.
I really need some help because making this device work will greatly benefit my work.
Thanks !
This is genuine issue which may come frequently,but the soln is simple you may try these steps:
step 1;
try swictching developer options on and off
if the above dont works then go to device manager in your pc check portables devices select device and update driver software-->browse my comp-->let me pick list of device drivers-->select android as in option or MTP
if your device dont show in portable devices just update the device which comes in portable devices list trust me it works all time
try to do this once
1. Check if authorized:
\platform-tools>adb devices List of devices attached 4df798d76f98cf6d unauthorized
2. Revoke USB Debugging on phone
If the device is shown as unauthorized, go to the developer options on the phone and click "Revoke USB debugging authorization" (tested with JellyBean & Samsung GalaxyIII).
Restart ADB Server:
Then restarted adb server
adb kill-server adb start-server
4. Reconnect the device
The device will ask if you are agree to connect the computer id. You need to confirm it.
Now Check the device
It is now authorized!
adb devices \platform-tools>adb devices List of devices attached 4df798d76f98cf6d device

Why is ADB unauthorised to debug my device on which I installed AOSP?

I am using a nexus 5 (hammerhead), and I just built AOSP marshmallow from source. I was trying various build configurations (user-debug vs user etc), and along the way, I did something which causes both my mac (yosemite) and my ubuntu vm (14.04), to not be authorised to debug via adb. ie. if I type "adb devices", then I see a message:
0c4a84901a7ce6a2 unauthorized
Facts -
Although I built the source code, and flashed the device on the ubuntu vm, yosemite is not authorised either - same message (can't understand why).
Fastboot has the same problem, if I try rebooting into the boot loader by issuing a command from the terminal. If I use the hardware buttons to launch the boot loader menu, then I can flash files, lock / unlock the boot loader etc.
I have tried killing / restarting the adb server (e.g.: adb kill-server / adb start-server)
I have tried deleting ~./.android/adbkey.pub in my ubuntu vm. Since it made no difference, I did not delete it in my mac.
I have tried restarting my mac, ubuntu vm, adb in combination...
When I enable / disable USB debugging on the device, no message pops up asking me to verify the computers finger print, and there is no option in the setting to revoke all the fingerprints (which is present in regular stock android roms / factory images)
I'm not sure what to do now. I know I can flash the factory image of marshmallow, so everything on the phone should be pristine. But What I want to know is why adb is unauthorised right now, and how to fix it - so I can get back to making aosp roms.
EDIT:
I just flashed the marshmallow factory image, and now adb is authorised on my mac, but in ubuntu, I'm still listed as unauthorized, even after killing / restarting the server.
EDIT: I built and flashed AOSP 6.0 with build configuration set as user-debug, and it seems dab is authorised again. So I imagine this is because when the build configuration is "user", adb is prevented from debugging. I wonder why, and how to fix this?
In case of AOSP user build, you may wish to check if ro.adb.secure=1, in your build default.prop. If not defined, then the popup to verify computer fingerprint may not come up.
I find that my android devices are "unauthorized" if usb-debugging is not enabled, or my computer's fingerprint was never accepted as authorized. Also, USB connection mode needs to be set to File transfer or photo transfer (MTP or PTP) for some versions of Android.
Try the following:
Connect usb cable to computer.
Go to Developer-options
Revoke USB Debugging authorizations
Disable and then enable USB Debugging
Accept "Allow USB Debugging" message
After this sequence, I always get message to accept computer's fingerprint on Ubuntu.

Android 4.2.2 adb can't find devices

With the new update to 4.2.2 to my Galaxy Nexus and Nexus 7, I can't find both my devices under adb.
These are the steps I took:
Updated to 4.2.2
Updated ADT and SDK through the SDK Manager
Checked ADB version, it's at 1.0.31
Restarted PC and Tablet and Phone numerous times
When I run adb devices, it's just blank. I have the same issue on Windows 8 and on Ubuntu 12.10, but on Ubuntu it shows my device and it says offline.
Are there any other steps I can take?
From the adb docs
When you connect a device running Android 4.2.2 or higher to your
computer, the system shows a dialog asking whether to accept an RSA
key that allows debugging through this computer. This security
mechanism protects user devices because it ensures that USB debugging
and other adb commands cannot be executed unless you're able to unlock
the device and acknowledge the dialog. This requires that you have adb
version 1.0.31 (available with SDK Platform-tools r16.0.1 and higher)
in order to debug on a device running Android 4.2.2 or higher
So, unplug, wait, replug in the cable, and hit ok (on modal dialog that appears on your device)
If you hit cancel, the device will show up as offline via adb devices
Try pre-installing the drivers for your devices. Make sure, under Windows, that your device is recognized in the System control panel first.
I use Windows 7 and my Galaxy Nexus wouldn't be recognized by the system until I installed the device drivers before plugging them in. From the comments, this works on Windows 8 as well.
Galaxy Nexus drivers
http://www.samsung.com/us/support/owners/product/SCH-I515MSAVZW#
Goto Manual & Drivers > Software
Nexus 7
http://support.asus.com/Download.aspx?SLanguage=en&m=Nexus+7&p=28&s=2
Just though Id share my experience, I had -
Unplugged and re plugged in the device
Installed the correct platform tools
Installed the correct Android bridge Turned USB debugging on and off
and on and off an...
Tried WiFi but it said it was offline
etc. etc.
What fixed it for me was changing the device connection from Mass Storage to MTP. To do so, with the phone unplugged you go into -
"Settings" -> "Storage" -> Click the menu Button -> "USB computer
connection" -> "Media device (MTP)"
Hope this helps some one from going crazy!
Thanks,
Ash.
I tried everything mentioned here and in other posts. It wasn't the cable, the USB port, rebooting the PC or Nexus 7, killing and starting adb or enabling/disabling USB Debugging.
It was due to the 4.2.2 OTA update, I simply replaced the \platform-tools\ folder, as described here: Android ADB device offline, can't issue commands
Download the updated platform-tools: http://dl.google.com/android/repository/platform-tools_r16.0.1-windows.zip
adb wait-for-device
works for me. Just unplug your usb device, run this command, and while it's waiting, plug your device in, then it will just work. :)
Here is what I did (Galaxy S4 4.2.2):
go to Settings => about this device => click several times on "Version number", that is to say something like "JDQ39.I9505XXBHYTGKDD" (not android version or anything else) ; here you will see that Google or Samsung have a lot of humour as you have to click until multiple times until having a toast displaying "You are at few clicks from being a developer" ; after something like 10 clicks, you have a toast "You are a developer"
Go "Development options" (in the "More" tab (rigjt tab of settings menu)) ; be sure that "USB debugging" is checked.
And it works ! Eclipse can see your S4(or any other device) 4.2.2 !
I had this problem today and fixed it by rebooting the Tab2 while leaving it plugged into the laptop/eclipse
Check if you have installed android-adb-tools in Ubuntu. If you do, the adb tool may be old. Uninstall and make an alias to the latest adb tool you download with the ADB plugin. To check the adb version do "adb version" if it's 1.0.29 is the old, the latest and working for Android 4.2.2 is 1.0.31.
I made a lot of stuff until i realized this.
going to Developer Options and checking USB Debugging solved it for me
My solution used on cm10.1 nightly build on droid bionic, was after updating the newest usb drivers, using the Mass storage option (instead of the MTP option for USB computer connection), then unchecking and rechecking in developer options, "ADB over network" option. Then it did the RSA pop up dialog.
For me the best solution was:
Update the Android SDK via the SDK-Manager. Removing the '.android' folder in my usr directory ( Windows 7 ) and re-plugging the device back in. Worked flawlessly due to the ADB RSA key issue. I had an older version of ADB that I stashed into c:\windows\system32\ due to not wanting to install an entire freakin SDK when all I wanted was a command prompt. Good ol' Google, the new Microsoft.
You may use an old version of adb.exe. Update platform-tools.
You may have to set a new path to adb.exe as well.
In case it helps someone else arriving here, I had this problem with a ZTE phone.
I tried installing the driver based on the offical list here but in Device Manager the driver was marked as not installed correctly.
In the end I found the way to make this work was:
Press Menu Button
Choose "Connect to PC"
Choose "Default connect type"
Choose "Install Driver"
Plug in phone and on PC select option to install the driver
Then change "Default connect type" to "PC software"
After doing this I was able to do:
adb kill-server
adb start-server
adb devices
and view my device.
It's working on windows 8 using Android 4.4.2
Reset your phone,
go to setting->about phone-> seven time click on build number.
go to back and go to developer options check USB debugging.
go to windows 8 start menu click on profile picture and click change profile picture.
Select devices and on Download over metered connections.
Connect your phone via cable your PC and wait.

Categories

Resources