With my Samsung Galaxy Nexus I can't sync my contacts (from Google Contacts) with those from Twitter/Facebook.

My accounts are up and running, but when i tap "Sync Now" nothing happens. It says "Last sync on ..." but contacts are not updated.

Am I'm missing something?

| improve this question | | | | |

Because Google disabled it for marketing reasons (pushing Google+ maybe?) Technically it's just not in the whitelist in an xml file to allow synchronization

According to niranjanthilak here is his detailed explanation:

  • Facebook application can sync its contacts with the Contacts ( Through ContactsProvider ) only when its whitelisted ( or, in other words , given an escalated permission set ) in the ROM.

  • For this , You have to edit the ContactsProvider.apk and add the whitelisted permission.

  • For editing the ContactsProvider.apk ( Which resides in the /system/app/ directory) ,You will need smali ( An assembler/disassembler for Android’s dex format ).
  • After disassembling the ContactsProvider.apk using smali , Go to the res/values/ folder ( in the disassembled source ) , and add the file ( arrays.xml ) containing the following content:
<?xml version="1.0" encoding="UTF-8"?>
    <string-array name="unrestricted_packages">
  • The com.facebook.katana is the application of facebook. So after adding the arrays.xml file to the /res/values/ folder, Assemble the ContactsProvider using the smali into an unsigned apk file.
  • Now , Since ICS , Android 4.0 , Google has disabled this provision of whitelisting applications natively , hence they have obfuscated certain fields from the database.
  • Add the column named

to the raw_contacts table inside contacts2.db ( stored in /data/data/com.android.providers.contacts/database/ ) - If you have sqlite enabled ( along with busybox ) in your kernel you can use this command for altering the database and adding the necessary field by running it under ADB Shell:

sqlite3 /data/data/com.android.providers.contacts/databases/contacts2.db
 'ALTER TABLE raw_contacts ADD COLUMN is_restricted VARCHAR';
  • After adding the column, all the facebook accounts added will be provided with Sync Prompt and they will appear under contacts.
| improve this answer | | | | |
  • Thanks. The only problem ATM is that I'm not root, so this will not work :( – user34295 Oct 19 '12 at 14:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.