Recompiling ContactsProvider.apk in order to support Facebook sync again - Galaxy S I9000 Themes and Apps

Hi people,
we all know that since ICS the Facebook app can't sync anymore with Android because Google disabled that feature, and wants Facebook to alter it's app in order to get the sync working again.
Facebook doesn't seem to be working very hard on that, and i really like my FB contacts being synced. So i read a few things on the web, and i saw this: http://android.modaco.com/topic/350037-enabling-facebook-sync-in-ice-cream-sandwich/. That seemed very interesting, but it still worked with some ugly init.d scripts, and his scripts can't be downloaded as Filesonic keeps deleting those files (and he didn't post the source).
But the first step he explained seemed helpful, and a poster who commented on his post gave a solution to get the sync working with only editing the ContactsProvider.apk: http://android.modaco.com/topic/350...-cream-sandwich/page__p__1873845#entry1873845.
So i tried it out. Took my contactsprovider.apk from OneCosmic's ICS (RC 2.11), and decompiled it with the latest apktool. I altered the files as explained in the posts, and tried to recompile.
But that's where i got stuck. It didn't recompile. I can't get it working. Tried different versions of apktool, loaded framework-res.apk, but it keeps giving errors. It really is a bummer, i wanted to try it out and see if i could get the sync working again.
Does anybody have a clue how i can recompile my files again, or does anybody have another solution? Thanks in advance!

I did manage to add arrays.xml file into resources, and patch that smali file (but the spot was @ line 9319!?).
Here's the apk:
http://www.multiupload.com/EJXMTI2G3W
I haven't signed it, cause I don't know if it's needed for system APKs.
Try it, and sign it yourself if needed.
I used apktool to add arrays.xml into resources and baksmali/smali for smali.
And as always I picked the new files (resources.arsc and classes.dex) and replaced them manually into a copy of the original apk.
Hope it helps.
edit: Ahh, forgot to mention.
I took ContactsProvider.apk from Onecosmics 2.1 build but I guess they're the same!
Not running ICS, not using FB sync, so not tested at all.

theos0o said:
I did manage to add arrays.xml file into resources, and patch that smali file (but the spot was @ line 9319!?).
Here's the apk:
http://www.multiupload.com/EJXMTI2G3W
I haven't signed it, cause I don't know if it's needed for system APKs.
Try it, and sign it yourself if needed.
I used apktool to add arrays.xml into resources and baksmali/smali for smali.
And as always I picked the new files (resources.arsc and classes.dex) and replaced them manually into a copy of the original apk.
Hope it helps.
edit: Ahh, forgot to mention.
I took ContactsProvider.apk from Onecosmics 2.1 build but I guess they're the same!
Not running ICS, not using FB sync, so not tested at all.
Click to expand...
Click to collapse
replaced ContactsProvider.apk on my Captivate running CM9 b12, i get force closes -_-

jerkysh said:
replaced ContactsProvider.apk on my Captivate running CM9 b12, i get force closes -_-
Click to expand...
Click to collapse
Not my problem if u can't read!

theos0o said:
I did manage to add arrays.xml file into resources, and patch that smali file (but the spot was @ line 9319!?).
Here's the apk:
http://www.multiupload.com/EJXMTI2G3W
I haven't signed it, cause I don't know if it's needed for system APKs.
Try it, and sign it yourself if needed.
I used apktool to add arrays.xml into resources and baksmali/smali for smali.
And as always I picked the new files (resources.arsc and classes.dex) and replaced them manually into a copy of the original apk.
Hope it helps.
edit: Ahh, forgot to mention.
I took ContactsProvider.apk from Onecosmics 2.1 build but I guess they're the same!
Not running ICS, not using FB sync, so not tested at all.
Click to expand...
Click to collapse
Thx for trying man, but it gives me force closes on de FB app and the Contacts app. Hmm.. Not really shure what to do now :')

dherre65 said:
Thx for trying man, but it gives me force closes on de FB app and the Contacts app. Hmm.. Not really shure what to do now :')
Click to expand...
Click to collapse
Did you sign it?

theos0o said:
Did you sign it?
Click to expand...
Click to collapse
I opened the apk with winrar and put the contents into the original file. That should work?

dherre65 said:
I opened the apk with winrar and put the contents into the original file. That should work?
Click to expand...
Click to collapse
Errr, no!?
First, you should try the APK I uploaded before, *UNTOUCHED*.
If that doesn't work, try this one which is signed.
Do not modify/touch/change any of them!

theos0o said:
Errr, no!?
First, you should try the APK I uploaded before, *UNTOUCHED*.
If that doesn't work, try this one which is signed.
Do not modify/touch/change any of them!
Click to expand...
Click to collapse
Okay, tried your unsigned and signed apk's, still fc on me... Contact app & fb app.

dherre65 said:
Okay, tried your unsigned and signed apk's, still fc on me... Contact app & fb app.
Click to expand...
Click to collapse
Hmm, ok.
I don't know, just followed the instructions!

Related

[LIVEWALLPAPER] ORIGINAL Livewallpapers.apk Nexus S

New port. It's the LiveWallpapers.apk from Nexus S, the ORIGINAL. Very smooth and zero problems. Had to decompile and fix some lines.
Back up and Delete your original LiveWallpapers.apk Then Push to /system/app with the usual permissions. Enjoy.
Screenshot:
Link: Livewallpaper Nexus
APK attached if the Mediafire link fails.
thanks for this...can you make an update.zip for flashing it through CWM?
Thanks dude.
I made a standalone apk for the Nexus LWP alone.
@santiemanuel
doesn´t work,
Fixing. Sorry for the inconvenience.
New version, manifest.xml fixed, optiPNG for images, cleaned classes.dex and deleted unnecesary files, renamed to com.android.nexuss . Just 642kb. Install and enjoy.
santiemanuel said:
New version, manifest.xml fixed, optiPNG for images, cleaned classes.dex and deleted unnecesary files, renamed to com.android.nexuss . Just 642kb. Install and enjoy.
Click to expand...
Click to collapse
Thank you so much for your work - I will check this out.
One thing though - would it be possible to make a flashable .zip-file for CWM?
BronzedDroid said:
Thank you so much for your work - I will check this out.
One thing though - would it be possible to make a flashable .zip-file for CWM?
Click to expand...
Click to collapse
Yes, in a few minutes.
update.zip signed (UNTESTED sorry).
For people that didnt installed the installable apk
santiemanuel said:
New version, manifest.xml fixed, optiPNG for images, cleaned classes.dex and deleted unnecesary files, renamed to com.android.nexuss . Just 642kb. Install and enjoy.
Click to expand...
Click to collapse
Is this a standalone APK?
Or do I have to replace LiveWallpapers.apk with this?
Darkyy said:
Is this a standalone APK?
Or do I have to replace LiveWallpapers.apk with this?
Click to expand...
Click to collapse
Just install as a normal .apk.
Its renamed to com.android.nexuss, install and get only the Nexus LWP, the others are equal to stock.
working perfectly, thanks a lot! been looking for this so much!
Dumb question - I have to be deodexed and rooted for this, right?
hello, I need a clarification: I have to rename the file from NexusS.apk to com.android.nexuss.apk before installing it? I also noticed that the animation does not start where I touch the screen, but a little to the right.
thank's in advance
tony81 said:
hello, I need a clarification: I have to rename the file from NexusS.apk to com.android.nexuss.apk before installing it? I also noticed that the animation does not start where I touch the screen, but a little to the right.
thank's in advance
Click to expand...
Click to collapse
You dont, its just to allow you to install it without deleting the LiveWallpapers.apk from system/app.
santiemanuel said:
You dont, its just to allow you to install it without deleting the LiveWallpapers.apk from system/app.
Click to expand...
Click to collapse
thanks for your answer, but why the animation does not start where I touch the screen, but a little to the right?
I dont know, you should ask Google , jk.
Force closes everytime
lockpick said:
Force closes everytime
Click to expand...
Click to collapse
Phone model-ROM?

[Bugfix][Gingerbread-JV*] Oversized/Unaligned browser combobox in themes.

Hi! I noticed this bug in ock's theme originally and then when I was trying to make my own theme banged heads with it myself.
The issue is that in the browser the combobox button seems to spill over into the text and generally is stretched poorly.
Like this:
I tried at first simply creating a .9.png version and removing the originals and replacing with the .9s. This made the bar vanish completely.
Eventually I got it working with a bit of a work-around, by compiling the .apk twice and extracting the images.
Having to explain that process recently lead me to the real answer though.
combobox_disabled.png and combobox_nohighlight.png ARE .9.pngs even though they do not have the .9.png extension.
apkmanager won't decompile (or compile) them as .9's because they don't have the right extension (and the right extension 'breaks' the theme).
Attatched are my .9.png versions of both images. I added the guidelines from scratch, but they seem to be correct. If your theme has this issue and you need to fix it, just drop the 'compiled' versions into your res/drawable-hdpi and apk-manager should happily compile it and the issue should be resolved.
tried both versions to just replace the ones in my framework-res.apk (didn't decompile the file but just replaced the files) and both didn't solve the problem.
XlAfbk said:
tried both versions to just replace the ones in my framework-res.apk (didn't decompile the file but just replaced the files) and both didn't solve the problem.
Click to expand...
Click to collapse
That -may- not work. That was one of the first things I tried to do - replace with .pngs straight from stock without a decompile/recompile of the whole apk.
The format of the zip file might be slightly ambiguous.
9s - are the raw pngs with draw9patch guidelines.
compiled - are the compiled draw9patch pngs. If you use a draw9patch compiler on the files in the 9s directory you get these.
Even though the pngs are compiled you still need to go through the decompile/recompile procedure with apk manager. (using the 'compiled' pngs).
sargorn, I've tried several times to decompile and recompile the framework with no luck. The new framework is ok, except this damn combo box rendering.
I personally gave up trying :|.
Toss me the framework and I'll give it a shot.
here's mine, based on JVB. thx fo giving it a try
XlAfbk said:
here's mine, based on JVB. thx fo giving it a try
Click to expand...
Click to collapse
Hi,
I tried decompiling and then recompiling your framework and it does not recompile.
zzzzz_tw_quickcontact_slider_btn_pressed.9.png and zzzzz_tw_quickcontact_slider_btn_selected.9.png were both 0 bytes.
If you've just been replacing images this probably won't work
Here it is decompiled and recompiled with stock copies of those two files and the combo box 'fix'.
The filesize seems very 'off' so I'm not sure if it'll work or not.
ro_explorer said:
sargorn, I've tried several times to decompile and recompile the framework with no luck. The new framework is ok, except this damn combo box rendering.
I personally gave up trying :|.
Click to expand...
Click to collapse
I've just de/recompiled JVH's framework-res and the combobox fix still seems to work. (Although maybe it's not needed in JVH, didn't test it!).
I tried it again with JVH and failed again. What I did:
1. decompile framework-res.apk with apkmanager
(2. make some of my changes to some xml files)
3. place the 2 files from compiled in drawable-hdpi-v4
4. recompile the apk
Everything but the comboboxes works as expected.
I'm attaching the apk, maybe you could have a look at it. If you can make it work please tell me what I did wrong. Many thx
XlAfbk said:
I tried it again with JVH and failed again. What I did:
1. decompile framework-res.apk with apkmanager
(2. make some of my changes to some xml files)
3. place the 2 files from compiled in drawable-hdpi-v4
4. recompile the apk
Everything but the comboboxes works as expected.
I'm attaching the apk, maybe you could have a look at it. If you can make it work please tell me what I did wrong. Many thx
Click to expand...
Click to collapse
As im here looking for the fix for my dhd I thought I might be able to help
Looking at your framework I can clearly see that those images in there are not fixed.
Try simply dragging and dropping the fixed pngs straight into your framework
liamstears said:
Try simply dragging and dropping the fixed pngs straight into your framework
Click to expand...
Click to collapse
that won't work, was said before, needs to be compiled in
Try out the jvo rom - I think this issue may be resolved in that framework.
Sent from my GT-I9000 using XDA Premium App
I still have that issue with my JVO theme

Could someone test a compile of mms.apk for me?

I've been debugging my mms themed app and have come up on a problem. Everything works great, but even a simple decompile/recompile seems to break the search messaging function. I get no errors during decompile/recompile, and no installation errors. Search just doesn't work. I'll post a logcat in case somebody can see something i missed. I'm using apk manager 5.0.2 and have also tried multi-tool 1.0.2.
-My question is, could someone decompile, then recompile the stock 4.0.3 mms.apk, then try to search via the magnifying glass at the bottom? Mine always FC's when i hit search. Thanks for the help guys.
also, i cannot decompile with dependencies, as it tells me that the framework-res.apk isn't the correct dependant, try again. decompiling without dependants seems to work fine, but i have a feeling i'll have to be able to get it with dependants since i think the search function uses external sources.
Exactly same problem with gingerbread mms.apk from LG Optimus Black.
If I retouch images or smali code, no problem at all... but when try to modify a .xml inside /values/ and then replace resources.asrc, search function returns a FC!!!!
It must be a format problem, but how to bypass this issue?
Regards.
Huexxx said:
Exactly same problem with gingerbread mms.apk from LG Optimus Black.
If I retouch images or smali code, no problem at all... but when try to modify a .xml inside /values/ and then replace resources.asrc, search function returns a FC!!!!
It must be a format problem, but how to bypass this issue?
Regards.
Click to expand...
Click to collapse
I bet on recompiling, you are including extra XML files you never edited. Apktool has a nasty bug of adding random extra '\' to files. Check your edited files too.
Hmmmm odd, apkmultitool doesn't introduce the bug you report. And I blacked out a stock 4.0.4 apk and search is fine.
good day.
lol i forgot about this thread. I fixed it a long time ago Turned out to be a bug in the version of apktool i was using.
chopper the dog said:
Hmmmm odd, apkmultitool doesn't introduce the bug you report. And I blacked out a stock 4.0.4 apk and search is fine.
good day.
Click to expand...
Click to collapse
artvandelay440 said:
lol i forgot about this thread. I fixed it a long time ago Turned out to be a bug in the version of apktool i was using.
Click to expand...
Click to collapse
/me slaps chopperthedog upside the head with nitsuj17

[Q] how can i add or edit whatsapp for custom emoticons ?

I would like to add some emoticons into whatsapp
Sent from my GT-I9100 Westcrips ICS using xda premium
RodneyNL said:
I would like to add some emoticons into whatsapp
Sent from my GT-I9100 Westcrips ICS using xda premium
Click to expand...
Click to collapse
You probably wont be able to add any, you can change the current ones by editing the apk, signing it then installing it. Once you open up the apk (with 7zip, winrar etc.) look inside the drawable-hdpi folder. Thats probably where the emoticons are kept.
I can help if you need.
You might want to check out these custom whatsapp's by yorzua :
http://forum.xda-developers.com/showthread.php?t=1543631
Thanks for your reply om gonna try it out i'll let you know of i need your help (probably i will need it xD)
Sent from my GT-I9100 using xda premium
Adding icons to whatsapp
Hey Guys has anyone tried adding new icons into the default whatsapp?
Or do the modded versions allow adding additional GIF'S to be added to the instant messenger?
Thanks
yes i have tried it, but it's useless since the recipient of the emoticon should have the "moded" version too, so that he could see the emoticon
Just wanted to add that Ive noticed the Iphone has new icons and I can view them on my phone which dont have those icons :/
esk02k said:
You probably wont be able to add any, you can change the current ones by editing the apk, signing it then installing it. Once you open up the apk (with 7zip, winrar etc.) look inside the drawable-hdpi folder. Thats probably where the emoticons are kept.
I can help if you need.
You might want to check out these custom whatsapp's by yorzua :
http://forum.xda-developers.com/showthread.php?t=1543631
Click to expand...
Click to collapse
I used 'Formatter' to rename (whatsapp) .apk file into .zip did required changes (replaced one .png smiley file) & again renamed it into .apk
But then, I'm not able to install it (even after uninstalling previous version). An error saying 'Application not installed' shows.
How can I modify .apk files (in terms of replacing only the smiley image files) & repack it into proper .apk file so that I'll be able to install it without any error?
Please help me..
thanks
yogz214 said:
I used 'Formatter' to rename (whatsapp) .apk file into .zip did required changes (replaced one .png smiley file) & again renamed it into .apk
But then, I'm not able to install it (even after uninstalling previous version). An error saying 'Application not installed' shows.
How can I modify .apk files (in terms of replacing only the smiley image files) & repack it into proper .apk file so that I'll be able to install it without any error?
Please help me..
thanks
Click to expand...
Click to collapse
i also want a new smiley, for example a puking smiley
After modifying the apk i think you should resign it to be able to install it
Check zipsigner from the play store
Sent from my GT-I9100G using XDA Premium 4 mobile app
fmardini said:
After modifying the apk i think you should resign it to be able to install it
Check zipsigner from the play store
Sent from my GT-I9100G using XDA Premium 4 mobile app
Click to expand...
Click to collapse
so i have to download the whatsapp.apk, unrar it, change the icons in it, and resign it?
Were are the folder?
I am getting a "parsing" error by installing whatsapp
jonny.pl said:
i also want a new smiley, for example a puking smiley
Click to expand...
Click to collapse
That is exactly what I am trying to do here.
I was looking for the same & found these.
http://www.techgyd.com/whatsapp-stickers-free-android-iphone/12739/
Good idea, but not practical
In order to install an apk, it must be properly signed and with a password that only the developers know. If you own the app though, you will still need to to decompile and recreate the apk structure by turning the directories of the zip into an android structure, since the compiling will change pretty much everything.
Worst part of it all, if you somehow manage to change and install the app, only you will be able to see it since only the apk installed on your phone has those custom emoticons.
Cheers :good:
how do I put emoticons on viber /whatsapp for sell
Just get your friends to use wechat, has all the emos in the world. Whatsapp is crap

[Q] Edited framework-res.apk

Can anyone edit a framework-res.apk with no mods other than adding the crt animation? I've found guides on how to edit the bools file in the res/values filder inside the apk, but I can't get it to recompile the apk correctly. Can someone tell me how or send me an edited apk or something?
If you want to post your framework file, I'll do it for you and send it back.
I just posted several of these for Caulkulin's 3.0 rom. What are you using now? His framework, but with a stock battery look.
Sent from my SPH-D710 using XDA
kyamora said:
Can anyone edit a framework-res.apk with no mods other than adding the crt animation? I've found guides on how to edit the bools file in the res/values filder inside the apk, but I can't get it to recompile the apk correctly. Can someone tell me how or send me an edited apk or something?
Click to expand...
Click to collapse
You need to check the error and see whats wrong with the framework file. Also you just want a stock framework file with crt on? Also what are you using to compile and decompile
playya said:
You need to check the error and see whats wrong with the framework file. Also you just want a stock framework file with crt on? Also what are you using to compile and decompile
Click to expand...
Click to collapse
I was using apk manager 4.9, and I have no idea how to read the log.
I attached my framework-res. It's stock from FD19, I probably should have specified.
If no one gets to it, I'll mod it when I get home.
Sent from my SPH-D710 using xda premium
All done. I tested on my phone. After I replaced the apk, I had to manually restart the phone for it to work. I placed your apk in a zip file before I uploaded, so make sure you unzip your apk before putting it back on your phone.
Thank you so much, it works very well.
Now I'd just like to know how you did it. Coming from a clean computer with nothing installed, what would I need to decompile an apk, edit it, and compile it again? I'm trying to get a handle on the whole thing to do some development myself.
Try and upgrade to Apk Manager 5.02 since I just de-compiled and then compiled your apk file without an issue. Also try and update everything associated with it like your java... But it seems quite fine to me
Edit: just tried yours again as well as removing animation I lowered autobrightness which is something I do on all my roms for better battery life.. Try that mod next
playya said:
Try and upgrade to Apk Manager 5.02 since I just de-compiled and then compiled your apk file without an issue. Also try and update everything associated with it like your java... But it seems quite fine to me
Edit: just tried yours again as well as removing animation I lowered autobrightness which is something I do on all my roms for better battery life.. Try that mod next
Click to expand...
Click to collapse
Do I have to do anything to set it up or is it good to go from install? Should I restart my computer?
Also where can I find 5.02? I had a lot of trouble finding 4.9 in the first place.
I've never used apk manager, so I'll check that out also. I used apktool to mod your framework along with all the java runtime files it needed to work.
Sent from my SPH-D710 using xda premium
&roid said:
I've never used apk manager, so I'll check that out also. I used apktool to mod your framework along with all the java runtime files it needed to work.
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
Apktool confused me so I used apk manager. I can't figure out how to get apktool to work. Do you have a link to a good guide or anything?
There are some good ones on xda. I'll link you one when I get home.
Sent from my SPH-D710 using xda premium
I was apparently using the gingerbread method for an ICS build. Would that have kept it from compiling correctly?
kyamora said:
I was apparently using the gingerbread method for an ICS build. Would that have kept it from compiling correctly?
Click to expand...
Click to collapse
YES
&roid said:
YES
Click to expand...
Click to collapse
Haha, at least I'm learning.
To be fair, no one specified. Thanks for all the help guys.
Hi. Any help me to on crt effect in this framework ? I try apk menager and apk edit, and always some problem when compile, program loop and only exit work
http://db.tt/W2DKqulN

Categories

Resources