yashsingh1/xdaforums huggingface dataset:
[Xposed Framework Modules] furboom1240:
There's a solution for you

You could try UberSync or Haxsync if you just need the high-res photos. Haxsync also syncs birthdays and calendars. It costs 99 cents.

You can also make a Google account to complement the FB account and use that photo instead.

---------- Post added at 05:46 PM ---------- Previous post was at 05:35 PM ----------

In CM 11 I have had this issue with the flashable version that [MENTION=2120050]cuadedanh[/MENTION] made. My call log fails and people can bypass my blacklist. That's a real problem. [MENTION=434511]agentdr8[/MENTION] I hope you can make sure this doesn't happen in your version. Also, please note if people want to update their phones with a new nightly or M snapshot, the new zip file will revert the ContactsProvider.apk to its non-FB enabled state upon installation.

My question is, would your apk be able to withstand the CM updates? If not, would I have to repeat the steps in the OP to make it happen all over?
[Xposed Framework Modules] Mardon:
Whenever cm makes changes to related apks you need to repatch contactsprovider.apk

On update of rom you can replace the contactsprovider from inside the flashable rom zip with the patched apk, but backup the new unpatched apk incase call log or blocklist is not working so you can patch the new apk later ;)
[Xposed Framework Modules] agentdr8:
It depends on if the CM update wipes /system or reinstalls ContactsProvider.apk. If you can update CM without having to reinstall Xposed, then this mod should still be enabled and able to check the contacts db for necessary schema changes.
[Xposed Framework Modules] furboom1240:
I appreciate your replies, but...

Well, that's good news. Based on prior experience, I think it overrides ContactsProvider.apk in /system/priv-app. Anything I put in /system/app via Titanium Backup stays installed in /system/app and doesn't get wiped. But whenever I update CM 11, Xposed_Process.jar resets to "---" and I have to reactivate the whole framework and reboot. Would that count as re-installing Xposed or is it only required to keep the Xposed_bridge intact?

My question regarding Call Log/Blacklist wasn't quite answered. [MENTION=434511]agentdr8[/MENTION], does your Xposed Module have this issue (which is the same as the flashable), and do you plan on resolving it in an update? I believe it has to do with KitKat introducing /system/priv-app category. I am using the CM 10.2 flashable on my ROM (see signature) and it has never been better. Then again, no /system/priv-app folder class there.

I just hope it isn't a KitKat bug...
[Xposed Framework Modules] agentdr8:
Nope, that's just to reactivate the bridge. Modules should still be installed and enabled, just not active until you perform the re-enabling/reboot.

I'm not sure if the Call Log/Blacklist issue is related to the changes to the ContactsProvider or the addition of the extra column in the contacts2 raw_contacts table. I don't see this behavior on cm11 on my OneX. If someone has more info relating to what causes this or what the solution to this bug might be, I can incorporate it.
[Xposed Framework Modules] CsR0501:
This not work more in the last update of Facebook app :(

Please... Help! :'(
[Xposed Framework Modules] jfig24:
It hasn't worked for me for quite a while. I was able to get it working once but when Facebook was updated, it stopped working. Any other way to get this working again?
[Xposed Framework Modules] CsR0501:
+1
[Xposed Framework Modules] agentdr8:
Will download the latest FB and see what changed.
[Xposed Framework Modules] timmyhasissues:
Complete novice, but it looks to me like they moved contact management/syncing over to the dedicated messenger app. At least that's where you can find the setting for FB contact sync. I don't find anything in the settings for the regular FB app regarding contact sync anymore.

Not sure if that helps shed any light.
[Xposed Framework Modules] agentdr8:
I took a look at both the FB app (14.0.0.17.13) and the Messenger app (9.0.0.15.17) and the ContactSync class is still present in the FB app. If I hit Menu->Settings in FB, and scroll down to the bottom, the Sync option is still there.

Looking at the debug output of the module, it looks rather normal:

[2014-08-19 10:29:18] XFBS: in facebook platformstorage class
[2014-08-19 10:29:18] XFBS: init contacts providers package
[2014-08-19 10:29:18] XFBS: db has been modded, no need to check
[2014-08-19 10:29:18] XFBS: found our a class, setting bool to true

I'll dig some more into the PlatformStorage class. Maybe they changed the database column name or type to something else.
[Xposed Framework Modules] timmyhasissues:
Interesting, I don't get the sync option for menu->settings in the FB app (15.0.0.20.16, so newer than what you have though didn't have the option in 14.0.0.17.13 either) but do for the messenger app (9.0.0.15.17). At the bottom of my menu->settings for the FB app is a "chat heads" section which has "messenger settings". That takes me to the chat heads settings within the messenger app. Like I said, total novice on this especially when it comes to xposed, so you may already have known all of that and it might not make a difference. Anywho thanks for taking the look.
[Xposed Framework Modules] CsR0501:
Mmm... My version of FACEBOOK APP is 15.0.0.20.16... If that helps :(
[Xposed Framework Modules] agentdr8:
Can someone post up the new version apk? The Play store is only offering me the older 14.x version I have.
[Xposed Framework Modules] hcgonzalezpr:
Here is a copy of version 15.0.0.20.16.
[Xposed Framework Modules] anips:
My sync also stopped working on 15.x but was working with 14.x. Funny though cuz using miui ROM still has sync working on 15.x. Just my cm11 stopped working.
[Xposed Framework Modules] CsR0501:
Any news? :(
[Xposed Framework Modules] agentdr8:
Had some issues decompiling the new FB apk. Will be a few days til I get a chance to do some testing.
[Xposed Framework Modules] CsR0501:
I really, really thank you! :victory:

If you want, i can test for you too! :)
[Xposed Framework Modules] CsR0501:
Sorry but i really need this moda :(

Any news please?...
[Xposed Framework Modules] agentdr8:
Work/life obligations. Will hopefully have some time this weekend or early next week to start work on it again.
[Xposed Framework Modules] CsR0501:
Ha ha! [emoji1]

I understand!... Thanks for your attention! [emoji111]

Enviado desde mi XT1058 mediante Tapatalk
[Xposed Framework Modules] kinglifer:
Ok... I am on this to... I would love to see if this works on my phone. I have 5k worth of FB friends.
[Xposed Framework Modules] agentdr8:
I noticed that my phone just got FB 16.0.0.20.15, so i'll be focusing on this version for now.
[Xposed Framework Modules] Mardon:
I just recieved fb update Version 18.0.0.0.5

Gesendet von meinem LT18i mit Tapatalk
[Xposed Framework Modules] agentdr8:
Grrr. Facebook needs to calm down with their updates until I get this sorted :|
[Xposed Framework Modules] kbapk:
I have google play edition ROM onn my HTC One M8, but i have one proble i do not have in FB app setting where i can turn on. There is no that options. When i weas on sense it was, what happened. What can i do
[Xposed Framework Modules] agentdr8:
HTC kept the facebook sync settings in their ContactsProvider for Sense. Hopefully if FB is done releasing updates for a while I can resume work on this module to restore that option.
[Xposed Framework Modules] kbapk:
It will be great if this option will be resumed. But now I will try with older FB version

I tried but there is no option to sync contacts.

I make all by instruction

What about picture quality when sync?
[Xposed Framework Modules] freedomtigers:
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...........
[Xposed Framework Modules] agentdr8:
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.
[Xposed Framework Modules] Opuz Klass:
This explains why it wasn't working, no matter what... :)

Do you think you'll be able to fix the issue?

Thanks for the hard work!
[Xposed Framework Modules] agentdr8:
Hopefully. For some reason the newer FB versions won't decompile cleanly, whether it's due to obfuscation or something else. Hard to figure out what they changed when I can't see the code.

But I'm still pushing forward.
[Xposed Framework Modules] adamhassel:
I thought it was a matter of fidgeting inside ContactsProvider.apk or GoogleContactsSyncAdapter.apk, as explained many places online (by setting something 'is_restricted' to false), rather than the Facebook app itself?
[Xposed Framework Modules] agentdr8:
Historically, the FB app checked the array resources of the ContactsProvider.apk to see if the unrestricted_packages array contained its package name within the com.facebook.contactsync.PlatformStorage class. If it finds its package name within that array, it then expects to find a column in the contacts2.db named is_restricted, with type of integer. If that exists, it inserts a value of 1 for each contact that gets synced.

For newer FB versions, they've moved/deleted the contactsync package and I haven't been able to locate to where yet.

Modifying the ContactsProvider.apk array might still work without the need for modifying the FB app itself, and that's probably the next course of action if I can't figure out where the PlatformStorage class went to (specifically, the a() method that does the array check).
[Xposed Framework Modules] adamhassel:
That sucks. But keep it up! Looking forward to hearing what you come up with!
[Xposed Framework Modules] ggogolewski:
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.
[Xposed Framework Modules] agentdr8:
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.
[Xposed Framework Modules] CsR0501:
I REALLY HOPE SO! :fingers-crossed:
[Xposed Framework Modules] yasir.97:
Any update on this? BTW i think ive noticed that for some reason if i switch to ART (disable Xposed) this works properly on my phone (Nexus 5)
[Xposed Framework Modules] agentdr8:
You're saying the Facebook app has the option for contact sync natively on your N5 but only in ART and not Dalvik? That's odd.
[Xposed Framework Modules] yasir.97:
Okay basically I switched to ART for a while and Contact Sync has been working even thought the option didn't really appear in the Facebook app, but it was still syncing. When I switched back to Dalvik most of my accounts were reset and I had to log in again except this time the Facebook contacts didn't sync.

Using N5, Paranoid Android 4.6 Beta 3, Franco Kernel 63
[Xposed Framework Modules] CsR0501:
Any news? ?
[Xposed Framework Modules] agentdr8:
Sorry, haven't had any time to work on it. Work & life obligations and all that.

The source has been posted on my github (on OP) if anyone wants to pick it up and run with it. Otherwise I'll try and find some time sooner or later to resume work on it.
[Xposed Framework Modules] fluffi444:
First thx for this great tiny module...

Maybe some of you can help me...

First installion works very well... my FB conacts were added correctly to each existing google contact to my phone... Only one contact each with this FB sign in each contact... (also have whatsapp and threema installed - those were also listed correctly in each contact - no extra "contact" were created)

After ROM updated I had to reactivate Xposed and the FB sync function was way... (no sync contacts button on FB account in settings)

I deleted again the FB in account again and let it install new via opening the FB app itself...

FB contacts account was created again and the sync stated..

BUT (now the problem :) ) - Each FB contact now gets his own "Contract" in the app... They are not merged automaticly like it was the first time...

Anyone knowing a way to bring the contacts of the FB app again together automaticly with the main contact..?
[Xposed Framework Modules] furboom1240:
Same issue

[MENTION=434511]agentdr8[/MENTION] I had this same issue. It seems your app doesn't have a survival mode and that means NIGHTLIES are no good for this Xposed Module. [MENTION=4962787]fluffi444[/MENTION] you may be out of luck until the OP releases such a fix. I asked this question earlier in the thread and got a vague answer, not a direct one.

Good luck.
[Xposed Framework Modules] agentdr8:
I'm not quite sure what a survival mode is.
[Xposed Framework Modules] furboom1240:
I'll explain

In a similar fashion to SuperSU, a OTA survival mode prevents core files from being changed, in SuperSU's case the binary is protected during a software update. I'm inquiring as to whether it can be done for ContactsProvider.apk that was modified by your Module and runs the risk of being undone by a nightly. That's all I meant. Can you do it?
[Xposed Framework Modules] agentdr8:
Ah I see. The xposed module doesn't actually make any permanent changes to the ContactsProvider.apk; that's supposed to be the power of Xposed; app or process modifications without having to actually change any packages.

I'm not sure why an OTA would change the behavior of the module, aside from possibly disabling the xposed framework itself.
[Xposed Framework Modules] furboom1240:
That's true [Got a question for you]

I think so, too, [MENTION=434511]agentdr8[/MENTION] and I think that's why the Framework asks to re-instate every time CM is updated, which simply breaks the bond Xposed has on the ROM (and any modules attached to it).

Here is my question. I think I asked it earlier and mentioned another individual on this forum. [MENTION=2120050]cuadedanh[/MENTION] also created a similar type of Facebook Sync for AOSP as well. However I used his Built-M5 version on my M11 and it took a toll.

Which brings me to my final question: Would you, cuadedanh and others who are interested consider collaborating and asking Cyanogen, Inc to modify its ContactProvider.apk to allow for Facebook Sync? Other OEMs do it, so it's not illegal or wrong to ask. I'd be happy to help out, too, regarding latte's.
[Xposed Framework Modules] Vankog:
Just use the XPosed Toggle zip right after the flash file:

http://xdaforums.com/showpost.php?p=45188739

This way you don't have to re-install it.
[Xposed Framework Modules] RandomPooka:
Cyanogenmod specifically does not do it on purpose. That will not be supported in the ROM ever.

The reason you have to reinstall xposed framework after you upgrade the ROM is because the room install/upgrade overwrites the system partition, and xposed modifies the system partition to allow for the changes to happen. You need to reapply its changes, because they've been wiped out during the flashing process.

---------- Post added at 06:22 PM ---------- Previous post was at 06:19 PM ----------

From what I remember, the changes to ContactProvider.apk are basically a dirty, back door hack that the CM team refuses to do on principle. They will not create a back door just because the Facebook app devs are coding like uncultured savages with no regard for doing things the right way.
[Xposed Framework Modules] furboom1240:
CM Updater skips a step

I went to that thread you posted, and it helped, however I have another issue. When CM updater installs a new ROM, it doesn't allow me that option of NOT restarting the phone right away, because it will reboot once the flash is complete. That cannot be controlled, unless there's a macro I must take advantage of (like a key press, for instance).

If I manually update the zip, is it supposed to wipe out Gapps? I'd like to know the answer to that because it DID when I dirty flashed over the same version (M11>M11) in an effort to revive my call log (guess which app I was using? Yup, the OP's) and blacklist and stop Contact FCs. I followed all directions and still had a mess to clean up.

I'm open to any suggestions if you have them. Thank you.
[Xposed Framework Modules] CsR0501:
Well... I think that this mod dead... Isn't it? [emoji20]

Enviado desde mi XT1058 mediante Tapatalk
[Xposed Framework Modules] agentdr8:
Not dead, just not high on the priority list. I opensourced the code, so anyone is welcome to fork it if they wish.
[Xposed Framework Modules] dracinn:
I hope someone updates this because it no longer works.
[Xposed Framework Modules] MikeGolf1:
I hope too :(
[Xposed Framework Modules] terpminator:
A new hope

I really really hope for an update ! :)

I've just entered the Custom Rom game, and suddenly I cant get the phone numbers from my facebook contacts...my phonebook is soooo empty :(

More love Google and Facebok! Like Han and Leia
[Xposed Framework Modules] kicikk:
Is it better than HaxSync?
[Xposed Framework Modules] freedomtigers:
anybody updated this hack ?

old one not working with new update of fb.......
[Xposed Framework Modules] prince10t:
this still works

still works only for facebook versin 14.0.0.17.13. the fb versions after this does not have the setting to sync contact. i just discovered this last night.
[Xposed Framework Modules] freedomtigers:
Plz share that version......
[Xposed Framework Modules] prince10t:
I dont need too coZ its already in google. sorry kinda lazy to link it here. just google it, or search for "facebook old apk", itll take u to the right place.
[Xposed Framework Modules] ThePalindrome:
Still Working

This application worked with the following version number: 14.0.0.17.13

You can download that APK via androiddrawer.
[Xposed Framework Modules] furboom1240:
Okay then. Any way you could point us in the right direction? A link to that source would be nice...
[Xposed Framework Modules] agentdr8:
It's on the first post (github link).
[Xposed Framework Modules] pogi1100:
FYI, for anyone who needs this to work, Carbon ROM has it built in.
[Xposed Framework Modules] scottjay:
How likely this will be fixed if Facebook removed sync from the app?
[Xposed Framework Modules] agentdr8:
Very unlikely, as there are other FB sync apps out there.
[Xposed Framework Modules] furboom1240:
Au contraire

[MENTION=434511]agentdr8[/MENTION] you do realize that despite such a prospect, those developers who actually tried doing such a thing were suckered into Facebook's payroll and the apps were abandoned (Mathhias Roth and HaxSync are a perfect example). The apps that currently exist on the Play Store do NOT allow Contact Sync, and the reason why is very simple: it requires a modification of the ContactsProvider.apk in /system/app (or /system/priv-app on 4.4.x) and modification of system files requires root access and an insecure kernel (in my case, as despite root access on my HTC One M8, I can't change a single system file).

The only reason most individuals have no worry is because OEMs like Samsung and HTC modify it themselves. This is an AOSP/Untampered/Skinless Android issue and like [MENTION=3053466]RandomPooka[/MENTION] said earlier, CyanogenMod devs refuse to do this by principle, as Facebook is indeed a bunch of code savages that do everything in their power to retain control of their code. They make Apple and Microsoft's closed-source OS framework look tame in comparison. Those boneheads need to be taught a lesson, and a note to all who fork agentdr8's code - DO NOT BE SUCKERED INTO FACEBOOK'S PAYROLL. If Cyanogen, Inc. can turn down an offer from Google, you should have the same degree of self-control and nobility to say NO.
[Xposed Framework Modules] agentdr8:
I agree with your comments and will add that if the FB app has no contact sync built into it any more, making it work the way it used to would be a huge undertaking. Aside from the small edit in ContactsProvider, the rest of the code needed for contact syncing is quite large.
[Xposed Framework Modules] liveXtrm:
FB removed the contacts sync option from its app

I have followed all ur steps and at found that there is no more option availale to check sync Fb contacts on Fb app :(
[Xposed Framework Modules] agentdr8:
Newer FB versions don't appear to have the contact sync option any longer. Not much I can do about that.
[Xposed Framework Modules] furboom1240:
Something just dawned on me. Would it be possible to decompile older Facebook apps (older than version 14) in order to snag the code Facebook has now omitted? Then, with the code [MENTION=434511]agentdr8[/MENTION] has in a repo, we can put that code into a contact sync app that won't require Facebook involvement?

I'd also like to note that this app should have the ability to create accounts on the device, but it should only work if Facebook is installed and signed in, so it can piggyback contact sync quietly.
[Xposed Framework Modules] agentdr8:
It's possible, but at that point you might as well make a standalone FB syncing application.
[Xposed Framework Modules] Vankog:
Well, but with third party apps you will always have the problem of the missing private API key that is exclusive to Facebook's own apps, won't you? You will never have access to contacts data as this is exclusive to Facebook's apps.
[Xposed Framework Modules] agentdr8:
That's true. I don't believe the contact sync classes can just be lifted from the FB app and just used though; lots of massaging would need to be done to get it functioning.
[Xposed Framework Modules] furboom1240:
Actually, there IS a solution to this issue. Samsung has their own SNS application that utilizes the Facebook contact sync adapter. I believe that app allows the sync process without modifying the ContactsProvider.apk file at all.

Maybe if we decompile that app maybe a solution can yield to skinless, AOSP versions of Android.

I will continue to edit and add information to this post as it becomes available to me. I appreciate your patience. Please avoid jumping to conclusions until I finalize my report. ;)

2/2/2015: [MENTION=434511]agentdr8[/MENTION] please take a look at this!

I have added the Samsung Galaxy SNS_Broadcast APK freshly updated from my Official tablet (#lt03wifi) and I'd like someone to take a peek at it. I believe that it may have an exclusion signature (very much like carrier-based apps like Sprint Zone that don't work on custom ROMs) that needs to be broken in order for it to work on Android versions since 2.3.6, which is when Facebook stopped allowing Google to sync its info.
[Xposed Framework Modules] kinglifer:
I'm curious... but not that curious...

does this still work?
[Xposed Framework Modules] agentdr8:
Only with older versions of the FB app (<15 I think).
[Xposed Framework Modules] agentdr8:
Will see what I can find out.

EDIT: What behavior is it exhibiting? From what I can see, it just logs into the mobile FB site and grabs a user access_token to sync profile info and stream data (to its own data storage). The app itself doesn't have any permission to write contact data, so it wouldn't be able to modify the ContactsProvider database.
[Xposed Framework Modules] fredsky2:
is it possible to get this working without the official facebook app ?