[DEPRECIATED][MOD]viperMOD LoS Checker v3.0.1

Status
Not open for further replies.
Search This thread

-viperboy-

Inactive Recognized Developer
Jun 24, 2007
7,836
12,992
PA
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...

taber_no_cell_phones_allowed.png


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 data and 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:

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


  • 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:

mdeathike

Senior Member
Apr 4, 2011
168
32
Chicago
This isn't gonna make my battery drop in huge increments when it reboot right? Also what if im going into an area with spotty coverage will my phone just constantly reboot? If either of these don't happen ill be more than pleased.

Sent from my SPH-D710 using XDA App
 

-viperboy-

Inactive Recognized Developer
Jun 24, 2007
7,836
12,992
PA
This isn't gonna make my battery drop in huge increments when it reboot right? Also what if im going into an area with spotty coverage will my phone just constantly reboot? If either of these don't happen ill be more than pleased.

Sent from my SPH-D710 using XDA App

No, when you have No Signal, the phone will see that differently than the radio being turned off (which is what I have it set to look for)
 

mdeathike

Senior Member
Apr 4, 2011
168
32
Chicago
Sweet ill put it on my phone before i head into work tomorrow. I have low coverage there and i get LOS pretty regularly there. Thanks a lot for the quick response. Ill let you know how it works out.

Sent from my SPH-D710 using XDA App
 

ewalk4866

Senior Member
Aug 13, 2010
536
426
chicago
Thanks for your hard work on this problem Viper but i do have a quastion. How you know if it installed?I go to look for the fold to change the time but I dont see it where you said it should be. so my quastion is did it install right then? Thanks
 

-viperboy-

Inactive Recognized Developer
Jun 24, 2007
7,836
12,992
PA
Thanks for your hard work on this problem Viper but i do have a quastion. How you know if it installed?I go to look for the fold to change the time but I dont see it where you said it should be. so my quastion is did it install right then? Thanks

It should be in /system/bin and the file is called LoSChecker. Had 3 people test this plus me. It's there and it installed right :)
 

-viperboy-

Inactive Recognized Developer
Jun 24, 2007
7,836
12,992
PA
Sorry guys, please redownload and reflash if you downloaded before 3:30AM EST. Small scripting issue causing the script not to run. I really need to get some sleep lol
 
  • Like
Reactions: DaisyPlucksta

HaiKaiDo

Senior Member
Mar 12, 2010
1,342
558
Could you possibly add logcat feature,that could be enabled and disabled to collect any possible errors and see when and why the radios are turning off?
 

sweets55

Senior Member
May 25, 2009
2,546
492
Now my wife won't yell at me. Lol. Thanks Man!

Sent from my SPH-D710 using XDA App
 

ewalk4866

Senior Member
Aug 13, 2010
536
426
chicago
OK it there after flashing the new one you put out. Thanks for your help

Sent from my SPH-D710 using xda premium
 

jevers77

Senior Member
Dec 26, 2007
59
8
Thanks for the hard work, am going to try it out, I get LOS at least 2 times a day where it shows signal but I don't have one with Starburst rom. Will let you know if this works. I'm assuming that's what you call ghost LOS.
 

-viperboy-

Inactive Recognized Developer
Jun 24, 2007
7,836
12,992
PA
Could you possibly add logcat feature,that could be enabled and disabled to collect any possible errors and see when and why the radios are turning off?

Yup, it does that already :)

This is why I love you guys. This will be an excellent add on for e4gt rom developers.

I hope so!


Thanks man!!

Now my wife won't yell at me. Lol. Thanks Man!

Sent from my SPH-D710 using XDA App

There is a bonus lol

OK it there after flashing the new one you put out. Thanks for your help

Sent from my SPH-D710 using xda premium

Sure man, sorry the first one didn't work!

Just installed...I hope this works...because I'm about to leave Sprint & Samsung forever... *grumbles*

This is why I wrote this because I was at work and had LoS for 3 hours and didn't know it. I don't check my phone much unless I feel it vibrate so I was pissed when I saw this happen.

Thanks for the hard work, am going to try it out, I get LOS at least 2 times a day where it shows signal but I don't have one with Starburst rom. Will let you know if this works. I'm assuming that's what you call ghost LOS.

Yes, that's what ghost LoS is. I hope it works for that, but I don't know yet. I need feedback from EVERYONE so I can make this better!
 

sweets55

Senior Member
May 25, 2009
2,546
492
This is LOS. Look at the signal meter. It has 0 with a line through it plus it says mobile network not available.

SC20111005-042115.png


This is the ghost LOS. Look at the top bar (the signal meter looks fine). I thought this only happens with changing the theme but I could be wrong. Also it doesn't say the network not available like above.

SC20111026-201607.png
 
  • Like
Reactions: scubasteve53

elliwigy

Retired Forum Moderator / Recognized Developer
XDA App Taskforce
your opinnion about LOS is interesting.. I have my roaming turned off and ever since I havent had any LOS, its either from that or from LostKernel.. I do experience the no bars and a x on it which requires a reboot, but im assuming thats not LOS but another problem with the sprint network..
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 61
    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...

    taber_no_cell_phones_allowed.png


    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 data and 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:

    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


    • 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!
    8
    I understand that, but I'm not sure what I will find from the full log. It's basically killing all the apps, not sure how I would do that from a script without some research. Rebooting is the easiest solution (from a coding perspective) and it does its job. But I will look into it.

    Okay so I took -viperboys- LoS checker script and only changed one thing. It now restarts your radio whenever it detects any of the versions of LoS (or should). viperboy if you want this pulled or whatever just let me know. As for anyone else, feel free to give it a try and see how it works for you. Its CWM flashable. and again ALL I DID WAS CHANGE TWO LINES OF VIPERBOYS SCRIPT! THIS IS HIS WORK NOT MINE!!! Dont rage at me please :\
    7
    Almost done with v2.1 :D
    7
    Updated to v3! I hope that his version is the most stable of all the version and should be because of the new LoS detection. Thanks to everyone for testing and helping me improve this, please continue to run logme if you experience an LoS that doesn't correct itself! Thanks and enjoy :D
    4
    I am on Starburst ROM...and will be switching to ViperROM with the next full ROM release (don't want to have to flash all those updates ;)).

    Anyway, I'm having random reboots related to the ROM (which is why I'm going to Viper). I flashed back to the stock kernel in hopes of fixing the issue...not sure it did...but here is my question.

    Does flashing new kernels remove the LoS Checker?

    It's 2 .zips you gotta flash man - v.2 and v2.2 (has v2.1 in it). It's not that much work!

    And no, it wouldn't remove it. The only exception is if you are running the stock kernel that doesn't have init.d support. Then it can't start the on boot. But I think someone made a stock kernel with init.d support, so use that one.

    was running v2 fine all day...then when i got home i got a few random reboots. let me know if you want the logs. Thanks.

    I always want logs! You guys never have to ask to post them or send them as it really helps me fix things. I've learned a few more things about the LoS stuff as well... radio shows suspended when on a call. That's why v2 was causing reboots for people and I just figured that out today after looking at some more logs. I think there are 2 key ways now for LoS check - if it shows "Data Disabled" I think that is ghost LoS and "radio turned off" with airplane mode off is regular LoS. I am also going to add something in to make sure the script doesn't do anything when you're on a call.

    I hope this gives you guys some idea as to how I'm trying to fix things :)