Linux - MobileThis forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Sailfish OS, Replicant, Ubuntu Touch, webOS, and other similar projects and products.
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
Code:
# 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_root="/dev/"
# 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_db="/dev/.udevdb"
# udev_rules - The name and location of the udev rules file
udev_rules="/etc/udev/rules.d/"
# udev_permissions - The name and location of the udev permission file
udev_permissions="/etc/udev/permissions.d/"
# 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!
default_mode="0660"
# udev_log - set to "yes" if you want logging
udev_log="no"
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.