Skip to content

Instantly share code, notes, and snippets.

@phatz
Forked from dreamwhite/gsync_adapters.md
Created February 4, 2024 18:37
Show Gist options
  • Save phatz/ca3d29d3dcf4aea7a79ed0ffdf6975d2 to your computer and use it in GitHub Desktop.
Save phatz/ca3d29d3dcf4aea7a79ed0ffdf6975d2 to your computer and use it in GitHub Desktop.
[Google Sync Adapters] How to sync them with microG

Mammamia Marcello what's this?

I know what you're thinking of while reading this gist, but I don't have much spare time to setup a Nextcloud server for syncing my contacts and my calendar This guide is intended for those users like me (lazy af) who wanna sync contacts and calendar with Google server, even if using microG.

Requirements

How to proceed then?

First of all, in addition to a working TWRP, I'll assume that you know how to copy a file using adb, how to create a directory using mkdir.

Let's proceed by booting your phone in recovery mode, mount system in RW mode using Mount menu, and connect the phone to the PC. Run adb shell and create two folders onto /system/app using the below command:

mkdir -p /system/app/{GoogleContactsSyncAdapter,GoogleCalendarSyncAdapter}

Then, push the sync adapter(s) in the(ir) respective folder(s) using adb push:

Please don't forget to rename the adapters

#For contact syncing adapter
adb push GoogleContactsSyncAdapter.apk /system/app/GoogleContactsSyncAdapter/GoogleContactsSyncAdapter.apk

#For calendar syncing adapter

adb push GoogleCalendarSyncAdapter.apk /system/app/GoogleCalendarSyncAdapter/GoogleCalendarSyncAdapter.apk

After doing so, give octal-permissions 644 to both files:

chmod 644 /system/app/GoogleContactsSyncAdapter/GoogleContactsSyncAdapter.apk
chmod 644  /system/app/GoogleCalendarSyncAdapter/GoogleCalendarSyncAdapter.apk

At this point reboot your phone and give to the new installed adapters their respective permission using Settings/Apps/Show System 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)

Lastly, open Settings/Accounts/Google/Account sync and flip Calendar and Contacts sync adapters

Credits

Please note that I do not own neither APKMirror nor Google Sync Adapter, nor microG nor whateveryouwant I just wanted to clarify the setup process for the install adapters after reading this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment