Skip to content

Instantly share code, notes, and snippets.

@xyhp915
Forked from dreamwhite/gsync_adapters.md
Created December 21, 2023 05:34
Show Gist options
  • Save xyhp915/4cc8fd13031f733f6348d8a9ea0dc776 to your computer and use it in GitHub Desktop.
Save xyhp915/4cc8fd13031f733f6348d8a9ea0dc776 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