I used Unity 2019.
When I connect my android devices (3 devices, tablet included) to Unity and try to run and build any apk, devices are recongized in Unity but the compilation process fails. lt's, writtren :Android device 52000... is not responding
I had this problem with my new phone, which was occurring even after enabling USB debugging and authorizing the PC through the phone. I ended up finding the answer in here Unity's documentation:
Run the adb devices command from the platform-tools directory of your
Android SDK installation and check the output.
If the output list is empty and you are using Windows, you may need to
install the driver for ADB devices. For more details, refer to the
Android SDK/NDK Setup documentation.
If the list contains entries with the unauthorized label, you may need
to authorize your computer on your device and give it permission to
debug it. Check the device’s screen for the corresponding dialog.
If the list contains your device with the device label, build your
Project in Unity again.
I resolve the problem.
In USB connection mode, on my phone, there are 4 options:
Transfer files
transfer images
Connect a MIDI device
Charge this phone.
I ONLY changed the connection mode to TRANSFER IMAGES.
After that, I received a prompt asking me the validate this connection mode. I did it and it works fine.
I resolved this issue, by changing the USB connection mode to Image Transfer(PTP) in my MI device
the problem is very clear. The compilation is successful, which means there is nothing wrong with your code. And the error message in the dialog box is clearly saying that
Make sure USB debugging has been enabled
So, to solve this simply follow the steps below -
Navigate to Settings > About Phone > Scroll to bottom > Tap Build number several times
Go back and now access the Developer options menu, check 'USB debugging' and click 'OK' on the prompt
You can also checkout this link
On android device, when prompted for "Allow USB debugging?", selecting "Always allow from this computer" checkbox solved the problem for me.
In order for my phone to show up the "Allow USB debugging?" dialog, I revoked the USB debugging authorisations from my android device and then ran "adb devices".
Also once I did this, unity was showing my device name instead of just device id.
Here's what worked for me.
Windows key type cmd
cd C:\Users\[name]\AppData\Local\Android\Sdk\platform-tools
adb kill-server
adb start-server
Related
I just installed Android Studio Bumblebee (2021.1.1 Patch 2)
But when I try to run my emulator, I got allow USB debugging prompt that always showed up even after I press allow, check the always allow option, or even cancel it.
I already tried to restart my adb server and remove and create a new emulator, wipe the data and try to cold boot it, but the issue persists.
Does anyone know what is the root cause of this issue and how to solve it?
I can still develop using real device but I do want to know if this issue able to be resolved.
Emulator: Google Pixel 3 API 30
If the "Allow USB debugging" message is shown again and again then this is usually a problem of the host, not of the Android device.
You should reset the Android ADB authentication key by deleting it and then restarting ADB. A new authentication key (pair) will be generated which will hopefully work.
To do so delete the files adbkey and adbkey.pub in the folder ~/.android/.
Then execute adb kill-server and finally restart adb by executing adb start-server.
Note that this will reset USB ADB authorization of all devices you had connected to that PC/user account.
I had the same issue and and manage to fix it by turning off and back on usb debugging in emulator developer options. Still don't know what caused the issue in the first place.
I able to resolve this issue by creating new AVD with X86_64 system image.
I know this question was asked a lot, but going through dozens of answers none have been helpful.
I'm attempting to run a simple hello world on my Huawei Mate 9 using Android Studio 2.3.1 (The APP is 4.X Jellybean API) running on Debian (Jesse).
-I have enabled debugging options on the phone (I can see developer options)
-Installed the SDK and ADB through the Android Studio.
-Device is being detected successfully on ADB devices.*
-I have tried MTP and PTP (currently it's on PTP)
Despite all different combinations I don't see my phone ready for uploading my program.
*With android studio closed:
when I check adb it usually never finds the phone the first time (adb devices) but after i do kill-server and start-server, i get the unique phone ID the second time I run adb devices. Needless to say, should I run studio after the second time around when it detects it, the phone still does not appear.
Thanks
Try this two solutions :
1) Go to setting and than in security and enable " Unknown source " to allow installation of apps from unknown source. If its still not working try second solution.
2) This problem can be due to unsupported adb driver of you mobile model. For this Download PdaNet+ a universal adb driver downloader for all devices. It will ask to remove current driver and go for it. It will fix all the adb driver related issue.
Link : http://pdanet.co/a/
So after rigorous search, I've found the reason for incapability of finding the phone in the android select deployment target menu is due to an option within a hash code menu.
You need to dial ##2846579## (works on Huawei 7 and onwards phones) in order to find a hidden window, for me it says ProjectMenu as the activity title name, then you must pick Background Settings->Background Debug->Open then restart your phone, should you have avd,android running well on your pc and debugging options activated on your phone this is all that's needed in order to deploy your app successfully.
I known there is lots of answers about this question, but still my mobile device not connected to eclipse IDE.
The following is what I already did:
1. restart adb or type command in cmd "adb kill-server/adb restart-server", eclipse find nothing in the devices.
2. execute netstat -aon|findstr "5037", finding there is only one process "adb" occupy the port
3. check the phone driver in device management, finding the phone is install correctly.
4. execute "adb devices":
List of devices attach
1f06cbba device
I thought may it's my phone's problem, so i remove it, and create a virtual device avd, the eclipse still don't work.
My Operating System is Windows 7 and Eclipse IDE Kepler.
can any body help me to successful run my first android helloworld?
Thanks a lot!!
additional explanation
debug mode is in phone is ON
adb is in the variable %path%(maybe some should answered)
try the latest adt-bunble in adroid website, it still don't work.
Try turning "developer options" on in your device. (Option you haven't tried).
To access these settings, open the Developer options in the system Settings. On Android 4.2 and higher, the Developer options screen is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.
Have you added adb in your class path variables? If not , you should append the class path with following paths :
path-to-sdk/android-sdk/platform-tools
path-to-sdk/android-sdk/tools
Try re-installing ADT Plugin. Worked for me last time.
Install your current mobile Adb USB driver and update Google USB driver
Check the MTP/PTP mode for your device:
http://lh3.ggpht.com/-8UMNs7Vg_dY/UVC6_6PnbDI/AAAAAAAAAIg/NjKOvAp9cDs/02-select-camera-ptp-mode_thumb%25255B1%25255D.png%3Fimgmax%3D800
In some devices you can find this under Settings->Storage->Menu Options(three vertical bullet squares).
When you say->the phone debug mode is open, i assume your developer options usb debugging is already enabled
I am looking for a way to debug a device remotely over the Internet.
I am getting a lot of bug reports from my users which I can't even reproduce. It would be easy to solve them if I could debug the device over the Internet as if it were connected to my PC.
Is this possible?
I heard about debugging over wifi in local network, maybe there is similar way to achieve it over the Internet?
It is possible to setup Android device for debugging over Internet, however it requires USB connection to enable it or root access on the device. In addition to that you will have to setup port forwarding to device to accept incoming ADB connections from the the Internet. It hardly can help unless users of your app are developers with great desire to cooperate.
You can find detailed instructions here:
http://www.cleansoft.lv/debugging-android-applications-remotely/
Steps to Follow:
First In Android Settings Application go to About Device option.
Click 9 times on Build Number option, so that you can unlock Developer Options setting.
Now In you Setting's Application, you will have Developer Options enabled, go and click on it.
set following options on : Stay Awake, USB Debugging and if you have Internet Adb option in menu set that also enabled if not then dont worry continue the steps.
Now open your Android Studio and the application you want to run on the android device.
In Android Studio, at bottom click on Terminal tab, Terminal window opens.
Now through your terminal go to the directory where your Android SDK is stored
In SDK directory go to platform-tools directory.
Now if you list the files in the platform-tools you will see adb there.
Running following Commands.
as an example.
adb connect <ip-address-of-your-device>:5555
as an example:
adb connect 10.10.0.21:5555
The terminal should show something like below
adb server is out of date. killing...
*daemon started successfully*
connected to 10.10.0.21:5555
Now run shell command
adb shell
you will get the prompt something like this, i my case i used android x86 device for debugging.
shell#x86_64:/$
Now if you go to the task bar in the android studio and click on Run options and then Run'app' you will be able to see the device as your Deployment Target.
Hope it helps !
You can use Crashlytics in your app.. It helps you to get the detailed crash logs. Whenever an app crashes, it will send you the detailed crash report, from which you can figure out what is happening at the client side.
Get more info about adding crashlytics to the app from here.
Send this new app to the client so can have workaround:
You can also use adb via tcp ip:
adb connect ip:port
Use a remote access (teamviewer or droid apk) to enable debugging in android developer tools.
In the router where the android is connected remember to create port forwards to the android ip.
In your machine with adb installed do:
adb connect public_ip:port
After being connected, you can do:
adb logcat
or
adb shell
Or any adb command you want to.
try Debugging Firefox for Android over Wifi it's working with me
https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Debugging_Firefox_for_Android_over_Wifi
There are lots of times Eclipse can't connect to emulator that I turned on from AVD Manager, and just starts a new emulator by itself,( two emulators are the same ):((. How can I make eclipse find the emulator ?
some times restarting adb solves your problem
adb kill-server
adb start-server
for working easier in command line in windows, add the path of adb.exe to that Windows' path. For example add ";C:\Program Files\Android\android-sdk\platform-tools" to System Properties-> Advanced-> Environment Variables-> System Variables-> Path
One of the reasons of problems in device connection is a long USB cable or a two-piece cables like keyboard USB. try to connect your device to PC directly by a short cable.
I guess that you might suffer from the issue that the manually started emulator got disconnected somehow, shown with a message like
Error: emulator-5554 disconnected
in the Eclipse console view. There are several related questions and answers on stackoverflow like Why do I get a emulator-5554 disconnected message,
but for me none of those answers helped.
Whenever I see the error message for disconnection occur, I just shutdown that emulator and start it again. Normally that already "fixes" the problem, it just works on the next attempt (for me).
I was just experiencing this issue also. I agree with breceivemail, the ADB reconnected to the emulated device after reset, but there is a shortcut using Eclipse:
In the DDMS view => Devices window => View Menu (the down triangle in the header) => reset adb
You can choose the target device manually by changing the run configurations.
Run -> Run configurations -> choose your App -> Target tab -> select "Always promt to pick device"
If your device isn't available you will at least don't start a new Emulator.
If the emulator is still active, you can use adb to connect to it via tcp. In this way you can connect a disconnected emulator to your development system's loopback one port higher, just like if you are using emulator-5554, you can connect to it by using a higher port.
adb connect localhost:5555
There was been an issue with this technique, where the emulator control becomes inactive, and the developer cannot send GPS coordinates or SMSs or calls to emulator.
There is a one click method to do this
Open notepad
Type the below code
#echo off
adb connect localhost:5555
Save the file as your_file_name.BAT
Copy the file to Android SDK/platform_tools
Create a shortcut, give it a custom icon, use it anywhere you like
Open the DDMS view from Eclipse, and simply click on the emulator name you want connect to in 'Emulator' tab.