Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,736,007 Members 40,552 Now Online
XDA Developers Android and Mobile Development Forum

Set Tasker to reboot when sim drops out

Tip us?
 
jadajada
Old
#1  
Senior Member - OP
Thanks Meter 16
Posts: 177
Join Date: Jul 2007
Default Set Tasker to reboot when sim drops out

I have a strange problem where the sim drops out from time to time. I get a message that tells me to reboot. Problem is, when this happens in my pocket or if the phone is not in use, it can take some time before I see it and reboot the phone.

I have seen that someone uses Tasker for this purpose.

Can someone tell me how to set up Tasker to reboot the phone when %SIMSTATE changes? Do I need root for that?
 
vpwrf
Old
#2  
Senior Member
Thanks Meter 19
Posts: 140
Join Date: Nov 2011
Quote:
Originally Posted by jadajada View Post
I have a strange problem where the sim drops out from time to time. I get a message that tells me to reboot. Problem is, when this happens in my pocket or if the phone is not in use, it can take some time before I see it and reboot the phone.

I have seen that someone uses Tasker for this purpose.

Can someone tell me how to set up Tasker to reboot the phone when %SIMSTATE changes? Do I need root for that?
Tasker's reboot action probably needs root. The problem with the %SIMSTATE variable is that it isn't dynamic (monitored) so you can't set it so it triggers on variable value. You can set it so it checks it every 2 minutes instead and reboot if the SIM is not available.

Profile: CheckSIM (171)
Time: From 00:00 every 2m Till 23:59
Enter: RebootNoSIM (170)
A1: If [ %SIMSTATE ~ absent ]
A2: Flash [ Text:No SIM. Rebooting in 60 seconds... Long:,Off ]
A3: Wait [ MS:0 Seconds:0 Minutes:1 Hours:0 Days:0 ]
A4: Reboot [ Type:Normal ]
A5: End If
Sign up for Copy with this link, and we'll both get 5 GB of free cloud storage in addition to the usual 15 GB.
The Following User Says Thank You to vpwrf For This Useful Post: [ Click to Expand ]
 
jadajada
Old
#3  
Senior Member - OP
Thanks Meter 16
Posts: 177
Join Date: Jul 2007
Quote:
Originally Posted by vpwrf View Post
Tasker's reboot action probably needs root. The problem with the %SIMSTATE variable is that it isn't dynamic (monitored) so you can't set it so it triggers on variable value. You can set it so it checks it every 2 minutes instead and reboot if the SIM is not available.

Profile: CheckSIM (171)
Time: From 00:00 every 2m Till 23:59
Enter: RebootNoSIM (170)
A1: If [ %SIMSTATE ~ absent ]
A2: Flash [ Text:No SIM. Rebooting in 60 seconds... Long:,Off ]
A3: Wait [ MS:0 Seconds:0 Minutes:1 Hours:0 Days:0 ]
A4: Reboot [ Type:Normal ]
A5: End If
Thanks! This works just like I wanted it to!
 
jadajada
Old
#4  
Senior Member - OP
Thanks Meter 16
Posts: 177
Join Date: Jul 2007
Quote:
Originally Posted by jadajada View Post
Thanks! This works just like I wanted it to!
Hmm... I flashed another rom, Imperium ROM V 7, and I am testing without any sim entered. After two minutes I get the notification that no sim is in the phone, and that it will reboot.

At reboot-time, I see that Tasker as been granted permission by SuperSU, but nothing happens.

I see that Imperium has reboot option where I can chose , reboot, fast reboot, recovery or download. Could that menu interfere with the reboot command? How can I get Tasker to reboot the phone as instructed?
 
vpwrf
Old
#5  
Senior Member
Thanks Meter 19
Posts: 140
Join Date: Nov 2011
Quote:
Originally Posted by jadajada View Post
Hmm... I flashed another rom, Imperium ROM V 7, and I am testing without any sim entered. After two minutes I get the notification that no sim is in the phone, and that it will reboot.

At reboot-time, I see that Tasker as been granted permission by SuperSU, but nothing happens.

I see that Imperium has reboot option where I can chose , reboot, fast reboot, recovery or download. Could that menu interfere with the reboot command? How can I get Tasker to reboot the phone as instructed?
Try using the Secure Settings plugin for Tasker. It also has reboot options. Pro version may be needed.
Sign up for Copy with this link, and we'll both get 5 GB of free cloud storage in addition to the usual 15 GB.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes