This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

custom shell script programs from android

Hi, i'm using my own custom board which is very similar to am335x_sk. i made necessary pinmux operations for changed pins in kernel. i verify all pinmux values from console and they are all what i wanted. i have a jdk library for android. i made spi0_d0 and spi0_sclk pins as uart pins. i can use pins as i wanted via the jdk library and tty02 after giving following command through console. chmod 777 /dev/tty02 my question is "how can i make it from kernel?" i dont want to give command from console after every boot which is already impossible. can i add my own shell script programs into kernel (or maybe u-boot) and make them run during device boot? regards Mehmet Rıza ÖZ
  • Hi,

    You should not have to issue that command directly from a console or a shell script at startup.
    Ueventd is the daemon that manages the dev nodes in android.
    You can try editing the file system/core/rootdir/ueventd.rc and add (or replace) the line for
    your tty:

    /dev/tty02            0777    user    group

    Change 'user' with your username and 'group' with your group.

    Restart your system or kill and restart /sbin/ueventd for the changes to be taken into account.

    This way when the daemon is launched you will get /dev/tty02 managed with the rights you want
    for the specified user and group.

    Regards.

  • Hi, Thank you for your solution. i also managed to run shell scripts at startup by adding scripts in init.rc file in filesystem. After changing init.rc you dont need to recompile filesystem. Regerds