Android: Difference between revisions
m Android Debug Bridge |
m Minor Nix formatting fixes. Still needs a `nixfmt` pass. |
||
Line 29: | Line 29: | ||
<syntaxhighlight lang=nix> | <syntaxhighlight lang=nix> | ||
{ | { | ||
users.users.<your-user>.extraGroups = ["kvm"]; | users.users.<your-user>.extraGroups = [ "kvm" ]; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 42: | Line 42: | ||
{ | { | ||
programs.adb.enable = true; | programs.adb.enable = true; | ||
users.users.<your-user>.extraGroups = ["adbusers"]; | users.users.<your-user>.extraGroups = [ "adbusers" ]; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 187: | Line 187: | ||
name = "android-env"; | name = "android-env"; | ||
targetPkgs = pkgs: with pkgs; | targetPkgs = pkgs: with pkgs; | ||
[ git | [ | ||
git | |||
gitRepo | gitRepo | ||
gnupg | gnupg | ||
Line 236: | Line 237: | ||
{ | { | ||
programs.adb.enable = true; | programs.adb.enable = true; | ||
services.udev.extraRules = '' | services.udev.extraRules = '' | ||
# replace the "[]" for the idVendor and idProduct variable | # replace the "[]" for the idVendor and idProduct variable | ||
SUBSYSTEM=="usb", ATTR{idVendor}== | SUBSYSTEM=="usb", ATTR{idVendor}=="[]", MODE="[]", GROUP="adbusers", TAG+="uaccess" | ||
SUBSYSTEM=="usb", ATTR{idVendor}=="[]", ATTR{idProduct}=="[]", SYMLINK+="android_adb" | SUBSYSTEM=="usb", ATTR{idVendor}=="[]", ATTR{idProduct}=="[]", SYMLINK+="android_adb" | ||
SUBSYSTEM=="usb", ATTR{idVendor}=="[]", ATTR{idProduct}=="[]", SYMLINK+="android_fastboot" | SUBSYSTEM=="usb", ATTR{idVendor}=="[]", ATTR{idProduct}=="[]", SYMLINK+="android_fastboot" | ||
''; | ''; | ||
# add user to adbusers group | |||
users.users.myUser = { | # add user to adbusers group | ||
users.users.myUser = { | |||
isNormalUser = true; | |||
extraGroups = [ "adbusers" ]; | |||
}; | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> |