I managed to work around the issue.

I'll explain the cause and the solution I found so that anybody getting
this issue in the future could find a possible solution in the list's
archives.

It looks like my issues came from the linux kernel module "option",
which is a driver for some USB 3G dongles. It looks like that the Flame
(and Buri which had the same issue) triggered the loading of this
module. The downside is that the module didn't work at all, filled the
kernel log with messages (especially its dependencies usb_wwan and
qmi_wwan). Moreover when halting the computer there was very often a
kernel crash stacktrace (I took a picture of it in case it could be useful).

When running "/sbin/lsmod | grep option" you could also look at the
"Used by" column to see that the number was constantly increasing.

The solution I used is backlisting the module. I did this by adding a
file "/etc/modprobe.d/option.conf" with the following content:

  install option /bin/false

Simply using "blacklist option" did not seem to work. I think some
Debian component changed the way to load modules recently and as a
result the "blacklist" keyword does not work in this situation (and this
could be what provoked my issues in the first place).

Then I ran "depmod -ae" and "update-initramfs -u" as advised on websites
(but I'm not that sure it's useful), and rebooted.

And tada, the "option" module is not autoloaded anymore and "adb
devices" works !

I'll file a bug to Debian soon, hopefully this can be fixed on their side.

Thanks to all the people who helped me :)

Le 25/03/2015 15:00, Julien Wajsberg a écrit :
> On the same computer, my Open C (v2.1) and a Z3 (master) work fine with adb.
>
> So this is somehow an incompatibility between the Flames' adb and my
> configuration.
>
> Le 25/03/2015 14:50, Julien Wajsberg a écrit :
>> Additional info: using a Live USB version of Ubuntu, I could make adb
>> work flawlessly.
>> So something is really happening in Debian :/
>>
>> Le 24/03/2015 19:54, Julien Wajsberg a écrit :
>>> I'd like to add that Mass Storage works fine on the same phone when it's
>>> plugged in. Fastboot works too. Only adb fails.
>>>
>>> Le 24/03/2015 19:41, Julien Wajsberg a écrit :
>>>> Hi,
>>>>
>>>> I have a big issue with adb: it can't see any of my phones. "adb
>>>> devices" returns an empty list.
>>>> It came all of a sudden: I updated nothing, it just appeared today. This
>>>> morning it worked, this afternoon it doesn't.
>>>> The funniest (in a sense) is that it happens on both my computers, both
>>>> running Debian Jessie. It stopped working on one of them last week, and
>>>> on the second one only today.
>>>>
>>>> I already tried to do the usual checks: udev rules, run as root,
>>>> kill-server, check that no other adb was running, reboot the computer,
>>>> update Android SDK, try other phones, try other cables: no luck. (same
>>>> phone, same cable, on another computer: works fine).
>>>> I tried removing MTP support and ModemManager (thinking this might
>>>> interfere) but it brought no improvement.
>>>>
>>>> Paul Adenot helped me debugging a little more using ADB_TRACE=1 and
>>>> strace and looking at the source code for adb.
>>>>
>>>> Here are the logs for what I found:
>>>>
>>>> $ ADB_TRACE=1 adb -P 5037 fork-server server
>>>> system/core/adb/adb.c::main():Handling commandline()
>>>> system/core/adb/transport_local.c::local_init():transport: local client 
>>>> init
>>>> system/core/adb/usb_linux.c::device_poll_thread():Created device thread
>>>> system/core/adb/adb_auth_host.c::adb_auth_init():adb_auth_init
>>>> system/core/adb/adb_auth_host.c::get_user_keyfilepath():home '/home/julien'
>>>> system/core/adb/transport_local.c::client_socket_thread():transport:
>>>> client_socket_thread() starting
>>>> system/core/adb/adb_auth_host.c::get_user_key():user key
>>>> '/home/julien/.android/adbkey'
>>>> system/core/adb/adb_auth_host.c::read_key():read_key
>>>> '/home/julien/.android/adbkey'
>>>> system/core/adb/usb_linux.c::register_device():[ usb located new device
>>>> /dev/bus/usb/001/100 (130/2/1) ]
>>>> system/core/adb/usb_linux.c::register_device():[ usb open
>>>> /dev/bus/usb/001/100 fd = 8]
>>>> system/core/adb/usb_linux.c::register_device():[ usb open
>>>> /dev/bus/usb/001/100 error=16, err_str = Device or resource busy]
>>>> OK
>>>>
>>>> The error seems to happen when the code tries to run ioctl with
>>>> USBDEVFS_CLAIMINTERFACE [1].
>>>>
>>>> [1] http://androidxref.com/5.1.0_r1/xref/system/core/adb/usb_linux.c#609
>>>>
>>>> This likely means that something else is already claiming this
>>>> interface, but I don't know how to find out where this comes from.
>>>>
>>>>
>>>> For the record, here is the log when this works fine (from another
>>>> computer -- you'll easily find out whose computer it is ;) ):
>>>>
>>>> $ ADB_TRACE=1 adb -P 5037 fork-server server
>>>> adb.c::main():Handling commandline()
>>>> transport_local.c::local_init():transport: local client init
>>>> usb_linux.c::device_poll_thread():Created device thread
>>>> adb_auth_host.c::adb_auth_init():adb_auth_init
>>>> transport_local.c::client_socket_thread():transport:
>>>> client_socket_thread() starting
>>>> adb_auth_host.c::get_user_keyfilepath():home '/home/jlorenzo'
>>>> adb_auth_host.c::get_user_key():user key '/home/jlorenzo/.android/adbkey'
>>>> adb_auth_host.c::read_key():read_key '/home/jlorenzo/.android/adbkey'
>>>> usb_linux.c::register_device():[ usb located new device
>>>> /dev/bus/usb/002/124 (130/2/1) ]
>>>> OK
>>>> usb_linux.c::register_device():[ usb open /dev/bus/usb/002/124 fd = 10]
>>>>
>>>> So it's really comparable except there is no error.
>>>>
>>>> Hope someone will be able to help me here, I'm quite stuck :/
>>>>
>>>> Regards,
>


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to