Android App "failed to install" on Samsung Galaxy Tab 10.1 - android

I've been testing my app on a tab emulator (runs just fine), but when attempting to run the app on a Samsung Galaxy Tab 10.1 today, I am running into a "failed to install" error. When I run, I am given the option for the device, I select it and then receive:
[2014-02-19 09:46:51 - Ops_Suite_Android] Failed to install Ops_Suite_Android.apk on device '4300f4b4b0979017': timeout
[2014-02-19 09:46:51 - Ops_Suite_Android] Launch canceled!
I increased the connection timeout to 10 seconds and still no luck. Immediately proceeding the timeout, on secondary run i am given :
[2014-02-19 09:46:57 - Ops_Suite_Android] Failed to install Ops_Suite_Android.apk on device '4300f4b4b0979017': EOF
[2014-02-19 09:46:57 - Ops_Suite_Android] java.io.IOException: EOF
[2014-02-19 09:46:57 - Ops_Suite_Android] Launch canceled!
After this attempt, the device shows offline for any further attempts. I pull out the USB and reconnect, only to go through the same errors every time. Any ideas?
By the way, I am noticing that the connection itself seems to go out after the second attempt and sometimes will reconnect, bringing up the device options all over again on my comp (like opening folders or opening pictures). I also notice that plugging in results in no charge to the tab, i get the charge symbol on the device with a big red x through it. Could this problem be related to connection issues or driver issues or something else?

This issue is generally caused when the device loses communication during an install. Try the following.
Clean your project. (Delete /bin/ and rebuild all.
Different USB Cable
Restart device.
Restart IDE and ADB Daemon (Reboot)
If the issue persists, try deleting your creently installed ADB driver, and use the one provided in the Android sdk-addons pack.

I had the same problem with a Samsung S4. Tried everything suggested. plus more.. I ended up rebooting my osx machine and it started working again.

Related

Android studio Error during Sync: An existing connection was forcibly closed by the remote host

I've been debugging for months with a physical Samsung pad connected via USB and now I can't load the app on the device for debugging. I rebooted everything yesterday and it worked until this afternoon! I get the same error all the time. The ADB appears to be running on port 5037.
I'm disappointed in how buggy the development environment is and feel like I'm spinning my wheels like back in the Win3 days fighting the environment instead of the app. Any suggestions would be appreciated...
3:11 PM Gradle build finished in 2s 40ms
3:11 PM Error during Sync: An existing connection was forcibly closed by the remote host
3:11 PM Session 'app': Error Installing APK
I'm using USB debugging. I've tried everything I can find on SO and nothing works:
1) Rebooted both laptop and device many times
2) Deleted app from device
3) Manually updated the SDK to 8.1.0 (auto update fails with file size error)
4) Unplugged and tried a different USB port
5) Updated the Samsung Android ADB interface from Win7 device manager
6) Killed adb via task manager and SDK kill-server and start-server
7) Turned USB / Developer mode off and on again
8) Deleted the device from Win Device Manager; re-scanned; updated driver software
I had this error.
There is low RAM in the system. I just closed some programs (Chrome used 1GB) and restart Android Studio.
Try also delete folder "build" and "app/build".
I can make this happen at will now and it seems like it happens when the device goes into sleep mode. So I'm debugging and all is working well and the problem occurs. I stop the app via Android Studio and reboot the Samsung pad. After that I get the funky temp device showing up and the ADB won't install. The fix is to unplug the USB cable. Wait about 1 minuet and plug back in. The temp device is gone and the pad shows up. All works well.

Why does Android Debug Bridge (adb) have to be restarted frequently?

This is what happens about half a dozen times every day:
An Android emulator (e.g. CPU/API: Intel Atom (x86), Target: API level 15) works fine for a little while, then Eclipse shows the following error when an app is installed
[2013-07-01 15:15:47 - Myapp] Failed to install myapp.apk on device 'emulator-5554': Connection refused: connect
[2013-07-01 15:15:47 - Myapp] java.net.ConnectException: Connection refused: connect
[2013-07-01 15:15:47 - Myapp] Launch canceled!
Sometimes closing and restarting the emulator will remedy this. However, most of the times, starting an emulator generates the following:
[2013-07-01 15:16:43 - Emulator] HAX is working and emulator runs in fast virt mode
[2013-07-01 15:16:43 - Emulator] emulator: warning: opening audio input failed
When this happens, the emulator will show up, but it will not work (i.e. apps cannot be installed). Resetting adb (DDMS > Device > Reset adb) will not work. I have to go to Windows Task Manager to kill adb.exe. Adb.exe will be restarted automatically in less than 20 seconds, and everything will be fine.
I am a bit sick of doing this many times every day, so I am seeking a way to avoid adb corruption.
Computer OS: Windows 8 Pro
CPU: Intel i5
Eclipse: Build id: 20121004-1855
Added on 2013-07-26:
I selected IronBlossom's response as the answer even though it does not answer this question specifically, but it solved the problem of having to restart ADB frequently. Actually, it solved multiple problems including a very significant one - unable to run Intel's Android emulators in fast mode and Windows Emulators simultaneously. There is a trick to run Genymotion emulators and Windows Phone emulators side by side.
Try using Genymotion . It runs on Oracle VM .
It even has GPS and Battery level features, comes pre-rooted with Superuser app.
I usually work with 2 computers, one is a High end computer playing windows 8 which I never got adb crashing or emulator running slow, but on my macmini with an i5 2415m and 2GB ram it crash a lot, but after I upgraded it to 5GB ram adb rarely get crashed, I can run 2 eclipses and 4 emulators and it rarely crashs.
So what I mean, is that maybe adb is not finished and it has some issues which may be related to memory leaks or thread synchronization, But (again but) it is just a shot on my experience, actually it never bothered me much.
When you hit a runtime error on device, instead of ctrl+c'ing out of adb, first click the prompt on the device acknowledging the crash has occurred. After that then ctrl+c out of adb. If it worked this should print out something happy.
adb devices

Device connection lost after APK install from MacBook

I'm running into a problem on my MacBook Pro. I type in "adb devices" with my device plugged in and I can see it listed there. However, when I install the application with "adb install" the connection gets dropped. This happens both in the Android SDK and in Eclipse. When I launch it in Eclipse I get this exception:
[2012-05-11 08:12:34 - Unexpected error while launching logcat. Try reselecting the device.] device not found
com.android.ddmlib.AdbCommandRejectedException: device not found
at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:752)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:373)
at com.android.ddmlib.Device.executeShellCommand(Device.java:397)
at com.android.ddmuilib.logcat.LogCatReceiver$1.run(LogCatReceiver.java:102)
at java.lang.Thread.run(Thread.java:680)
I unplug the device and reconnect it and it shows up right until the moment when I try to run the application.
This problem does not seem to happen on my Windows box.
(I do not have tethering on the Macbook and it is disabled on my Android device)

Device debugging Defy Eclipse Windows 7 64 bit

I am successfully using Eclipse with emulators. Now I want to use my Defy for device debugging, since the emulator is a bit slow.
My Defy has Cyanogenmod 7. My app is for 2.1 Android, so it should work. I followed all description and have device debugging set in my app manifest as well as the device settings.
If I type "adb devices", it now shows up one device. First I had problems with the driver with Win7 64Bit. After manual installation of the driver it worked.
I am wondering how to select the real device in Eclipse. In debug, I have my emulators. The real device does not show up in the list of my emulators. It is not an emulator so it makes sense. But how can a Start debugging on it. Or shall I copy the apk on the device and somehow attach Eclipse to the running process for debugging?
Best Regards,
Patrick
I do not get my Defy debugging in Eclipse. Some days ago it had worked. I just restarted my laptop and found the below error. adb is installed under the requested path. If I type adb devices in cmd in that path I get a device: efefeSOME_NUMBERrggr offline, Do not know if the offine is a problem
I also tries the wifi adb apps. If i connect with this tools I also get a device 192.168...:5555 device. This looks good.
After trying again eclipse debug, it directly starts the debugger. I have switched on enable debug, my phone is rootet. Can anyone give me a hint, what I may also consider? It had worked one day and now it does not.
[2012-04-12 22:10:01 - MyApp] ------------------------------ [2012-04-12 22:10:01 - MyApp] Android Launch! [2012-04-12 22:10:01 - MyApp] The connection to adb is down, and a severe error has occured. [2012-04-12 22:10:01 - MyApp] You must restart adb and Eclipse. [2012-04-12 22:10:01 - MyApp] Please ensure that adb is correctly located at 'C:\Entwicklung\android-sdk\platform-tools\adb.exe' and can be executed.
I have been learning Android by developing under Windows 7, Eclipse and the emulator. I wanted to start using my old LG Adroid instead of the emulator, but a soon as I plugged it in and did all the stuff to get it working with ADB, Eclipse blew up with : Please ensure that adb is correctly located at 'C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe' and can be executed.
If I unplug the phone, Eclipse will start up the emulator and work just fine. I found that if I first do a "adb shell" and then exit the shell, Eclipse is happy and works.
I need to do this on every reboot of Windows.
You have to download the USB Driver from Motorola here USB DRIVER
then USB debugging like "Waqas" says and i also use Unknow Sources. I Develop with a Motorola Defy 2.1 and it works fine :-D
...sorry i read you question to fast. Maybe try this go in Eclipse to Run->Run Configurations and set the Target to Manual. Then you should be able to chouse your device
You need to enable USB Debugging mode in your device's setting to allow eclipse (ADT) to use it for development.
Settings -> Applications -> Development -> USB debugging (should be
enables)

Problem Nexus 1 running apps on my phone from Eclipse

I have a Samsung Google Nexus S. Great phone.
I have been developing apps on it, not too much of a problem.
Since last week I can suddenly not run apps from Eclipse on the phone anymore. I get the following error:
[2011-04-11 20:12:48 - ImageBrowser] Android Launch!
[2011-04-11 20:12:48 - ImageBrowser] adb is running normally.
[2011-04-11 20:12:48 - ImageBrowser] Performing com.xxx.android.imagebrowser.ImageBrowser activity launch
[2011-04-11 20:12:48 - ImageBrowser] Automatic Target Mode: using device '34315B519D6000EC'
[2011-04-11 20:12:48 - ImageBrowser] Uploading ImageBrowser.apk onto device '34315B519D6000EC'
[2011-04-11 20:12:48 - ImageBrowser] Failed to install ImageBrowser.apk on device '34315B519D6000EC': An established connection was aborted by the software in your host machine
[2011-04-11 20:12:48 - ImageBrowser] java.io.IOException: An established connection was aborted by the software in your host machine
[2011-04-11 20:12:48 - ImageBrowser] Launch canceled!
I am going out of my mind. Everything has been working perfectly before. I have tried just running a Hello world app with the same problem.
My Machine: Apple i5, pretty standard.
OS: Windows 7 32 bit
Eclipse: Helios Service Release 2
ADB: Android debug birdge version 1.0.26
I have re-installed the google usb drivers as per this following link: http://developer.android.com/sdk/win-usb.html
USB debugging enabled on phone
I have hard factory reset my phone in case something is wrong.
I am at wits end. Everything worked just fine, and then it all suddenly went berserk and now nothing works.
2 things: about a week ago I plugged in an ipod which had been in someones windows machine and it appeared to have a virus on it. I have run AVG and removed one or 2 things that were on there, but has not helped.
Secondly I have a 3g dongle I use for internet, and that connects via usb. But I have been using this together with the phone no problem...
When I plug in the phone, it immediately appears in Eclipse in the devices panel, and it is online and showing Honeycomb android version. Then, when I hit run, the above message/error occurs and then immediately the device is offline. I can only unplug and plug in again, and start from the beginning with same results.
Very oddly, I have had issues when disabling USB debugging, and trying to copy photos from my phone. When I enabled the device as USB storage, it woudl connect fine, but not always stay on as stable. If I then went to the images folder, it would disconnect. Extremely odd.
Help???
As you can see from the your log, the issue is An established connection was aborted by the software in your host machine.
So it wasn't caused by 1) a physical loss of connection or 2) the device itself.
The issue therefore lies with your computer. Have you tried:
Performing a full system scan with at least one different anti-virus package
Disabling the active-scanning of your anti-virus software while copying
Re-installing ADB
As a last resort: re-installing Eclipse and the Android SDK/AVD

Categories

Resources