Hi Martin,
I've never successfully captured the issue in a debug log. I was, with repeated tries, able to replicate it.
I get very poor reception in my home and if my telephony antenna isn't disabled, my battery dies in 3 - 4 hours. My solution is to call forward calls and enable the telephony antenna only when the user is present or for only 1 minute, every 15 mins to receive SMS messages. Turning the telephony antenna off independently doesn't work on my Nexus 5 so I must turn on airplane mode then turn WiFi and Bluetooth back on.
What I've discovered is that if I turn off airplane mode during a connection attempt by another antenna, Automagic occasionally fails to obtain root permissions and sleep actions in unrelated flows lock if they happen to be running. Another discovery is turning airplane mode back on from within Automatic seems to be the only root command that still works when this happens and normal operation resumes afterwards.
As a work around, I added a condition before turning airplane mode off to check that WiFi is connected. If it isn't, I kill all antennas with an airplane mode on command before turning airplane mode off. It's been days since I implemented this change and have experienced no issues.
"Sleep" hangs - root permissions fail
Moderator: Martin
Re: "Sleep" hangs - root permissions fail
Hi,
I was still not able to reproduce this issue on any of my devices. Could you please capture a debug log and send the log to me (menu->Manage->Log, Menu->Send Log, send to info@automagic4android.com)?
Thanks!
I was still not able to reproduce this issue on any of my devices. Could you please capture a debug log and send the log to me (menu->Manage->Log, Menu->Send Log, send to info@automagic4android.com)?
Thanks!
Re: "Sleep" hangs - root permissions fail
Hi Martin,
I've created two flows that reliably and consistently reproduce the problem. It always does it in under a minute for me - unless debug logging is on. I waited 10 mins and nothing. It's as though debug logging prevents the issue. With no debug logging and no write to SD card it happens quickly, every time. Let me know if I can do anything more. Thanks!
I've created two flows that reliably and consistently reproduce the problem. It always does it in under a minute for me - unless debug logging is on. I waited 10 mins and nothing. It's as though debug logging prevents the issue. With no debug logging and no write to SD card it happens quickly, every time. Let me know if I can do anything more. Thanks!
- Attachments
-
- flow_Perfect_storm_2_20140729_222420.xml
- (1.14 KiB) Downloaded 879 times
-
- flow_Perfect_storm_1_20140729_222351.xml
- (3.53 KiB) Downloaded 839 times
Re: "Sleep" hangs - root permissions fail
Thanks for the flows!
I'm currently trying to reproduce this issue with your flows but I had no luck yet (Nexus 5/4.4.4, Debug Log/SD card log inactive).
Which sleep action hangs on your device, one of the 10s sleeps?
When you disable the airplane mode action in flow Perfect storm 1, does the problem still occur?
Regards,
Martin
I'm currently trying to reproduce this issue with your flows but I had no luck yet (Nexus 5/4.4.4, Debug Log/SD card log inactive).
Which sleep action hangs on your device, one of the 10s sleeps?
When you disable the airplane mode action in flow Perfect storm 1, does the problem still occur?
Regards,
Martin
Re: "Sleep" hangs - root permissions fail
Hi Martin,
I managed to catch a failure in debug and have emailed the log to you. Let me know if you want anything else from me.
I really appreciate you looking into this!
I managed to catch a failure in debug and have emailed the log to you. Let me know if you want anything else from me.
I really appreciate you looking into this!
Re: "Sleep" hangs - root permissions fail
Without the airplane mode actions I've yet to see an issue. I'll keep trying and let you know.
Re: "Sleep" hangs - root permissions fail
Thanks for the log!
Toggling airplane mode requires that a system broadcast is sent by Automagic. Usually sending such a broadcast is more or less instant, but in your case the command runs into a timeout of 15 seconds. Right at the same time, the system also does not send the broadcast to Automagic that the sleep duration has elapsed anymore.
I suspect that your device has a problem to send broadcasts in general for some reason. I left your flows also running for multiple hours, but was not yet able to reproduce this issue. Are you using tools with root permissions that could interfere somehow?
Could you please try the following modifications and post whether the sleep action runs successfully or stops working?
1. change Perfect storm 1 by removing the airplane toggle action completely (to verify if airplane mode and/or root triggers the problem)
2. change Perfect storm 1 by replacing the airplane toggle with action Execute Root Command: id (to verify if a root command alone triggers the problem)
3. change Perfect storm 1 by replacing the airplane toggle with action Execute Root Command: am broadcast -a test (to verify if sending a broadcast as root in general triggers the problem)
Toggling airplane mode requires that a system broadcast is sent by Automagic. Usually sending such a broadcast is more or less instant, but in your case the command runs into a timeout of 15 seconds. Right at the same time, the system also does not send the broadcast to Automagic that the sleep duration has elapsed anymore.
I suspect that your device has a problem to send broadcasts in general for some reason. I left your flows also running for multiple hours, but was not yet able to reproduce this issue. Are you using tools with root permissions that could interfere somehow?
Could you please try the following modifications and post whether the sleep action runs successfully or stops working?
1. change Perfect storm 1 by removing the airplane toggle action completely (to verify if airplane mode and/or root triggers the problem)
2. change Perfect storm 1 by replacing the airplane toggle with action Execute Root Command: id (to verify if a root command alone triggers the problem)
3. change Perfect storm 1 by replacing the airplane toggle with action Execute Root Command: am broadcast -a test (to verify if sending a broadcast as root in general triggers the problem)
Re: "Sleep" hangs - root permissions fail
You are absolutely right, Martin!
I'm so sorry for taking up your time. I had an old - discontined - app call AppOpsX installed that selectively blocks permissions to apps. I uninstalled it, installed Xposed framework and AppOpsXposed. Now, I've been trying for a while and I'm no longer able to reproduce the problem.
Thanks again! Your product is incredible and so is your support!
I'm so sorry for taking up your time. I had an old - discontined - app call AppOpsX installed that selectively blocks permissions to apps. I uninstalled it, installed Xposed framework and AppOpsXposed. Now, I've been trying for a while and I'm no longer able to reproduce the problem.
Thanks again! Your product is incredible and so is your support!
Re: "Sleep" hangs - root permissions fail
No problem, I'm glad it's working now 
