Android: Difference between revisions
imported>Raboof show how to add udev rules without adding adb globally |
imported>Raboof |
||
| Line 28: | Line 28: | ||
=== adb shell on device === | === adb shell on device === | ||
First open a nix-shell with the platform tools and connect your device: | |||
<syntaxhighlight lang=console> | |||
$ # For nixos < 19.03 | |||
$ # nix-shell -p androidenv.platformTools | |||
$ nix-shell -p androidenv.androidPkgs_9_0.platform-tools | |||
% adb devices | |||
List of devices attached | |||
* daemon not running; starting now at tcp:5037 | |||
* daemon started successfully | |||
BH90272JCU unauthorized | |||
</syntaxhighlight> | |||
A popup appears on your phone to allow your computer access to it. After allowing, you can: | |||
<syntaxhighlight lang=console> | |||
% adb devices | |||
List of devices attached | |||
BH90272JCU device | |||
% adb shell | |||
</syntaxhighlight> | |||
You can also connect to an already-running adb server: | |||
<syntaxhighlight lang=console> | <syntaxhighlight lang=console> | ||
| Line 36: | Line 60: | ||
% adb shell | % adb shell | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Transferring files from/to an Android device === | === Transferring files from/to an Android device === | ||