Linux - MobileThis forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Firefox OS, Sailfish OS, Maemo, MeeGo, Ubuntu Mobile, WebOS, Open Mobile Alliance and other similar projects and products.
A reminder that LQ now has a dedicated Android sister site: AndroidQuestions.org
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am working on a an android device that uses 2.6.29 linux kernel image. The directory structure is not the same as a normal linux system, and there is no /etc/udev directory. I am looking for the equivalent of this because I want my device to act as a host, such that when I connect a usb storage device, it can automatically mount it to my specified directory.
hi archieval, were you ever able to get udev rules properly working on Android? I tried following that link, but Google has removed it now. I have tried putting a udev directory in to /etc (which is a symlink to /system/etc)
In /etc/udev, I have a udev.conf file like this:
# cat udev/udev.conf
# /etc/udev/udev.conf: main config file for udev
# This file can be used to override some of udev's default values
# for where it looks for files, and where it places device nodes.
# udev_root - where in the filesystem to place the device nodes
# udev_db - The name and location of the udev database.
# NOTE: this should be somewhere that is writable before
# / is mounted rw, like /dev ...
# udev_rules - The name and location of the udev rules file
# udev_permissions - The name and location of the udev permission file
# default_mode - set the default mode for all nodes that have no
# explicit match in the permissions file
# NOTE: do not set to anything else if you are not
# sure you have everything needed for normal
# user to function in the permissions file!
# udev_log - set to "yes" if you want logging
Thanks for posting the solution, as well as taking the time to mark this "[SOLVED]". May you have the good fortune to need this solution again & discover this as your answer. (It has happened to others.)
There is no udev in android. The configurations such as mount points, permissions, etc. are put in a file called init.rc. This file is located in the top level directory of android OS. This file is written using the android init languange which is supposed to be described in the link I provided. Here is another link to that: http://www.kandroid.org/android_pdk/bring_up.html
That init.rc file can be found in your android source code deep within the vendor/ folder. When you compile your android source code, that file will be included in the ramdisk.img.