Android: Difference between revisions
m styling |
m Concrete example, relevant to android. |
||
| Line 242: | Line 242: | ||
=== Android Debug Bridge === | === Android Debug Bridge === | ||
Run <code>nix-shell -p usbutils --run "lsusb"</code> on your terminal to get the list of USB devices connected to your computer. Sample output | Run <code>nix-shell -p usbutils --run "lsusb"</code> on your terminal to get the list of USB devices connected to your computer. Sample output:<pre> | ||
... | |||
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub | Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub | ||
Bus | Bus 002 Device 007: ID 0fce:320d Sony Ericsson Mobile Communications AB Xperia 5 III | ||
Bus 001 | Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | ||
... | |||
</pre> | </pre> | ||
<code>ID | <code>ID 0fce:320d</code> can be seen as: <code>idVendor = 0fce</code> and <code>idProduct = 320d</code>. | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
| Line 256: | Line 258: | ||
let | let | ||
# nix-shell -p usbutils --run "lsusb" | # nix-shell -p usbutils --run "lsusb" | ||
idVendor = " | idVendor = "0fce"; # Change according to the guide above | ||
idProduct = " | idProduct = "320d"; # Change according to the guide above | ||
in | in | ||
'' | '' | ||