Open twaik opened 1 year ago
for some reason app_process can not find required files
Used to run Termux:API and am
inside PRoot.
If you run PRoot Distro and not using --ieolated
options, then perhaps your device uses some additional paths besides currently bound. This usually can be detected through logcat. If that's the case, I can fix it.
It simply prints Killed
to stderr.
It looks like it simply can not access path to apk (in /data/app
) it gets from PackageManager API.
Is there a way to detect proot? When I tried to use syscall(SYS_shmat)
my application was killed by seccomp so I think I need somehow detect proot to enable using sysvipc syscalls only in proot.
And there is one more question. How to make proot use single namespace for all the invocations of proot (mentioned here)?
It looks like it simply can not access path to apk (in /data/app) it gets from PackageManager API.
I was able to bind that path (/data/app) under proot-distro, so the fix should be trivial.
When I tried to use
syscall(SYS_shmat)
my application was killed by seccomp
In that case you can detect that by registering signal handler for SIGSYS
or checking in child process
Another way is used by systemd-detect-virt
, which detects proot
by looking for TracerPid
in /proc/self/status
and checking if that process with name starting with "proot"
Note that you can also be under proot
without --sysvipc
, in which case syscall(SYS_shmat)
will return -ENOSYS
without raising signal
make proot use single namespace for all the invocations of proot
There currently isn't such option as this namespacing behaviour is just effect of that shm status is stored within proot
process, there isn't client-server (The proot --shm-helper
process stores shared memory file descriptors, however all bookkeeping is in main proot
process)
Probably it'd make more sense to use libandroid-shmem
's server (or do you use something else?), than attempting to make my implementation start own server, although for that probably I'd need additional helper binary from libandroid-shmem
side (as currently with libandroid-shmem
runs server in whatever process requested allocation and I would like to avoid pulling libandroid-shmem
server into proot
and also I'd need something that would provide shm metadata and file descriptors instead of directly mapping them)
Also in that case sem
and msg
would still be separate namespaces
It might also be possible to just use libandroid-shmem
inside proot
, although don't really know if current ports work
Hi. I am writing new termux-x11 version which will use embedded X server. That means it will be impossible to use Xvfb or Xwayland in proot container so proot-distro users will not be able to use any program which requires MIT-SHM support.
MIT-SHM requires both server (which will run in android's JVM) and clients (in our case in proot'ed environment) to have the same sysv ipc mechanisms. I know that it is complicated because of syscall chaining, but maybe there is some way to make proot use termux's ipc implementation?
For some reason termux-x11 can not be started in proot (for some reason
app_process
can not find required files) so I can not start it in container.Thank you for your hard work.