Rishabh Verma
Rishabh Verma

Reputation: 15

How to make a script run automatically whenever i boot up the kernel

I want create and run a shell script each time i boot up the kernel along with android on my mobile

Upvotes: 0

Views: 946

Answers (1)

Ishay Peled
Ishay Peled

Reputation: 2868

A script can't be run when you boot up the kernel because the interpreter (your shell) isn't ready at that point. At best you can run your script when the kernel is done loading, and even then it will be quite hackey to do from within the kernel.

Best use init.rc for that purpose, this is what it was designed for

Upvotes: 1

Related Questions