@cmills: The information below doesn't seem to be in the FxOS wiki. Can
it be added?

Hi,

I recently upgraded to Debian 8, which brought me some headaches when
figuring out how to use adb with a Flame device reliably. Flame's
interaction with Debian's udev* rules creates a number of problems that
make the device impossible to use for development. I guess that other
distributions are affected as well. I hope this email will be helpful to
anyone who sees similar issues.

1) The first problem is that there's a modeswitch rule for the device,
which makes the Flame 'invisible' to adb. So you won't see your device
listed by 'adb devices'.

The Flame appears to be a multi-state device. When you plug in a
switched-off Flame, its USB id is 05c6:f000. There's a udev rule in
'/lib/udev/rules.d/40-usb_modeswitch.rules' that calls 'usb_modeswitch'
for this device, and usb_modeswitch apparently sets the Flame to be a
USB modem.

You can fix this problem by either

 a) deleting the usb_modeswitch tool,
 b) out-commenting the line in the rules file, or
 c) adding the following line to your android.rules file

    ATTR{idVendor}=="05c6", ATTR{idProduct}=="f000", RUN=""

  to disable the call to 'usb_modeswitch'.

Solution c) appears to be the best option IMHO.

2) The order of the udev rule files is important. Udev reads all the
files with rules and orders them alphabetically. Whatever comes later
overwrites earlier rules. (That's also why solution 1.c works.)

My rules file was named '51_android.rules' as described in [1]. It turns
out that there's a file named '/lib/udev/rules.d/69_libmtp.rules', which
contains a rule for 05c6:9025 that treats your Flame like a media player
and puts it into the group 'audio'. You won't be able to use the devices
with adb then.

You can fix this problem by renaming your android.rules file;
'99_android.rules' works for my system.

Best regards
Thomas

[1] https://developer.android.com/tools/device.html

* udev is the Linux program that sets up connected devices and maintains
the content in the /dev directory.
_______________________________________________
dev-fxos mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-fxos

Reply via email to