nixos/adb: switch to android-tools built from source#136040
Merged
primeos merged 1 commit intoNixOS:masterfrom Apr 3, 2022
Merged
nixos/adb: switch to android-tools built from source#136040primeos merged 1 commit intoNixOS:masterfrom
primeos merged 1 commit intoNixOS:masterfrom
Conversation
xaverdh
commented
Aug 28, 2021
| config = mkIf config.programs.adb.enable { | ||
| services.udev.packages = [ pkgs.android-udev-rules ]; | ||
| # Give platform-tools lower priority so mke2fs+friends are taken from other packages first | ||
| environment.systemPackages = [ (lowPrio pkgs.androidenv.androidPkgs_9_0.platform-tools) ]; |
Contributor
Author
There was a problem hiding this comment.
note that android-tools has lowPrio applied in all-packages.nix already
Contributor
Author
|
cc @Mic92 |
erdnaxe
approved these changes
Jan 22, 2022
primeos
approved these changes
Apr 3, 2022
Member
primeos
left a comment
There was a problem hiding this comment.
LGTM, thanks :)
Only adb (and fastboot) should be required for this module but to document the differences:
$ ls -1 /nix/store/h0xj81jhac3b4aw7l08iqkg0a5pkmjli-android-tools-31.0.3p1/bin/
adb
append2simg
avbtool.py
fastboot
img2simg
lpadd
lpdump
lpflash
lpmake
lpunpack
mkbootimg
mke2fs.android
repack_bootimg
simg2img
unpack_bootimg
$ ls -1 /nix/store/dd0b1lx6s8fzrqqrs8pzj3sq7a84aiy1-platform-tools-31.0.3/bin/
adb
dmtracedump
e2fsdroid
etc1tool
fastboot
hprof-conv
make_f2fs
make_f2fs_casefold
mke2fs
mke2fs.conf
sload_f2fs
Member
|
cc @svanderburg (FYI) |
|
i had to use the platform tools folder in /nix/store to be able to use fastboot -w, otherwise, i get a "/nix/store/blah-android-tools-bla/bin/make_f2fs (exit status 1)", because it doesn't exist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for this change
Since #124992 we can build
adbfrom source, so lets use it.Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)