Getting "Connecting over ADB to localhost:5277...failed" - android

Hi all i am trying to launch Desktop Head Unit(DHU) using android ADB.
I have followed all steps what mentioned in installing DHU steps.
But i am getting following error.
Please some body help me how to resolve this.

Make sure you perform the following steps:
Make sure developer mode is enabled on your phone.
Install Android Auto on your phone.
Enable developer mode by tapping on the title in the app several times quickly.
Once in developer mode, tap on the 3 dot menu on the top corner and click "Start head unit server".
Connect your device to the computer.
On your computer now, enable tcp forwarding via "adb forward tcp:5277 tcp:5277" (if this fails, you may need to call adb kill-server). You will need to perform this step any time you disconnect then reconnect your phone to the computer.
Start the DHU by calling desktop-head-unit.exe

"Developer Mode
Finally, a note about developer mode, since a few people will certainly ask. It's still there and accessible in basically the same way. Instead of tapping several times on the lead image, you'll want to give ten quick taps right on the words "Android Auto" in the action bar. Just like before, a toast message will confirm that it worked. But don't expect anything new in the developer options screen, it's identical to the previous version."
AndroidPolice
Enjoy your Android car development ;)

First connect your phone to computer then open android auto on your phone click menu icon(you need to enable developer mode on app first) click start head unit server.Try to open DHU on your computer.

Related

Android stuck on "Installing" and "Launching App"

When I try to run my application via Android Studio on a virtual device, or a physical device, my Kotlin app runs the first time, but afterwards I need to disconnect my device each time I want to publish it again.
When I click on "Run App" it just says "Install" an the bottom. When I click it, it says "Launching App". I've had this problem for some time now, and I hope somebody knows the solution for this.
I've tried rebooting and turning USB-debugging off and on. Both work the first time install, just like disconnecting and reconnecting the device. After that however, again it keeps getting stuck on "Installing".
On a virtual device u could try to Open AVD Manager and then click on Wipe Data from dropDown list in actions column

Cannot run on production devices

When I run my application, the message below is printed in the error log. I don't understand if the problem is from my application or if the message is printed by my Android device.
E/NEW_BHD: Cannot run on production devices!
I read this answer Unable to run 'adb root' on a rooted Android phone , but my device is not rooted.
Why this error log is printed ?
Try enabling this function: go to Settings -> Security Just activate Unknown sources.
Now that you're ready to install your apk.
The main problem (I believe) that causes this, is your mobile's battery.
When Motorola mobiles have low battery, and they're connected to a computer, the USB option for the mobile will be forced to charging only mode.
To solve this, just swipe down from the top, click the USB for charging, touch for more options and select File Transfer. This will resolve your problem.
Try to active Developer Mode on setting of your device.
Enable Developer Options In Android 6.0 Marshmallow
Pull down on the notifications shade and open the Settings app. You can also achieve the same thing from the app drawer if you so wish.
Scroll all the way down and tap on ‘About phone’.
Now scroll down again and you’ll see an entry labelled ‘Build number’. Keep on tapping till you see a prompt that says ‘You are now a developer!’

Android TV SDK : Setting Proxy for the Emulator?

I have installed the Android TV SDK Developer preview for Windows. I am in a corporate intranet environment. I can start the Emulator, but the main screen endlessly loops with the "Preparing Recommendations" animation. I can navigate to the Settings and see that there is no network (no wired and no ethernet).
I suspect this might be a proxy issue. I have tried launching the Emulator with the following command:
C:\Eclipse_w_Android\adt-bundle-windows-x86-20140624\sdk\tools>emulator -avd AVD_for_Android_TV_1080p_by_Google_X86 -http-proxy http://MY_PROXY_IP:8080
(MY_PROXY_IP is replaced with my company's IP address)
It launches the Emulator but doesn't seem to have any effect on the network.
Has anyone else been able to get the Android TV Emulator to fully load in a heavily firewalled / proxied environment?
I thought I was experiencing this issue as well (and had originally commented as such), but I later realized that there was no actually connectivity problem. Two things to note:
"Preparing Recommendations" will appear indefinitely, and I presume this is simply because there are no apps by default feeding recommendations to populate this screen.
Both the Ethernet and Wireless items will show that they are not connected. However, if you run an app that uses the network (a simple WebView is sufficient as long as the app has INTERNET permissions), you'll see that it connects just fine.
I would suggest trying a test app to check connectivity, as there is no other indicator I can find suggesting that it is working properly. I suspect you'll find that all is well.
you probably forgot the first part username password # server port
your company probably has the ip setup with username password

Eclipse/Android Studio Device not showing up in Chooser Dialog

I am trying to debug my android application on a device but it is not showing me any device connected in the chooser dialog. What could be the problem ?
I've tried to change connect and disconnect the device again.
I restarted the eclipse
I checked Window->Preferences->Android it shows me the SDK Targets.
What else can I do. My Computer recognizes the device but the eclipse chooser dialog doesn't show any device connected.
Please help...
There is a third party software named "moborobo" : http://www.moborobo.com/
You can install this there after you didn't need any driver for any perticular mobile device...it will automatically gets detected and you can choose it from the dialogue box. Hope this will help.
Check that your device connected as PTP device(Camera). Notification Bar -> USB Connection.
If your device connected as MTP(as common data storage) then AndroidStudio don't recognize it as debuggable device. At least that works for me and my Nexus.
There is another method that you can use .....when you run your project as android project, it generates an .apk file. Just move that .apk file to your device. Then on device run the application in debug mode.
What you can try is: killing adb.exe (using Windows Task Manager) (your IDE will restart it when needed automatically)
If you have more than one IDE open (for instance eclipse and Android-Studio): shutdown one of them, because there may have some conflicts between them when trying to connect with ADB.
If your device was never recognized through ADB (never shows up in eclipse chooser dialog, nor in Android-Studio chooser dialog): then you can try to install the generic Android Driver provided by Google (<SDK_HOME>/extras/google/usb_driver/)
I often encounter this problem, particularly when starting a particular emulator device for the first time that day. i.e. I launch my app, choose the device, the device starts up - but not before the launch of my app has timed out. I find that although the emulator device appears to have started properly - Eclipse does not recognise it as a "running Android device".
I simply shut down the device and repeat the process. I find that the second attempt is (almost) always successful - even if the app launch "times out", the emulator will be talking to Eclipse and I can then relaunch my app on the running emulator device.
Increasing the ADB connection timeout (defaults to 5000ms: Window...Preferences...Android...DDMS) may or may not help.
Hope this helps !

Ringing myself using android emulator

I am developing a small application on Google's android emulator.
I am trying to figure out how I can simulate a phone call from one instance of an emulator to another (both running on my computer). Does anyone know how this can be done?
Thank you very much.
Launch the dialer application on the
first emulator. As the
number to dial, enter the console
port number of the second emulator you'd
like to simulate a call on.
You can see the port number of the instance in the windows title of the emulator.
alt text http://www.freeimagehosting.net/uploads/6c15bc13f1.png
Press "Dial". A new inbound
call appears in the second emulator
instance.
Alternatively to the solution provided by Kami, you can use DDMS or just the android console (in Linux and assuming emulator port is 5554):
$ telnet localhost 5554 <<!
> gsm call 12345678
> !
simply open the DDMS from the eclipse and choose emulator control
and you'll find a tel bar just type the phone number you want the emulator to receive and hit call
In order for calling the port number to work, both emulator instances must be started from the same android AVD manager process. Two separate 'android' processes launching different emulators will not be able to call each other.
In Emulator's "Extended Controls" window, there's an option to ring the phone artificially by means of a button "Call Device". See screenshot below:

Categories

Resources