Update 12.05.11
OK guys, I am going to close this thread. trifthen has posted a more updated script that does more than my LoSChecker. He is a good guy, flash his stuff it will remove LoSChecker and bug him about fixing things Thanks for all the feedback and support, everyone. Here is his thread...
http://xdaforums.com/showthread.php?t=1374560
--------------------------------------------------------------------
Hello all, worked on this all night and came up with LoS Checker to cut down on your LoS time. I wish I had some screenshots for you, but this is all just a background job THIS DOES NOT ELIMINATE LoS! It fixes your phone when you have LoS! Let's read on to find out more about LoS Checker...
Standard disclaimer: Use at your own risk! I am not responsible if your phone breaks!
*** !Important! ***
If you go LoS and the phone doesn't reboot, PLEASE PM me or post your logs so I can determine why! As of version v2.1, "LogMe" is included with LoSChecker. LogMe is a quick script that grabs 3 important logs relating to the phone's radios that help explain LoS. The logs go into /data/local/LoS in time stamped folders that start with "script_dump_".
To use LogMe, type "su" in Terminal Emulator (no quotes) then "logme" (no quotes) and it will dump the logs for you. Do this if you think you have LoS and your phone didn't reboot automatically from LoSChecker. I also need to know what what happening (eg. couldn't text or call) as well as current device status (eg. on wifi, etc). Please be as detailed as possible. These logs will help me make LoS Checker work better and maybe even solve the root cause of LoS!
Q. What is LoS Checker?
A. LoS Checker is an automated script that monitors the phone radio to check for LoS every 2 mins. When it determines that the phone's radio has turned off, it will dump logs to /data/local/LoS and reboot the phone. This will minimize the time that the phone sits in your pocket with no service.
Q. What if you're on Airplane Mode?
A. If you are on Airplane Mode, the phone sees the radio as being off just like it would on LoS. However, I have added a special check in that will specifically check to see if you are in Airplane Mode and it will not reboot every 2 minutes on you.
Q. What about "Ghost LoS"?
A. Ghost LoS is when the phone doesn't indicate that you have LoS. Data and signal icons are still there even though texts fail and data doesn't work.To be honest, I'm not sure what the radio thinks is happening when it goes into Ghost LoS since I haven't had this happen to me while testing. [EDIT: I am getting closer to nailing down ghost LoS!] I tested the script by forcing the radio to shut down and simulate LoS (which wasn't full LoS) so when LoS happens, it should work just fine.
Q. Any ideas on how to fix "Ghost LoS"?
A. Frifox suggested pinging 8.8.8.8 (Google Servers) to test for dataand while that will work, if you were on the phone and not on WiFi either, it would cause the phone to reboot because it thinks it is experiencing LoS. I would need to add in checks for being on the phone and roaming and such, which isn't the easiest thing to do in an automated shell script. [EDIT: As of v2.1 and higher, the script checks if you're on the phone but if you have a data connection through WiFi, this wouldn't tell me anything. Thinking of more options.] Again, please monitor to see if LoS Checker fixes Ghost LoS.
Q. Can you make LoS Checker check faster/slower?
A. Yes, you can. I have it setup for 2 minutes because it's pretty conservative and I think much faster is unnecessary. If you want to do this, open up the LoSChecker file located in /system/bin and look for this line:
Change "120" to whatever you would like (in seconds).
Q. Will this cause wake lock or battery drain?
A. No, it should not. Checking every 2 minutes uses hardly any battery life, probably less than a second of processing power every 24 hours. If you increase the frequency of checking, it may have negative effects on your battery life.
Q. What is the root cause of LoS?
A. In my opinion, it has something to do with roaming during low service. That is when I notice it happening the most to me.
Q. Can I include this in my ROM?
A. Yes, that's fine. Just please give credit I would, however, advise not including it in your ROM just yet because of the frequent updates while perfecting LoSChecker.
Changelog
v3.0.1 [11.21.11] - Fixed a boo-boo! (flash over any previous version)
v3 [11.21.11] - New LoS Detection! (flash over any previous version)
v2.1 [11.5.11] - MANY improvements (flash over any other versions)
v2 [11.1.11] (flash over v1)
v1 [10.31.11] - Initial Release
OK guys, I am going to close this thread. trifthen has posted a more updated script that does more than my LoSChecker. He is a good guy, flash his stuff it will remove LoSChecker and bug him about fixing things Thanks for all the feedback and support, everyone. Here is his thread...
http://xdaforums.com/showthread.php?t=1374560
--------------------------------------------------------------------
Hello all, worked on this all night and came up with LoS Checker to cut down on your LoS time. I wish I had some screenshots for you, but this is all just a background job THIS DOES NOT ELIMINATE LoS! It fixes your phone when you have LoS! Let's read on to find out more about LoS Checker...
Standard disclaimer: Use at your own risk! I am not responsible if your phone breaks!
*** !Important! ***
If you go LoS and the phone doesn't reboot, PLEASE PM me or post your logs so I can determine why! As of version v2.1, "LogMe" is included with LoSChecker. LogMe is a quick script that grabs 3 important logs relating to the phone's radios that help explain LoS. The logs go into /data/local/LoS in time stamped folders that start with "script_dump_".
To use LogMe, type "su" in Terminal Emulator (no quotes) then "logme" (no quotes) and it will dump the logs for you. Do this if you think you have LoS and your phone didn't reboot automatically from LoSChecker. I also need to know what what happening (eg. couldn't text or call) as well as current device status (eg. on wifi, etc). Please be as detailed as possible. These logs will help me make LoS Checker work better and maybe even solve the root cause of LoS!
Q. What is LoS Checker?
A. LoS Checker is an automated script that monitors the phone radio to check for LoS every 2 mins. When it determines that the phone's radio has turned off, it will dump logs to /data/local/LoS and reboot the phone. This will minimize the time that the phone sits in your pocket with no service.
Q. What if you're on Airplane Mode?
A. If you are on Airplane Mode, the phone sees the radio as being off just like it would on LoS. However, I have added a special check in that will specifically check to see if you are in Airplane Mode and it will not reboot every 2 minutes on you.
Q. What about "Ghost LoS"?
A. Ghost LoS is when the phone doesn't indicate that you have LoS. Data and signal icons are still there even though texts fail and data doesn't work.
Q. Any ideas on how to fix "Ghost LoS"?
A. Frifox suggested pinging 8.8.8.8 (Google Servers) to test for data
Q. Can you make LoS Checker check faster/slower?
A. Yes, you can. I have it setup for 2 minutes because it's pretty conservative and I think much faster is unnecessary. If you want to do this, open up the LoSChecker file located in /system/bin and look for this line:
Code:
SLEEP=120
Change "120" to whatever you would like (in seconds).
Q. Will this cause wake lock or battery drain?
A. No, it should not. Checking every 2 minutes uses hardly any battery life, probably less than a second of processing power every 24 hours. If you increase the frequency of checking, it may have negative effects on your battery life.
Q. What is the root cause of LoS?
A. In my opinion, it has something to do with roaming during low service. That is when I notice it happening the most to me.
Q. Can I include this in my ROM?
A. Yes, that's fine. Just please give credit I would, however, advise not including it in your ROM just yet because of the frequent updates while perfecting LoSChecker.
Changelog
v3.0.1 [11.21.11] - Fixed a boo-boo! (flash over any previous version)
- Fixed name of script in .zip that caused it to not work. Sorry!!
v3 [11.21.11] - New LoS Detection! (flash over any previous version)
- Size of /data/local/LoS will be in logcat upon reboot
- Script checks and detects roaming or not and shows in logcat
- New detection for LoS [cell radio and 4G] (thanks trifthen!)
- Script will force kill radio and only reboot if radio doesn't restart (thanks HaiKaiDo and times_infinity!)
v2.1 [11.5.11] - MANY improvements (flash over any other versions)
- Fixed reboot bug from v2 (sorry about that!)
- Script checks for call state (nothing happens when on a call now)
- Script checks for WiFi state to prevent false LoS reboots
- Removed checking for PRL ("default" comes up when roaming and other random times, need to investigate more)
- Script double checks after 15 seconds of possible LoS
- "LogMe" now included with v2.1 (see "!Important!" above!)
v2 [11.1.11] (flash over v1)
- Detect PRL LoS Bug - PRL shows "default" instead of correct PRL
- Detect Suspended LoS Bug - Phone state shows "suspended" (different than idle or disconnected)
- Enhancements to Radio Off LoS Bug
- Added "double checking" to all LoS - 60 sec for PRL LoS Bug (sometimes when phone boots up, PRL is default for a few seconds and we don't want it to reboot right away), 15 sec for Suspend LoS Bug and Radio Off LoS Bug
- Logs in /data/local/LoS are now in time stamped folders telling you which LoS occurred
- Added some more helpful logging
v1 [10.31.11] - Initial Release
- Check Radio Off LoS every 2 mins
-Downloads-
(download BOTH files, just in case!)
viperMOD LoS Checker v3 and remover
http://bit.ly/st0LPm
(download BOTH files, just in case!)
viperMOD LoS Checker v3 and remover
http://bit.ly/st0LPm
- Thanks to eagercrow, caaznkid, and frifox for testing this!
- Thanks HaiKaiDo and times_infinity for the radio kill idea!
- Thanks trifthen for a better way to detect LoS!
- Thanks to bigrushdog and solarnz for always helping me with my questions as well!
Last edited: