Post Reply

[MOD][Xposed] XFBSync - Restore native FB contact sync via Xposed [CM10+]

OP agentdr8

23rd June 2014, 05:55 AM   |  #1  
agentdr8's Avatar
OP Senior Member
Flag Cowtown, CA
Thanks Meter: 1,107
 
2,159 posts
Join Date:Joined: Mar 2007
Donate to Me
More
I built this module at @mew1033's request. Thanks to the guide by @pogi1100, I was able to mimic the steps needed to get this working. This has been tested on CM11 4.4.4 Nightly from 06-19-14, but it should work on older CM/AOSP releases as well. Most OEM builds from HTC, Samsung, LG, Sony, etc don't require this, as they modify the ContactsProvider themselves to allow Facebook syncing.

Install steps:
  • Make sure you have the latest Xposed Framework installed
  • Make sure you enable the app_process from within Xposed Installer and reboot
  • Install attached apk, just like you would any other apk
  • Enable module in Xposed Installer, but don't reboot/soft-reboot just yet
  1. Open Settings->Accounts. If you have a Facebook account already added, remove it
  2. Click on your Google account, and under its sync preferences, uncheck the Contacts item
  3. Go back to Settings->Apps. Go to the All tab and find Contacts Storage. Clear the data
  4. Now you can soft/hard reboot
  5. When the phone is booted, go back into Settings->Accounts, select your Google account. Re-check your Contacts item
  6. When the Contacts are finished syncing, open the Facebook app and enter your login info
  7. Open Facebook->Settings and scroll all the way down to Sync Contacts
  8. Check either to Sync All, or Sync with Existing Names
  9. Go back to Settings->Accounts, pick your Facebook account
  10. You should see Contacts as an item and it should show the syncing status
  11. When the sync is done, open People and you should see all your FB contacts, with phone numbers and email addresses

Known Issues
If you have Privacy Guard, AppOps or any sort of privacy enhancer/app firewall, make sure you disable it for the Facebook app. This can prevent contact syncing from working.
Available via Xposed Repo as well (currently under Beta).

Source code can be found at my github

I've attached some screens showing the steps outlined above. It's pretty straight forward, but should be done in that order.
Attached Thumbnails
Click image for larger version

Name:	step1.png
Views:	2850
Size:	53.8 KB
ID:	2812925   Click image for larger version

Name:	step2.png
Views:	2500
Size:	30.6 KB
ID:	2812926   Click image for larger version

Name:	step3.png
Views:	2307
Size:	70.7 KB
ID:	2812927   Click image for larger version

Name:	step4.png
Views:	2157
Size:	59.2 KB
ID:	2812928   Click image for larger version

Name:	step5.png
Views:	2152
Size:	80.5 KB
ID:	2812929  

Click image for larger version

Name:	step6.png
Views:	2114
Size:	54.6 KB
ID:	2812930   Click image for larger version

Name:	step7.png
Views:	2548
Size:	122.5 KB
ID:	2812931   Click image for larger version

Name:	step8.png
Views:	2489
Size:	52.0 KB
ID:	2812932   Click image for larger version

Name:	step9.png
Views:	2246
Size:	33.4 KB
ID:	2812933   Click image for larger version

Name:	step10.png
Views:	2039
Size:	57.7 KB
ID:	2812934  

Click image for larger version

Name:	step11.png
Views:	2020
Size:	24.0 KB
ID:	2812935  
Attached Files
File Type: apk XFBSync_v1.0.apk - [Click for QR Code] (277.3 KB, 1028 views)
Last edited by agentdr8; 11th July 2014 at 07:15 PM.
The Following 33 Users Say Thank You to agentdr8 For This Useful Post: [ View ]
23rd June 2014, 07:04 AM   |  #2  
Persechini's Avatar
Senior Member
Flag Rio de Janeiro
Thanks Meter: 125
 
364 posts
Join Date:Joined: Mar 2012
More
Hmm, I followed al the steps, Facebook setting show the option to sync contacts, but if I chose all contacts it auto changes to existing contacts, and despite Facebook showing up on the contacts app correctly now, even after letting all contacts sync, when showing only Facebook contacts the list is empty.Maybe some Facebook configuration is causing this trouble? It has all signs that it's working, but friends list visibility could mess this up right? Or its something else?

Enviado de meu Nexus 4 usando Tapatalk
23rd June 2014, 09:36 AM   |  #3  
PeppeBove's Avatar
Member
Thanks Meter: 4
 
63 posts
Join Date:Joined: Feb 2011
Could be useful (for others) to write instructions That appear when you click on module

Inviato dal mio ST15i utilizzando Tapatalk
23rd June 2014, 04:24 PM   |  #4  
Senior Member
Thanks Meter: 23
 
171 posts
Join Date:Joined: Oct 2007
Works great on XNote Touchwiz ROM! Finally a working facebook contact sync with phone numbers!..and no apk modification needed. Great work!

Btw, is there a way to backup the synced contact numbers to a file or merge it with your google account? I want to keep/archive the synced facebook info.
Last edited by jembot; 23rd June 2014 at 04:28 PM.
23rd June 2014, 04:31 PM   |  #5  
freedomtigers's Avatar
Member
Flag kerala
Thanks Meter: 0
 
34 posts
Join Date:Joined: Sep 2013
Donate to Me
More
Angry
i did all things you described here
fb shows sync atlast

after it synced all contacts,
there is no fb contact.... (gmail contacts are there. no issue with them. and my phone contacts too)
the field is empty for fb contact

i did exactly as you described
and i selected contact display option for gmail and fb
still there is no fb contacts......

please help me......
Last edited by freedomtigers; 23rd June 2014 at 04:34 PM. Reason: error correction
23rd June 2014, 05:32 PM   |  #6  
MaKTaiL's Avatar
Senior Member
Flag Brasília
Thanks Meter: 1,156
 
2,736 posts
Join Date:Joined: Oct 2011
More
Does this work on stock/almost stock Android (Nexus, Moto X/G/E)?
23rd June 2014, 05:46 PM   |  #7  
Persechini's Avatar
Senior Member
Flag Rio de Janeiro
Thanks Meter: 125
 
364 posts
Join Date:Joined: Mar 2012
More
Quote:
Originally Posted by MaKTaiL

Does this work on stock/almost stock Android (Nexus, Moto X/G/E)?

Ok my nexus 4 and 7 it enables sync options, but sync zero contacts from Facebook

Enviado de meu Nexus 4 usando Tapatalk
23rd June 2014, 07:08 PM   |  #8  
agentdr8's Avatar
OP Senior Member
Flag Cowtown, CA
Thanks Meter: 1,107
 
2,159 posts
Join Date:Joined: Mar 2007
Donate to Me
More
Quote:
Originally Posted by Persechini

Hmm, I followed al the steps, Facebook setting show the option to sync contacts, but if I chose all contacts it auto changes to existing contacts, and despite Facebook showing up on the contacts app correctly now, even after letting all contacts sync, when showing only Facebook contacts the list is empty.Maybe some Facebook configuration is causing this trouble? It has all signs that it's working, but friends list visibility could mess this up right? Or its something else?

I can do some further testing tonight. I only added a single Google contact to my test account, so there weren't any contacts to match names with for the FB sync. I'm wondering if maybe that's throwing it off. I know that when I picked to display only FB contacts, the single Google contact disappeared and I only saw FB contacts.
23rd June 2014, 07:09 PM   |  #9  
agentdr8's Avatar
OP Senior Member
Flag Cowtown, CA
Thanks Meter: 1,107
 
2,159 posts
Join Date:Joined: Mar 2007
Donate to Me
More
Quote:
Originally Posted by PeppeBove

Could be useful (for others) to write instructions That appear when you click on module

Not a bad idea. I can add a built-in howto.
23rd June 2014, 07:13 PM   |  #10  
agentdr8's Avatar
OP Senior Member
Flag Cowtown, CA
Thanks Meter: 1,107
 
2,159 posts
Join Date:Joined: Mar 2007
Donate to Me
More
Quote:
Originally Posted by jembot

Works great on XNote Touchwiz ROM! Finally a working facebook contact sync with phone numbers!..and no apk modification needed. Great work!

Btw, is there a way to backup the synced contact numbers to a file or merge it with your google account? I want to keep/archive the synced facebook info.

Contact merging is usually handled by the Contacts/People app itself I think. It doesn't merge the data together, but just combines multiple contacts with the same name under a single contact entry. If you want to extract data from one contact type and add to another, you'd probably want to export all contacts from say FB and then import them into your Google account via the web.

Try displaying only FB contacts and there might be an Import/Export option in the menu.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Xposed Framework Modules by ThreadRank