LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Mobile (https://www.linuxquestions.org/questions/linux-mobile-81/)
-   -   What is the "udev" in Android? (https://www.linuxquestions.org/questions/linux-mobile-81/what-is-the-udev-in-android-832703/)

archieval 09-16-2010 09:11 PM

What is the "udev" in Android?
 
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.

Regards,
archieval

archieval 09-17-2010 01:14 AM

Solved, I found this.
http://source.android.com/porting/bring_up.html
:Pengy:

hedpe 05-16-2011 03:49 PM

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"

But, it seems like my rules are not in effect.

archtoad6 05-17-2011 06:36 AM

archieval,

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.)

archieval 05-17-2011 10:01 AM

Hi guys!

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.

Regards,
archieval


All times are GMT -5. The time now is 02:06 AM.