I am trying to develop an app using a game engine, that I build with VS2017. My phone is not recognized in either VS or the game engine, however it is recognized in Android Studio and I have been able to deploy an app to it.
I found this thread but all of these suggestions I had already done, as evidenced by the phone being recognized in Android Studio. One thing that may reinforce some sort of VS/Windows/Lineage issue is that after revoking ADB debugging authorization, unplugging and plugging the phone back in, I could never get the authorization dialog to come back to reauthorize the connection. Until, that is, I tried to deploy a test app in Android studio, and then it came back and I could authorize the connection. So, even though the device wasn't authorized it was recognized in AS, while even when it was authorized it was not recognized in VS.
The phone's OS is Lineage 16.
All other windows functions, file transfer, picture transfer, etc, work correctly.
The Samsung drivers are also installed and not just Win10.
I've set root access on the phone to both apps and adb and adb only, with no difference in behavior.
I've tried multiple cables, as well as USB2.0 and 3.0 connections on my pc. About the only thing I haven't tried is rebooting my pc, but since I already started this message I'll do that after I post.
Here's hoping someone might have an idea!!
Related
Persistent error on Samsung Galaxy Note 5
this is a weird issue that i am having for almost a year now, i'll try to be brief.
background story (What i think happened)
I own a Chinese aftermarket car infotainment system, running android 4.4. So, being the obsolete piece of **** that it is, i started digging around, and found out that it has something called Device link or something along those lines.
you have to download an app called EasyConnection from the play store, enable developer mode, and enable usb debugging, i know that's not the safest thing to do with Chinese stuff, but that's the only option i have at my disposal, so i have to manage.
anyway, it worked flawlessly for a year or so, then suddenly it refused to connect, with an endless connecting message. and my phone started giving me the Attention message, this was a year ago, and never worked since.
Attention
The connected device is unable to access data on this device. Reconnect the USB cable and try again.
Android File Transfer or Samsung Smart Switch must be installed on Mac OS X devices. To download Android File Transfer, go to https://www.android.com/filetransfer, or to download Samsung Smart Switch, go to https://www.samsung.com/smartswitch.
Phone behavior
Since then, whenever i connect my phone to my PC, either running windows or linux, it displays the Attention message. i can access files on my phone no problem, and it is not driver related, as this happens regardless of what driver is installed, or in the case of linux, no driver is required.
Android development
Now, a couple of months back, i decided to dabble in android development , as i have a couple of sysadmin years under my belt, and a beginner level knowledge of a couple of programming languages, so i thought android development would be fun, but here is the problem.
While my device is hooked up to android studio, i get this aforementioned error on random long intervals, but i am able to run my apps from android studio to my phone no problem. So i started to link everything together, and thought to seek help here on reddit after some fruitless internet diving.
note
I did a factory reset for my phone a month or so ago, so the only step remaining in my mind right now is to re-flash the stock firmware (i'm on stock for security reasons), but i am reluctant to do so because of the hassle of re-configuring my device again.
I'm hoping to accomplish the following :
Resolve the cause of the error.
See if my car system works with my phone after the error is resolved
Any help would be greatly appreciated.
I am trying to create a React-Native app and I need to connect my device to troubleshoot some issues that only occur on the physical device and not the simulator. For some reason I have never been able to connect my Pixel 2 XL to my PC. I am running Windows 10 and I have tried all of the following.
Enabling developer mode and USB Debugging on my device.
Uplugging and replugging my device 20+ times in a row.
Changing the USB port I am using.
Changing the USB connectivity settings in Developer Options > Default USB Configuration. (Options are: File Transfer, USB tethering, MIDI, PTP, No data transfer) I've tried them all.
Restarting my device while it's plugged in
Downloading the Google USB Driver (in Android Studio).
Restarting my PC when the device is plugged in.
Updating my PC, and updating my device.
Checking Device Manager and trying to update the driver. (So the device used to show up with the yellow warning triangle next to it and trying to update the driver never worked. But now, the device doesn't even show up in Device Manager anymore)
Factory Reset my phone.
Downloaded Media Feature Pack for N and KN versions of Windows 10 (Suggested by the google tech support)(I called them)
I feel like I've tried everything previously addressed in every Stack Overflow question on this issue.
Finally solved the issue. The data cable was the problem. If you have tried all the steps above, and nothing is working, buy a new cable. This one works great and seems very durable for my Pixel 2 X: https://www.amazon.com/gp/product/B01N4OKUB8/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
I had this issue too - my Google Pixel 2 XL is about 9 months old. Was developing an app, so using USB debugging to debug the app as I built it. One day it mysteriously stopped working, though no issues with charging. I tried everything, including using all the different USB ports on my laptop, with no luck.
I eventually gave up and started using the emulator on Android Studio, and since I didn't need data transfer for anything else, I didn't send my phone for repair or anything.
A few weeks later it just started working again, all by itself...
I don't think I did anything to fix it - the moral of the story is, if you don't need it urgently, there's a chance it might just decide to work again!
I am unable to attach VS2017 to my unity android app. Here's my setup.
I have adb connected via wifi.
C:\Users\Diamonds\AppData\Local\Android\sdk\platform-tools>adb devices
List of devices attached
192.168.86.20:5555 device
Unity successfully sends the build to the android phone, and logs show up when the app runs on phone:
I've got the app just running on the phone. Inside VS2017 the phone shows up correctly. When I select it, VS2017 spins for 20 seconds then does nothing. No error in VS2017 or in Unity.
Oddly I do not have the phone connected via USB. I do not know why it shows up there.
I think you can try USB instead of WIFI.
According to Microsoft's documentation
Wifi is versatile but super slow compared to USB because of latency. We saw a lack of proper multicast support for some routers or devices (Nexus series are well known for this).
using USB is a better option.
ref:
https://learn.microsoft.com/zh-cn/visualstudio/cross-platform/troubleshooting-and-known-issues-visual-studio-tools-for-unity?view=vs-2017
I've been working on the HelloWorld app for a few weeks now, overcoming many little hurdles, and I think I've reached the last one. I'm working out of 'Learn Android Studio' by Adam Gerber (not an endorsement, just happens to be the book I'm using). I have an HTC One.
When I open the device manager, there is no device listed. In the terminal, I issue the command adb devices and I get the heading "List of attached devices" with nothing listed. If I click the green run arrow, I'm asked to choose my device, but my device isn't shown.
I used to get the error "Unable to obtain result of 'adb version'" when I opened the device manager, but I don't get that anymore, for some reason. But now, when I open Android Studio, I get a Windows Firewall window telling me that some aspects of Android Studio are blocked, including public networks. I don't know if this is the reason for my difficulty or not (I don't think connecting my phone to my laptop is like a public network, is it?).
I went to the developer.android site and followed the directions for connecting a device:
How to connect an Android device to Android Studio.
Step 1 is: "Verify that your application is "debuggable" in your manifest or build.gradle file." The details on how to do it are provided, and I made the appropriate addition to my build.gradle file.
Step 2 is: "Enable USB debugging on your device." This is the thing where you tap your phone at a certain place in the settings to enable development capabilities. I did that.
Step 3 is: "When plugged in over USB, you can verify that your device is connected by executing adb devices from your SDK platform-tools/ directory. If connected, you'll see the device name listed as a 'device.'" As I mentioned above, I get a heading for a list, and no items listed. My book says on page 23: "If your computer does not recognize your Android device when you connect to your computer via a USB cable, you probably require a USB driver. If your computer initially recognizes your Android device, you should probably forgo installing a different or newer version of the USB driver, as this could cause the USB connection to fail." Since I've transferred image and music files to and from my HTC One dozens of times, I followed this advice and did not install a driver (Actually, before I read this book, I had started looking for a driver, following the links on the developer.android site, but I wasn't able to locate one).
On another site where programmers congregate, someone gave me this list of 4 items to check:
- Have you reinstalled adb? (I'm not sure what this means.)
- Do you have the DeveloperOptions SubMenu enabled on your phone? (yes)
- Do you have USB debugging enabled on your phone? (yes)
- Do you have AllowMock Locations enabled on your phone? (I did not, and I enabled it.)
Regarding the first item, my adb is an exe. How do I 'reinstall' that? I responded to his message, and he has not responded to clarify what he means.
Regarding mock locations, that was not enabled, and I enabled it and tried again to connect my phone to Android Studio. That's when the Windows Firewall window showed up for the first time. I don't know if it's because I enabled mock locations or not.
I also tried rebooting after starting the adb, as suggested by my book, on page 25, but that didn't do anything. "If after restarting the ADB server you still don't see the device, it's possible, though unlikely, that the USB driver requires a system reboot to take effect." I've noticed that adb starts up when I boot up (I tend to keep the task manager open), so I know my problem is not that the adb is not running.
I looked at many similar questions on this forum, and the most common advice seems to be to install a driver. Since my book says a driver might not be necessary and could ruin my USB connecting ability, and also since some programmers stated that their Android Studio connection to their phone was failing in spite of installing drivers, I'm not rushing to install a driver, especially since I need USB connectivity on my phone for my job.
So this is where I am. So, what about this statement in my book that if my laptop can see my phone, I don't need a driver. Would that be true? What else could be the problem?
Any help/suggestions/comments gratefully appreciated.
The fact that your computer can see your phone does not mean that you don't need a driver.
What that means is that your computer has the appropriate drivers installed for recognizing your phone as a media device.
What you need is for your phone to be recognized as an ADB device. These are often different drivers from the phone drivers that are installed by default, as the vast majority of users do not need to use developer tools with their phone.
If you can find these drivers from HTC, then they are very safe to install and the risk to your computer is negligible. Google's USB drivers installed via the SDK manager work for many devices and are also safe, though I cannot speak as to whether they will work with the HTC One or not.
I have a problem debugging apps on my Samsung Galaxy S3, (GTI9300, I believe this is also known as the international version) from Eclipse.
The thing is, debugging actually worked for a time and then it just stopped working. I've tried quite a few things to make it work again. I'll describe my whole experience briefly, to keep you from suggesting things I've already tried, and save us all some time.
When I first got my phone, debugging didn't work. When I plugged in my phone, the system detected it, and I could use it almost like a storage drive (using Media Transfer Protocol or some such thing) But when I started Eclipse and tried to debug, the debugger didn't see the phone.
I googled some, learned that I had to install some specific driver. I honestly don't remember which driver it was, but I believe it was an official one (from Samsung's website). Once I installed this driver, Windows would no longer detect my phone as a storage device. But the debugger did see it, and I was able to debug a few simple apps that I'd made. I could easily live with this tradeoff.
Then I got busy with other stuff and set Android development aside. I came back to it this weekend - after 2 or 3 months - only to find that it no longer works. No matter what I do, the debugger does not detect my phone (Windows still won't detect it either).
I tried all the first aid solutions like restarting Eclipse, rebooting my computer and rebooting the phone. Just for the sake of completeness, I do have usb debugging enabled on my phone.
The only major change of the whole setup that I can think of is that my phone's OS has recently updated. I don't know the exact version it was before, right now it's Android version 4.1.2 (Kernel version 3.0.31-1160235, if this is useful to anyone). I tried plugging the phone into other computers, it gets recognized as a media/storage phone. I can't install the Android development tools and try debugging on any of these computers - I'm stuck with the one I've got.
I've tried reinstalling the usb drivers for my phone. It didn't help. In desperation (and against my better judgement) I tried installing Samsung's software, first AllShare Control, and eventually Kies. None of it helped. When I run Kies, it gives me the option of connecting through USB or via WiFi. However it won't detect my phone when I plug it in. When I click "Troubleshoot connection" (or some such thing, unfortunately Kies decided to use my native language instead of English) it starts reinstalling the USB driver. This process takes quite a while, and fixes nothing.
I'm basically out of ideas, I don't know what to try next. Any help would be appreciated.