Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,733,661 Members 45,135 Now Online
XDA Developers Android and Mobile Development Forum

sync fb Contacts - without allowing extra app to collect ur fb info!!

Tip us?
 
IndianKarmas
Old
(Last edited by IndianKarmas; 1st February 2014 at 09:11 AM.)
#1  
Senior Member - OP
Thanks Meter 94
Posts: 246
Join Date: Jan 2013
Default sync fb Contacts - without allowing extra app to collect ur fb info!!

We all have FB & ever since ICS days FB syncing was disabled. A lot of us want to be able to sync images for contacts from fb. I personally don't like adding more & more apps as they can have some impact on performance or battery. But most importantly I dont want to share my fb info with other apps.

**Just a update....Purity Rom has this enabled as of 01/29/2014 N4 build....so Purity users please skip this...its more useful for other Roms***

I had mentioned it in one of the forums, and few people had messaged me in private regarding it so I am just putting it out there in simple noob friendly manner. The steps do seem long, but once you get through it couple of times these are very very simple. For me this method has worked great over time, worth the effort for me atleast.

So I found a method back in the ICS days to be able to sync fb images with client profiles following Niranjan's method (I take no credit for it whatsoever and just providing information and can help someone if they need any guidance) but subsequently author stopped posting/responding the thread. So I will try to recompile a easy guide that can prove useful for anyone who wants to do it on their own. Please note Sense n other OEM roms already have this capability so u won't need this method.

Drawbacks
1. Slightly time consuming joining contacts.
2. Have to redo process everytime you update rom (dirty flash keeps older syncs but doesn't update)

Requirements:
1. Root and su - since you will be modifying system file.
2. Download and install aShell and aSqlLiteManager from google store - both free by developer Andsen thanks for his contributions. Also once u are done...u can simply uninstall these two apps.
3. Be able to decompile & compile apk files or alternatively I could do it for u but never try to rush or demand from me....I am doing it as a courtesy so never try to push me for it. You could always quote me (so I get notified) or send me a message in case I don't respond in a day.

Steps
1. We need to retrieve your current contactsprovider.apk file. Depending on your version of Android it can be located in different folder within the root directory:
a. Kitkat: /system/priv-app
b. Jellybean/ICS: /system/app/

2. Make sure to do a backup of the apk file before proceeding. If you want me to modify your apk file then upload it for me to modify and skip step 3-5.

3. Save the copied apk as contactsprovider1.apk Decompile (I used this guide in starting...noob friendly) the contactsprovider.apk and call it contacts. Rename attached arrays.xml.txt file to arrays.xml and add to decompiled apk's res/values/ folder.

4. Once you have added the file you should a total of 4 files (including the one you added). Recompile the apk folder as contacts.apk. Using Winrar/7-zip copy resources.arsc from contacts.apk and replace the file in contactprovider1.apk.

5. Upload the new contactsprovider1.apk to its correct directory and since you have the original backed up safetly you can rename the file to contactsprovider.apk after setting the permissions. Set permissions to -rw-r--r--

6. Open aShell (installed earlier), grant it superuser permissions. You will come across few tip boxes, so just close through them. Tick Root checkbox. Click File Explorer. Navigate to Data/Data/com.android.providers.contacts/databases and click on contacts2.db. Allow aSQLd mime sqlite to open the db. Click Open database with aSQLiteManager. Click Query. Enter following query "alter table raw_contacts add column is_restricted VARCHAR;" (don't include quotes). Click Run & you are done.

7. Press back button until you get a popup message asking you to save the changes you committed and you say YES to it.

8. Now login into your FB app and go to app settings and you will have a option at the bottom for sync. Select Sync all and give it about 5 minutes to sync through. You can open your contacts/people app and see if the names/images start coming through from FB.

9. One last step (boon for some curse for others) is you have to open up your contacts/people app and go to the contact who you want to sync with fb. Go to Edit, go to join and your FB contact will show up there and you join them together.
Attached Files
File Type: txt arrays.xml.txt - [Click for QR Code] (177 Bytes, 34 views)
The Following 2 Users Say Thank You to IndianKarmas For This Useful Post: [ Click to Expand ]
 
Wizard Knight
Old
#2  
Wizard Knight's Avatar
Senior Member
Thanks Meter 254
Posts: 966
Join Date: Apr 2010
Location: Long Island, New York
Or just download ubersync? https://play.google.com/store/apps/d...t.contactssync

Sent from my Nexus 4 using Tapatalk
The Following 3 Users Say Thank You to Wizard Knight For This Useful Post: [ Click to Expand ]
 
IndianKarmas
Old
#3  
Senior Member - OP
Thanks Meter 94
Posts: 246
Join Date: Jan 2013
Quote:
Originally Posted by Wizard Knight View Post
Or just download ubersync? https://play.google.com/store/apps/d...t.contactssync

Sent from my Nexus 4 using Tapatalk
u are really very smart....without reading that it says for those who don't want to add an extra app

but u surely are very smart indeed...thats why u didnt read it
 
Wizard Knight
Old
#4  
Wizard Knight's Avatar
Senior Member
Thanks Meter 254
Posts: 966
Join Date: Apr 2010
Location: Long Island, New York
Quote:
Originally Posted by IndianKarmas View Post
u are really very smart....without reading that it says for those who don't want to add an extra app

but u surely are very smart indeed...thats why u didnt read it
Your solution involves installing 2 additional apps... Ashell and asqlitemanager, both of which require a user to be rooted, as well as decompiling an app on top of the other additional steps. Your reasoning for those steps was an additional cost to phone performance.

Ubersync is 1 app rather than 2, so it fits better into your first requirement, doesn't require root access, and doesn't affect performance because it doesn't run in background unless it's performing a sync, which takes roughly 30 seconds compared to your 5 minutes and can be set to happen as little as once a month.

I did read your post. The logic is flawed and reasoning outdated especially on current model phones.

Sent from my Nexus 4 using Tapatalk
The Following 3 Users Say Thank You to Wizard Knight For This Useful Post: [ Click to Expand ]
 
IndianKarmas
Old
#5  
Senior Member - OP
Thanks Meter 94
Posts: 246
Join Date: Jan 2013
Quote:
Originally Posted by Wizard Knight View Post
Your solution involves installing 2 additional apps... Ashell and asqlitemanager, both of which require a user to be rooted, as well as decompiling an app on top of the other additional steps. Your reasoning for those steps was an additional cost to phone performance.

Ubersync is 1 app rather than 2, so it fits better into your first requirement, doesn't require root access, and doesn't affect performance because it doesn't run in background unless it's performing a sync, which takes roughly 30 seconds compared to your 5 minutes and can be set to happen as little as once a month.

I did read your post. The logic is flawed and reasoning outdated especially on current model phones.

Sent from my Nexus 4 using Tapatalk
U don't require either of the apps once u are done.... but i am sure someone super intelligent like u knew.... Plus someone as smart as u who is getting his panties in a bunch for no reason will know that uber is an app which doesn't sync phone numbers..... n most of nexus users don't like extra add on apps

N most importantly this is a free forum.... U are more then welcome to open a new thread n preach whatever u want.... instead of being a 50yr old cranky old guy
 
Wizard Knight
Old
#6  
Wizard Knight's Avatar
Senior Member
Thanks Meter 254
Posts: 966
Join Date: Apr 2010
Location: Long Island, New York
Quote:
Originally Posted by IndianKarmas View Post
U don't require either of the apps once u are done.... but i am sure someone super intelligent like u knew.... Plus someone as smart as u who is getting his panties in a bunch for no reason will know that uber is an app which doesn't sync phone numbers..... n most of nexus users don't like extra add on apps

N most importantly this is a free forum.... U are more then welcome to open a new thread n preach whatever u want.... instead of being a 50yr old cranky old guy
No preaching, simply offering a streamlined alternative. I'm not aware of the poll that shows how many people who own a nexus don't like add-on apps, but I hesitate at advising people to edit their phone databases because of the risk of mistakes, even with backups. Considering that database queries search for specifically labeled information, a wrong edit can cause the database cursor to not be able to find the information, affecting not only the contacts app but any other app that accesses the contacts provider.

At the very least, I'd recommend posting the dangers of using this method over simply using a sync app. But considering how easily you were able to correctly estimate my intelligence, I'd guess you've already thought of that.

Good night

Sent from my Nexus 4 using Tapatalk
The Following 3 Users Say Thank You to Wizard Knight For This Useful Post: [ Click to Expand ]
 
jayRokk
Old
(Last edited by jayRokk; 30th January 2014 at 07:14 AM.)
#7  
jayRokk's Avatar
Senior Member
Thanks Meter 1890
Posts: 2,775
Join Date: Jan 2012
Location: Rack City
I'd rather download 1 app. This, to be honest isn't noob friendly. Im familiar with all this and even i found it complicated.

Not only is there various app on Google play which do this, most don't require you to be rooted.


Also ROMs are offering contact sync now.
I just flashed the latest Purity and as soon as i installed Facebook it syncd both contact pictures and numbers with out any apps.
So that's also an option for rooted users.

Sent from my Nexus 4 using Tapatalk


If your signature says something like "Hit the thanks button if I've helped," I automatically assume you're here for "likes" and really care about imaginary internet points.
You're on the wrong site. Don't be that person. Its ridiculous.





The Following 2 Users Say Thank You to jayRokk For This Useful Post: [ Click to Expand ]
 
IndianKarmas
Old
#8  
Senior Member - OP
Thanks Meter 94
Posts: 246
Join Date: Jan 2013
Quote:
Originally Posted by jayRokk View Post
I'd rather download 1 app. This, to be honest isn't noob friendly. Im familiar with all this and even i found it complicated.

Not only is there various app on Google play which do this, most don't require you to be rooted.


Also ROMs are offering contact sync now.
I just flashed the latest Purity and as soon as i installed Facebook it syncd both contact pictures and numbers with out any apps.
So that's also an option for rooted users.

Sent from my Nexus 4 using Tapatalk
If u read i put in what are the drawbacks for it. Also i am not pushing it to anyone or reinventing the wheel here.... lot of people used Niranjan's method, i just gave then option of doing it in kitkat.
I won't know why u did be happy to have a 3rd party app have access to your data + causing a battery drain. Adding a column to db isn't creating havoc.... any person who has basic knowledge of SQL could tell u that....
N i am not here to sell something or destroy a db by adding a column to it if someone could use it then great.... it's about helping each other out on xda... cause there are people who don't like 3rd party apps controlling them
 
gie62001
Old
#9  
Senior Member
Thanks Meter 78
Posts: 234
Join Date: Jan 2011
Location: London
Quote:
Originally Posted by Wizard Knight View Post
Or just download ubersync? https://play.google.com/store/apps/d...t.contactssync

Sent from my Nexus 4 using Tapatalk
Big thumbs up simply by how well the person can defend his/her argument. Not running wild into emotions like the OP. But on topic - this is indeed an easier option for noobs.

Thanks

Sent from my Nexus 4 using xda app-developers app
The Following 2 Users Say Thank You to gie62001 For This Useful Post: [ Click to Expand ]
 
IndianKarmas
Old
#10  
Senior Member - OP
Thanks Meter 94
Posts: 246
Join Date: Jan 2013
Quote:
Originally Posted by gie62001 View Post
Big thumbs up simply by how well the person can defend his/her argument. Not running wild into emotions like the OP. But on topic - this is indeed an easier option for noobs.

Thanks

Sent from my Nexus 4 using xda app-developers app
lol n here u r searching for ways to still be able to sync contacts for fb that landed u on this page.....lol speaks a lot about ur comfort level with the app.....but sure as u said wild emotions....u r more then welcome to give more apps control to ur personal life n also try to put down ppl who r trying to share with community

anyways whole idea was to give some users who had been looking n asking for fb sync an alternative...but thats helping them...which u wont understand.....funnily enough one of the best roms on N4 also got fb enabled by its dev.....so guess I am very wrong

I will be more then happy to close out the thread

Tags
contact images, contacts, facebook, facebook sync, sync
THREAD CLOSED
Subscribe
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes