Sun Virtual BOX + SDK + ADB + HTC Legend = doesn't upload app? - Android Software Development

Hello
I'm (trying) to developing android and deploying on a real device (HTC Legend) using a virtual machine Windows XP Pro guested into SUN Virtual Box on a real machine Windows 7.
My configuration:
- HOST machine real (Windows 7)
- Sun Virtual BOX
- VM XP Pro
- SDK Android
- ADB Manager
- Eclipse
- HTC Sync
(all software updated to 13-jun-2010)
Inside XP Pro (virtual machine...):
Code:
C:\android\android-sdk-windows\tools>adb devices
List of devices attached
HT03SNX02682 device
RUN CONFIGURATION into Eclipse-->ANDROID DEVICE CHOOSER
Code:
[2010-06-14 13:02:23 - HelloWorld21] ------------------------------
[2010-06-14 13:02:23 - HelloWorld21] Android Launch!
[2010-06-14 13:02:23 - HelloWorld21] adb is running normally.
[2010-06-14 13:02:23 - HelloWorld21] Performing android.helloworldapp21.HelloWorld21 activity launch
[2010-06-14 13:03:15 - HelloWorld21] WARNING: Application does not specify an API level requirement!
[2010-06-14 13:03:15 - HelloWorld21] Device API version is 7 (Android 2.1)
[2010-06-14 13:03:15 - HelloWorld21] Uploading HelloWorld21.apk onto device 'HT03SNX02682'
[2010-06-14 13:03:21 - HelloWorld21] Failed to upload HelloWorld21.apk on device 'HT03SNX02682'
[2010-06-14 13:03:21 - HelloWorld21] java.io.IOException: Unable to open sync connection!
[2010-06-14 13:03:21 - HelloWorld21] Launch canceled!
HTC Legend is set with USB debugging flagged true...
Anyone can help me?
How resolve exception... java.io.IOException: Unable to open sync connection! ?
Thank you...

Did you install the adb USB driver?
http://developer.android.com/intl/de/sdk/win-usb.html

lhurtado said:
Did you install the adb USB driver?
Click to expand...
Click to collapse
oh yes... I also modified it to support HTC Legend inserting those strings:
;HTC Legend
%SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C97
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C97&MI_01
;
I found suggestion for this on a forum...now I dont rember where but could recover the site...if necessary.
Besides... the fact that ADB see the device, is not indication of the fact that the phone is connected?
thku!

Related

Ubuntu 0.2 with Synergy (remote keyboard)

I thought I needed a remote keyboard and mouse in the latest 0.2 ubuntu release.
(Many, many thnx to the developers!)
Options:
* With usb host? Too difficult for me ; )
* With remote desktop? Didn't work with my knowledge ; )
I succeeded with Synergy (http://synergy2.sourceforge.net/)
Install it on your windows machine.
Install it with ubuntu's package manager (Quicksynergy) in ubuntu
Try youtube for connections settings.
The result is my HD2 Ubuntu as a (sort of) second display!!

[Q] my journey to try and develop with an htc aria

Hi,
I have two small apps that I have devleoped using eclipse and the emulator. Now I want to use eclipse and my htc aria.
I followd the sdk's directions for downloading the usb driver and I now have a folder named "usb_driver" in my sdk. However, windows can't find a driver for the htc aria in that folder.
THe next thing that I tried was to use "HTC sync" from HTC. However, I can't even get HTC sync to work all. MY aria can't find HTC sync on my VIsta compter. After digging into this, I found that windows gets an error when it tries to run the htc sync driver. This is detalied below:
Device Manager:
Android USB Devices: My HTC
Device status: Windows cannot initialize the device driver for this hardware. (Code 37)
Click 'Check for solutions' to send data about this device to Microsoft and to see if there is a solution available.
Description:
Windows was able to successfully install device driver software, but the driver software encountered a problem when it tried to run. The problem code is 37.
Problem signature:
Problem Event Name: PnPDeviceProblemCode
Architecture: x86
Hardware Id: USB\VID_0BB4&PID_0C92&REV_0100&MI_01
Setup class GUID: {f72fe0d4-cbcb-407d-8814-9ed673d0dd6b}
PnP problem code: 00000025
Driver name: ANDROIDUSB.sys
Driver version: 2.0.7.1
Driver date: 06-10-2009
OS Version: 6.0.6000.2.0.0.256.6
Locale ID: 1033
I am at wits end. It seems that a USB driver for the HTC aria isn't ready yet from the android download site and the drivers from HTC won't work on my computer.
Has anyone else seen anything like this? Is there another way that I can run my apps on my phone?
Thanks,
mhuman1
You may need to manually add a couple of lines to the driver .inf
I did this for an incredible. Search google for "htc incredible usb driver" and use the aria usb pid/id
I modified the driver's inf file like suggested abobe with the following additional text in the two indicated places and now my phone shows up using the "adb devices" command. It shows the serial number of my htc aria.
;HTC Aria
%SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C92&REV_0100
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C92&REV_0100&MI_01
However, I still can't access the phone from eclipse. Do i still need to do more setup in eclipse?
Thanks,
mhuman1
Htc Aria shows up in DDMS but not as project target
HI,
Now my HTC Aria shows up under the DDMS perspective with its serial number, but I don't know how to make eclipse launch my application on the phone I think that I must be overlooking something really silly.
Thanks,
Keith

MotoUSB reverse tether w/ linux success

I have successfully used reverse USB tethering on a flipout. This method should be portable to other devices running the motorola android multi-device driver with usb0.
If you are comparing to any windows drivers, say that installed from the driver installer MSI when connecting a flipout and maybe other devices in 'portal' mode, the (windows) driver will be motousbnet. On linux, the driver is cdc_subset. However, this driver does not know how to bind to the motorola
1. Figure out the usb vendor id, product id, and interface class, interface subclass, and interface protocol of the networking interface. On the flipout, this is named the 'motorola networking interface'. On my device, it has these ids: 0x22b8, 0x41da, 0x02, 0x0a, 0x01. You can find these ids via exploring /sys/bus/usb on a linux system, or with the lsusb utility.
2. patch your cdc_subset driver to support the USB id and interface of the above device. You will need to inspect via lsusb or sysfs to setup a 'product' and 'driver info' structure in cdc_subset.c to select the correct interface and endpoints. The pertinent parts of my cdc_subset.c are as follows:
Code:
add to products
{
// Moto flipout usb
USB_DEVICE_AND_INTERFACE_INFO (0x22b8, 0x41da, 0x02, 0x0a, 0x01),
.driver_info = (unsigned long) &motousb_info,
},
add near other driver_infos:
static const struct driver_info motousb_info = {
.description = "Motorola USB endpoint",
.check_connect = always_connected,
.in=0x84, .out=0x03,
};
3. Doing such a mod and compiling yourself a new cdc_subset.ko, and installing that, will yield a usb driver that can talk to usb0 on your flipout. At this point, you just have to configure networking. I setup proxyarp on my LAN and usb0 interfaces, and set up some manual addresses and routes. Other options could be to add usb0 to a bridge, or do routing and DHCP, or routing + nat + DHCP. You'll probably need to netcfg rmnet0 down and setprop net.dns1 and net.rmnet0.dns1 your ips manually. Make sure you save your old dns. I'm not sure if that gets restored from carrier when you turn rmnet back on.
4. after all that, you should be online.
5. EDIT: all compiling and module installation steps noted above happen on the host PC, if that wasn't clear.
Work to follow:
use SL4A to automate usb0 bringup
interface with APNDroid to soft-down the 3g instead of nuking it the hard way. killing the radio process will get you back online, but thats effectively the same as resetting the baseband, so you'll need to re-unlock your SIM etc.
Thanks man! This is awesome. It worked on my Motorola Defy (same parameters) under Ubunutu.
Hi,
I thing this is what i am looking for, enable a motorola device (defy) to be a usb0 device with ubuntu so you can have an IP, and ssh easly with your droid (using vlc remote with usb cable). I realy appreciate this native feature with my old htc.
where is the cdc_subset.c ?
tkx
balek said:
Hi,
I thing this is what i am looking for, enable a motorola device (defy) to be a usb0 device with ubuntu so you can have an IP, and ssh easly with your droid (using vlc remote with usb cable). I realy appreciate this native feature with my old htc.
where is the cdc_subset.c ?
tkx
Click to expand...
Click to collapse
It's in the kernel source. -- You'll have to download the linux or kernel source package that matches the kernel you run on your ubuntu machine, modify your cdc_subset driver, rebuild it, and install it.
Learning things like the kernel build system and how to install a kernel module are exercises for the reader.
Good job! I'll try it once i get my Ubuntu installation up and running again ^_^
Defy and Debian USB network works partially...
Hello. The idea was good...
My config is:
- on one side: a Defy (CM7 1.0-RC1 Nightly build 2037, Gingerbread 2.3.4)
- on the other side: a Linux Debian (Squeeze , kernel 3.0.0-1-686-pae)
I patched the cdc_subset driver as proposed. I saw a little difference on the endpoints: lsusb -v reports 0x83 for 'in' endpoint and 0x2 (bulk) or 0x3 (interrupt) for 'out' endpoint. I tried all combinations and only 0x83/0x2 give a working ping between hosts. => Are the initial endpoints working (0x84/0x3) ?
See attached file for the complete listing, search 'SDX' to see where I patched.
When I plug the USB cable, the usb0 interface is brought up on linux automatically and that's perfect.
With a simple network configuration, ping works on both hosts.
.
So everything seems right.
I then tried to transfer a huge 100MB file to see the performance:
- scp from linux to defy => OK, ~5MB/s
- scp from defy to linux => FAILURE after a few MB transfered
In the second test, the connection is completely frozen and I see errors on both interfaces (ifconfig usb0, error packets). I repeated the test multiple times with alternate network configs, without wifi etc., and I could never transfer the file completely.
Can someone confirm me:
- that the transfer is working for him in both ways with huge files
- what is reported by "lsusb -v -d 22b8:41da" to see if my endpoints for a Defy are correct
I'm not sure, but maybe cdc_subset is not the right driver to patch ?
Or simply it's a bug in scp or sshd on Defy ! I should try with something else like ftp or http...
I keep working on this topic...Thx for any clue !
sdxmob said:
Hello. The idea was good...
My config is:
- on one side: a Defy (CM7 1.0-RC1 Nightly build 2037, Gingerbread 2.3.4)
- on the other side: a Linux Debian (Squeeze , kernel 3.0.0-1-686-pae)
I patched the cdc_subset driver as proposed. I saw a little difference on the endpoints: lsusb -v reports 0x83 for 'in' endpoint and 0x2 (bulk) or 0x3 (interrupt) for 'out' endpoint. I tried all combinations and only 0x83/0x2 give a working ping between hosts. => Are the initial endpoints working (0x84/0x3) ?
See attached file for the complete listing, search 'SDX' to see where I patched.
When I plug the USB cable, the usb0 interface is brought up on linux automatically and that's perfect.
With a simple network configuration, ping works on both hosts.
.
So everything seems right.
I then tried to transfer a huge 100MB file to see the performance:
- scp from linux to defy => OK, ~5MB/s
- scp from defy to linux => FAILURE after a few MB transfered
In the second test, the connection is completely frozen and I see errors on both interfaces (ifconfig usb0, error packets). I repeated the test multiple times with alternate network configs, without wifi etc., and I could never transfer the file completely.
Can someone confirm me:
- that the transfer is working for him in both ways with huge files
- what is reported by "lsusb -v -d 22b8:41da" to see if my endpoints for a Defy are correct
I'm not sure, but maybe cdc_subset is not the right driver to patch ?
Or simply it's a bug in scp or sshd on Defy ! I should try with something else like ftp or http...
I keep working on this topic...Thx for any clue !
Click to expand...
Click to collapse
Any news with defy ?

ADB stopped working - Device Not Listed [Solved]

I was experiencing massive issues getting adb to work for my phone. It had been working at one stage prior to a firmware update (Now on Android 4.0.4 on a UK Samsung Galaxy s2 i9100) and it randomly stopped working. Im on XP 64 and it may only be an issue for 64 bit operating systems.
Usb debugging had always been set, the drivers were installed, but adb would not work.
Numerous help guides all seem to concentrate on getting the correct drivers to install with kies or with extracted drivers from kies only but this was largely not my problem (or the drivers with kies for the samsung s2 no longer allow adb?) My phone is rooted with superuser and busybox only but otherwise has completely standard firmware (had been rooted and was unrooted when android 4.0.4 was upgraded).
So starting from a point with the drivers installed I can connect to my phone as an MTP, as a Camera, as a Mass Storage device and with Kies. I have Kies installed and have had it reinstall the drivers multiple times but this should probably work fine without Kies and just the latest drivers installed as available from here http://forum.xda-developers.com/showthread.php?t=961956. I have a device listed in Device Manager "Samsung Android ADB Interface" with driver version "2.9.505.831" but no ADB.
It appeared I had an issue with the uart connection on my phone (as shown in the phoneutil screen) and also I needed to be able to install the adb interface driver from the google sdk.
I was able to do neither of these using the standard methods/guides I was able to find elsewhere.
To change the uart setting back to pda and the usb connection back to pda the special code *#7284# no longer works on the Samsung Galaxy s2 i9100 Android 4.0.4 (or at least not for me) I had to download the bettercut apk (which I may very well had to pirate because I couldn't find it in the market) and made a shortcut to phoneutil manually
bettercut > new shortcut > no > all activities > phoneutil
There you can change the settings to modem and back to pda (when connected in modem mode xp listed a new device "7 CDS's" which would not install).
After that I had to install the google driver from the sdk (adt-bundle-windows-x86_64\sdk\extras\google\usb_driver)
And to allow Windows XP 64 to install the drivers you need to edit "android_winusb.inf" to add the samsung galaxy as a valid device.
I added the following lines to [Google.NTx86] and [Google.NTamd64].
android_winusb.inf
[Google.NTx86]
; Samsung galaxy
%CompositeAdbInterface% = USB_Install, USB\VID_04E8&PID_6860&MI_00
%SingleBootLoaderInterface% = USB_Install, USB\VID_04E8&PID_6860&MI_04
%CompositeAdbInterface% = USB_Install, USB\VID_04E8&PID_6860&adb
%SingleBootLoaderInterface% = USB_Install, USB\VID_04E8&PID_6860&adb
[Google.NTamd64]
; Samsung galaxy
%CompositeAdbInterface% = USB_Install, USB\VID_04E8&PID_6860&MI_00
%SingleBootLoaderInterface% = USB_Install, USB\VID_04E8&PID_6860&MI_04
%CompositeAdbInterface% = USB_Install, USB\VID_04E8&PID_6860&adb
%SingleBootLoaderInterface% = USB_Install, USB\VID_04E8&PID_6860&adb
I found instructions to add a device USB\VID_04E8&PID_6860&MI_00 however this did not match my phone, I needed to manually determine the device ID and add it myself before windows would let me install the drivers.
Device Manager > Samsung Android Phone > Samsung Android ADB Interface > Properties > Details > Matching Device ID
And the phone ADB interface had the following ID USB\VID_04E8&PID_6860&adb
Which I added as above (if your phone doesnt match you would need to do this too I think). I then updated the driver for "Samsung Android ADB Interface" using the "Android Bootloader Interface" which I can now select from the Google SDK Driver.
Install "Android Bootloader Interface" from google SDK.
I then was able to reinstall the "Samsung Android ADB Interface" driver as before or the "Android Composite ADB Interface" from the google SDK and ADB started working (as tested with ADB Devices, mine is now listed, woot!).
So i think the problem was mainly the lack of the Android Bootloader Interface driver, with the UART thing possibly having some effect?
However I did have adb working BEFORE i decided to re-root my phone (only discovered it stopped working when I couldn't use ADB Explorer however I am failry certain I had used it not 10 minutes before). So why it stopped working I haven't a clue. I am pretty certain nothing changed on my pc, so perhaps setting the uart mode back and forcing the drivers to reinstall was enough to fix it. However maybe adb no longer works for the standard samsung drivers and you need to install the drivers from the sdk too?
Id be interested to know if there are other folk in the same boat, if they have any idea what happened
SDK Drivers
View attachment 1608810
SDK drivers for those who dont want to download the whole SDK. (its a rar by the way).
henryjfry said:
View attachment 1608810
SDK drivers for those who dont want to download the whole SDK. (its a rar by the way).
Click to expand...
Click to collapse
To all the 133 viewers no, don't thank me. Your immense gratitude is thanks enough.

[Q] no usb adb connect

Hello,
my root nook simple touch connects two disks in win 7 64 (on two different PC's)
but I can't get a adb device and so no adb connect.
I've edited the 'android_winusb.inf' in [Google.NTx86] and [Google.NTamd64] with
Code:
; Nook Simple Touch
%SingleAdbInterface% = USB_Install, USB\VID_2080&PID_0003
%CompositeAdbInterface% = USB_Install, USB\VID_2080&PID_0003&MI_01
But when I connect the the nook, windows is not even asking for device.
I've tried to start adbd on nook, but it failure 'not able to open Port 5037' occurs
NogoNogo said:
failure 'not able to open Port 5037' occurs
Click to expand...
Click to collapse
Then the problem is that it can't open port 5037.
ADB is composed of two parts in one executable.
The server part connects to the Nook using either USB or port 5555 (usually) on the Nook.
It opens up port 5037 to receive requests from any program.
That is why you can be simultaneously using an ADB shell, logcat, DDMS and adbsync.exe.
The client part of ADB provides shell access and performs pulls and pushes.
Do this and see if somebody already has possession of port 5037:
Code:
netstat -a -b
Maybe you are already running ADB server?
Maybe some anti-something software is preventing ADB from opening 5037?
many thanks, now I understand, and it works.
I had used adb some time ago with a phone, everything worked out of the box
-> no "need" of understanding the communication...

Categories

Resources