Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,808,448 Members 40,105 Now Online
XDA Developers Android and Mobile Development Forum

[Q] How to remove Facebook suggested ads?

Tip us?
 
Klyno
Old
#1  
Klyno's Avatar
Member - OP
Thanks Meter 65
Posts: 70
Join Date: May 2014
Default [Q] How to remove Facebook suggested ads?

Hi.
I just wanted to know how to remove all the suggested ads in the news feed of Facebook application. I tried to block some permission which could eventually be the cause of this or even use adblockers but nothing worked for Facebook. So if you have a solution it would be gladly appreciated.
Thank you
Hi 🐼

Because Nexus that's why!
 
olokos
Old
#2  
olokos's Avatar
Recognized Contributor
Thanks Meter 1,355
Posts: 2,252
Join Date: Oct 2011
Location: Warsaw

 
DONATE TO ME
That is pretty interesting I have to say. My first idea "impossible as there are no elements that would be easy to distinguish from the other items of the app", but I might be very wrong.
My work on xda and things I'm proud of:
Single link for that as the sig got too big ^^
If you want me to reply then please quote my post or mention me by writing @olokos. This way you can be sure I'll reply. sooner or later :P
 
Klyno
Old
#3  
Klyno's Avatar
Member - OP
Thanks Meter 65
Posts: 70
Join Date: May 2014
Quote:
Originally Posted by olokos View Post
That is pretty interesting I have to say. My first idea "impossible as there are no elements that would be easy to distinguish from the other items of the app", but I might be very wrong.
Hmm I see but still it must be a line of code which implements ads as in every free app with ads but I must admit it that as you said, ads in Facebook are in the core of the app and not just a third-party layer. I mean most of ads in others apps are "Google ads" but it's different for Facebook. Maybe decompiling the apk and search for the part with suggested ads could help ^^
Hi 🐼

Because Nexus that's why!
 
shinji257
Old
#4  
Senior Member
Thanks Meter 30
Posts: 387
Join Date: Feb 2010
Isn't the suggestions just pushed as a news feed item?
Current: HTC One (Stock, Rooted, Unlocked, S-OFF HBOOT 1.56, Tampered flag removed)
Backup:
Samsung Captivate (CyanogenMod 11 Nightly)
Tablet: Nexus 7 (Rooted, TWRP Recovery (I think)) Android 4.4.2

Defunct: Samsung Galaxy S2 AT&T (CyanogenMod 11 Unofficial)

Thank god for having spare cell phones and custom roms that make them survive for a bit longer.
 
Klyno
Old
#5  
Klyno's Avatar
Member - OP
Thanks Meter 65
Posts: 70
Join Date: May 2014
Quote:
Originally Posted by shinji257 View Post
Isn't the suggestions just pushed as a news feed item?
If it is so then I have to find the line where the item is implemented and set it to "false" or something like that no? I kind of suck in coding but I'll give it a try one day.
Hi 🐼

Because Nexus that's why!
 
olokos
Old
#6  
olokos's Avatar
Recognized Contributor
Thanks Meter 1,355
Posts: 2,252
Join Date: Oct 2011
Location: Warsaw

 
DONATE TO ME
I was almost sure that it can't be as easy as it sounds and it actually isn't. You were taking about bools. Those are either true or false. Unfortunately I was right...

I can upload decompiled Facebook apk if you want to dig it further.
My work on xda and things I'm proud of:
Single link for that as the sig got too big ^^
If you want me to reply then please quote my post or mention me by writing @olokos. This way you can be sure I'll reply. sooner or later :P
The Following User Says Thank You to olokos For This Useful Post: [ Click to Expand ]
 
Klyno
Old
(Last edited by Klyno; 20th August 2014 at 05:35 PM.)
#7  
Klyno's Avatar
Member - OP
Thanks Meter 65
Posts: 70
Join Date: May 2014
Quote:
Originally Posted by olokos View Post
I was almost sure that it can't be as easy as it sounds and it actually isn't. You were taking about bools. Those are either true or false. Unfortunately I was right...

I can upload decompiled Facebook apk if you want to dig it further.
I'll do it with apk tool or apk studio and see what I can change and if it's possible to get some results. I was thinking of making a test on for example deactivate news from a specific user (this could be done from options too) from the apk directly and maybe with a little chance the suggested ads work the same way. If it's the case it's kind of easy to block them I guess.

PS. Did you find the bools.xml in the fb apk? Because I can't find it ^^
Hi 🐼

Because Nexus that's why!
 
olokos
Old
#8  
olokos's Avatar
Recognized Contributor
Thanks Meter 1,355
Posts: 2,252
Join Date: Oct 2011
Location: Warsaw

 
DONATE TO ME
Yup. Facebook apk indeed. Disassembled just before my previous post. Nothing helpful in that xml anyway. It's a good idea although I think it won't be that easy.
Good luck though. Shall you need any help, just let me know and I'll do my best to help you. Post anything you find here.
My work on xda and things I'm proud of:
Single link for that as the sig got too big ^^
If you want me to reply then please quote my post or mention me by writing @olokos. This way you can be sure I'll reply. sooner or later :P
The Following User Says Thank You to olokos For This Useful Post: [ Click to Expand ]
 
Klyno
Old
#9  
Klyno's Avatar
Member - OP
Thanks Meter 65
Posts: 70
Join Date: May 2014
Quote:
Originally Posted by olokos View Post
Yup. Facebook apk indeed. Disassembled just before my previous post. Nothing helpful in that xml anyway. It's a good idea although I think it won't be that easy.
Good luck though. Shall you need any help, just let me know and I'll do my best to help you. Post anything you find here.
Well I think I was searching it in the wrong place, I went in /data/app then directly in the apk nvm ^^
Well I'll start this tomorrow and see what I can do. I have to say I'm not a genius in coding, only worked in python but it's more logic than anything else. If something looks weird I have Google
Hi 🐼

Because Nexus that's why!
 
olokos
Old
#10  
olokos's Avatar
Recognized Contributor
Thanks Meter 1,355
Posts: 2,252
Join Date: Oct 2011
Location: Warsaw

 
DONATE TO ME
Try starting from how to decompile an apk. I also want to mention that smali which you'll need to know to dig REALLY DEEP is more like assembler not like python :P

---------- Post added at 09:50 PM ---------- Previous post was at 09:50 PM ----------

Byte code <- smali <- Java
My work on xda and things I'm proud of:
Single link for that as the sig got too big ^^
If you want me to reply then please quote my post or mention me by writing @olokos. This way you can be sure I'll reply. sooner or later :P

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes