Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contacts and Calendar Sync (Solved) #585

Open
NolfNolfer opened this issue Aug 3, 2018 · 30 comments
Open

Contacts and Calendar Sync (Solved) #585

NolfNolfer opened this issue Aug 3, 2018 · 30 comments

Comments

@NolfNolfer
Copy link

NolfNolfer commented Aug 3, 2018

Please help me because I'm about to explode, as it's been 4 hours I'm trying to solve this.

Basically I clean installed lineageOS microg, and everything works, but I want to sync my calendar and my contacts.

I want an elegant and automatic solution, so downloading GoogleCalendarSyncAdapter solved the issue for the calendar sync without the Google Calendar app, but I'm currently stuck with no Contacts syncing, even though I've installed GoogleContactsSyncAdapter (version 9 that crashed, version 8.1 and other versions).

In settings, accounts, google, (mail account), there is NO contacts switch, only Gmail and Calendar appeared after rebooting.

Plus, when opened, gmail asks me to add an email account because it reads none (even though I logged in my two google accounts at the start of the lineageOS setup) and so I'm stuck there, and cannot read mails (if I receive a mail, I get the notification).

So, what do I have to do to have working Contacts sync and a working gmail?

EDIT: after logging out of an account and opening gmail again the other account showed up on the gmail starting page. From there I added the account I removed and then tapped on "take me to gmail", and now it works perfectly. However, I still need to find a solution to sync my Contacts

@JonnyTech
Copy link

#222 (comment)

@NolfNolfer
Copy link
Author

Yes, I've already did the DAVdroid solution, but it only synced my contacts without calendar, and that is odd since the url "https://apidata.googleusercontent.com/caldav/v2/calid/events" should sync the calendar, not the contacts. So I've unistalled everything because I prefer "clean" solutions, and that solution solved my problem but has a distinct "it works? what the hell have I done?" feel to it.

I'd basically like to have something small, easy, elegant, easily comprehensible and easily backup-able and permanent. Installing the contacts sync apk should be the perfect solution (because it's the proprietary app and does everything automatically, so no risks of future incompatibility if Google decides to change stuff), however it doesn't make the "contacts" sync switch appear in the accounts settings, and I'd like to fix that to have something less invasive than the DAVdroid app (which btw I still can't understand why it synced contacts instead of calendar).

by the way, on https://developers.google.com/calendar/caldav/v2/guide, they say that the address in the post you linked "https://www.google.com/calendar/dav/[email protected]/events" is deprecated

@Catfriend1
Copy link

I've also got this problem.with the google contacts sync some time ago and decided to put up a small zarafa activesync installation on a rasbpi and later used my nas for it. This is rather not a solution but a recommendation.

@JonnyTech
Copy link

JonnyTech commented Aug 3, 2018

No, use the link in the post - it works correctly: https://www.google.com/calendar/dav/[email protected]/events

@Lanchon
Copy link

Lanchon commented Aug 3, 2018 via email

@NolfNolfer
Copy link
Author

NolfNolfer commented Aug 7, 2018

Found the solution!

This will install the two official Google APKs that automatically sync google Contacts and Calendar to the device, so if you're concerned about privacy and stuff, DAVdroid could be the solution you're looking for.

However, they should just sync these two things and do nothing else, so you should be pretty safe, but in these privacy-rending, obscure times you can't even trust your mouse. Maybe your mouse is tracking what you do and how you move your hand, who knows.

Anyway, if you don't really care, and just want the damn instructions, go ahead:

1: download gapps; I used Open Gapps
2: open the archive and extract:

  • googlecontactssync-all.tar.lz from the Core folder
  • calsync-all.tar.lz from the GApps folder (maybe the folder names and paths will change with other gapps? The archives names shouldn't though, so maybe you could search for the names and extract them)

3: extract the respective APKs. If you can't open ".tar.lz" archives because reasons, convert them or find a tool that will open them. I converted them to .zip archives with https://convertio.co/it/tar.lz-tar/ and used winRar to extract them
4: send them to your device
6: mount /system as RW and put these two APKs in /system/apps in their respective directories (which won't exist and you will create), like this:
/system/app/GoogleContactsSyncAdapter/GoogleContactsSyncAdapter.apk
/system/app/GoogleCalendarSyncAdapter/GoogleCalendarSyncAdapter.apk
7: IMPORTANT: set both APKs' permissions to 644 (Owner: read write, Group: read, Other: read)

8: Reboot

9: Open settings, apps, show system apps, then give:

  • Contacts permissions to the Google Contacts Sync app
  • Calendar permissions to Google Calendar Sync app
    (not sure why, but the Google Calendar Sync app had a "Contacts" permission and also an "Additional permissions" section with another "Contacts" switch with a different icon than the other one; to be sure I enabled both)

10: Reboot again

11: ???

12: [Realizes there is no number 5]

13: [profits internally]

One final doubt: will a TWRP factory reset wipe these apps, even if they are system apps? From what I understand, a TWRP factory reset only wipes cache and data, while leaving the /system partition intact

@NolfNolfer NolfNolfer changed the title Contacts Sync Contacts and Calendar Sync (Solved) Aug 9, 2018
@sirocyl
Copy link

sirocyl commented Oct 16, 2018

@NolfNolfer from what I can tell, a data wipe will not delete the apps placed in the /system/ partition. However, any apecial permissions you set from the Settings app, will be erased, and will need to be reinstated manually.

I wouldn't say this solves the issue - your solution works, and makes your problem go away, but it certainly isn't within the scope of the microG project to recommend users to install a Google proprietary system app.

In the end, further research will need to be done, in order to properly implement Contacts, Calendar and other PIM syncing/storage functionality within microG, as the Google service would, with or without using Google PIM servers.

@nitinjs
Copy link

nitinjs commented Mar 4, 2019

Found the solution!

This will install the two official Google APKs that automatically sync google Contacts and Calendar to the device, so if you're concerned about privacy and stuff, DAVdroid could be the solution you're looking for.

However, they should just sync these two things and do nothing else, so you should be pretty safe, but in these privacy-rending, obscure times you can't even trust your mouse. Maybe your mouse is tracking what you do and how you move your hand, who knows.

Anyway, if you don't really care, and just want the damn instructions, go ahead:

1: download gapps; I used Open Gapps
2: open the archive and extract:

* googlecontactssync-all.tar.lz from the Core folder

* calsync-all.tar.lz from the GApps folder (maybe the folder names and paths will change with other gapps? The archives names shouldn't though, so maybe you could search for the names and extract them)

3: extract the respective APKs. If you can't open ".tar.lz" archives because reasons, convert them or find a tool that will open them. I converted them to .zip archives with https://convertio.co/it/tar.lz-tar/ and used winRar to extract them
4: send them to your device
6: mount /system as RW and put these two APKs in /system/apps in their respective directories (which won't exist and you will create), like this:
/system/app/GoogleContactsSyncAdapter/GoogleContactsSyncAdapter.apk
/system/app/GoogleCalendarSyncAdapter/GoogleCalendarSyncAdapter.apk
7: IMPORTANT: set both APKs' permissions to 644 (Owner: read write, Group: read, Other: read)

8: Reboot

9: Open settings, apps, show system apps, then give:

* Contacts permissions to the Google Contacts Sync app

* Calendar permissions to Google Calendar Sync app
  (not sure why, but the Google Calendar Sync app had a "Contacts" permission and also an "Additional permissions" section with another "Contacts" switch with a different icon than the other one; to be sure I enabled both)

10: Reboot again

11: ???

12: [Realizes there is no number 5]

13: [profits internally]

One final doubt: will a TWRP factory reset wipe these apps, even if they are system apps? From what I understand, a TWRP factory reset only wipes cache and data, while leaving the /system partition intact

awesome, it worked for me! 👍

@billbarni
Copy link

I always get errors when trying to convert or extract the tar.lz-tar files.

@ac130kz
Copy link

ac130kz commented Dec 21, 2020

@billbarni got the same error, extracting on Android worked fine. However, when I try installing the app as shown above, the apps just disappear after a reboot, even though I set proper permissions and switch to RW

@b0d8mr4zu
Copy link

@billbarni tar can extract them directly. (assuming You're on linux)
tar --lzip -xvf googlecontactssync-all.tar.lz

@ac130kz You can use the terminal in the recovery (e.g. TWRP). You don't have to root the rom this way. You can mount the FS as read-write, add the dirs to system, copy apks to the corresponding dirs and chmod their permitions. No need for usb connection, you can type it on the device.

@ac130kz
Copy link

ac130kz commented Feb 17, 2021

@b0d8mr4zu I moved to DAVx5, which works perfectly

@b0d8mr4zu
Copy link

b0d8mr4zu commented Feb 17, 2021

@ac130kz andoid 11 will probably break DAVx5 although everything can be worked-around, but it's awesome it works for now.
I used a combination of DAVx5 for calendars from multiple accounts and GoogleContactsSyncAdapter as it's less likely to stop working unattended.

@ac130kz
Copy link

ac130kz commented Feb 17, 2021

@b0d8mr4zu I've been using Android 11 for a month now, it doesn't seem like Google changed anything

@dreamwhite
Copy link

Found the solution!

This will install the two official Google APKs that automatically sync google Contacts and Calendar to the device, so if you're concerned about privacy and stuff, DAVdroid could be the solution you're looking for.

However, they should just sync these two things and do nothing else, so you should be pretty safe, but in these privacy-rending, obscure times you can't even trust your mouse. Maybe your mouse is tracking what you do and how you move your hand, who knows.

Anyway, if you don't really care, and just want the damn instructions, go ahead:

1: download gapps; I used Open Gapps
2: open the archive and extract:

* googlecontactssync-all.tar.lz from the Core folder

* calsync-all.tar.lz from the GApps folder (maybe the folder names and paths will change with other gapps? The archives names shouldn't though, so maybe you could search for the names and extract them)

3: extract the respective APKs. If you can't open ".tar.lz" archives because reasons, convert them or find a tool that will open them. I converted them to .zip archives with https://convertio.co/it/tar.lz-tar/ and used winRar to extract them
4: send them to your device
6: mount /system as RW and put these two APKs in /system/apps in their respective directories (which won't exist and you will create), like this:
/system/app/GoogleContactsSyncAdapter/GoogleContactsSyncAdapter.apk
/system/app/GoogleCalendarSyncAdapter/GoogleCalendarSyncAdapter.apk
7: IMPORTANT: set both APKs' permissions to 644 (Owner: read write, Group: read, Other: read)

8: Reboot

9: Open settings, apps, show system apps, then give:

* Contacts permissions to the Google Contacts Sync app

* Calendar permissions to Google Calendar Sync app
  (not sure why, but the Google Calendar Sync app had a "Contacts" permission and also an "Additional permissions" section with another "Contacts" switch with a different icon than the other one; to be sure I enabled both)

10: Reboot again

11: ???

12: [Realizes there is no number 5]

13: [profits internally]

One final doubt: will a TWRP factory reset wipe these apps, even if they are system apps? From what I understand, a TWRP factory reset only wipes cache and data, while leaving the /system partition intact

Hi there, I just landed there to let you know that I've published on a repository of mine a Magisk module which fixes this issue. Basically it installs as system-apps GoogleContactsSyncAdapter and GoogleCalendarSyncAdapter.
You can get more infos here

@Shalahuddin0
Copy link

@NolfNolfer thank you for the solution bro, I have managed to synchronize contacts on microG, I am very grateful

@ibilux
Copy link

ibilux commented Nov 1, 2021

Any update on properly implementing this in MicroG without using GoogleContactsSyncAdapter and GoogleCalendarSyncAdapter ?

@drrossum
Copy link

drrossum commented Nov 2, 2021 via email

@Lanchon
Copy link

Lanchon commented Nov 2, 2021

What is the point of sharing your information with Google but trying to avoid using their own method for doing so?

the point is different for each person. some might already have contacts on google and know that if true deletion is possible, it is pointless because your contacts use google anyway.

i am not so worried about google having my contact list at this juncture (but i hate ppl giving their contacts to app makers and google allowing this and not allowing me to opt out of other ppl giving my contact to 3rd parties). what i want to avoid is google being root on my computers: google not abiding by the privacy and security rules the force on to others, including the computer "owners" themselves. this is insulting and repulsive.

@ibilux
Copy link

ibilux commented Nov 2, 2021

What is the point of sharing your information with Google but trying to avoid using their own method for doing so?

If you used MicroG and Gapps you will see the difference in speed and ram usage and battery consumption (Huge difference).
Also, if GoogleContactsSyncAdapter and GoogleCalendarSyncAdapter are implemented in MicroG, we wouldn't need to install them any more.

@RobertoWa
Copy link

you should put up with the fact that you have to use another program like davx to get this function.

@Black6spdZ
Copy link

you should put up with the fact that you have to use another program like davx to get this function.

no you don't have to use davx.. https://github.com/dreamwhite/gsync_adapters_for_magisk flash in magisk or recovery

@dront78
Copy link

dront78 commented Feb 5, 2022

@ibilux how i can sync without installing the adapters? I'm using latest microg lineage and contacts are not synced.

@ibilux
Copy link

ibilux commented Feb 5, 2022

@dront78 currently there is no other solution than using these adapters.

@bitmage
Copy link

bitmage commented Aug 23, 2022

I'm on Android 12. OpenGapps 12 not yet available. Tried installing the two apks from BitGApps. Got them installed and set permissions, but nothing happens. Gave up.

This process feels a lot more painful than it needs to be. One contributing factor is a lack of any information about what's going on... is it syncing? Did it even try? What went wrong? I understand we're dealing with google code here, but I'm wondering if there's some way to view logs and troubleshoot. I agree with other posters, it seems like it would be valuable to implement this in microG for a better user experience. Or failing that, document a suggested path.

I did get calendar and contact sync working via DavX5 per instructions here. I appreciate that the DavX5 program has detailed information about the network requests it's making and what replies it is getting.

@egpbos
Copy link

egpbos commented Aug 30, 2022

Android 12 here too (Lineage 19.1), am also having issues with the latest available sync app from APKMirror, even though it says its minimum version is "Android 12+". I also installed the Google Contacts app. That one says it's trying to sync, but it has done so for the past two days and so my hopes are low that it will manage to sync my mere few hundred contacts.

@darsaliq00
Copy link

@egpbos u tried nik gapps?

@egpbos
Copy link

egpbos commented Sep 12, 2022

No, I didn't know about that, but it seems like that does not use microG, so that's not really a solution for my situation. Thanks for the suggestion, though, maybe I'll try it some other time.

@TheArkive
Copy link

@NolfNolfer thanks!

This worked for me on LOS 18.1 (on OG Pixel XL-marlin) with one minor change:

  • I had to actually clear cache/storage for the calendar sync adapter before I could set permissions.
    Thanks again!

@Ten0
Copy link

Ten0 commented Dec 4, 2023

For reference: iodéOS 20 (with Google Agenda app installed at least) doesn't require any additional installation for agenda sync to work, however contacts won't sync.
So I uploaded a version of the magisk module that only installs the contacts fix: https://github.com/Ten0/gsync_adapters_for_magisk/releases/tag/69420-v420

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests