Most questions I can find related to this are dated 2011 and thereabouts, so perhaps it's not too surprising that things have changed since. I've tried a whole bunch of things, with no results whatsoever.
There are some scripts in
/system/etc/init.d (which also appears under
/etc/init.d on my device). In particular, there is a
00banner script which is supposed to log a welcome message. The welcome message never appears in logcat.
I've placed my own script here, which was eventually reduced to nothing but this:
#!/system/bin/sh log -t mytest Testing
Nothing. Never appears in logcat unless run manually via terminal. Then it works.
There is also a
90userinit file here, which invokes
/data/local/userinit.sh if it exists. I've created it with the same contents as above. Again, nothing ever appears in logcat. Which is not surprising, really, since if
00banner won't run then this wouldn't either.
I searched for anything named "init.rc" but nothing like that exists anywhere on my device.
All of my scripts have 755 permissions.
What else can I try? (other than apps that run scripts for me)