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

Search This thread

estapagu

Senior Member
Jun 30, 2011
130
55
Thanks a lot for the update!
I'm wondering... Would it be possible to add a feature to overwrite contact pictures on Google account? I mean, just like haxsync option.
 

st40611

Senior Member
Jun 7, 2009
134
16
First of, thanks for doing this - after Facebook killed off API v1 it's pretty much impossible to get any Facebook contact sync done on AOSP builds. This module is pretty much the only hope we have left as Stock/GPE/etc users. :/

Anyways, after a lot of trial error, I have v34 FB running on my 5.1.1 GPE m8, with both Sync & High Quality Pictures on (had to kill all FB-related services for the second one to show up). Works great now!
 

agentdr8

Senior Member
Mar 4, 2007
3,648
1,896
Cowtown, CA
I'm wondering... Would it be possible to add a feature to overwrite contact pictures on Google account? I mean, just like haxsync option.

Possible yes, but something that I'll likely add, probably not. I think it's a bit out of scope for what I had envisioned for this module. The good thing is this module is open source, so anyone can grab a copy from my github and add whatever features they may want.

I posted it to soon. High res option suddenly disappeared. [emoji20]

The option in settings disappeared, or the high res pictures disappeared? If it's the latter, then it's something else within the FB app that I would need to find and block to prevent it from reverting to low res pics during sync. Probably not something I'll investigate due to time constraints, but if someone finds a solution, I can definitely look at adding it to the module.
 

0.0

Senior Member
Jan 12, 2010
6,829
3,275
Possible yes, but something that I'll likely add, probably not. I think it's a bit out of scope for what I had envisioned for this module. The good thing is this module is open source, so anyone can grab a copy from my github and add whatever features they may want.

The option in settings disappeared, or the high res pictures disappeared? If it's the latter, then it's something else within the FB app that I would need to find and block to prevent it from reverting to low res pics during sync. Probably not something I'll investigate due to time constraints, but if someone finds a solution, I can definitely look at adding it to the module.

With v1.2.2, it caused the option to sync pics to disappear. It would appear for a short while though, after boot. With v1.2, it was working
 

mangordi89

Senior Member
Sep 21, 2010
242
22
Anyone got this to work on the Moto X with 4.4.4? I followed all the steps but the sync contacts option doesn't come up under app settings. I'm on the newest Facebook update. Thanks!

Sent from my XT1056 using XDA Free mobile app
 

Budgiebrain994

New member
Oct 4, 2013
2
0
Hi there
Awesome job with the app :)
I've followed instructions up to the last step, where Contacts sync is checked, FB set to sync all contacts, it says the sync is running but after a few seconds it stops and there are no contacts in the People app. I have changed the view to Custom to only show Facebook contacts, which is also ticked.
Anyone else having this problem? I'm running on a rooted OnePlus One with CM12, on 5.0.2. Privacy Guard has also been switched off. I can provide ContactsProvider.apk and any logs if it helps. I have also cleared Facebook's data again to try to resync, but to no avail.
Thanks in advance
 

agentdr8

Senior Member
Mar 4, 2007
3,648
1,896
Cowtown, CA
Anyone got this to work on the Moto X with 4.4.4? I followed all the steps but the sync contacts option doesn't come up under app settings. I'm on the newest Facebook update. Thanks!

Then you may have missed on the OP under Known Issues that for devices running on a rom older than LP, you have to use the FB app v14 or older. Anything newer and the entire contact syncing package and classes are removed.
 

0.0

Senior Member
Jan 12, 2010
6,829
3,275
Oh well..
The syncing worked, but the "sync only with existing contacts" did not.
Now I have all my Facebook contacts in my contacts app, even without number.
Same here. With that option selected, all my Facebook contacts are synced :(

sent from my Moto X Pure Edition
 

agentdr8

Senior Member
Mar 4, 2007
3,648
1,896
Cowtown, CA
The "sync only exisiting contacts" doesn't seem to work indeed.
After trying to remove it it f*** ed up my whole Google contacts, linking the pictures to the wrong names.
Had to reset it on the Google contacts website and revert to a backup.

I updated the module and posted it on the OP and in the repo. I just tested it on a fresh CM12.1 install on my G2 and it seems to be doing what it should be, including syncing just with existing contacts, and pulling down high res pics. The option still won't show up until you've enabled the module and then killed the FB app/processes at least once.
 

agentdr8

Senior Member
Mar 4, 2007
3,648
1,896
Cowtown, CA
I'm on Nexus 5 with cataclysm.
Followed instructions in op but not working at all. No contact sync option in fb app or under setting/accounts. As if the module is not installed.

Enable debugging by creating the files directory in /data/data/com.dr8.xposed.XFBSync/ and place an empty file named debug in it. Then reboot and provide me the xposed installer error.log
 

voetbalremco

Inactive Recognized Developer
I updated the module and posted it on the OP and in the repo. I just tested it on a fresh CM12.1 install on my G2 and it seems to be doing what it should be, including syncing just with existing contacts, and pulling down high res pics. The option still won't show up until you've enabled the module and then killed the FB app/processes at least once.

The syncing went fine and the option was available, it just didn't sync the existing contacts but all my Facebook contacts.
I"ll try again later.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 49
    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.

    This module made it to the XDA Portal! Thanks!

    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.​
    The module has been reported to work on the KK and older version of the FB app from v14 and older. Also reported to work on the most recent stable LP FB app (v34.0.0...) and for some, the most recent alpha version (v35.0.0...)​

    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.

    The latest version of the module now has a module icon (thanks to @-DM-) in Xposed Installer. If you don't like it or are offended by it, continue to use v1.2.5. The module icon is the only change.
    5

    Had some issues decompiling the new FB apk. Will be a few days til I get a chance to do some testing.
    4
    In SlimKat ROM is working contacts sync with Facebook. I have working option with Facebook applications to check contacts sync. But only profile photo is syncing and very bad quality. Maybe it will be helpful to see haw they do that.

    The newer FB apps are still checking for the unrestricted_packages array, but not in the same location code-wise as the previous versions. It's just a matter of finding it and overwriting the return value.

    Also, the low-res picture sync has always been a shortcoming of the FB contact syncing. That's why there are alternative apps that do high-res photos. I had started doing some preliminary work on incorporating high-res photo syncing but ran into some roadblocks. If I can get the contact sync working again, I might have time to look into the photos as well.
    4
    this method not working after the last update to Facebook app.
    i got this method working for an older version before. [with very low pic quality - please try to improve this too]
    now it is gone.

    i don't updated my os...........

    Yes I'm aware. Facebook broke my module by moving things around within their app. The 14.x versions still work, but anything after that doesn't.

    High-res contact pictures aren't a priority since there are a few apps out there that already do this. My priority at this point is to get the module working with the latest version of the FB app.
    3
    Grrr. Facebook needs to calm down with their updates until I get this sorted :|