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

7,836 posts
Thanks Meter: 13,044
 
By -viperboy-, Inactive Recognized Developer on 31st October 2011, 07:24 AM
Thread Closed Email Thread
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://forum.xda-developers.com/show....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 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!
The Following 61 Users Say Thank You to -viperboy- For This Useful Post: [ View ] Gift -viperboy- Ad-Free
31st October 2011, 07:34 AM |#2  
Member
Flag Salt lake city
Thanks Meter: 2
 
More
Swag.. thanks mate!

Sent from my SPH-D710 using xda premium
31st October 2011, 07:35 AM |#3  
mdeathike's Avatar
Senior Member
Flag Chicago
Thanks Meter: 32
 
More
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
31st October 2011, 07:39 AM |#4  
-viperboy-'s Avatar
OP Inactive Recognized Developer
Flag PA
Thanks Meter: 13,044
 
Donate to Me
More
Quote:
Originally Posted by mdeathike

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)
31st October 2011, 07:42 AM |#5  
mdeathike's Avatar
Senior Member
Flag Chicago
Thanks Meter: 32
 
More
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
31st October 2011, 07:43 AM |#6  
ravizzle's Avatar
Senior Member
Flag Sacramento
Thanks Meter: 140
 
More
Thanks will try out. I get ghost los so I'll report back how well it works with that.

Sent from my Galaxy S2
31st October 2011, 07:47 AM |#7  
Senior Member
Flag So Cal, California
Thanks Meter: 380
 
More
thanks thats why i get los because it always roams once and a while at work.
31st October 2011, 08:06 AM |#8  
ewalk4866's Avatar
Senior Member
Flag chicago
Thanks Meter: 426
 
More
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
31st October 2011, 08:14 AM |#9  
-viperboy-'s Avatar
OP Inactive Recognized Developer
Flag PA
Thanks Meter: 13,044
 
Donate to Me
More
Quote:
Originally Posted by ewalk4866

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
31st October 2011, 08:28 AM |#10  
-viperboy-'s Avatar
OP Inactive Recognized Developer
Flag PA
Thanks Meter: 13,044
 
Donate to Me
More
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
The Following User Says Thank You to -viperboy- For This Useful Post: [ View ] Gift -viperboy- Ad-Free
31st October 2011, 09:18 AM |#11  
HaiKaiDo's Avatar
Senior Member
Thanks Meter: 554
 
Donate to Me
More
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?
Thread Closed Subscribe to Thread

Tags
los, loss of service, no service
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes