nix-community / nix-on-droid

Nix-enabled environment for your Android device. [maintainers=@t184256,@Gerschtli]
https://nix-on-droid.unboiled.info
MIT License
1.15k stars 65 forks source link

Android security killing nix process #333

Closed carbolymer closed 4 months ago

carbolymer commented 4 months ago

Sometimes Android kills the nix process for the security reasons. Seems a bit random. For example, when running nix profile list five times, only one execution fails with:

bash-5.2$ nix profile list
Killed

And the following error pops out: Screenshot_2024-02-20-11-05-39-10_7c9fdf2472f91e6d21f35bb801178e75

That's definitely a false positive from some security heuristics system. Any ideas where this comes from? I haven't observed anything similar on Termux, so I don't if it's related to nix or Termux.

Android 14 OxygenOS 14.0

t184256 commented 4 months ago

I don't know what is this mechanism.

Gerschtli commented 4 months ago

Looks like BitWarden does some stuff, not sure what exactly..

carbolymer commented 4 months ago

@Gerschtli that's just bitwarden autocompletion service saying that the vault is locked. I doubt it is making a difference here.

carbolymer commented 4 months ago

This one was odd. Turns out it's not a nix-on-droid bug, but it's an accessibility setting that's interfering somehow.

  1. Go to Android Settings > Additional Settings > Accessibility > Accessibility Menu, set "Shortcut" to Off.
  2. Go to Android Settings > Additional Settings > Accessibility > Downloaded apps, disable all, disable all, disable shortcuts for all of them.

After that, nix profile isn't killed by OS anymore.