remote-android / redroid-doc

redroid (Remote-Android) is a multi-arch, GPU enabled, Android in Cloud solution. Track issues / docs here
4.06k stars 291 forks source link

Android overwriting parameters in procfs of host system #366

Open horror-proton opened 1 year ago

horror-proton commented 1 year ago

Describe the bug

❯ cat /proc/sys/kernel/perf_event_paranoid
-1

❯ docker run docker run -itd --rm --privileged redroid/redroid:11.0.0-latest ...

❯ cat /proc/sys/kernel/perf_event_paranoid
3

the parameter shouldn’t get overwritten as android works fine with the old value

make sure the required kernel modules present

collect debug logs 8KJkOFa2mJ.zip

zhouziyang commented 1 year ago

redroid is a pure container solution (share same kernel with your Host), and some are not isolated (procfs, sysfs etc.). you may try Android Emulator like (VM based) solutions if strict isolation wanted.

BTW, can bind mount /proc/sys/kernel/perf_event_paranoid to something else. Thus, redroid container will not change your host settings.

AAGaming00 commented 1 year ago

How would you bind mount this? Trying volumes in compose says "/var/lib/docker/overlay2/fd40fe9a6c4490262996b1a4086f056d1daed47dab4db55c77308d2d7c69b9a9/merged/proc/sys/kernel/perf_event_paranoid" cannot be mounted because it is inside /proc: unknown

AAGaming00 commented 1 year ago

Unless you meant bind mount on the host

zhouziyang commented 1 year ago

You can bind mount during start the container -v xxx:/proc/some_file. Anyway, try some VM like solutions (Android Emulator etc.) if strict isolation required.