[APP] 14.6 v2 SmartSync Disabler: Disable the HTC Wifi/Data sleep policy during night

Search This thread
J

j4n87

Guest
Redmond pie article:

HTC One X Turning 3G & Wi-Fi Off Overnight? A Fix Is Now In The Play Store


thanks to Oliver Haslam


2012-06-15_08-58-11.png


Hi guys,


I found a solution for the HTC SmartSync Powersaving issue and provide here a simple app to disable this HTC feature..and the cool thing is:

It works for LOCKED devices without root too!


It should be compatible with each Sense 4.0 device and Sense 4.0 port.



What's this HTC SmartSync Powersaving issue?:


HTC introduced SmartSync with Sense ICS (all devices), which shall provide you the best battery life for your device.
Unfortunatly HTC messed it up again, because theres no interface to control this powersaving feature.
Isn't a problem you think? It is, and I tell you why:

HTC SmartSync system forces the wifi and data connections to go do sleep/disconnect after 15 minutes screen off time between 00:00 and 07:00 am.
For some this isnt an issue and can ignore this thread, but for some it is important to have a constant data/wifi connection during night.

The issue is disussed here in over 40 pages: wifi goes sleep even setting policy to "Always On"

Some people contacted HTC and HTC confirmed this "issue"...they call it more a feature to save battery during night and didnt make a statement if this "bug" will be fixed in the future.

mikeyxda posted a solution to this problem here, but its quite a dirty hack. To accomplish this you also need some basic knowledge with apktool. For me it causes issues with Exchange syncing as well.
But the biggest disadvantage with this solutution is, that you have to be rootet.




Some smali code which shows the issue (for experienced users):



Here you can see the timespan from 00:00 to 07:00 where the SmartSync to turn of data/wifi gets disabled


constructor of SmartSyncScreenOnOffTimeReceiver.smali


Code:
   const/4 v2, 0x0 [COLOR=Red]----> Stands for 00:00[/COLOR]

    ....

    sput v1, Lcom/android/settings/framework/activity/powersaver/SmartSyncScreenOnOffTimeReceiver;->USERNIGHT_TIMESTART:I

    const/4 v2, 0x7 [COLOR=Red]----> Stands for 07:00[/COLOR]

    sput v2, Lcom/android/settings/framework/activity/powersaver/SmartSyncScreenOnOffTimeReceiver;->USERNIGHT_TIMEEND:I

You see that this values are hardcoded which wouldnt allow a configuration...if an interface to it would exist, of course.
...theres lots more code I could show, but most of the users wouldnt have use for it =P.


I spent some hours to backtrace the the issue to find a cleaner solution than mikeyxda found. But thanks to him I got a point to start with
and found a cleaner solution...well even the possibility to provide this fix for none unlocked/rooted users.




How to test this issue immediatly:


  • Turn your wifi on
  • Go into Settings->Date and Time: Uncheck automatic date and time
  • Set the time to 00:00
  • Turn your screen off and let it off for 20 minutes
  • after >20 minutes turn your device on and see if your wifi/data is still connected.

-> You should see that you havent any data/wifi connection and wifi reconnects few seconds later
And this behaviour repeats each day during 00:00 and 07:00am.



Now do the similar steps again just

  • Start my app
  • Check the checkbox "Disable smartsync"
  • REBOOT
  • Turn your wifi on
  • Go into Settings->Date and Time: Uncheck automatic date and time
  • Set the time to 00:00
  • Turn your screen off and let it off for 20 minutes
  • after >20 minutes turn your device on and see if your wifi/data is still connected.


-> You should see that your wifi is still connected!



Disclaimer:

I tried to fix what HTC borked..but I'm not responsible if your data connection still disconnects and you miss important mails etc.
The app is properly testet and I got several reports that its working though.
 
Last edited:

H-KaN

Senior Member
Dec 7, 2010
614
136
Goslar
Im going to test it tonight and will report if it works. My Phone is completely stock, no root, nothing.

----------------------------------------------------

Edit: Not working for me.
 
Last edited:
  • Like
Reactions: sparky4017

modplan

Senior Member
Jun 12, 2010
152
59
Awesome thanks!

Any way you could provide a Tasker/Locale plugin with this app, maybe a donate version that has this? (or a way to toggle it via command line, there is already a plugin to run commands)

I'd like to disable SmartSync when I'm at home (or charging) but re-enable it if I'm staying with a friend or something so my battery will last all night.
 

stuart0001

Senior Member
Jan 9, 2011
2,484
1,238
Hampton
Awesome thanks!

Any way you could provide a Tasker/Locale plugin with this app, maybe a donate version that has this? (or a way to toggle it via command line, there is already a plugin to run commands)

I'd like to disable SmartSync when I'm at home (or charging) but re-enable it if I'm staying with a friend or something so my battery will last all night.

You could just set up profiles to turn off the data and wifi at particular times and location

Sent from my HTC One X using xda premium
 

modplan

Senior Member
Jun 12, 2010
152
59
I've already done that, but even with wifi on at night, SmartSync will disconnect it after 20 mins of screen off. I backup my sdcard to my home server nightly, and backups are failing because of SmartSync, even with wifi turned on.
 

stuart0001

Senior Member
Jan 9, 2011
2,484
1,238
Hampton
I've already done that, but even with wifi on at night, SmartSync will disconnect it after 20 mins of screen off. I backup my sdcard to my home server nightly, and backups are failing because of SmartSync, even with wifi turned on.

I'm suggesting you turn off the smart sync using this app and don't bother reenabling it at all and just use Tasker to turn off data when and where you want

Sent from my HTC One X using xda premium
 

modplan

Senior Member
Jun 12, 2010
152
59
I'm suggesting you turn off the smart sync using this app and don't bother reenabling it at all and just use Tasker to turn off data when and where you want

Sent from my HTC One X using xda premium

Ahh i see, thanks for the clarification.

While that is certainly an option, for me turning off smartsync only at home would be ideal.
 

adazamim

Senior Member
Sep 24, 2010
524
130
Cairo
Will test, Real time 01:10Am Cairo Local Time

..enjoy.

Feel free to report if it worked for you.

I have installed the your app, on my S-On, un-rooted HTC One X (Information on my signature)

It's Now Exactly 01:10Am Cairo Local Time.
I have just locked screen and got my phone to sleep mode.

I will report back at Exactly: 01:45Am, to be sure.

Thank you
 
  • Like
Reactions: Snah001

modplan

Senior Member
Jun 12, 2010
152
59

the_scotsman

Assistant Forum Admin / Moderator Committee
Staff member
Jan 30, 2006
31,068
24,418
NSW, Australia
Samsung Galaxy Note 20 Ultra
This is about wifi disconnecting between midnight and 7am if the screen is off.

I think I see what the OP's app is modifying to diable this. Running some tests now.

If we know what is being modified, this can be ported to be more versatile, like a tasker plugin.

Yea I know, but it sounded like a related issue so just thought I'd ask :)

A Tasker plugin would be handy indeed :)
 

meangreenie

Senior Member
Mar 6, 2012
2,584
732
Will this work on the Evo-3d with ics on 3.6 sense? I've used mikey's fix but would be good to have an on off control app.
 
Last edited:

gpz1100

Senior Member
Nov 28, 2009
3,053
581
I'm sure the OP did sufficient testing to make sure it addresses the htcsmartsync flaws. If you want to test further without touching the phone during the time period in question, consider the following. Most routers show connected clients, be it wired or wireless. On my wrt54g with tomato firmware, it was clear when the phone was dropping off because no signal level was being reported.

I would, still like to know how the OP's method is more robust/different than the other fix posted?
 

modplan

Senior Member
Jun 12, 2010
152
59
I'm sure the OP did sufficient testing to make sure it addresses the htcsmartsync flaws. If you want to test further without touching the phone during the time period in question, consider the following. Most routers show connected clients, be it wired or wireless. On my wrt54g with tomato firmware, it was clear when the phone was dropping off because no signal level was being reported.

I would, still like to know how the OP's method is more robust/different than the other fix posted?

If my tests are conclusive, I'll reveal the method so more people can use it. All credit goes to the OP though. I dumped his app to smali, but it wasn't much help. He used Stringer to encrypt all of the strings in his app to prevent anyone from seeing what it was really doing, but the structure of the code gave me a few pointers and after looking at the smali from the stock code I think I have found a fix.

---------- Post added at 01:39 AM ---------- Previous post was at 01:38 AM ----------

Will this work on the Evo-3d with ics on 3.6 sense? I've used mikey's fix but would be good to have an on off control app.

I'm not sure, but I would guess Yes. I can confirm it works on other sense 4 roms (Evo 4G LTE)
 
  • Like
Reactions: meangreenie

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Hey Guys,

    for those who can't find the app in google's Play Store, I've uploaded it for you.
    3
    SUCCESS WITH SmartSyncDisabler_v2.apk

    I tried to testing the app,
    Unfortunately it didn't work,
    Here are the things I tried.

    1. I installed the app
    2. Put my phone to sleep at 01:10 Am
    3. Checked at 01:30Am and the WiFi wasn't there.

    4. I disabled the "Automatic Date and Time"
    5. Put my phone to sleep at 01:35Am
    6. Checked at 02:00Am and the WiFi wasn't there

    7. I re-enabled "Automatic Date and Time"
    8. Turned my phone off with "Fast boot" disabled.
    9. Turned back my phone on.
    10. Put my phone to sleep at 02:30Am
    11. Checked at 03:00Am and the WiFi wasn't there.


      I UnInstalled the app.
      Thank you for the efforts thogh.

    Dear all,
    I am glad to report that I have success with SmartSyncDisabler_v2.apk,

    Steps as following:

    1. Turn OFF WiFi
    2. Choose the HTC SmarSync app (The first version) from app try and Un-Tic the box.
    3. Uninstall SmartSyncDisabler.apk (The first version) by doing the following > App Trey> Menu> Manage apps> Select HTC Smart Sync Disabler> Clear Cash + Clear Data + Force Stop + Uninstall

    4. Download and Install SmartSyncDisabler_v2.apk
    5. Restart my phone (As prompted in the app). I have "Fast Boot" disabled.
    6. After phone fully starts up (20-25 seconds), turn on WiFi


      [*]This test was done on real time basis (12:50 Am CLT - Cairo Local Time)
      Screen off and phone locked exactly at (12:50 Am CLT)
      Phone unlocked and screen on exactly at (01:10 Am CLT) -> WiFi ON


      [*]Test repeated exactly at (01:15 Am CLT)
      Screen off and phone locked exactly at (01:15 Am CLT)
      Phone unlocked and screen on exactly at (01:35 Am CLT) -> WiFi ON


    Thank you very much j4n87 for the hard work and effort. No words can repay you.
    Thanks a million again.


    I will keep monitoring.
    All information you may need about my phone are on my signature
    2
    j4n87, Thanks for the fix. Can you expand on how your fix differs?

    Thanks!
    2
    I am a nightshift worker and yes this does keep 3g connected but it made things worse after the 'fix' for me, i had to send an email to the wifey before i could receive one from her..

    it all got very confusing in the end and it felt like i was playing some kind of party game where one has to answer a question before it's asked...hehe...uninstalled

    Check your email sync schedule. This is not changed by the app, it only keeps the wifi/3g connection on. You still have to change your mail sync manually for each mail account.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone