0

I'm running nixos and I have a .apk file, i.e. an Android app.

There is the handy tool adb (Android Debug Bridge) and the command

adb install /path/to/app.apk

How do I get it to work on nixos?

ruben.moor
  • 1,876
  • 15
  • 27

1 Answers1

3

The binary adb is in androidsdk. So either run

nix-env -i androidsdk

or add androidsdk to the list environment.systemPackages in /etc/nixos/configuration.nix.

Your Android phone needs to be plugged in and have USB debugging enabled as documented on developer.android.com.

Simply running adb install ... didn't work for me. Instead I did

sudo adb start-server
adb install /path/to/app.apk

or

adb install /path/to/app.apk -r

for overwriting an already installed app.

ruben.moor
  • 1,876
  • 15
  • 27