Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android security killing nix process #333

Closed
carbolymer opened this issue Feb 20, 2024 · 12 comments
Closed

Android security killing nix process #333

carbolymer opened this issue Feb 20, 2024 · 12 comments

Comments

@carbolymer
Copy link

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
Copy link
Collaborator

t184256 commented Feb 21, 2024

I don't know what is this mechanism.

@Gerschtli
Copy link
Collaborator

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

@carbolymer
Copy link
Author

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

@carbolymer
Copy link
Author

carbolymer commented Feb 29, 2024

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.


Most likely that's not the case. See: #333 (comment)

@elkcl
Copy link

elkcl commented Jul 19, 2024

Getting the same problem right after installing the app when it tries to bootstrap Nix. Using Oxygen 14.0 (on Android 14) as well. Tried turning off all the accessibility shortcuts, but to no avail (they weren't turned on in the first place)

@t184256
Copy link
Collaborator

t184256 commented Jul 19, 2024 via email

@elkcl
Copy link

elkcl commented Jul 19, 2024

I tried all that, even disabled killing of phantom processes as described here, but it's still the same problem. It's not like it's getting killed because of battery-hogging, android thinks that the app is malicious for some reason.

Screenshot_2024_07_20_01_18_55_59_7c9fdf2472f91e6d21f35bb801178e75

@t184256
Copy link
Collaborator

t184256 commented Jul 19, 2024 via email

@carbolymer
Copy link
Author

@elkcl My money is still on accessibility settings. Are you sure you have everything disabled in accessibility settings? Have you tried killing all background apps and restarting? I don't remember If I did that too.

@elkcl
Copy link

elkcl commented Jul 22, 2024

@carbolymer Yes, I've tried doing all that, and it still doesn't work. I've found out that other Oneplus 12 users on Oxygen OS 14 also have a similar problem, the security alert is triggered if you try to launch more than 40 processes under proot for some reason (it isn't triggered if not under proot, and turning off phantom process restrictions in the developer options also doesn't help)

https://xdaforums.com/t/termux-processes-getting-flagged-as-malicious-software-and-killed.4660971/

https://community.oneplus.com/thread/1625392448551256065

@carbolymer
Copy link
Author

carbolymer commented Nov 12, 2024

@elkcl
Copy link

elkcl commented Nov 12, 2024

Damn, that sucks. Thanks for the heads up, looks like I'm skipping this update for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants