Android: Difference between revisions

Update adb setup from the previous `programs.adb` option to the package.
Axka (talk | contribs)
Make "ADB setup" section independent of operating system and method of installation.
Tags: Mobile edit Mobile web edit Visual edit
Line 36: Line 36:
</syntaxhighlight>
</syntaxhighlight>


== adb setup ==
== ADB setup ==


To enable <code>adb</code> in NixOS for unprivileged users
To use the <code>adb</code> program, you can just [[Package installation|install]] the <code>android-tools</code> package.
add these lines to your <code>configuration.nix</code>.
This is mandatory for all further interactions with your android device.


<syntaxhighlight lang="nix">
{{Note|1=Previously you would need use <code>programs.adb.enable = true;</code> and <code>users.users.<your-user>.extraGroups = [ "adbusers" ];</code> to add ADB to your PATH and configure access rules. This option is no longer needed as systemd 258 handles uaccess rules automatically. See the Nixpkgs pull request {{pull|454366}}.}}
{
  environment.systemPackages = [ pkgs.android-tools ];
  users.users.<your-user>.extraGroups = [ "adbusers" ];
}
</syntaxhighlight>{{Note|1=Previously you would need use <code><small>programs.adb.enable = true;</code></small> to add adb to your PATH and configure access rules. This option is no longer needed as systemd 258 handles uaccess rules automatically.}}


=== Use Older Platform Version ===
=== Use Older Platform Version ===