Question

i made the connection between emulatore and physical device via USB.I had follow the link linkbut also it is not working properly it is running on the virtual device only.

when i am reseting adb then it is showing following error

[2012-04-04 10:06:40 - DeviceMonitor] Adb connection Error:An existing connection was forcibly closed by the remote host
[2012-04-04 10:06:41 - DeviceMonitor] Connection attempts: 1
[2012-04-04 11:00:41 - DeviceMonitor] Adb connection Error:An existing connection was forcibly closed by the remote host
[2012-04-04 11:00:42 - DeviceMonitor] Connection attempts: 1
[2012-04-04 11:32:53 - DeviceMonitor] Adb connection Error:An existing connection was forcibly closed by the remote host
Was it helpful?

Solution

Are you working with Eclipse? You have to connect your mobile device (with usb debugging mode on) with eclipse. How to do that, you can read here: Running APK on Device

edit: oh, it's the same link like yours, so what's the problem..?

OTHER TIPS

There are two methods.

  1. First enable USB debugging in your device and connect to development PC. Use ADB tool to install your .apk file in device you connected.

  2. Connect your device to PC. After select Turn on USB storage by dragging the notifications area. After that you can see your device as one removable media in your PC. copy your .apk file to this drive. After disconnect your device and check the option allow installation from unknown resources from Settings in your device. Now open file manger and open your .apk file recently copied. It will ask you to install this apk.

Enable USB debugging on your phone (Settings -> Applications -> Development -> USB debugging). You should now be able to deploy the app, provided you have set up the development environment correctly (ADT and the SDK must be downloaded and configured accordingly).

From command line, Go to android platform tools where adb is located. For the application you have created a .apk file would be generated

Use the below command to push the apk to the device.

adb push .apk /system/app/.apk

After pushing the apk, it would be ready to run on the device

If you are using eclipse then this may be the solution

right click on the project-> Run As-> Run Configuration -> select Automatic -> uncheck all the device name in the list -> click on Apply-> Click On run

If both emulator and physical device is running it will prompt to select one.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top