[How-To] Stop syncing calendar and contacts to google - Android Software/Hacking General [Developers Only]

I you are a paranoid one (like me) who doesn't want to sync all your valuable and sensitive calendar and contacts information to the google cloud, BUT WANT to use the android default calendar and contacts app AND want to sync with your desktop then you're officially lost in the google world.
I tried several syncing solutions and the only one which was worth of beeing used (this is my personal opinion, YMMV) is MyPhoneExplorer which is free and gives you lots of extras.
However, to make a long journey short: Just do the following on your ROOTED device:
Code:
adb shell
su
mount -o remount,rw /dev/block/mtdblock6 /system
cd /system/app
mv GoogleCalendarSyncAdapter.apk GoogleCalendarSyncAdapter.apk.org
mv GoogleContactsSyncAdapter.apk GoogleContactsSyncAdapter.apk.org
cd /
mount -o remount,ro /dev/block/mtdblock6 /system
The above will remount your system partition as RW, rename the 2 sync adapters and remount back to RO. It might be that your system partition relies on another block, you should check on your device via mount first.
Up to now (3 days) I could not detect any side effects on my device (Dell Streak with Android 2.2). I can sync with my dektop, access calendar and contact just like normal but without sending anything to the cloud. Market access, google reader and all that other stuff are still working. You might want to use DroidWall in addition to prevent unknown apps from accessing the net.
Please post back in this thread if this solution works for you too and on which device/os you are on.
Cheers

Related

[MOD] Native Facebook app modded to use touch site!

Ok so after getting tired of the darn Facebook app using m.facebook.com for EVERYTHING, I decided to finally take matters into my own hands.
I updated all URL references in the app to now use the touch.facebook.com url. The only one that caused issue was the SHARE url that is launched whenever you try to share a link in Android with Facebook.
Unfortunately Facebook only offers http://www.facebook.com/sharer.php and http://m.facebook.com/sharer.php but no touch-site version. I tried using the full-site version of their share link but it never worked correctly so had to revert to mobile link
Anyways enjoy everyone.
INSTRUCTIONS FOR INSTALLING (ADB METHOD)
Code:
adb remount
adb shell rm /system/app/Facebook.apk
adb shell rm /data/dalvik-cache/[email protected]@[email protected]
adb push Facebook.zip /system/app/Facebook.apk
*** One thing to note is I rebooted after removing the existing Facebook app. I didn't add that step above as I'm hoping it was not required. My reasoning for rebooting is just in case Android kept the existing Facebook.apk signature in memory. Since this is a modded Facebook.apk I signed it with a developer key. If you have trouble, try removing your Facebook.apk and reboot and then push the modded copy.
IF YOU HAD FACEBOOK CONTACTS SYNC DO THE FOLLOWING
Open the Facebook App
Hit your menu key, open "Settings"
Scroll to the bottom and open "Sync Contacts" and re-enable sync
Don't bother trying to re-add Facebook in the Account Manager in Android, just do it from within Facebook as described above.
this man is genius! i hate the mobile site
cool, nice... would try it!
odd, i prefer the m. site and mine always reverts to the touch site with the user agent specified as android...
shafty023 said:
INSTRUCTIONS FOR INSTALLING (ADB METHOD)
Code:
adb remount
adb shell rm /system/app/Facebook.apk
adb shell rm /data/dalvik-cache/[email protected]@[email protected]
adb push Facebook.zip /system/app/Facebook.apk
Click to expand...
Click to collapse
I did the same as above, but made sure I backed up the original Facebook.apk file
Code:
adb remount
adb pull /system/app/Facebook.apk ./_STUFF/Facebook/Facebook.apk.bak
adb shell rm /system/app/Facebook.apk
adb shell rm /data/dalvik-cache/[email protected]@[email protected]
adb push ./_STUFF/Facebook/Facebook.zip /system/app/Facebook.apk
adb shell reboot
CODE TO GO BACK:
Code:
adb remount
adb shell rm /system/app/Facebook.apk
adb shell rm /data/dalvik-cache/[email protected]@[email protected]
adb push ./_STUFF/Facebook/Facebook.apk.bak /system/app/Facebook.apk
adb shell reboot
can we get this in an update.zip please
device froze a number of times while contact photos are synchronizing
also after sync, merged contacts needs to be merged again, and two entries of "view facebook profile" will be shown under view contact.
@k3vink3vin have you install a Desire rom before cause two facebook entry in contact can be due to Desire rom which haven't the same system for syncing facebook contact info in phone's contact
imfloflo said:
@k3vink3vin have you install a Desire rom before cause two facebook entry in contact can be due to Desire rom which haven't the same system for syncing facebook contact info in phone's contact
Click to expand...
Click to collapse
yes I ran Desire rom before, it leaves some facebook id under notes for merged contacts. Currently running Cyan 5.0.7.1.
I have fixed the problem by nandroid restoring, remove facebook sync before removing Facebook.apk, push modded Facebook.zip and setup sync again.
I still get occasional FCs when scrolling through Friends in Facebook App.
k3vink3vin said:
yes I ran Desire rom before, it leaves some facebook id under notes for merged contacts. Currently running Cyan 5.0.7.1.
I have fixed the problem by nandroid restoring, remove facebook sync before removing Facebook.apk, push modded Facebook.zip and setup sync again.
I still get occasional FCs when scrolling through Friends in Facebook App.
Click to expand...
Click to collapse
When you get the occasional FC can you please view your logs and send me a dump so we can see exactly what is causing your FC? I am able to scroll through FB friends with no FC ever.
shafty023 said:
When you get the occasional FC can you please view your logs and send me a dump so we can see exactly what is causing your FC? I am able to scroll through FB friends with no FC ever.
Click to expand...
Click to collapse
have been scrolling for like 10mins and couldn't get it to FC!
I believe it is related to the kernel I was using (wildmonks' 33.5 CFS 925mV). I flashed pershoot's latest .34 and the FCs are gone
Another problem though, I am synchronizing all facebook contacts to my contact list. In my phone contacts, all facebook contacts are included, however, many of their profile photos won't load (more than half of my facebook contacts). Tapping into the contact and tap on facebook view profile opens the facebook app and sees their profile photo and wall no problem.
Is there any way to force the photos to re-sync?
k3vink3vin said:
Is there any way to force the photos to re-sync?
Click to expand...
Click to collapse
Nope, I've had that issue since loading Froyo even with the stock Facebook app. Try erasing the Note section on each contact that should have its picture synced, then merge the contact with the facebook contact, go to accounts & settings in android->settings and refresh the facebook sync.
it says it is unable to remove '/system/app/Facebook.apk' There is no such file or directory :<
Google Contact Sync on Facebook
Thank so much shafty the facebook app works well now
might be off topic but has anyone tried this? It allows matching your friends on facebook to your google contacts so that it syncs their contact photo and birthday.
http://heartofangel.com/google-contact-sync
Guess I'll disable facebook sync and give it a go.
yes! been waiting for someone to baksmali and mod Facebook app! can i request you also tweak the notifications retrieval time? to like allow 1 min, 3 min, 5 min?
!
Just wanted to say great job shafty! And also its awsome to see you in the n1 forums i know you have had the n1 for a while ...
arctu said:
yes! been waiting for someone to baksmali and mod Facebook app! can i request you also tweak the notifications retrieval time? to like allow 1 min, 3 min, 5 min?
Click to expand...
Click to collapse
I'll see if those are changeable.
teamsilence said:
Just wanted to say great job shafty! And also its awsome to see you in the n1 forums i know you have had the n1 for a while ...
Click to expand...
Click to collapse
Ya I've just been slammed with work and haven't had any free time to hack. I technically didn't have time to hack the Facebook app but I just got so sick of the mobile site and wanted the touch site.
mudrock1000 said:
it says it is unable to remove '/system/app/Facebook.apk' There is no such file or directory :<
Click to expand...
Click to collapse
That would mean you don't have Facebook installed currently or if you do then it is installed to /data/app/Facebook.apk instead.
System Applications
Code:
/system/app/
User Applications
Code:
/data/app/
By the way, I don't always check back on threads that I create or post in because of my busy schedule so hit me up on Twitter to let me know u have a question. Then just tweet me the url of your thread post with the question. I'll try my best to help everyone as I get free time.

Contacts database location

Not sure if this would be helpful but I decided to poke around the Captivate/Android OS and I located the contacts database.
Code:
ADB SHELL
SU
cp /dbdata/databases/com.android.providers.contacts/contacts2.db /sdcard/sd/contacts2.db
cp /dbdata/databases/com.android.providers.telephony/mmssms.db /sdcard/sd/mmssms.db
Opened using sqlitebrowser.sourceforge.net
Next I want to find the call history database.

[Q] Have any ideas how to temporarily empty the contacts and call log DBs? $40 Reward

So I'm hacking the AppRadio and one thing it likes to do is copy the entire contacts and call log databases over bluetooth. This can take a while and with the way it is hacked now it is completely unnecessary. What I would like to do is empty the contacts and call logs databases and restore them when that part of the connection process is over. It seems like these things are cached because after renaming the dabases all the contacts are still there. I renamed contacts.db to contacts.bak and the next morning all my contacts were gone. However when I renamed every .db file to .bak all my contacts are still there two days later. Heres what the folder looks like
Code:
contacts2.bak contacts2.db-wal profile.db-shm
contacts2.db-shm profile.bak profile.db-wal
Even with calling this the contacts are still there:
Code:
getContentResolver().notifyChange(Calls.CONTENT_URI, null);
getContentResolver().notifyChange(Phone.CONTENT_URI, null);
So does anyone have an idea on how would be the best way to do this? I'd also be open to override the bluetooth AT command. The Android source where this happens can be seen here:
http://androidxref.com/source/xref/...c/com/android/phone/BluetoothAtPhonebook.java
I'll Paypal $40 to anyone who can produce code to empty and restore the contacts and call databases. It needs to be able to run in 0-2 seconds because there is a short window of time. It needs to be done between when the radio pairs and when it requests the logs and address book. It can prepare for this in advance and take any amount of time.
Heres basicly the code I'm using now:
Shell
Code:
cd /data/data/com.android.providers.contacts/databases
for file in *.db ; do mv $file `echo $file | sed 's/\\(.*\\.\\)db/\\1bak/'` ; done
Java
Code:
getContentResolver().notifyChange(Calls.CONTENT_URI, null);
getContentResolver().notifyChange(Phone.CONTENT_URI, null);

[Q] An app to mass-delete photos by date on android

My android phone warn me the storage is full. after checking by file manager app, I found the size of DCIM folder is 20G!! and there were some pictures located on the other app's folder..
Here is my action: Move all folders of photographic app into DCIM. Backed up all pictures under DCIM.
However I dont want to delete all photos by delete DCIM folder. instead. I would like to keep those photos taken within 6 months, and delete those more than 6 month.
I would like to know if any app can help me to to do this? ex: search files( or only pictures) which date more than 6-month on target folder(s) -> select all -> delete
ps: I know that I could use adb shell busybox find ... -exec rm .. , but if there is an app could do this , that would be easier

Restoring Facebook Messenger access through /data/data files

Hello,
A while ago my phone got bricked and I had to wipe it, however I've managed to extract all the files from /data/data. However a google authenticator got lost in the process and I cannot access some accounts, notably Facebook Messenger.
Is it possible, to restore access to it using the aforementioned files? So far I've found some suspicous strings in "shared_prefs" folder, such as "USER_ID" and "auth_token".
And no, just replacing all the files in a fresh messenger doesn't work, the app crashes instantly.
If restoring Facebook access is possible instead of messenger, it will do just fine.
Update: Solved!
After running a simple recursive grep by string "auth_token" I found a folder with the messenger auth data.
All you need to do is move "app_light_prefs" and "shared_prefs" from the old data to the messenger's fresh installation in /data/data/com.facebook.orca (Root needed)
From there you can access account settings and disable 2FA.

Categories

Resources