• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[MOD][CM11][CM10.x] Enabling Facebook Contact Sync In CM rom based

Search This thread

cuadedanh

Senior Member
Oct 30, 2009
70
152
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!
Screenshot_2012-05-29-19-25-21_thumb.png
Screenshot_2012-05-29-19-25-08_thumb.png

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 ^^
 

Attachments

  • CM10-CM10.1.FBSyncEnable-flashable.zip
    479.8 KB · Views: 4,712
  • CM10.2.FBSyncEnable-flashable.zip
    512.6 KB · Views: 4,434
  • CM11.FBSyncEnable-flashable-builtM5.zip
    532 KB · Views: 7,294
Last edited:

HeCareth

Senior Member
Jul 11, 2011
240
61
Southern California
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.
 
  • Like
Reactions: dEris

Aashuk Mehta

Senior Member
Sep 4, 2012
2,756
1,074
26
Mumbai
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.

It also syncs all these except birthdays and it is the only way to sync emails

please press thanks if I helped you
 
  • Like
Reactions: ANDROID-000

Top Liked Posts

  • There are no posts matching your filters.
  • 126
    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!
    Screenshot_2012-05-29-19-25-21_thumb.png
    Screenshot_2012-05-29-19-25-08_thumb.png

    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 ^^
    6
    It Works

    Confirmed Working

    Phone Samsung Galaxy S3 (Metro PCS)
    Model SCH-R530M
    Rom CM10.1 version 10.1-20130121-EXPERIMENTAL-d2mtr-M1
    Android 4.2.1
    Kernel 3.0.57-cyanogenmod-gb1ea79a

    If there is anything else that you would like to know about the phone or OS please ask.

    This is how I installed it. After hours of failing to remake my own ContactsProvider.apk I simply downloaded the one that was posted in this thread.

    First I activated AIRPLANE mode
    I dropped that file on my external SD card.
    I loaded the root browser from in side my rom tools app
    I copied the ContactsProvider.apk from my external SD card and pasted it in system/apps/. (this created a ContactsProvider - COPY.apk or something very similar)
    I then renamed the original ContactsProvider.apk to ContactsProvider.apk.bak
    Then renamed the new file ContactsProvider - COPY.apk to ContactsProvider.apk
    Next I changed the permissions to 0644
    After that I changed the group and owner back to root : root (it was something odd like system and sd_card )
    Lastly I used adb shell and I added the missing column to the the contacts2.db
    These are the commands I ran
    su
    sqlite3 /data/data/com.android.providers.contacts/databases/contacts2.db
    ALTER TABLE raw_contacts ADD COLUMN is_restricted VARCHAR;
    .exit
    exit
    exit

    Next I rebooted my phone (this is where I thought I failed)

    After the phone booted I was greeted with a contacts failed to load it crashed and then I was blessed with the android.process.acore fails. While dealing with the constant pop ups from that message I managed to get the next steps completed

    I turned AIRPLANE mode back off so that the phone would get signal
    I then went into settings>apps (second to bottom option under device section) and then switched to the ALL section
    Next i cleared the data on Contacts and then Contacts Storage
    Rebooted

    BOOSH!

    The system started up no contacts crash no acore issues. I opened my contacts and it was normal. I then opened Facebook and was greeted with a sync option that was familiar to us all. I selected "Sync All" and then I checked my contacts and it worked. You can access that menu to change the options by loading up facebook going into settings and at the bottom is the Sync Contacts option press that and it opens the menu with the options.

    I hope that this boring post help someone in get theirs to work as well.

    On a side note. It did sync all the pictures as well. They are just poor quality.
    4
    oh, maybe change in Cm11 code, let me see in it and rebuild :laugh:
    Already did it ;)
    Works fine now.
    3
    Could someone create a version for CM11/AOSP 4.4?
    start it now, wait some minutes
    3
    updated for CM11. Have tested, it works fine