Seems like a simple thing. How can I run custom script on my (rooted) android with LineageOS at boot?

Neither creating it as /data/local/userinit.d/99sshd nor /data/local/userinit.sh did not help.

The LineageOS actually states in /etc/init.d/20userinit that it will run /data/local/userinit.sh if exists, but according to logcat it does not.

The script (in my case) runs SSH daemon, which runs fine when I execute the script manually.

  • 1
    AFAIK init.d support still has to enabled externally. It was once pre-enabled, but somewhere along the timeline they cancelled it. There are apps on Play that would do this.
    – Andy Yan
    Apr 19 '17 at 0:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.