adb could not connect to device on macos but on windows - android

I want to connect my mobilephone (xiaomi lite 11) for android development (usb debugging) with my mac.
On my windows machine, it connects automaticly and everything is fine. But if i want to connect the same mobilephone with the mac it does not work.
On the mac:
I see the dialog with the connect options (file transfer, mtp...) its open, and close after a second, and open again and close after 1 second, and so one.
adb devices gives this to me:
% adb devices
List of devices attached
51ef87ce offline
% adb devices
List of devices attached
% adb devices
List of devices attached
51ef87ce offline
% adb devices
List of devices attached
I got another mobilephone, and this connects fine with the mac.
So the problem exist between my xiaomi and the mac and over usb! I can connect the mobilephone via wifi and its working fine.
I found a related question, but the only answer is to use the wifi (my Realme device is not connect as adb devices on mac but connecting on windows fluently)
I've update the adb and android studio to the latest stable.
Has someone this issue in the past and got its phone working via usb?

Ok, the problem is located in the MiUI 12.5.6. It also blocks sometimes Updates to newer Versions.
So i fix this with:
change region to andorra
try manual update
update to 12.5.7
change region to my real region
Now the connection work, and i can debug and install apps over usb.

Related

Android Studio connection issue

Am having a problem in connecting my huawei Y7 2018 phone with android studio,each time i try connecting it via the usb option it still doesnt appear on my android studio even after allowing the usb debugging option on and the weird part of it, it connects to other phones.Kindly help to solve this problem.
check for ADB drivers are properly installed n are compatible with your device. Connect your phone to pc n open terminal n-type adb devices check whether your device shows up or not, if not you have to install your device compatible drivers(optional try universal ADB drivers or google ADB drivers).

Android Studio 3.5.2 can't find USB connected device (but found through adb terminal)

The title pretty much says it all: I'm working on an Android Studio (3.5.2) project on my Windows 7 64-bit running laptop, I connect my Samsung J7 (2016) to the laptop through the original Samsung cable but Android Studio simply can't see the device. If I try to do the same on my desktop computer (same Android Studio version but on a Windows 10 64-bit OS) everything works just fine.
Here comes the funny thing: the "adb devices" command shows the device (and I'm 100% sure it's my smartphone since it's the only device connected). The Android Studio toolbar keeps showing "No devices" anyway.
I've spent 3 hours on this and couldn't find a solution. I already tried every suggested solution around the web (stackoverflow.com included), but I achieved nothing:
Disabling/Enabling USB Debug function in the Developer Settings of my smartphone (including revoking USB debugging authorizations)
Running Android Studio as admin (sometimes it solves strange stuff...)
Trying to USB connect through PdaNet+
Android Studio built-in troubleshooting service (re-scanning for devices actually makes me see my smartphone but it's treating it as if it can't be used as a debugging device; anyway the smartphone-computer connection is just fine: I can browse my files and all. Killing and restarting the ADB server does nothing)
Tried connecting both as PTP and MTP
Tried both the Google USB Drivers and the Windows Update drivers (those the computer gets when you first connect the device)
Thanks in advance :)
if you use linux as your PC OS. may be try to install adb will help you..
apt-get install adb
that's work for me.

How can I develop my own apps for the Huawei P30 Pro?

I have been developing some apps with Xcode for my iPhone but recently I got the Huawei P30 Pro and would like to start making my own apps for it.
I've tried Android Studio for Mac but it doesn't detect my phone plus google doesn't show any results for developing apps for the Huawei.
Is it possible or is there nothing I can do as of now?
I've enabled USB Debugging on the phone and run 'ads devices' which shows my device as connected but still noting in Android Studio.
You may have accidentally revoked access to debugging try turning debugging off and back on again you NEED debugging for any form of android development. as for no documentation, that is OK your phone is new and there will not be much info on the specifics, just google stuff about android development in general.
If Android Studio doesn't detect your device, you may want to try using wifi to connect the device, I use AS on a mac every day, and the devices I have often disconnect when cabled, but with this they stay connected for days.
Connect device via cable.
Open terminal / preferred command line app.
Run command adb devices. If no device detects unplug and try again, if it continues with no device then check settings on device that usb debugging is enabled, and enabled in charging mode.
If device connected:
if only one device, run adb tcpip 5555
if multiple devices run adb -s deviceid tcpip 5555
If successful then disconnect the device
Run command adb connect 192.168.x.x:5555 with x.x being your device IP address.
If that's all done and it says connected, then you should see it in AS.

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

ADB shows Motorola Xoom as offline when connected

I have a Wi-Fi Motorola Xoom that I am connecting via ADB for development. I am seeing an intermittent problem where the device (with ID number) shows up in the adb devices list, but will present as being offline.
The device and computer both show the tablet as being connected. I've tried a combination of rebooting each device and swapping USB ports, but the only thing that solves the issue is switching out the cable. Furthermore, a cable that I used yesterday doesn't work today -- I am having to use a previously non-functioning cable to connect.
Is this a driver issue? Device port issue? I have seen this issue with several versions of the Motorola drivers as well as the PdaNet drivers. I am currently using Motorola Mobile Drivers 4.7.1.
WARNING: this question referred to an older device and as such the answers may no longer be relevant to current ADB connection issues.
I met the same problems like yours, and I found out that the USB cable has mal-functions in the PIN of head USB. So I switch to the new USB cable, it just works fine and detect device as online.
I had the same problem, and switching from the USB port on the front of my machine to the port on the back made things work. It could be related to a difference in port power or USB type.
From XDA: nouvelle_adr http://forum.xda-developers.com/showthread.php?t=2247471
I downloaded the adb version and it worked.
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.
If you haven't this pop-up mesage in your device, there is the solution :
1) Install SDK in your PC
It may asks you to install JAVA, if so, do it.
2) make sure that your adb is 1.0.31 or upper, to know the version, tape : adb version in your commande window"

Categories

Resources