redroid-doc
redroid-doc copied to clipboard
`Unable to open ashmem device` with `androidboot.use_memfd` enabled
Describe the bug
ashmem : Unable to open ashmem device /dev/ashmem286560ba-2737-4ed9-a3ef-8fda0eabe024 (error = No such file or directory) and /dev/ashmem(error = No such file or directory)
with androidboot.use_memfd
enabled
as the error message is from __ashmem_open_locked(), and the method is called from __ashmem_open(), and __ashmem_open()
is called by ashmem_create_region()
I guess there's something wrong with has_memfd_support()
I'm not familiar with the internal implementation of Android, any ideas or clues for me to debug it?
Platform: Fedora 39 with 6.5.6-300.fc39.x86_64 kernel
docker compose file
name: redroid
services:
redroid:
stdin_open: true
tty: true
privileged: true
restart: no
volumes:
- './data:/data'
ports:
- 5555:5555
command:
- 'androidboot.redroid_gpu_mode=guest'
- 'androidboot.use_memfd=1'
container_name: redroid
image: redroid/redroid:12.0.0.modified.magisk
make sure the required kernel modules present
-
grep binder /proc/filesystems
nodev binder
-
grep ashmem /proc/misc
*nothing
collect debug logs
01-09 15:14:24.110 80 80 W SQLiteCompatibilityWalFlags: Cannot read global setting sqlite_compatibility_wal_flags - Application state not available
01-09 15:14:24.125 80 112 E ashmem : Unable to open ashmem device /dev/ashmem286560ba-2737-4ed9-a3ef-8fda0eabe024 (error = No such file or directory) and /dev/ashmem(error = No such file or directory)
01-09 15:14:24.125 80 112 E LSPosedService: preload dex
01-09 15:14:24.125 80 112 E LSPosedService: android.system.ErrnoException: SharedMemory_create failed: ENOENT (No such file or directory)
01-09 15:14:24.125 80 112 E LSPosedService: at android.os.SharedMemory.nCreate(Native Method)
01-09 15:14:24.125 80 112 E LSPosedService: at android.os.SharedMemory.create(SharedMemory.java:87)
01-09 15:14:24.125 80 112 E LSPosedService: at z0.j(Unknown Source:5)
01-09 15:14:24.125 80 112 E LSPosedService: at z0.g(Unknown Source:14)
01-09 15:14:24.125 80 112 E LSPosedService: at O0.run(Unknown Source:226)
01-09 15:14:24.125 80 112 E LSPosedService: at android.os.Handler.handleCallback(Handler.java:938)
01-09 15:14:24.125 80 112 E LSPosedService: at android.os.Handler.dispatchMessage(Handler.java:99)
01-09 15:14:24.125 80 112 E LSPosedService: at android.os.Looper.loopOnce(Looper.java:201)
01-09 15:14:24.125 80 112 E LSPosedService: at android.os.Looper.loop(Looper.java:288)
01-09 15:14:24.125 80 112 E LSPosedService: at android.os.HandlerThread.run(HandlerThread.java:67)