Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

How to enable Wi-Fi at boot with init.d and "svc wifi enable"?

OP kentchristopher

6th June 2014, 08:43 PM   |  #1  
OP Member
Thanks Meter: 13
 
78 posts
Join Date:Joined: Nov 2007
This is so simple I know it must be possible, and yet I've tried multiple things with no luck (believe me, I've searched).

I'm using a port of Cyamogenmod 7 on an old Sony Ericsson X10 Mini. There's an init.d folder present, so I can only assume init.d is working.

I can successfully enable wifi from terminal via:
Code:
su
svc wifi enable
Thus I figured an init.d script named '50wifion' in the init.d folder should do the trick:
Code:
#!/system/bin/sh
svc wifi enable
No such luck. I've tried several different tactics, the latest being appending an existing init.d file '20userinit' with this:

Code:
/system/bin/sh /system/bin/wifion.sh >/userinit.out 2>/userinit.err
Calling 'wifion.sh' in /system/bin:
Code:
#!/system/bin/sh
/system/bin/svc wifi enable
This not only fails to enable Wi-Fi, but there is no output in either file -- they're just blank.

Are certain commands not allowed at boot, period? I've tried adding 'sleep 20' in there with no luck. What am I missing?
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes