Project

General

Profile

Running a shell script on startup

Added by Dmitriy Dmitriev about 3 years ago

Hi! I need to run a shell script on boot (6.0 0004 RC3). Particularly, I need to disable wifi on boot, in case wifi was on when the device was turned off/rebooted.

I added a couple lines to /etc/init.d/90userinit, but it didn't work:

/system/bin/settings put global airplane_mode_on 1
/system/bin/svc wifi disable

I also tried to create /data/local/userinit.sh, which is referred to in /etc/init.d/90userinit, but it didn't work either, and the file gets deleted after reboot.

Any suggestions?