[Q] ADB Crashing in Eclipse - Android Q&A, Help & Troubleshooting

I've got ADB 1.0.26 running on my Windows 7 x64 and Eclipse SDK 3.6.2 with ADT 10.0.1 SDK tools r10, and I've got all the Android SDK versions installed.
When I connect my phone to the computer in debug mode, and type `adb devices` into the command prompt, my phone shows up. It's an Inspire 4G. I can `adb shell` into the device and `ls`, so I'm assuming that the adb/driver/phone part of the chain is working properly.
Now, if I connect my phone and go into Eclipse, I get:
[2011-03-28 17:46:33 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
[2011-03-28 17:46:34 - DeviceMonitor]Connection attempts: 1
[2011-03-28 17:46:36 - DeviceMonitor]Connection attempts: 2
Click to expand...
Click to collapse
[...etc...]
[2011-03-28 17:47:53 - DeviceMonitor]Connection attempts: 10
[2011-03-28 17:46:54 - DeviceMonitor]Connection attempts: 11
[2011-03-28 17:47:00 - adb]
[2011-03-28 17:47:00 - adb]This application has requested the Runtime to terminate it in an unusual way.
[2011-03-28 17:47:00 - adb]Please contact the application's support team for more information.
[2011-03-28 17:47:04 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
[2011-03-28 17:47:05 - DeviceMonitor]Connection attempts: 1
[2011-03-28 17:47:07 - DeviceMonitor]Connection attempts: 2
Click to expand...
Click to collapse
etc, etc... This loops forever.
It doesn't matter if I start Eclipse and then connect the phone, or if I connect the phone and then start Eclipse.
I don't think it should matter, but my phone is an Inspire 4G which is rooted and running Revolution 4G 3.2
As suggested somewhere else, I've tried resetting ADB in DDMS but that has no effect.

i have the same problem... can anyone help me please?

This happens to me too sometimes.
To solve this I have to this:
- close the IDE (in your case Eclipse... )
- open up cmd, and type: adb kill-server
- Start Eclipse and it should work again

http://code.google.com/p/android/issues/detail?id=12141

Related

[Q] Can't connect my galaxy s2 to Kies/Eclipse etc..

I can't connect to Kies. It tells me to switch device in PC studio mode ??
Device is in Usb debugging mode, rooted (with another pc).
When connecting in Eclipse, i got some errors.
[2011-06-10 11:31:34 - ] ------------------------------
[2011-06-10 11:31:34 - ] Android Launch!
[2011-06-10 11:31:34 - ] adb is running normally.
[2011-06-10 11:31:34 - ] Performing xxxxxxxxxxxxxxxxxxxxx activity launch
[2011-06-10 11:31:34 - ] Automatic Target Mode: using device '304D19D8533A935E'
[2011-06-10 11:31:34 - ] Uploading xxxx.apk onto device '304D19D8533A935E'
[2011-06-10 11:31:34 - ] Failed to install .apk on device '304D19D8533A935E': Unable to open sync connection!
[2011-06-10 11:31:34 - ] java.io.IOException: Unable to open sync connection!
[2011-06-10 11:31:34 - ] Launch canceled!
In fact it seems that if Eclipse is launched, adb logcat doesn't work anymore. Very strange
[2011-06-10 11:45:05 - ] ------------------------------
[2011-06-10 11:45:05 - ] Android Launch!
[2011-06-10 11:45:05 - ] adb is running normally.
[2011-06-10 11:45:05 - ] Performing xxxxxxxxxxxxxx activity launch
[2011-06-10 11:45:05 - ] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2011-06-10 11:45:07 - ] WARNING: Unknown device API version!
[2011-06-10 11:45:07 - ] Uploading xxxxxxxxxxx.apk onto device '304D19D8533A935E'
[2011-06-10 11:45:07 - ] Failed to install xxxxxxxxxxxxxxx.apk on device '304D19D8533A935E': Unable to open sync connection!
[2011-06-10 11:45:07 - ] java.io.IOException: Unable to open sync connection!
[2011-06-10 11:45:07 - ] Launch canceled!
Someone has any idea ?
I supposed it's a driver problem, but how to update ?
Try turning USB Debugging mode off, you should then connect to Kies. I personally never use Kies so have USB Debugging on so I can mount the phone.
Ok it installed me some drivers more.
Kies IS OK.
But if i switch to usb debugging on, i still got problems in Eclipse.
[2011-06-10 12:25:23 - adb]
[2011-06-10 12:25:23 - adb]This application has requested the Runtime to terminate it in an unusual way.
[2011-06-10 12:25:23 - adb]Please contact the application's support team for more information.
[2011-06-10 12:25:28 - Logcat]null
com.android.ddmlib.TimeoutException
at com.android.ddmlib.AdbHelper.read(AdbHelper.java:648)
at com.android.ddmlib.AdbHelper.read(AdbHelper.java:616)
at com.android.ddmlib.AdbHelper.readAdbResponse(AdbHelper.java:216)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:378)
at com.android.ddmlib.Device.executeShellCommand(Device.java:284)
at com.android.ddmuilib.logcat.LogPanel$3.run(LogPanel.java:527)
when trying to get logcat, and also got problems when trying to pull my app on device. But my device shows in the 'Device' eclipse tab...
So impossible for me to use it for my devs... :/
Nobody has experienced the same problems?
I'm still stuck with this, any ideas ?
TyphZ said:
I'm still stuck with this, any ideas ?
Click to expand...
Click to collapse
Does it show in cmd prompt with -devices ?
What rom? Build date?
What OS and version (Windows 7 i take it?)
I use sgs2 ke7 constantly for testing dev stuff quick so not sure why you should be so special
I use it mainly on OSX and Linux, with the latter I had to add vender USB permissions to the USB module but thats it.
Take it you got it sorted?
Rom v. = XWKE2
C:\Users\gbe>adb devices
List of devices attached
304D19D8533A935E device
(only the SGS2 is connected to my PC)
I'm using WIN 7 PRO.
I don't know why, but now it works, i didn't changed anything, even reboot (just hibernate...)
It will stay a mystery i think....
TyphZ said:
Rom v. = XWKE2
C:\Users\gbe>adb devices
List of devices attached
304D19D8533A935E device
(only the SGS2 is connected to my PC)
I'm using WIN 7 PRO.
I don't know why, but now it works, i didn't changed anything, even reboot (just hibernate...)
It will stay a mystery i think....
Click to expand...
Click to collapse
On win7 I can replicate all sorts of things by using hibernation, usb probs, sound problems, cause sometimes it doesn't sleep resources or wake them up as it should. So could be that
I have the same problem on rooted sgs2 and windows xp. Have you found a solution?
deanwray said:
On win7 I can replicate all sorts of things by using hibernation, usb probs, sound problems, cause sometimes it doesn't sleep resources or wake them up as it should. So could be that
Click to expand...
Click to collapse
yup, I can run the kies on win 7 too,there have not any problem when I root my galaxy S II, maybe is the compatibility problem?!
update ur windows by windows updater in control panel or by clicking right click on my computer u will find additional updates there and thr u can see MTP DRIVERS for S2 after installing it u can reconnect ur device

SDK/ADB help

Trying to run the Dalvik Debug Monitor and can't seem to get it figured... currently my CMD box shows what is written below and my phone shows offline.
09:34:53 E/adb:
09:34:53 E/adb: This application has requested the Runtime to terminate it in an
unusual way.
09:34:53 E/adb: Please contact the application's support team for more informati
on.
09:34:58 W/DeviceMonitor: Failed to connect to client '1629': An existing connec
tion was forcibly closed by the remote host
09:34:58 E/DeviceMonitor: Adb connection Error:An existing connection was forcib
ly closed by the remote host
09:34:59 E/DeviceMonitor: Connection attempts: 1
09:35:01 E/DeviceMonitor: Connection attempts: 2
09:35:03 E/DeviceMonitor: Connection attempts: 3
09:35:05 E/DeviceMonitor: Connection attempts: 4
09:35:07 E/DeviceMonitor: Connection attempts: 5
09:35:09 E/DeviceMonitor: Connection attempts: 6
09:35:11 E/DeviceMonitor: Connection attempts: 7
09:35:13 E/DeviceMonitor: Connection attempts: 8
09:35:15 E/DeviceMonitor: Connection attempts: 9
09:35:17 E/DeviceMonitor: Connection attempts: 10
09:35:19 E/DeviceMonitor: Connection attempts: 11
09:35:26 E/adb:
09:35:26 E/adb: This application has requested the Runtime to terminate it in an
unusual way.
09:35:26 E/adb: Please contact the application's support team for more informati
on.
09:35:31 W/DeviceMonitor: Failed to connect to client '1551': timeout
09:35:32 E/DeviceMonitor: Adb connection Error:An existing connection was forcib
ly closed by the remote host
09:35:32 E/EventLog: An existing connection was forcibly closed by the remote ho
st
java.io.IOException: An existing connection was forcibly closed by the remote ho
st
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at com.android.ddmlib.AdbHelper.read(AdbHelper.java:640)
at com.android.ddmlib.AdbHelper.read(AdbHelper.java:616)
at com.android.ddmlib.AdbHelper.readAdbResponse(AdbHelper.java:216)
at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:734)
at com.android.ddmlib.AdbHelper.runLogService(AdbHelper.java:469)
at com.android.ddmlib.AdbHelper.runEventLogService(AdbHelper.java:445)
at com.android.ddmlib.Device.runEventLogService(Device.java:290)
at com.android.ddmuilib.log.event.EventLogPanel$8.run(EventLogPanel.java
:454)
09:35:32 W/DeviceMonitor: Failed to connect to client '1580': An existing connec
tion was forcibly closed by the remote host
09:35:33 E/DeviceMonitor: Connection attempts: 1
09:35:33 W/DeviceMonitor: Failed to connect to client '1620': Connection refused
: connect
09:35:34 W/DeviceMonitor: Failed to connect to client '1629': Connection refused
: connect
09:35:35 E/DeviceMonitor: Connection attempts: 2
09:35:37 E/DeviceMonitor: Connection attempts: 3
09:35:39 E/DeviceMonitor: Connection attempts: 4
09:35:41 E/DeviceMonitor: Connection attempts: 5
09:35:43 E/DeviceMonitor: Connection attempts: 6
09:35:45 E/DeviceMonitor: Connection attempts: 7
09:35:47 E/DeviceMonitor: Connection attempts: 8
09:35:49 E/DeviceMonitor: Connection attempts: 9
09:35:51 E/DeviceMonitor: Connection attempts: 10
09:35:53 E/DeviceMonitor: Connection attempts: 11
09:37:04 E/DDMS: device offline
com.android.ddmlib.AdbCommandRejectedException: device offline
at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:736)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:373)
at com.android.ddmlib.Device.executeShellCommand(Device.java:276)
at com.android.ddmuilib.SysinfoPanel.loadFromDevice(SysinfoPanel.java:15
9)
at com.android.ddmuilib.SysinfoPanel.deviceSelected(SysinfoPanel.java:12
6)
at com.android.ddmuilib.SelectionDependentPanel.deviceSelected(Selection
DependentPanel.java:52)
at com.android.ddms.UIThread.selectionChanged(UIThread.java:1680)
at com.android.ddmuilib.DevicePanel.notifyListeners(DevicePanel.java:752
)
at com.android.ddmuilib.DevicePanel.notifyListeners(DevicePanel.java:740
)
at com.android.ddmuilib.DevicePanel.access$1100(DevicePanel.java:56)
at com.android.ddmuilib.DevicePanel$1.widgetSelected(DevicePanel.java:35
7)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at com.android.ddms.UIThread.runUI(UIThread.java:497)
at com.android.ddms.Main.main(Main.java:103)
09:37:12 W/ddms: Unable to get frame buffer: device offline
09:37:14 W/ddms: Unable to get frame buffer: device offline
09:37:31 E/DDMS: device offline
com.android.ddmlib.AdbCommandRejectedException: device offline
at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:736)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:373)
at com.android.ddmlib.Device.executeShellCommand(Device.java:276)
at com.android.ddmuilib.SysinfoPanel.loadFromDevice(SysinfoPanel.java:15
9)
at com.android.ddmuilib.SysinfoPanel.access$300(SysinfoPanel.java:54)
at com.android.ddmuilib.SysinfoPanel$3.widgetSelected(SysinfoPanel.java:
274)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at com.android.ddms.UIThread.runUI(UIThread.java:497)
at com.android.ddms.Main.main(Main.java:103)
09:37:40 E/DeviceMonitor: Adb connection Error:An existing connection was forcib
ly closed by the remote host
09:37:40 W/ddms: 'adb kill-server' failed -- run manually if necessary
09:37:41 E/DeviceMonitor: Connection attempts: 1
Click to expand...
Click to collapse
perhaps try the last piece of advice it provides,
adb kill-server and then ./ddms which should auto start the adb server again.
if you're on windows, might give it a reboot.
sometimes it can be odd when plugging/unplugging phones, etc.
also, if you're using eclipse for application development (your logcat of errors shows eclispe, eclipse will sometimes initiate an adb connection and prevent another instance of adb from establishing a connection .. this is usually the issue that i run into!
Thanks, ill try this when I get home from work. Hopefully this will solve it.. new PC problems always suck
I caused water damag to my Laptop for about 2-3 seconds. Although it is booting now after about 2 days to dry.. too nervous to play with it yet. (Hopefully I get lucky)
Supra RCMix Shooter

ADB/ADT 14 totally dead on Atrix

I upgraded to ADT 14 for ICS and it sucks, and it sucks bad. The upgrades are nice, but now ADB (at least logcat) doesn't work at ALL.
Code:
[2011-10-20 19:36:46 - adb]
[2011-10-20 19:36:46 - adb]This application has requested the Runtime to terminate it in an unusual way.
[2011-10-20 19:36:46 - adb]Please contact the application's support team for more information.
[2011-10-20 19:36:54 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
[2011-10-20 19:36:54 - Unexpected error while launching logcat. Try reselecting the device.]An existing connection was forcibly closed by the remote host
java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:395)
at com.android.ddmlib.Device.executeShellCommand(Device.java:319)
at com.android.ddmuilib.logcat.LogCatReceiver$1.run(LogCatReceiver.java:100)
at java.lang.Thread.run(Unknown Source)
[2011-10-20 19:36:55 - DeviceMonitor]Connection attempts: 1
[2011-10-20 19:36:57 - DeviceMonitor]Connection attempts: 2
[2011-10-20 19:36:59 - DeviceMonitor]Connection attempts: 3
[2011-10-20 19:37:01 - DeviceMonitor]Connection attempts: 4
[2011-10-20 19:37:03 - DeviceMonitor]Connection attempts: 5
[2011-10-20 19:37:05 - DeviceMonitor]Connection attempts: 6
[2011-10-20 19:37:07 - DeviceMonitor]Connection attempts: 7
[2011-10-20 19:37:09 - DeviceMonitor]Connection attempts: 8
[2011-10-20 19:37:11 - DeviceMonitor]Connection attempts: 9
[2011-10-20 19:37:13 - DeviceMonitor]Connection attempts: 10
[2011-10-20 19:37:15 - DeviceMonitor]Connection attempts: 11
Is what I get anytime ADB connects. IT prints out about 100 lines then dies. MAkes it impossible to test any apps.
I don't know how much longer I can use the patch ADB version on the google code page (Not sure of hte link right off hand)... anyone know how to fix this?
Hi, same problem here. Debugging on a Galaxy Tab 10.1 is now impossible since logcat isn't working.

[Q] Apple Mac OSX & Support for MTP

I have spent many hours traulling the net, scanning through forums across multiple websites and found no information on how to make my device which in its current software incarnation currently seems to only allow MTP as the option for transferring data via the USB cable to and from my Mac running OSX 1.7.3.
Please note, that that google app for file transfers DOES NOT WORK (for me). I cannot get it to work no matter which god I've prayed to or what kinda dance I did. So I looked for alternatives.
ADB worked, but I got tired of ADB to push files across (which is effective, but not what I would call fun). I came across MacPort, giving us ports of Linux/Unix stuff in the world of OSX. YAY!
Found that the various libraries for MTP and MTP-FS was ported! YAY!
After installing the hell out of macport (found: www macports org) and runing the updates.
Drop to the command line and then run these commands once:
Code:
sudo port install libmtp
sudo port install mtpfs
Every time you load your device:
Code:
sudo mtpfs
Awesome! Progress, plug in the device and run mtpfs. But then I get this:
Code:
bergenmacbook:Applications bergenlarsen$ sudo mtpfs
Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1/S2/GT-N7000/Galaxy Nexus.
Found 1 device(s):
Samsung: GT-P7510/Galaxy Tab 10.1/S2/GT-N7000/Galaxy Nexus (04e8:6860) @ bus 250, dev 6
Attempting to connect device
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
inep: usb_get_endpoint_status(): Operation timed out
outep: usb_get_endpoint_status(): Operation timed out
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device -208647360
I'm running MIUI v4 (2.4.13) with Siyah Kernel (currently 3.1RC5).
Help?
BergenLarsen said:
I have spent many hours traulling the net, scanning through forums across multiple websites and found no information on how to make my device which in its current software incarnation currently seems to only allow MTP as the option for transferring data via the USB cable to and from my Mac running OSX 1.7.3.
Please note, that that google app for file transfers DOES NOT WORK (for me). I cannot get it to work no matter which god I've prayed to or what kinda dance I did. So I looked for alternatives.
ADB worked, but I got tired of ADB to push files across (which is effective, but not what I would call fun). I came across MacPort, giving us ports of Linux/Unix stuff in the world of OSX. YAY!
Found that the various libraries for MTP and MTP-FS was ported! YAY!
After installing the hell out of macport (found: www macports org) and runing the updates.
Drop to the command line and then run these commands once:
Code:
sudo port install libmtp
sudo port install mtpfs
Every time you load your device:
Code:
sudo mtpfs
Awesome! Progress, plug in the device and run mtpfs. But then I get this:
Code:
bergenmacbook:Applications bergenlarsen$ sudo mtpfs
Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1/S2/GT-N7000/Galaxy Nexus.
Found 1 device(s):
Samsung: GT-P7510/Galaxy Tab 10.1/S2/GT-N7000/Galaxy Nexus (04e8:6860) @ bus 250, dev 6
Attempting to connect device
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
inep: usb_get_endpoint_status(): Operation timed out
outep: usb_get_endpoint_status(): Operation timed out
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device -208647360
I'm running MIUI v4 (2.4.13) with Siyah Kernel (currently 3.1RC5).
Help?
Click to expand...
Click to collapse
Tried installing gvfs-gphoto2 and nautilus?
Read more here:
How To: Fix Samsung Galaxy Nexus MTP File Transfer for Ubuntu GNU/Linux 11.10

[Q] HELP: Android USB debug mode works in Windows not in Ubuntu

The Android device in question is a Micromax A87(a relatively unknown brand in global market but I hope that should'nt matter).
In Ubuntu, I have double checked the udev rules. They all look perfect. (I cross checked using another phone too). The USB debug mode doesn't show up no matter what. And I have the adb_usb.ini in the right place. I have tried running all possible combinations of running
adb, adb start-server as root. But
Code:
adb devices
shows no devices at all.
However, with the USB debugging option enabled on phone, it worked on Win7 after windows installed a Common handset driver.
Now the interesting part.
If I go back to Ubuntu without disconnecting the cable and do
Code:
$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
[B]1234567890ABCDEF[/B] device
The product id is 1234567890ABCDEF and I am able to see it and everthing works fine!!
But the moment I disconnect the USB cable, its gone.
So I guess it's not the development machine that is at fault. The device seems to be setting a property while in Windows which stays latched till the usb connection goes off.
What could be a way to get this to work? (Besides developing on Windows :silly: )
Btw the
Code:
/data/property/persist.service.adb.enable
is 1 too.
What is your computer setup? Are you using a Windows machine, with Ubuntu in a vm? Dual-boot? Other?
My setup:
Dual boot.
Ubuntu 12.04 and Windows 7.
Ok, how about if you plug in the USB with the computer's power off, then boot into Ubuntu?
i have the clone of this phone. mine is Mito A78.
lsusb command shows it as 1c9e:9e08
so idVendor =1c9e and idProduct = 9e08
for now, what you say (plugin to windows and reboot to ubuntu without unplug the phone) is the solution.
i will see if lsusb output still the same.
okay, have checked on windows pc, it should be switched to idVendor =1c9e and idProduct = 9e18
anyway, what you say is a clue that the solution may be around usb_modeswitch and modem manager
further search on usb_modeswitch 1c9e 9e08 found the solution here: http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=3&t=1351
have tried, but not yet switched to idVendor =1c9e and idProduct = 9e18
have to find the correct rules on /etc/usb_modeswitch.d/1c9e:9e08
Code:
########################################################
# Mito A78
DefaultVendor=0x1c9e
DefaultProduct=0x9e08
TargetVendor=0x1c9e
TargetProduct=0x9e18
SierraMode=1
CheckSuccess=20
NoDriverLoading=1
found it.
after writing the rules, insert
Code:
# Mito A78
ATTR{idVendor}=="1c9e", ATTR{idProduct}=="9e08", RUN+="usb_modeswitch '%b/%k'"
to /lib/udev/rules.d/40-usb_modeswitch.rules
i than have to run
Code:
sudo usb_modeswitch -v 0x1c9e -p 0x9e08 -S -R -W
and then the phone switched to idVendor =1c9e and idProduct = 9e18 and adb can access the phone.
:good: :good: :good:
I-mobile IQ 5.1 has same issue, but adb still can't see device
The usb_modeswitch is exactly the same for this phone (same usb vid/pid). However adb still doesn't find the phone under Windows and Ubuntu. lsusb shows the product id switch did work and it all looks right.
Under windows it spins up a cdrom device from the phone so you can install the windows drivers (this lives as an *.iso file under /system); after the driver install, you get the adb device in device manager and two com ports,with all devices having a pid of 9e18 (original 9e08). However adb does not see the device!
I recon there is something wrong on the phone side. This is a very new phone (only release about 5 days ago), so I suspect this is one of the early release bugs...
Since I don't even have a custom recovery for it (CWM, etc) I can even backup my phone and try and do a factory reset.
Looks like a low level USB issue
Switched on tracing on adbd on the phone side. Looks like a phone/usb low level issue:
Code:
--- adb starting (pid 14270) ---
system/core/adb/adb.c::main():Handling main()
system/core/adb/adb.c::adb_main():Local port disabled
system/core/adb/usb_linux_client.c::usb_init():failed to open /dev/android_adb_enable
system/core/adb/usb_linux_client.c::usb_init():[ usb_init - starting thread ]
system/core/adb/adb.c::adb_main():adb_main(): pre init_jdwp()
system/core/adb/jdwp_service.c::jdwp_control_init():jdwp control socket started (5)
system/core/adb/adb.c::adb_main():adb_main(): post init_jdwp()
system/core/adb/adb.c::adb_main():Event loop starting
system/core/adb/usb_linux_client.c::usb_open_thread():[ usb_thread - opening device ]
system/core/adb/usb_linux_client.c::usb_open_thread():[ opening device succeeded ]
system/core/adb/usb_linux_client.c::usb_open_thread():[ usb_thread - registering device ]
system/core/adb/transport.c::register_usb_transport():transport: 0x11364a0 init'ing for usb_handle 0x1136410 (sn='')
system/core/adb/transport_usb.c::init_usb_transport():transport: usb
system/core/adb/transport.c::register_transport():transport: (null) registered
system/core/adb/transport.c::transport_registration_func():transport: (null) (10,11) starting
system/core/adb/transport.c::output_thread():(null): starting transport output thread on fd 11, SYNC online (2)
system/core/adb/transport.c::dump_packet():fd=11: to remote: [SYNC] arg0=1 arg1=2 (len=0)
system/core/adb/transport.c::transport_socket_events():transport_socket_events(fd=10, events=0001,...)
system/core/adb/transport.c::dump_packet():fd=10: from remote: [SYNC] arg0=1 arg1=2 (len=0)
system/core/adb/adb.c::handle_packet():handle_packet() SYNC
system/core/adb/transport.c::dump_packet():fd=10: to remote: [SYNC] arg0=1 arg1=2 (len=0)
system/core/adb/transport.c::output_thread():(null): data pump started
system/core/adb/usb_linux_client.c::usb_read():about to read (fd=9, len=24)
system/core/adb/transport.c::input_thread():(null): starting transport input thread, reading from fd 11
system/core/adb/transport.c::dump_packet():fd=11: from remote: [SYNC] arg0=1 arg1=2 (len=0)
system/core/adb/transport.c::input_thread():(null): transport SYNC online
system/core/adb/jdwp_service.c::jdwp_process_event():Adding pid 11279 to jdwp process list
system/core/adb/jdwp_service.c::jdwp_process_event():Adding pid 11325 to jdwp process list
system/core/adb/jdwp_service.c::jdwp_process_event():Adding pid 11818 to jdwp process list
system/core/adb/jdwp_service.c::jdwp_process_event():Adding pid 13994 to jdwp process list
system/core/adb/jdwp_service.c::jdwp_process_event():Adding pid 13951 to jdwp process list
system/core/adb/jdwp_service.c::jdwp_process_event():Adding pid 13913 to jdwp process list
system/core/adb/jdwp_service.c::jdwp_process_event():Adding pid 13856 to jdwp process list
system/core/adb/usb_linux_client.c::usb_read():ERROR: fd = 9, n = -1, errno = 5 (I/O error)
system/core/adb/transport_usb.c::remote_read():remote usb: read terminated (message)
system/core/adb/transport.c::output_thread():(null): remote read failed for transport
system/core/adb/transport.c::output_thread():(null): SYNC offline for transport
system/core/adb/transport.c::dump_packet():fd=11: to remote: [SYNC] arg0=0 arg1=0 (len=0)
system/core/adb/transport.c::output_thread():(null): transport output thread is exiting
system/core/adb/usb_linux_client.c::usb_kick():usb_kick
---------- Post added at 04:31 AM ---------- Previous post was at 04:27 AM ----------
I also tried the Chainfire adbd insecure and its exactly the same in the debugging.
Now working on win7 64!
Followed this link and managed to get it working. The PID value was set to 9e18. In essence the andriod usb driver was missing (install via the andriod.bat andriod package manager).
Also works in virtualbox winxp vm on Linux (ubuntu 12.10; actually Mint 14). Just mapped in my win7 64 partition to get access to the andriod sdk/usb driver.
Now that I know its not a handset issue, can return to trying to get the Linux side working.
Now working under Linux!
You need the vendor id in adb_usb.ini:
Code:
cat ~/.android/adb_usb.ini
# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
0x1c9e
If you will run adb as root, make sure you also create the file for root too.
Tip: You will be logged into the phone as the 'shell' user. Try and 'su -' to get root access, and then click on your su dialog on the phone to grant access.
Final issue is that plugging in the device should do the switch automatically; I will update you on that when I have that fixed.
udev sorted on ubuntu
Ok, we are rocking on udev on ubuntu 12.10. Seems like udev doesn't like ATTR keywords, although ATTRS makes everything burst into life (man page says ATTR is useable). Steps that worked for me:
Code:
# cp /lib/udev/rules.d/40-usb_modeswitch.rules /etc/udev/rules.d/usb_modeswitch.rules
# vi /etc/udev/rules.d/usb_modeswitch.rules
Add the following entry near the bottom under the last entry:
Code:
# I-Mobile IQ5.1
ATTRS{idVendor}=="1c9e", ATTRS{idProduct}=="9e08", RUN+="usb_modeswitch '%b/%k'"
Create /etc/usb_modeswitch.d/1c9e:9e08 as described earlier by jurban.
Unplug the phone. Plug it in. Do an lsusb. Firstly shows up as dev 1c9e:9e08. Enter lsusb again. Shows up as 1c9e:9e18. Now adb will show the device as jurban shows above. All good to go!

Categories

Resources