Android: Difference between revisions

Pigs (talk | contribs)
m Add category development
Update adb setup from the previous `programs.adb` option to the package.
Line 42: Line 42:
This is mandatory for all further interactions with your android device.
This is mandatory for all further interactions with your android device.


<syntaxhighlight lang=nix>
<syntaxhighlight lang="nix">
{
{
   programs.adb.enable = true;
   environment.systemPackages = [ pkgs.android-tools ];
   users.users.<your-user>.extraGroups = [ "adbusers" ];
   users.users.<your-user>.extraGroups = [ "adbusers" ];
}
}
</syntaxhighlight>
</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.}}
 
This will add [https://github.com/M0Rf30/android-udev-rules additional udev rules] for unprivileged access as well as add adb to your <code>$PATH</code>.
 
Alternatively, if you don't want to install adb globally but do want to configure the udev rules, you can:
 
<syntaxhighlight lang=nix>
{
  services.udev.packages = [
    pkgs.android-udev-rules
  ];
}
</syntaxhighlight>


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