/dev/mem and /dev/kmem not exists?


I would appreciate if some one can explain me why the two files do not exist?
How Android kernel’s virtual memory space and physical space be like without have the 2 files?

I am having Android 2.3.7 (Cyanogen mod), the 2 files do not exist:
enter image description here

I have checked the Samsung Galaxy S3 running ICS, the 2 files exist


The /dev/mem (c:1:1) and /dev/kmem (c:1:2) device nodes are merely an API that drivers/char/mem.c in the Linux kernel exposes to user-space. The kernel itself manages memory directly without use of these device nodes, and in general user-space does not need them either.

/dev is simply a directory which (by tradition) contains device nodes, which are special “files”; there is no strict relation between what is available in /dev and what the kernel provides. (There are tools like udev or mdev which create and destroy device nodes in /dev in response to kernel events, but these are not always used in the embedded world where hardware is relatively fixed and known.) If you wish, you may try creating these nodes to interact with using mknod (and this can live anywhere, not ncessarily in /dev). However, it is possible that the kernel has been configured with CONFIG_DEVKMEM=n, in which case these devices will not work anyways.

Answered By – ephemient

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published