[HOWTO] (Re)Enabling the Android Calendar sync

Search This thread

feisty_noodle

Senior Member
Jan 16, 2010
220
81
tldr: Although the initial calendar state is pulled from Google servers upon account setup, normal syncing function of the Calendar app is broken in the autonootered Nooks; follow this procedure to fix

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

It seems, the problem is that there is no way to set the sync state of the google services because we don't have access to the proper Android Settings (just whatever B&N wants us to have).

There is, however an xml file which can set the properties, if properly edited:
/data/system/sync/accounts.xml

In this file, one can find a bunch of entries which correspond with registered Google accounts (made possible, of course, by the SetupWizard.apk provided as a result of the Autonooter procedure).

They (these entries) look like this:
Code:
<authority id="?" account="?????@gmail.com" type="com.google" authority="???" />

Procedure to enable calendar syncing:

0) If possible, backup the current state with TitaniumBackup or something similar. (I haven't seen any bad mishaps -- like a /data wipe -- but one never knows.)

1) pull the /data/system/sync/accounts.xml and save a copy just in case
Code:
cmdline$ adb pull /data/system/sync/accounts.xml ./accounts.xml
cmdline$ adb pull /data/system/sync/accounts.xml ./accounts.xml.orig

2) modify the lines in accounts.xml with {authority="calendar"} to include {enabled="true" syncable="true"}; use a simple text editor not to introduce any weird formatting

The final state of the line will be something like this:
Code:
<authority id="?" account="?????@gmail.com" type="com.google" authority="calendar" enabled="true" syncable="true" />

3) push the modified file back to the same location
Code:
cmdline$ adb push ./accounts.xml /data/system/sync/accounts.xml

4) reboot and test the syncing: create an event on the Nook and see it appear on GCal (should happen within 30 s), create an event on GCal and see it appear on the Nook (you may have to refresh the app by exiting to Home and getting back in, for example)

5) enjoy your functional calendar app

Note: although I have not experienced any weirdness, and this procedure appears to be safe, please remember that this is a hack.
That said, I have safely started B&N Shop and Nook Home app. Things are steady on my Nook.

Update: After a couple of days, things are stable. Events are still syncing; no spontaneous wipes.
Also, others have reported success, so I am unburying this post from a different thread.
 

jasoraso

Senior Member
May 24, 2007
581
177
Salt Lake City, UT
I've been using an app/widget called "Synker" available on the Market. Works good to trigger sync events, but maybe I'll try these steps this weekend when I get some downtime.

Thanks!
 
  • Like
Reactions: kfanciu

dawynkoop

Senior Member
Jun 5, 2009
190
37
Fort Wayne
Tried this, pushed the file to the device and the pulled it again to see if the proper file was there and it was, but after rebooting it restores back to the original file. Any way to prevent that from happening?
 

feisty_noodle

Senior Member
Jan 16, 2010
220
81
Tried this, pushed the file to the device and the pulled it again to see if the proper file was there and it was, but after rebooting it restores back to the original file. Any way to prevent that from happening?
Hmm, you are right; I see this, too.

I don't understand what is happening, but it is clear to me that the file gets refreshed with every reboot. Where is the data coming from? I don't know at this point. I didn't notice any data regarding sync management in accounts.db.

Nevertheless, the sync is persistent on my device. That is, after several reboots and no further meddling with the accounts.xml file (apart from the initial mod), I see sync behavior work, as expected.

One reason for this may be that the "enabled" and "syncable" switches for the primary account are NOT set to "false" after the reboot. They are simply discarded.

To answer your question directly, I suppose, one may change the write permissions on the accounts.xml file to read-only (at this time the permissions are 600) after modifications are applied. Haven't tested that yet ...
 

dawynkoop

Senior Member
Jun 5, 2009
190
37
Fort Wayne
I'll give that a shot. I also noticed that after I added the Android 3D gallery app it created a new entry in the accounts.xml fil for picasa.
 

feisty_noodle

Senior Member
Jan 16, 2010
220
81
Seeing that this file needs to be modified by the system from time to time (e.g. when adding new accounts), I would not mess with it. There is clearly something going on that is unaccounted for.

FYI: 755 stands for rwxr-xr-x, which is not read-only. On my device, the starting state is 600 or rw-------. Read-only (r--------) would be 'chmod 400'.

For my use, the hack still seems to work well. I cannot add and manage calendars from my other Google accounts, but I'll live with this.

Before this, I used the Synker widget mentioned above, but didn't like having to sync manually. I never remember to do that when I reconnect with the network after working offline. I need a system service to take care of that for me.

Once we have Froyo (fingers-crossed), all of this will be moot.
 

dawynkoop

Senior Member
Jun 5, 2009
190
37
Fort Wayne
I was finlly able to get my calendar syncing by opening the GMail app selecting menu then accounts and then re-adding my gmail account, when I re-added the account it gave me the option to select calendar for syncing.

Sent from my ROOTED Barnes & Noble NookCOLOR
 

feisty_noodle

Senior Member
Jan 16, 2010
220
81
@dawynkoop That sounds about right. What you see is the foundation of the hack.
The problem is that there is no way to toggle this option, once set, is there?

I wish I knew where the settings really reside in the system.

Sent from my LogicPD Zoom2 using XDA App
 

here.david

Senior Member
Jan 6, 2009
423
29
Sonoma, CA
I was finlly able to get my calendar syncing by opening the GMail app selecting menu then accounts and then re-adding my gmail account, when I re-added the account it gave me the option to select calendar for syncing.

Sent from my ROOTED Barnes & Noble NookCOLOR

YES SIR! worked, tx's....funny how it shows my account yet allows one to enter the same account again...was not sure if I was to remove the account 1st...just added it again w/o removing in case other were wondering...
 
  • Like
Reactions: bengt_a

Patissier

Member
Apr 26, 2010
8
0
Brooklyn
Thank you. I was trying to figure out how to get this working for a couple hrs. In my haste to get this working I forgot to check the system sync.
 

rckymtnrfc

Senior Member
Nov 11, 2007
110
5
Readded my Gmail account and when it gave me the option to sync calendar and I press it...it tells me to turn on background and auto sync.

Thoughts?

Sent from my Nooxus One using Tapatalk
 

vrmaier

Member
Oct 5, 2010
9
1
tldr: Although the initial calendar state is pulled from Google servers upon account setup, normal syncing function of the Calendar app is broken in the autonootered Nooks; follow this procedure to fix

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

It seems, the problem is that there is no way to set the sync state of the google services because we don't have access to the proper Android Settings (just whatever B&N wants us to have).

There is, however an xml file which can set the properties, if properly edited:
/data/system/sync/accounts.xml

In this file, one can find a bunch of entries which correspond with registered Google accounts (made possible, of course, by the SetupWizard.apk provided as a result of the Autonooter procedure).

They (these entries) look like this:
Code:
<authority id="?" account="?????@gmail.com" type="com.google" authority="???" />

Procedure to enable calendar syncing:

0) If possible, backup the current state with TitaniumBackup or something similar. (I haven't seen any bad mishaps -- like a /data wipe -- but one never knows.)

1) pull the /data/system/sync/accounts.xml and save a copy just in case
Code:
cmdline$ adb pull /data/system/sync/accounts.xml ./accounts.xml
cmdline$ adb pull /data/system/sync/accounts.xml ./accounts.xml.orig

2) modify the lines in accounts.xml with {authority="calendar"} to include {enabled="true" syncable="true"}; use a simple text editor not to introduce any weird formatting

The final state of the line will be something like this:
Code:
<authority id="?" account="?????@gmail.com" type="com.google" authority="calendar" enabled="true" syncable="true" />

3) push the modified file back to the same location
Code:
cmdline$ adb push ./accounts.xml /data/system/sync/accounts.xml

4) reboot and test the syncing: create an event on the Nook and see it appear on GCal (should happen within 30 s), create an event on GCal and see it appear on the Nook (you may have to refresh the app by exiting to Home and getting back in, for example)

5) enjoy your functional calendar app

Note: although I have not experienced any weirdness, and this procedure appears to be safe, please remember that this is a hack.
That said, I have safely started B&N Shop and Nook Home app. Things are steady on my Nook.

Update: After a couple of days, things are stable. Events are still syncing; no spontaneous wipes.
Also, others have reported success, so I am unburying this post from a different thread.
This solution worked great for me! Thanks!
 

tonis79

Member
Feb 1, 2011
9
0
Like the other two people, I just went back into my gmail app, re-added my gmail account information and told it to sync my calendar when it asked and it works fine now. Way easier than all this other stuff.
 

khaytsus

Senior Member
Apr 8, 2008
7,258
1,175
Central Kentucky
Like the other two people, I just went back into my gmail app, re-added my gmail account information and told it to sync my calendar when it asked and it works fine now. Way easier than all this other stuff.

Does it STAY synced? If you modify the calendar on the web, it reflects on the Nook without any manual intervention? And likewise editing on the Nook reflects on the web?
 

jdebay

Senior Member
Feb 5, 2011
68
9
Holliston. MA
Thanks a million, I did it like you said.

I was finlly able to get my calendar syncing by opening the GMail app selecting menu then accounts and then re-adding my gmail account, when I re-added the account it gave me the option to select calendar for syncing.

Sent from my ROOTED Barnes & Noble NookCOLOR

It worked fine, but this time, I checked sync calendar to sync.

J
 

DomSim

Senior Member
Sep 24, 2008
1,326
208
When I tries to "re-add" my Gmail account it says this account already exists on your phone :(
 

feisty_noodle

Senior Member
Jan 16, 2010
220
81
Anyone? Does it actually STAY synced or sync that one time?

As I mentioned in the OP, the sync is stable.
It also persists through reboots (although the contents of the XML file change).

People here are also using a much more simple procedure suggested by Docfreed (I think) of simply re-adding the main Google account. This works for some, but not everyone.

Good luck.
 

khaytsus

Senior Member
Apr 8, 2008
7,258
1,175
Central Kentucky
As I mentioned in the OP, the sync is stable.
It also persists through reboots (although the contents of the XML file change).

People here are also using a much more simple procedure suggested by Docfreed (I think) of simply re-adding the main Google account. This works for some, but not everyone.

Good luck.

Good luck is right, that never worked for me.. Oh well. I tried it once before, and I just re-tried it.. the file stays the way I modified it until I reboot, and then it's back to the original version with enabled="false" and no syncable="true" added.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    tldr: Although the initial calendar state is pulled from Google servers upon account setup, normal syncing function of the Calendar app is broken in the autonootered Nooks; follow this procedure to fix

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

    It seems, the problem is that there is no way to set the sync state of the google services because we don't have access to the proper Android Settings (just whatever B&N wants us to have).

    There is, however an xml file which can set the properties, if properly edited:
    /data/system/sync/accounts.xml

    In this file, one can find a bunch of entries which correspond with registered Google accounts (made possible, of course, by the SetupWizard.apk provided as a result of the Autonooter procedure).

    They (these entries) look like this:
    Code:
    <authority id="?" account="?????@gmail.com" type="com.google" authority="???" />

    Procedure to enable calendar syncing:

    0) If possible, backup the current state with TitaniumBackup or something similar. (I haven't seen any bad mishaps -- like a /data wipe -- but one never knows.)

    1) pull the /data/system/sync/accounts.xml and save a copy just in case
    Code:
    cmdline$ adb pull /data/system/sync/accounts.xml ./accounts.xml
    cmdline$ adb pull /data/system/sync/accounts.xml ./accounts.xml.orig

    2) modify the lines in accounts.xml with {authority="calendar"} to include {enabled="true" syncable="true"}; use a simple text editor not to introduce any weird formatting

    The final state of the line will be something like this:
    Code:
    <authority id="?" account="?????@gmail.com" type="com.google" authority="calendar" enabled="true" syncable="true" />

    3) push the modified file back to the same location
    Code:
    cmdline$ adb push ./accounts.xml /data/system/sync/accounts.xml

    4) reboot and test the syncing: create an event on the Nook and see it appear on GCal (should happen within 30 s), create an event on GCal and see it appear on the Nook (you may have to refresh the app by exiting to Home and getting back in, for example)

    5) enjoy your functional calendar app

    Note: although I have not experienced any weirdness, and this procedure appears to be safe, please remember that this is a hack.
    That said, I have safely started B&N Shop and Nook Home app. Things are steady on my Nook.

    Update: After a couple of days, things are stable. Events are still syncing; no spontaneous wipes.
    Also, others have reported success, so I am unburying this post from a different thread.
    2
    I was finlly able to get my calendar syncing by opening the GMail app selecting menu then accounts and then re-adding my gmail account, when I re-added the account it gave me the option to select calendar for syncing.

    Sent from my ROOTED Barnes & Noble NookCOLOR
    1
    I've been using an app/widget called "Synker" available on the Market. Works good to trigger sync events, but maybe I'll try these steps this weekend when I get some downtime.

    Thanks!
    1
    I was finlly able to get my calendar syncing by opening the GMail app selecting menu then accounts and then re-adding my gmail account, when I re-added the account it gave me the option to select calendar for syncing.

    Sent from my ROOTED Barnes & Noble NookCOLOR

    YES SIR! worked, tx's....funny how it shows my account yet allows one to enter the same account again...was not sure if I was to remove the account 1st...just added it again w/o removing in case other were wondering...
    1
    You see enabled="false"?
    Are you trying to enable the calendar(s) on the primary Gmail account?

    If not, I don't think this method will work. I have been unable to set up any calendars other than those associated with my primary Gmail account.

    Btw, following a reboot, I normally see that the file which I edit reverts back to the 'enabled' and 'syncable' entries missing.
    Only on my secondary Gmail accounts do I ever see the enabled="false" flag.

    I only have one Google account, so yeah it's the primary account. So your file reverts too, but it works? Ah well.. I created and moved an event around a few times, waiting each time, never did update. Only way to get it to update is the Synker widget.