AM Android soft reboot

30 views
Skip to first unread message

ChrisM

unread,
Sep 25, 2021, 8:51:57 AM9/25/21
to MppDevices
Hi does anyone know if it is possible to trigger a soft reboot of the android OS from AM?  

Occasionally I am unable to remotely control devices using AutomationOnDrive. Its a real bummer if this happens when I'm out of town. 

Usually when I get back home and look at the AM server,  the android has either lost its WiFi connection or is connected but not communicating.  In either case if you do a scan of APs, no AP's are detected. A soft restart resolves the problem.

I would like to configure a rule that fires when WiFi is lost, sets a timer for ~60min then triggers a soft reboot. 

Ideas welcome!

Thanks

DougC

unread,
Sep 26, 2021, 7:42:25 AM9/26/21
to MppDevices
Does disabling then re-enabling wifi on the android help in this circumstance? If it did then you can certainly do that from AM.

MikeP 4 MPP

unread,
Sep 26, 2021, 12:54:14 PM9/26/21
to MppDevices
There's an "execute" action in AM where you can run OS commands, on android it's "restart", I think you need a command parameter like /now or something, it's been a while since I tried...  Unfortunately it only works on rooted devices as I'm pretty sure you need to run it using "sudo" and grant AM root permission (use "test" to get that to happen).

ChrisM

unread,
Sep 26, 2021, 5:24:33 PM9/26/21
to MppDevices
Hi Doug, unfortunately no.  After turning off WiFi and turning it back on, it scanned and did not find any APs. That when I restarted android. 

Thanks Mike for the suggestion.  I'll see if I can get that to work.

ChrisM

unread,
Sep 27, 2021, 2:11:40 PM9/27/21
to MppDevices
Checked an my android tablet is not rooted.  Executing the restart command returns a message complaining about permissions.  I discovered there is an auto reboot function in the Samsung tablet that I'll investigate further.

Thanks

On Sunday, September 26, 2021 at 12:54:14 PM UTC-4 MikeP 4 MPP wrote:

sergey

unread,
Sep 28, 2021, 4:06:24 AM9/28/21
to MppDevices
There is no way for software reboot for unrooted Samsung... unfortunately. But it seems to be a way if you reboot the router? 
My country-home's router is connected to main home over VPN and some time VPN falls down , when it happens internal router software checks outgoing address has disappeared and reboot the router.

ChrisM

unread,
Sep 29, 2021, 11:30:43 AM9/29/21
to MppDevices
Thanks Sergey.  I actually use a Sonoff to trigger a reboot of the router every night. Despite that (and this only happens infrequently), the Samsung tablet will lose its WiFi connection.  It seems that rebooting the Samsung is my only fix.  

MikeP 4 MPP

unread,
Sep 29, 2021, 2:11:52 PM9/29/21
to MppDevices
I've got this happening on my old TAB2 as well.  They're not running samsung's android so I suspect it's hardware - the wifi chip seems to lock up, thinks it's active but can't see any signals.  Only a reboot will sort it.  I use it as a console with widgets rather than for automation so it's not a bit problem but it is annoying.
Some devices have tricks for restart and to reboot into the OS instead of charge mode, but I haven't been able to get any to work for samsung devices :(.

Reply all
Reply to author
Forward
0 new messages