yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] cuadedanh:
Cause from IS google disable Facebook Contacts sync so i modified ContactsProvider.apk to enable FB sync in CM10.2 ;cm 10.1 JB rom (tested),Pacrom 4.3 (tested) and maybe aosp rom ( didnt test).

Guide screenshot and credit is :

-->http://niranjanthilak.com/facebook-sync-for-android-ics-devices/

and --> http://www.modaco.com/page/news/_/a...sync-in-ice-cream-sandwich-r140#commentsStart

many thanks!

I modified code and included in ContactsProvider.apk so you dont have to do with contact database by sqlite... all you need is clearing old contacts database. When it first lauchs it will create new proper contact database.

Changelog:

07/04/14: - Rebuild based on latest CM11 M5( 05042014)

- Remove unnecessary script in flash zip.

30/11/13: update for CM 11

02/10/13: fix for Cm10.2. i have tested it in latest cm-10.2-20131001-NIGHTLY on my Galaxy S, it work fine now.

06//09/13: - add support CM10.2 , pls test it and report.

- add support PacRom JB4.3

- make CWM flashable zip file cm10,cm10.1, pls test it. If u have problem, try manual method

26/12: - remove error CWM zip file, now manual install

- change source to CM10 stable, now it work both CM10 and CM10.1

25/12:

- first bug version

Install:

1. Sync contact to backup data to google cloud,

2. Clear old contact database by ->setting->app-> all->contact storage ->clear data (very important)

3. Delete FB account in Setting-> account

4. Backup ContactsProvider.apk in system/priv-app (or system/app if u use cm10)

5. Flash attached zip file in Clock work mode( if u have problem, try manual method: put attached ContactsProvider.apk in system/app override old one, change permission to 644

6. Reboot the device.

7. Resync Google Contact and FaceBook.

In kitkat (cm11) ContactsProvider.apk is in system/priv-app instead of system/app

if no change-> try step 2; 3

if you lauch contact, phone, android process error..-> try step 2 because conflict in old contact data and resync;

if still error, maybe it s not suitable with ur rom, pls restore ur backup in step 4

Donate me if it is useful for you ^^
[Android Apps and Games] Aashuk Mehta:
Does it work on cm 10

please press thanks if I helped you
[Android Apps and Games] cuadedanh:
you can backup contactprovider.apk and test yourself, if fc you can copy back original apk:laugh:
[Android Apps and Games] cuadedanh:
fixed bug in automatic create contacts database problem, now it works like a charm:D
[Android Apps and Games] Aashuk Mehta:
It doesn't work in cm10

can u mod one for cm10 it will be appreciated

please press thanks if I helped you
[Android Apps and Games] 865DETH:
+1 for cm10 compatible :)
[Android Apps and Games] jacksita:
Is it possible on miui rom 2.12.21?

Inviato dal mio GT-I9000 con Tapatalk 2
[Android Apps and Games] cuadedanh:
now it work both in cm10 and cm10.1, test it and report here, try install manual, sorry for yesterday errorr CWM zip ( it does not overide old contactsprovider.apk) :cowboy:
[Android Apps and Games] cyburke:
interested to try this if works on CM10.. thanks for your efforts!
[Android Apps and Games] cuadedanh:
pls try it and confirm here, if FC try to clear data in contact storage app.:good:
[Android Apps and Games] Aashuk Mehta:
Re: [MOD][CM10.1] Enabling Facebook Contact Sync In CM10.1 JB and maybe AOSP ROMs

It works

please press thanks if I helped you
[Android Apps and Games] ZeRo2o9:
Doesn't work on cm10 for me
[Android Apps and Games] Aashuk Mehta:
It works open your Facebook settings and if it doesn't works clear Facebook app data

please press thanks if I helped you
[Android Apps and Games] HeCareth:
It worked but HaxSync is still a better option as it syncs Birthdays, Events, News Feed, and HQ pictures. Honestly my phone started slowing down after messing with this and forced me to do a clean flash...so it is what it is.
[Android Apps and Games] cuadedanh:
But official FB app is only way to extract phone number and email of stranger users if they shared :D
[Android Apps and Games] Aashuk Mehta:
It also syncs all these except birthdays and it is the only way to sync emails

please press thanks if I helped you
[Android Apps and Games] Luca2903:
Tried a few times and didnt work on cm 10.1. O didnt change that permission thing, because i dont know how to do that =(
[Android Apps and Games] Aashuk Mehta:
Can u make one for the calendar as well??

please press thanks if I helped you
[Android Apps and Games] ZeRo2o9:
my contacts just fc when i try this
[Android Apps and Games] cuadedanh:
clear contact storage data and restart.
[Android Apps and Games] weirdguy99:
This is how I did it on my HTC One (CM10.1.3 RC2).

First off, being the stupid person I am I overwrote the ContactsProvider.apk instead of backing the old one up. Don't make this mistake just in case. I got lucky.

1. Delete the ContactsProvider data and disable the app

2. Delete Facebook from the Accounts list in settings

3. Move the modified ContactsProvider.apk to system/app [There is no need to change any permissions, at least in my case]

4. Reboot phone

5. Open Facebook and log-in

Facebook should prompt you to sync contacts at this point. The contacts backed up with Google will merge with the FB ones, with display pics and all.
[Android Apps and Games] cuadedanh:
Updated

changelog

06//09/13: - Add support Pac Man rom JB 4.3.

- make CWM flashable zip file cm10,cm10.1, pls test it. If u have problem, try manual method

- will update for CM10.2 soon
[Android Apps and Games] weirdguy99:
Will this update improve the quality of the profile pictures? Currently they are very pixelated.

CM10.1.3 RC2 HTC One.
[Android Apps and Games] cuadedanh:
it depends on FB, not me, i only open the way for it to sync.
[Android Apps and Games] cuadedanh:
update: - add support CM10.2 , pls test it and report here.

- add support PacRom JB4.3

- make CWM flashable zip file cm10,cm10.1, pls test it. If u have problem, try manual method

-soon
[Android Apps and Games] g_oral:
CM10-CM10.1.FBSyncEnable-flashable.zip

this file must be broken, i cant unzip file contactsprovider.apk from this zip.

propaby thats why this fix doesnt work on my samsung advance and there is an error
[Android Apps and Games] Magotchi:
I can confirm that CM10.2.FBSyncEnable-flashable.zip works perfectly (flashed via TWRP) on cm-10.2-20130910-NIGHTLY-d2vzw.zip (the latest Galaxy S3 CM10.2 nightly).
[Android Apps and Games] madgstik:
Not working here ...

Hi all,

Does not work for me.

Galaxy Note N7000 + CM 10.2 (Team Asylum : see screenshot).

No sync at all available.

Thanks fot the effort though.

MadG
[Android Apps and Games] Mardon:
Works fine on cm10.1 and cm10.2

Gesendet von meinem GT-S5830 mit Tapatalk 4
[Android Apps and Games] jukiewalsh:
I'm using the latest 4.3 PAC nightly on galaxy s3 i747 and it's not working for me.
[Android Apps and Games] ScratMan38:
Tried with SlimBean 4.3 Build 1.2, does not work (I used the CM10.2 version)... :(
[Android Apps and Games] htrowpiks:
Still can't get it working on Ressurection remix..... Tried the flash, and the manual. Still get FC's.

AT&T Captivate, 16gb/32gb

ROM: Ressurection Remix (port)

Devil Kernel 6.24.13

Row/Lagfree, 1200 OC
[Android Apps and Games] hunfatal:
Not working on today's CM10.2 nightly on Nexus 4. Constant com.android.process.acore is stopped (I've flashed via CWM)
[Android Apps and Games] orgon3:
Likewise. I just did a clean re-install and I am still getting the acore is stopped, every few seconds. I'm on 10.2 latest nightly (0928), latest official gapps (081313) and a Galaxy S3. Clean re-install did not work. Any ideas?
[Android Apps and Games] pataykhan:
Force close on CM 10.2 (20130928 nightly).

Device: Galaxy S I9000
[Android Apps and Games] orgon3:
What exactly are we force closing? I didn't use this, I used Face Smash, but the same problem.

Edit: I fixed the problem by clean installing 10.1.3 and then clean installing 10.2 (20130928 nightly). I am now using Sync.Me to sync contacts and photos. Would love to use the official app for this though. Wonder why CM decided to never support it.
[Android Apps and Games] pataykhan:
When phone boots, it force closes com.android.process.acore process. I guess ContactProvider.apk has changed in recent releases and is not compatible now?
[Android Apps and Games] orgon3:
All I see is Contacts and Contacts Storage. Force closing either did not work. I had to do a clean to 10.1.3 and then clean to 10.2. A clean re-install of 10.2 did not fix it. I had to go back to 10.1.3 first. Very odd. Right now I'm using Contacts+, but it's okay.
[Android Apps and Games] hunfatal:
That was google's choice since ICS, not CM.
[Android Apps and Games] stubey:
followed instructions exactly and kept getting acore.process blah blah. i went back and cleared data on contacts, contacts storage, and google contacts sync just for good measure. all errors stopped and its syncing up just fine.

running cm10.1.2 on gs3 i747

one question though, not all contacts sync to facebook properly. I think its because my contact name for them is different than their facebook profile name. i could have sworn there was a "link" or "Join" setting where you could manually join a contact to their facebook profile. does this not exist in cm10.1.2 or does your modified contacts provider.apk not have that capabilitiy?
[Android Apps and Games] surajkala:
Getting FC continuously on CM 10.2 on my Huawei Honor u8860 (flashed via CWM)... thank god i had backed up original apk :good:
[Android Apps and Games] cuadedanh:
UPDATE :

02/10/13: fix for Cm10.2. i have tested it in latest cm-10.2-20131001-NIGHTLY on my Galaxy S, it work fine now. Sorry for my slowly bug fix

:good:
[Android Apps and Games] surajkala:
Thanks.. Got rid of Force Close with latest version... but still contacts are not getting sync'd.. It shows sync.. but no FB contacts are displayed in Contacts.
[Android Apps and Games] hunfatal:
Could you create apk for AOKP (jb-mr1 and jb-mr2) ? :)

Btw, I did a clean install of CM10.2 (today's nightly) and the new zip is works like a charm, thx. :)
[Android Apps and Games] surajkala:
Thanks for the advice.. will try clean install way next time :good::good::good:
[Android Apps and Games] jukiewalsh:
Why won't this work on pac anymore?

It used to work and then on the last 4 nightlies I can't get it to go.
[Android Apps and Games] jukiewalsh:
Could you make an update for PAC please?
[Android Apps and Games] Zxurian:
Tried this as well. Clearing contacts storage & google contacts sync fixed the constant fc's of acore and other items, but now, whenever I try to run People or Dialer, it immediately FC's. Also google Search FC's occasionally on it's own, even when I'm just sitting at the home screen.

Running SlimBean 4.3
[Android Apps and Games] Zxurian:
It appears this is working after I cleared data on contacts storage & google contact sync & Facebook, however default contact pictures ant using the Facebook ones. Any way I can get it to do that?
[Android Apps and Games] graycorgi:
I flashed this and wiped cache/dalvik as well as facebook data, but still getting 0 contacts on FB even though it says it's syncing.
[Android Apps and Games] cuadedanh:
try step 2 in OP: Clear old contact database by ->setting->app-> all->contact storage ->clear data (very important)
[Android Apps and Games] adamhassel:
This causes FCs for the acore process on PAC rom on the oct 09 nightly.

I have tried erasing all contact databases (facebook data gone, contact provider storage data gone, google contact provider data gone, G+ contact data gone, all syncs disabled), but it still FCs all over the place. What gives?
[Android Apps and Games] cuadedanh:
Maybe change in PAC code, i will fix it soon
[Android Apps and Games] Julie95220:
Hi,

I tried to flash the zip file with SafeStrap for CM10.1.3 and now, everything keeps crashing !

I tried to restore my ContactProvider.apk file from my backup with the terminal by copying it to /system/app/ but I have an error : Read Only File System. (I am root)

Is there anything I can do to be able to do a copy with the terminal ?

Or a zip file like the previous one containing the correct version of ContactProvider.apk ?

Thanks (If I can avoid to reinstall everything, it would be great :) )
[Android Apps and Games] cuadedanh:
if u r rooted, try install root explorer from G Play and try to recopy
[Android Apps and Games] Fadiayad:
Syncing Problems

I did all the steps

I have HTC amaze 4G

CM 10 latest ROM

super CID

Rooted

S OFF

Facebook sync option is now enabled

and in the accounts I have touch to Sync facebook contacts

but once Synced I get no contacts under facebook

only google contacts appear

any suggestion ?
[Android Apps and Games] Fadiayad:
Syncing Problems Solved

Its ok guys, I did follow the steps one more time and it worked fine

apparently you have to remove the facebook account before installing

and second time I also kept at least one contact (my personal Profile) as a phone contact

after deleting all data.

this way it worked fine..

thank you all
[Android Apps and Games] pakatsui:
Still doesn't work on PAC 23. Please fix! :)
[Android Apps and Games] pogi1100:
See my sig.
[Android Apps and Games] hunfatal:
Could someone create a version for CM11/AOSP 4.4?
[Android Apps and Games] alongenemylines:
Seconded. CM11 is really new, but already surprisingly stable.
[Android Apps and Games] cuadedanh:
start it now, wait some minutes
[Android Apps and Games] qzxi:
How about the twitter app??

can you mod as well??

---------- Post added at 04:39 AM ---------- Previous post was at 04:36 AM ----------

How about the twitter app??

can you mod as well??
[Android Apps and Games] hunfatal:
It looks like 10.2 version is not working again :(

At least it's not working with new carbon, I've compiled today. Does it work at anyone with the latest cm10.2 nightly?

Nevermind, I reflashed the rom and it's working.
[Android Apps and Games] cuadedanh:
updated for CM11. Have tested, it works fine
[Android Apps and Games] hunfatal:
Thank you!
[Android Apps and Games] FINEEEEE:
Awesome cm11 is out :D

Enviado desde mi GT-I9300 mediante Tapatalk
[Android Apps and Games] Bronto9:
Turning this into an xposed module would be great, have you thought about that?

Inviato dal mio Nexus 7 utilizzando Tapatalk
[Android Apps and Games] linema56:
is it work on miui?
[Android Apps and Games] magalhaesro1979:
Facebook sync

It worked perfectly on the Galaxy S3 CM10.2
[Android Apps and Games] collegencmc:
So I'm on SlimBean DLX 4.3.1 for the HTC DNA, and now after playing around with it everything is working and syncing correctly. Thanks for this fix!!
[Android Apps and Games] bestfil:
The apk doesn't crash but I don't see any chages - no syncing.

GT-I9305, CM 11 Unofficial with Agni perf kernel.

EDIT: I killed contacts, contacts provider, and contatcs sync manager, then wiped all apps' data. Now it works!
[Android Apps and Games] hunfatal:
It's working at me with CM11 crDroid on mako.
[Android Apps and Games] :
Works, but after the flashing and clearing of data, make sure to sync Facebook contacts first, THEN Google Contacts.
[Android Apps and Games] jnetode:
I am using the CM11 mod. It is awesome. I finally get to download all of my contacts to the phone.
[Android Apps and Games] silhouette_blacktea:
Awesome, it works on my cm10.2

Thx for sharing..:thumbup:
[Android Apps and Games] Alcibiade:
Working perfectly on my Nexus 7 and 5 (With CM11)

Thanks a lot !
[Android Apps and Games] zooster:
Tried with cm11, and it worked, thx!

Just one issue, quality of pictures is poor.

Fb sync with stock rom gives nice pictures, with cm11 is awful. Why?
[Android Apps and Games] mc_becker56:
Sync Phone numbers?

Does this mod sync the actual phone numbers from Facebook or just pics/links to FB/ect?
[Android Apps and Games] hunfatal:
Sync the pictures with UberSync and all good. :)

---------- Post added at 02:49 AM ---------- Previous post was at 02:49 AM ----------

Google disabled official facebook app to sync anything. This mod just enable it, so you can use that app to sync everything (incl. phone numbers).
[Android Apps and Games] evgeniydmgsm:
Does any know how to use search in facebook app center on android device? I have just 2 rows there =()
[Android Apps and Games] ashok:
how is the picture quality now?
[Android Apps and Games] mc_becker56:
Awesome! Working great for me on Beanstalk 4.4/Note 2. I did all the steps listed and Facebook contacts didn't sync. I just removed my Google account all together and facebook. Rebooted into recovery. Flashed zip. Rebooted. Added Google Account back and Facebook. Voila! Thanks for the great mod dev!
[Android Apps and Games] Maurice5813:
thanks:D
[Android Apps and Games] IndianKarmas:
hi...does fb's calendar sync as well?
[Android Apps and Games] tenchi0205:
not working in MIUI v5
[Android Apps and Games] Maurice5813:
cm only
[Android Apps and Games] Y_Yan_C:
Anyone knows if it works on carbon? And if I have multiple devices, when I install this mod in a cm device, will hr pics be synced to the other non-cm devices through Google contact?
[Android Apps and Games] Maurice5813:
Idk, it might thugh. The dev of this mod has only patched the contactsprovider.apk for Cyanogenmod and PAC, not any other rom so my best bet is no sense carbon is AOSP.

It should work in:

Cyanogenmod

PAC

Beanstalk

Hellfire

crDroid (maybe)

SlimKat

And almost any cm based rom...
[Android Apps and Games] yeeserious:
that would be awesome!
[Android Apps and Games] atulclassic:
doesn't work

it didn't worked with Motorola Defy+ running CM11 4.4.2
[Android Apps and Games] iobling:
so it should work also on omnirom doesn't it?
[Android Apps and Games] Persechini:
In theory if I extract the original contactsprovider.apk and replace it in the zip that should suffice as a flashable backup, right? Or is there anything else in the script I'm missing other than the replacement of the apk?

I might test this in my N4 with stock Kitkat

EDIT:

Nope, no go on stock kitkat using the CM11 patch, the contacts app force-closes no matter what. I noobingly admit should've taken in consideration that the stock ROM is odexed. The backup solution worked like a charm thou
[Android Apps and Games] Herrmaro:
Working great on CM11 powered HOX! Thx ?
[Android Apps and Games] imharshadpatel:
no effect

do i have to use the facebook app for synchronising facebook contects ? I didnt get any changes in cm11.

thank you.
[Android Apps and Games] dstruct2k:
[MENTION=2120050]cuadedanh[/MENTION] - Just curious, why do you mount /cache and /data during flashing? Also, could the APK not just be replaced in /system/app or /system/priv-app manually instead of flashing through recovery?

I don't see a backup of the original APK made anywhere, do your flash-packages not make a copy before overwriting?

Also, your flashing script changes permissions for the entire /app and /priv-app directories, unfreezing all apps that were frozen via permission changes. Please correct the script to only change the permissions for the file you flashed.

You can use this on odexed ROMs by just renaming/deleting the old ContactsProvider.odex file when you put the new APK in /system/app-priv; There's no harm in having a couple de-odexed APKs on an odexed ROM.

Is that a stock-from-Google KK ROM? I don't see why they'd odex those if they have ART as an option, as ART doesn't use odex files... (Optimised Dalvik EXecutable)
[Android Apps and Games] aidfarh:
Omnirom is not CM-based.
[Android Apps and Games] dstruct2k:
All this does is re-enables the ability for the Facebook app to access the Android contacts database.
[Android Apps and Games] the_details:
After going through the steps in the OP for CM11, I also didn't see any change, so I force stopped Contacts and deleted data for Contacts Storage again, both Google and Facebook synced contacts and I now have working contact sync.
[Android Apps and Games] mrbubs3:
Works on SlimROM 4.4.2 Weekly V. 2 on M7Tmob. Just waiting so I can use uberSync, so I can get hi-res contact photos. Otherwise, SUPER DUPER.
[Android Apps and Games] hunfatal:
Carbon is AOSP based but it's contacts and dialer is from CM, that's why this mod is working on it.
[Android Apps and Games] thahim:
Very nice :)

will this work on galaxy s4 Android 4.3 rooted touchwiz?
[Android Apps and Games] Riekr:
So will changing contacts provider.apk with the one in cm11 zip and removing corresponding odex work on stock KitKat too?

Inviato dal mio Nexus 5 utilizzando Tapatalk
[Android Apps and Games] dstruct2k:
Maybe, it depends if CM11 changed anything in ContactsProvider from AOSP KitKat; I don't see why they would've except maybe to add CMAccount as another provider. Make a backup first and try it.
[Android Apps and Games] Maurice5813:
No, thats AOSP, stock on top of that.
[Android Apps and Games] Djay1809:
Confirmed working, Htc Rezound Running Unofficial Cyanogen Mod 11 4.4.2
[Android Apps and Games] sui785:
Works fine with CM11 nightly on Galaxy Nexus.
[Android Apps and Games] marvi0:
On my s4,running Pac 4.3, followed instructions but got force closes after reading reboot. Searched on the thread a difference am I right in having to do a full wipe for this to work without force close?
[Android Apps and Games] aidfarh:
I used the CM11 version on my I9100g running Omnirom 4.4 and it works.
[Android Apps and Games] Persechini:
Yes, stock-from-google

The contactsprovider.apk is odexed, I will try again renaming the .odex file

I can't test with ART because I'm using Xposed Framework and it's not compatible
[Android Apps and Games] petz79:
I'm using PAC Android 4.3.1 (from Maclaw 20131227) and tried flashing this zip file. I only get the message that the acore process has stopped and I should blame Tyler. I removed the Google and Facebook accounts and cleared the cache, but am still getting this message. Now Contacts isn't working at all. Does this still work for the newest releases?
[Android Apps and Games] marvi0:
having the same problem, am also on Pac.
[Android Apps and Games] Herrmaro:
Working great on HTC one x with cm11 previewbuild! THX
[Android Apps and Games] Persechini:
Still no go on stock Google kitkat for nexus 4 deleting the odex file, clearing cache, etc.

On a sidenote, would this be achievable with Xposed framework?

Enviado de meu Nexus 4 usando Tapatalk
[Android Apps and Games] johnb380:
I downloaded the cm11 zip and it's Working fine On AOSP build Of 4.4.2 on N4 But I didn't flash I just extracted apk from zip file renamed original contacts sync to add .Bak to the name then copied new one to system/priv-app changed permissions to match all others And Then went into settings/Apps cleared data and cache Of contact storage and rebooted then went into settings/accounts and synced Facebook and google then opened Facebook and select who To sync all or just the contacts in ur phone book then let it Do It's thing and boom Facebook contacts!

If I helped u hit the thanx

Sent from my Nexus 4
[Android Apps and Games] cuadedanh:
wow, i know what u think :D. just because i m lazy to write brand new script and i just used available multi purpose zip file( gapp or something i forgot), all i do is only replace contactsprovider.apk in /system/priv-app. You have to backup ur contactsprovider.apk manually. if u family with script u can delete garbage script in it like mount /cache and /data or replace contactsproviders.apk with the original to make backup flashable zip file.
[Android Apps and Games] LG13:
+1 worked like a charm! Thanks
[Android Apps and Games] Persechini:
Tried a couple more times, once I managed not to get force closes, but couldn't get any Facebook contact to sync

Are the tutorials valid for kit Kat? I may try modifying my the apk from my rom

Enviado de meu Nexus 4 usando Tapatalk
[Android Apps and Games] NegativeOne:
Does this sync high quality pictures?
[Android Apps and Games] zviki:
I think that Johnb380 has the same rom on the same phone and it works for him,so it should for you too. He explained you how.His answer is few posts above http://xdaforums.com/showthread.php?p=3
[Android Apps and Games] Petert87:
If I do a new install of CM11 on HOX and I install this zip after GApps and CM, do I have to do clear old database?
[Android Apps and Games] Mike3.14159:
Has anyone tried this on Omni ROM?? I know its aosp based and not cm based, but any luck?