Limit adMob to 1 ad - Mobile Ad Networks

Here is some code I wrote to limit adMob apps to 1 ad.
cd /
find -iname app_admob_cache -print0 | xargs -0 rm -r | xargs -0 ln -s /dev/null

you can significantly speed this up using
Code:
for x in `find /data -name app_admob_cache`; do rm -r $x; done
EDIT: forgot to explain why.
your method searches the entire device for app_admob_cache. the only place it should exist would be in /data/data (but i was lenient and let it search the entire /data partition.)
there are only 3 mounts that are read/write anyways, cache, data, and sdcard.

Thanks to both of you, very helpful!

What will this help do.

Now, this is interesting. I mean, it's such a "duh" thing, but I certainly never thought of it. I don't see it being particularly useful... might make admob ever so slightly less annoying... but still, cool find/idea.

Do I use adb or terminal for this? I've tried using both but seen no results as the "xarg" is not found.

Ozonethegreat said:
Do I use adb or terminal for this? I've tried using both but seen no results as the "xarg" is not found.
Click to expand...
Click to collapse
I used terminal on a cynogen mod, your signature says your using a official release which seams to be missing xargs (busybox).

Ace42 said:
What will this help do.
Click to expand...
Click to collapse
It helps you lower the number of admob ads to 1 making them slightly less anoying. It does this by searching for the admob cache folder and removing it then making a link for those folders to /dev/null so it does not refill.
I posted this code in the hope that it helps others device a way to completly remove the ads for people like me who would never ever click on them anyways.

bug666 said:
I used terminal on a cynogen mod, your signature says your using a official release which seams to be missing xargs (busybox).
Click to expand...
Click to collapse
I'm no expert but I noticed that this app called droid swap (swapper clone) has an option to download busybox. not sure if it works, but if you're rooted give it shot.

You guys should just use Adfree Android by BigTinCan, its in the market for free, and it works great, all it does is block hostnames from a list of known hostnames and so anytime you have an app with ads you just dont see the ad AT ALL. IMO whats even the point of cutting it down to ONE when you can already cut it down to NONE for free?
-BMFC

haykuro said:
you can significantly speed this up using
Code:
for x in `find /data -name app_admob_cache`; do rm -r $x; done
EDIT: forgot to explain why.
your method searches the entire device for app_admob_cache. the only place it should exist would be in /data/data (but i was lenient and let it search the entire /data partition.)
there are only 3 mounts that are read/write anyways, cache, data, and sdcard.
Click to expand...
Click to collapse
After installing busybox on my AOSP build, I still don't understand your instructions here. I've tried to enter this using adb and in the terminal and kept getting at "syntax error" message.
Can you post clearer instructions on how to do this?

Ozonethegreat said:
After installing busybox on my AOSP build, I still don't understand your instructions here. I've tried to enter this using adb and in the terminal and kept getting at "syntax error" message.
Can you post clearer instructions on how to do this?
Click to expand...
Click to collapse
you may have to do it from adb shell
i.e.
Code:
adb shell
$ for x in `find ..............

bmfc187 said:
You guys should just use Adfree Android by BigTinCan, its in the market for free, and it works great, all it does is block hostnames from a list of known hostnames and so anytime you have an app with ads you just dont see the ad AT ALL. IMO whats even the point of cutting it down to ONE when you can already cut it down to NONE for free?
-BMFC
Click to expand...
Click to collapse
that's what I use and it is continually updated to block new host names. it works great for me.

tazz9690 said:
that's what I use and it is continually updated to block new host names. it works great for me.
Click to expand...
Click to collapse
Indeed this is a fantastic app. It does such a good job of it that on some apps, I don't even realize that there were supposed to be apps there.

FatBoyExtraordinaire said:
Indeed this is a fantastic app. It does such a good job of it that on some apps, I don't even realize that there were supposed to be apps there.
Click to expand...
Click to collapse
You don't notice the hideous error message where the ad should be? I did use HOSTS to block ads on my phone, but I eventually got tired of pushing my HOSTS file back to my phone every time I flashed a new ROM, and decided that the ads weren't any uglier than the error message.

carnegie0107 said:
You don't notice the hideous error message where the ad should be? I did use HOSTS to block ads on my phone, but I eventually got tired of pushing my HOSTS file back to my phone every time I flashed a new ROM, and decided that the ads weren't any uglier than the error message.
Click to expand...
Click to collapse
I don't get error messages. At first, I used to get one on the app SportsTap, which kinda rendered that app useless, but that has been fixed a few upgrades back. Now all I get is "blackness". No image, no words, just whatever ad that was supposed to be there being black out. And since many of the ad apps use a black background as the base to their GUI, it kinda blends in and I don't even notice. Apps like Quick Uninstaller or Shazam come to mind in which the lack of apps kinds of blends into the app.

FatBoyExtraordinaire said:
I don't get error messages. At first, I used to get one on the app SportsTap, which kinda rendered that app useless, but that has been fixed a few upgrades back. Now all I get is "blackness". No image, no words, just whatever ad that was supposed to be there being black out. And since many of the ad apps use a black background as the base to their GUI, it kinda blends in and I don't even notice. Apps like Quick Uninstaller or Shazam come to mind in which the lack of apps kinds of blends into the app.
Click to expand...
Click to collapse
Huh. Will have to try it again... I haven't tried it since I was on Cupcake. Back then, the ad was replaced by a little android peeking out with an error message saying "http://adcrap.adsite.com/8uncha13tt3rsandnum83r5 could not be found." It was hideous. But I used it since it made things faster by not loading the data.

carnegie0107 said:
Huh. Will have to try it again... I haven't tried it since I was on Cupcake. Back then, the ad was replaced by a little android peeking out with an error message saying "http://adcrap.adsite.com/8uncha13tt3rsandnum83r5 could not be found." It was hideous. But I used it since it made things faster by not loading the data.
Click to expand...
Click to collapse
Yeah sometimes the little android guy will pop up, but even that is rare and there is no text included. It's just the robot. And a reboot of the phone after re-updating takes care of that too.

Ozonethegreat said:
After installing busybox on my AOSP build, I still don't understand your instructions here. I've tried to enter this using adb and in the terminal and kept getting at "syntax error" message.
Can you post clearer instructions on how to do this?
Click to expand...
Click to collapse
You didn't need to do that; busybox *is* included with TheOfficial. You might need to substitute `busybox xargs' for `xargs' in the command, however.

Related

Block ads on your Android phone (2010-04-15)

AdFree is a fantastic program created by XDA user delta_foxtrot2 (see this thread in the G1 forum) to facilitate using your hosts file to block ad servers. This makes it extremely easy. Of course you will need root access!
Unfortunately I found some ads still weren't blocked and the last update to the AdFree hosts file happened 2010-02-27. So I decided to update the hosts file myself. I merged the hosts files from adfree/mvps/yoyo and added a bunch of mobile ad providers I've found myself. The list is free of duplicates and comments, so as to keep it as small as possible (it still amounts to about 635 kB).
To install this hosts file, you still need root access obviously:
download the zip
unpack it to the directory where adb.exe is located (if you don't know what adb is or how to get it running, please use the search)
open a command prompt
Code:
adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
adb push hosts.for.mobile.txt /etc/hosts
adb shell mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
You might need to restart your phone. Also clearing the Android browser cache will apparently help in getting rid of already cached ads (worked for me, ymmv).
As for ethical discussions on blocking ads for free apps, blah. I don't so much have a problem with ads, as I do with the personal data that gets send to the ad providers. I'm talking about location data and whatever else they might want to know about my device and what I'm running ("analytics" is a fancy name for "we want to find out as much about you as we possibly can get away with").
Anyway.. use it, don't use it, up to you.
Last updated
15-4-2010 23:23 (20808 hosts blocked)
.
Thanks a bunch!
Thanks for the updated hosts. So should we even bother with the program, especially if it doesn't get updated hardly at all?
You're welcome!
If you push my hosts file, you don't need the AdFree app, but I wanted to acknowledge his work and give people a simpler alternative to using adb.
Best choice right now is my hosts file as it's simply more comprehensive.
Sent from my HTC Hero using the XDA mobile application powered by Tapatalk
phaelox said:
You're welcome!
If you push my hosts file, you don't need the AdFree app, but I wanted to acknowledge his work and give people a simpler alternative to using adb.
Best choice right now is my hosts file as it's simply more comprehensive.
Sent from my HTC Hero using the XDA mobile application powered by Tapatalk
Click to expand...
Click to collapse
Understood. Yeah, it was a great start/beginning to blocking ads, but no updates. Thanks again.
Thanks! I've been looking for something like this for awhile. Real quick question: is getting "Data connectivity errors" in browser normal with this? It didn't start till I pushed this on my phone.
tmayne said:
Real quick question: is getting "Data connectivity errors" in browser normal with this? It didn't start till I pushed this on my phone.
Click to expand...
Click to collapse
Short answer: Yes.
Long answer:
You may know this, but I'll explain anyway. The way this works is as follows. The loopback address for any network interface is 127.0.0.1 -- this is the address for the device, but only from the device itself, it loops back on itself. We don't want to waste bandwidth with ads, or have ad providers collect all sorts of data on us, so we don't want to connect to them. Any FQDN -Fully Qualified Domain Name- (for example: analytics.admob.com) needs to be converted into an IP address to be able to connect to it. Here's where the 'hosts' file comes in. It's a simple text file with a record on each line that says redirect 'hostname' to 'ip-address'. So we put a line in that reads '127.0.0.1 analytics.admob.com'. This tells our device that any connection made to 'analytics.admob.com' needs to be redirected to '127.0.0.1', which is your device. Basically a dead-end, as you are not running their webserver serving ads on your device, so this results in a data connection error.
Now, usually you will surf to a site that loads images (advertisements) from a server that is listed in this hosts file, and as a result the ads will not load. That shouldn't popup any error windows. But if you try to visit http://analytics.admob.com in your browser, then yes, you will see an error.
If the latter happens with a site you do wish to visit, just open the hosts file in a text editor (one that supports UNIX-style line ends) and remove the line in question, or put a '#' in front of the line to comment it out.
Hope that made it clearer.
Yeah it did. No worries though since it seems that after pressing "Ok" everything works fine! Small trade off for blocked ads! Thanks!
Thanks for this How-TO!
So basicaly that mean we can restrict acces to certain websites from our phone?
eg: adding this line
Code:
127.0.0.1 forum.xda-developers.com
and I'll no longer be able to browse XDA from my phone?
Keep writing such How-To, like this one and the one to sign update.zip, I found this interessant and usefull
tmayne said:
Yeah it did. No worries though since it seems that after pressing "Ok" everything works fine! Small trade off for blocked ads! Thanks!
Click to expand...
Click to collapse
You're welcome, glad I could help.
carbonyle said:
Thanks for this How-TO!
So basicaly that mean we can restrict acces to certain websites from our phone?
eg: adding this line
Code:
127.0.0.1 forum.xda-developers.com
and I'll no longer be able to browse XDA from my phone?
Keep writing such How-To, like this one and the one to sign update.zip, I found this interessant and usefull
Click to expand...
Click to collapse
Cheers. And yes, that's exactly right. Just remember the hosts file takes FQDN's, so you can block a domain (or subdomain) this way, but not a directory or page on a domain. Also, blocking a domain does not also block its subdomains.
PS. this method of using the hosts file is not unique to your android phone, it works on most operating systems on PC as well. See this Wikipedia entry for more info.
what about non rooted phones? I just got myself a htc desire, I'm happy with it but would be happier if I wouldn't be required to see all those ads.
Unfortunately root is required to remount /system as writable to be able to overwrite the hosts file.
Without root you could use another free app found in Market called "AdBlock", which functions as a localhost proxy. Just set localhost as proxy in APN/wifi settings. It doesn't come with a prefilled list of keywords to block though, but it works on a URL level, not FQDN, so you can specify a url or part of it to block.
Just one more quick concern about the Data Connectivity issues: Certain areas of my university require a redirect page login in order to connect to wifi. However, it seems that at certain locations, I get the Data Connectivity error pop up repeatedly and my phone never makes it to the redirect page.
Actually it seems my phone only likes the wifi in my dorm. As stepping outside (to a library or classroom) and attempting to connect to the same wifi produces the error.
Is this an issue with the hosts file or with the phone itself??
Thanks!
If you DO see the wifi redirect page at SOME locations, then the hosts file is not blocking it (wouldn't make sense as it's likely an intranet page anyway). Sounds like wifi reception is unstable on your phone.
This is getting off-topic, but..... Have you already updated your radio? (the part of the ROM that handles everything related to GSM/3G/WiFi/Bluetooth connections). If not, here for the latest radio update.zip - flash through recovery.
phaelox said:
If you DO see the wifi redirect page at SOME locations, then the hosts file is not blocking it (wouldn't make sense as it's likely an intranet page anyway). Sounds like wifi reception is unstable on your phone.
This is getting off-topic, but..... Have you already updated your radio? (the part of the ROM that handles everything related to GSM/3G/WiFi/Bluetooth connections). If not, or the latest radio update.zip - flash through recovery.
Click to expand...
Click to collapse
I should note that I'm using a Motorola Cliq...Handler 1.5 ROM. There is a radio update available for the Motorola Cliq (I'm currently using 1.3.18 and 1.4.8 has been released) but there are some apk incompatibilities with it (particularly Swype which I love...since it's in closed beta right now, there are no accessible updates for it unfortunately).
Since I bought my phone off of ebay, I can't send it back for a new one. The essential things work but it is a bit frustrating that it has some problems.
tmayne said:
I should note that I'm using a Motorola Cliq...Handler 1.5 ROM. There is a radio update available for the Motorola Cliq (I'm currently using 1.3.18 and 1.4.8 has been released) but there are some apk incompatibilities with it (particularly Swype which I love...since it's in closed beta right now, there are no accessible updates for it unfortunately).
Since I bought my phone off of ebay, I can't send it back for a new one. The essential things work but it is a bit frustrating that it has some problems.
Click to expand...
Click to collapse
I'm pretty sure that updating radio won't affect other softwares since "radio" is *just* the piece of code that can handle GSM/Wifi/BT/3G, ... signals
I'll always keep an open mind, but from what I know, I'm with carbonyle on this.
Back on topic:
if you come across an app that still displays ad, regardless of my hosts file, please reply in this topic with the app/version (and a logcat output would be nice if you know how) and I'll see if I can find the ad provider domain and update the hosts file.
I'm confused... This is for blocking apps adds???
:No-Frost: said:
I'm confused... This is for blocking apps adds???
Click to expand...
Click to collapse
Yes it is. See it like a firewall wich blocks mobile ads. Because the app wont recieve any response from the ad url it tries to reach, it'll simply not display the ad (like when you use the app without wifi or data connextion on)
Wooooooo thanks... worked like a charm in glympse shazam and others =D...
PS: Air Control still have adds... Mmm how can we know what's the host for the add in the apps so we can contribute into blocking them???

[Q] Limited number of apps??

I'm buying one tomorrow and i heared that there is a very limited number of available apps in the Andoid marcket because of QVGA resolution, what about this rumor?. Can someone tell me if there is a significant number of apps available.
Looking foward for a reply
Best Wishes to all
interested too...
well, I don't know because i don't have it, but it's strange... many android apps shouldn't care about the screen size, or, almost, that's what i hope!
let us know, dear users!
Unfortunately, yes. There is a limitation
And not due to market but to devs who don't allow their app for QVGA (even it works well).
Anyway i'm huge app user and I find almost 90% of my usual apps. So not a big deal and u can always find alternatives to find the missing apps ;-)
On the X10mini we had a trick, installing the tattoo patched market, but since I have the "new" market on my flipout, i don't want to lose it.
okey i was downloading lots of apps and there are LOTS really, no big deal with this issue,
someone know a really missable app?
mixzing and radar now! are (or where) missing on the charm. (pretty much the same phone
I've contacted the devs, and they provided direct APK's but didn't specify if they'd make the app compatible/available in the market
Radar Now!
http://www.radarnow.net/apk/rn_2_4.apk
Mixzing
http://www.mixzing.com/install/android/com.mixzing.basic.apk
Is there anywhere we can find a list of the missing apps? I'm not too concerned because there are often apps missing from the markets of different handsets. For instance angry birds was not available on the galaxy s. And the g1 still offers pacman for free. However it would be nice to know what's missing.
Also has anybody come across apps where the square screen has been an issue. Maybe part of the screen cropped at the bottom? Or anything similar?
Usually there is no issue at all, however a compass APP that I downloaded thought I was holding the device differently and therefor showed north as always being east.
Radar now usually fills the entire screen on my mytouch, however on my wifes charm it needs to be slightly scrolled down to see the weather and stuff.
Beyond that though I have not run into any other issue with any app, including games.
Angry birds would run, if it could fit on the damn device....
MrShides said:
Usually there is no issue at all, however a compass APP that I downloaded thought I was holding the device differently and therefor showed north as always being east.
Radar now usually fills the entire screen on my mytouch, however on my wifes charm it needs to be slightly scrolled down to see the weather and stuff.
Beyond that though I have not run into any other issue with any app, including games.
Angry birds would run, if it could fit on the damn device....
Click to expand...
Click to collapse
Thank you very much. A bit of scrolling or having to turn the handset around now and then I can deal with. I think I will be buying 1 of these soon
Use a hack
if you want to be able to load "all" apps:
On a rooted phone, you can use this replacement for the market app:
xda-dev thread
But because locations on the Flipout are a bit different, use this:
Code:
adb shell
su
mount -o rw,remount /dev/block/mtdblock7 /system
exit
adb pull /system/app/com.android.vending.apk Vending.old.apk
adb push Vending.apk /system/app/com.android.vending.apk
or from a terminal on the Flipout
Code:
su
mount -o rw,remount /dev/block/mtdblock7 /system
cp /system/app/com.android.vending.apk /sdcard/Vending.old.apk
cp /sdcard/Vending.apk /system/app/com.android.vending.apk
Once you use the new Market, you can get all apps, except for those that have additional requirements (for example, an autofocus camera )
After using it for some time, I had a problem where Market would FC once the app finished downloading, and I had to the manually go to /cache and install it from there. To fix that you copy the old Vending.apk, reboot, and then copy the new apk again. Maybe the above thread has a fix for this problem... I haven't checked.
Most apps work really well on the Flipout!
Yes but...this is the old market ^^ Not the one with automatic updates and new tab for comms.
No way I'll go back to the old one :/
But for people who don't have a lot of apps, it's good solution, used it on my x10mini and was fine
Sakem said:
Yes but...this is the old market ^^ Not the one with automatic updates and new tab for comms.
No way I'll go back to the old one :/
But for people who don't have a lot of apps, it's good solution, used it on my x10mini and was fine
Click to expand...
Click to collapse
But you can switch between them, no?
The old market when you want to search for an app, and the new one for updates (i.e. most of the time). Oh... maybe if an app isn't found it can't get updated? Hmmm....
BTW: I'm curious - do most people use auto-update? I haven't yet, because I heard of too many cases of an update breaking the app. I like to wait a bit, and see that it doesn't break stuff. I guess it depends on how much you need the particular app....
2 markets in 1 Android OS ?!?
2 Windows Explorer in 1 Windows OS ?!?
Think it's not possible ^^ market is part of the OS
"update breaking the app".....? I use Android for 11 months now and constantly update manually my apps through the market and never had a problem with it !!??
So why automatic updates would break it :/
IMO Market V2 is a great great improvement and I was waiting for it for months now
Sakem said:
2 markets in 1 Android OS ?!?
2 Windows Explorer in 1 Windows OS ?!?
Think it's not possible ^^ market is part of the OS
"update breaking the app".....? I use Android for 11 months now and constantly update manually my apps through the market and never had a problem with it !!??
So why automatic updates would break it :/
IMO Market V2 is a great great improvement and I was waiting for it for months now
Click to expand...
Click to collapse
Actually the market is not part of the os... it is a system app called vending.apk
So a system app is not part of an OS :/ Right
So we can have 2 versions of the market on our androphones ? (Incredible !)
Sakem said:
So a system app is not part of an OS :/ Right
So we can have 2 versions of the market on our androphones ? (Incredible !)
Click to expand...
Click to collapse
That is correct, once rooted the system apps can be removed, changed, and manipulated
OMG I think you really take me for a huuuuuuge noob ^^
So u definitely confirm u succeed in having 2 different versions of the market working at same time on your androphone ? (2 markets in your drawer)
If yes , you're right I feel in shame cos I thought I had a better andro level for 11 months manipulating it and I'm in fact a big noob.
If no, I'm right from the beginning and that was indeed a useless talk ^^
Sakem said:
OMG I think you really take me for a huuuuuuge noob ^^
So u definitely confirm u succeed in having 2 different versions of the market working at same time on your androphone ? (2 markets in your drawer)
If yes , you're right I feel in shame cos I thought I had a better andro level for 11 months manipulating it and I'm in fact a big noob.
If no, I'm right from the beginning and that was indeed a useless talk ^^
Click to expand...
Click to collapse
It depends... what markets are they? Are you referring to 2 versions of the same android market?
Even better solution
I followed the instructions of hacking Vendor.apk, and produced one out of the new Market app.
So, included below is the result: new Market app, for Flipout with larger screen apps enabled.
Till now, it works really well. I see lots of apps (>1900 video, as oposed to just a bit over 1000), and I have auto update and a comment tab.
Also, FC seem to be gone (since I started with the Flipout version), but maybe it is still too early to tell since I've only been using it for a day.
I also added the autofocus camera file, which enabled me to also see and install google goggles.
Directions for installation are (copied from the original post.)
Code:
adb pull /system/app/com.android.vending.apk Vending.backup.apk
adb push Vending_v2007.apk /sdcard
adb push android.hardware.camera.autofocus.xml.txt /sdcard/android.hardware.camera.autofocus.xml
adb shell
su
mount -o rw,remount /dev/block/mtdblock7 /system
cp /sdcard/Vending_v2007.apk /system/app/com.android.vending.apk
cp /sdcard/Vending_v2007.apk /data/app/com.android.vending.apk
cp /sdcard/android.hardware.camera.autofocus.xml /system/etc/permissions
chmod 644 /system/app/com.android.vending.apk
chmod 644 /data/app/com.android.vending.apk
chmod 644 /system/etc/permissions/android.hardware.camera.autofocus.xml
chown system.system /system/app/com.android.vending.apk
rm -r /data/data/com.android.vending
reboot
Run market enabler: in "Setting list" long press on [us] T-Mobile (T-Mobile) -> Fake this provider now.
Now Run Market Application (you should find it in the list of all installed applications if you set permissions correctly).
Be careful with autoupdate of your market (that will overwrite your changes).
If anything goes wrong: place your original Vending.apk files, set permissions, delete cache. It should be as before.
The hack did not allow me to download apps until I ran the market enabler. I'm not sure why that is.
The one I used is called "MarketAccess".
Just an update....angry birds will not let you get past the first screen that shows you how to play the game. You cannot click the "check" to go past that screen as it is off the side.
I'm wondering if one of those density switcher apps might resolve this?
Mine works
Strange... my version of angry birds works, no switcher. I forgot where I got it from, 'cause I couldn't find it on the market.
It is caled AngryBirds_1.3.5.apk. Is it ok to post it here? It's a free version.
Oh, there, I tried it again. Once you get to the first screen with a crosshair on the pig, press home (home key), then once out of angry birds, enter it again, and you'll see the options. From then on it plays well.

can anyone help with adfree

my last mytouch4 worked out just fine... this ine however is pissing me off
I have done everything i can think of
uninstall-reinstall-wipe cache in recovery and still wont work right. dont get it.. last one worked right out the gate.
nlarge said:
my last mytouch4 worked out just fine... this ine however is pissing me off
I have done everything i can think of
uninstall-reinstall-wipe cache in recovery and still wont work right. dont get it.. last one worked right out the gate.
Click to expand...
Click to collapse
All that ranting, but no information as to what is actually going on. Are you getting an error message? FC?
Still getting ads.....
AFAIK, adfree simply adds a hosts file with the add servers in it, in which case you are seeing adds because either the servers changed or there are new ad servers that haven't been added yet. Devs need incentive to do the work they do, so just be happy that you can even get good apps for free and deal with it.
jdkoren said:
AFAIK, adfree simply adds a hosts file with the add servers in it, in which case you are seeing adds because either the servers changed or there are new ad servers that haven't been added yet. Devs need icnentive to do the work they do, so just be happy that you can even get good apps for free and deal with it.
Click to expand...
Click to collapse
An app is only as good as it works. I have run into the same issue as the op recently. Also I'm getting real tired of reading these smart ass remarks at the end of posts here to just like yours. Its unnecessary!
hey.. try this:
http://forum.xda-developers.com/showthread.php?t=919040
The above methods seem to work for me. I've never used adfree btw...
There is something odd going on with hosts. I have the same problem as you that ads continue. I have traced mine to the fact that the hosts file is continually overlaid by the default blank one. It appears there is some component that continually scans this and wipes it.
I posted this problem a couple months ago but never got a response. The best I did was install GScript Lite and create a script to copy my saved off version of the ad-free hosts file back over the real one. It is not a good solution but the only one I have. I suppose the ultimate solution would be a different ROM. But that would just trade the problem I understand for an unknown number of ones I don't.
ethutch said:
There is something odd going on with hosts. I have the same problem as you that ads continue. I have traced mine to the fact that the hosts file is continually overlaid by the default blank one. It appears there is some component that continually scans this and wipes it.
I posted this problem a couple months ago but never got a response. The best I did was install GScript Lite and create a script to copy my saved off version of the ad-free hosts file back over the real one. It is not a good solution but the only one I have. I suppose the ultimate solution would be a different ROM. But that would just trade the problem I understand for an unknown number of ones I don't.
Click to expand...
Click to collapse
i dont use adfree
ive never had an ad using this hosts file
extract it from the zip, and put it in system/etc
enjoy
Has anyone tried enabling the AdFree option to symlink to /local/data (I think? forgot the exact path it gives in the app). I use that and have never experienced any problems with this on Ice Glacier.
It works for me, perhaps its a device specific problem.
SE7EN- said:
An app is only as good as it works. I have run into the same issue as the op recently. Also I'm getting real tired of reading these smart ass remarks at the end of posts here to just like yours. Its unnecessary!
Click to expand...
Click to collapse
While I somewhat agree with your post, I agree with jdkoren's more. All of the apps you are blocking ads for were free, free because of the ads that help fund the development of the apps. So I think he's just saying, if you can't block the ads, accept it, you have all those apps at no cost... Everything we experience, this forum, these custom ROMs, market apps, all took great amounts of time and effort, I think sometimes we lose sight of that when we think about open source projects.

[ROOT][HOWTO] Disable Lockscreen Ads

WARNING: I am not responsible for any bricked devices caused by attempting this howto. If you haven't read this how to twice, and fully understand the requirements, then please don't attempt it.
Introduction (not important):
First, this may not be the best way to do this, and if someone knows a better way, I'll be happy to listen.
I kinda stumbled across this solution after trying the many other ways to solve the problem, but all the other ways seemed to have something incomplete with them and ended with no ADS, but no something else, like rotating lock screens or something.
I started with the assumption that the ADS program (dtcp) can be disabled through a flag somewhere on the system, for if you pay the extra $20 you get a kindle with no ADS, but same Android build. After looking through lots of sqlite databases I found it in the com.android.providers.settings/settings.db file.
Prerequisites:
Basic knowledge of databases
SQLite Editor Pro (Free on 1Mobile Market)
DroidWall
Steps:
Open SQLite Editor
Open "Settings Storage" (com.android.providers.settings)
Open settings.db
open "global" table
Highlight entry "IS_DTCP_ENABLED"
Click the Edit Record button at the top
Change the value from a 1 to a 0
Click Save
Go back
Make same change on the "secure" table
Reboot kindle for new options to take effect.
Other Thoughts:
This just changes the value temporarily until the device checks back in with Amazon and then the value will get overridden again with the correct value. To prevent that install DroidWall and whitelist only the applications you need to access the internet. DroidWall requires root, which is why root is in the subject. But you should be doing this anyways to prevent OTA updates.
cool
Does this mean that you will now get the rotating native wallpapers that you would have if you paid for the dismissal of the ads? Currently I use adaway on my s4 hotspot and the only one I blacklist is (spectrum.s3.amazonaws.com) this has blocked updates because I am still on old software with no other blocking in place and I have noticed it also has blocked rotateing ads accept I have the same 1 at all times.
Edit: YAY !!!! and yes I now have rotating native wallpapers
Btw thank you for sharing and it is quite refreshing to see a new member join to share useful information in a well thought out and presented OP and not just join to start a thread with a question that is the heading of so many other threads that has been beat to death already..burying perfectly good information..thank you for joining us at XDA!
Awesome!!!! have been looking for a way to do this without factory reset for a while! You da man! Gonna spam that thanks button for a while lol
Thanks so much, that was easy!
Mind after a few days .2 went straight black lock screen
Anyone know what exactly I need to enable in droidwall to have internet but no ota updates or Amazon changing the lock screen back to ads?
Uhg
This mod works fine. No ads, rotating wallpapers appear every time. No reversion to black screen. No need for Droidwall. Use of Droidwall is impractical for this purpose. Who knows what not to include in some giant white list?
It appears that the wallpapers will continue to appear without reversion if you have blocked updates using the root kit.
earlgrey_44 said:
This mod works fine. No ads, rotating wallpapers appear every time. No reversion to black screen. No need for Droidwall. Use of Droidwall is impractical for this purpose. Who knows what not to include in some giant white list?
It appears that the wallpapers will continue to appear without reversion if you have blocked updates using the root kit.
Click to expand...
Click to collapse
Sorry, what's the root kit?
dras99 said:
Sorry, what's the root kit?
Click to expand...
Click to collapse
First link in this post:
http://forum.xda-developers.com/showpost.php?p=53451623&postcount=3
I assume the block update action from the rootkit is responsible for the lack of reversion to ads since I haven't done anything else except the steps I outlined in the post and the data base tweaks explained above. My kindle has been running for 5 days now without ads and with the startup wallpaper.
earlgrey_44 said:
First link in this post:
http://forum.xda-developers.com/showpost.php?p=53451623&postcount=3
I assume the block update action from the rootkit is responsible for the lack of reversion to ads since I haven't done anything else except the steps I outlined in the post and the data base tweaks explained above. My kindle has been running for 5 days now without ads and with the startup wallpaper.
Click to expand...
Click to collapse
I also blocked updates with the root kit. Then I followed this tutorial and it worked great however it did revert back to adds after a reboot or 2.
conan1600 said:
I also blocked updates with the root kit. Then I followed this tutorial and it worked great however it did revert back to adds after a reboot or 2.
Click to expand...
Click to collapse
Strange! What's different about my install I wonder?
earlgrey_44 said:
Strange! What's different about my install I wonder?
Click to expand...
Click to collapse
I'm left scratching my head over that as well. Tomorrow I will re run the ota block script as I'm now concerned that it perhaps did not do something correctly. I did check for updates and it says last update failed but better safe than sorry. I DO NOT want to end up getting updated again. I finally have this tablet running rather nicely and am quite satisfied with most aspects. Still need much more customization options but it's serviceable now. And this tablet has always had the best touch input response of any I've ever used. I'd hate to have to throw it back in the closet.
I am getting now BLACK SCREENS. Any way to change this?
Script
For anyone who wants to run this from command line (e.g. on reboot or network change event) you can create a script like below and use SManager to run it periodically. You will first need to install sqlite3 binary (google "SQLite Installer for Root").
Here is the script that needs to be executed as root:
Code:
#!/system/bin/sh
sqlite3 -batch /data/data/com.android.providers.settings/databases/settings.db "update global SET value='0' where name='IS_DTCP_ENABLED'";
sqlite3 -batch /data/data/com.android.providers.settings/databases/settings.db "update secure SET value='0' where name='IS_DTCP_ENABLED'";

Playstation Vue on rooted Fire TV

Has anyone figured out how to get ps vue to work with firetv that is rooted? I've gone the route of renaming su.apk in shell to xsu.apk. When I do this I can access root in shell but can not give permission to installed rooted apps on screen. I've tried root cloak. It's a no go. Plus why is there no gui for su for fire tv. Any help would be greatly appreciated. Thanks.
1. What did you think would happen if you rename your su and Superuser.apk? It all would magically work regardless?
2. Other people report that Root Cloak worked for them as recently as 24 days ago. Might not work on the FireTV - but still...
3. You can get the information on why the su GUI does not work on the FireTV from here:
http://forum.xda-developers.com/showpost.php?p=68273660&postcount=67
Thanks for replying. By changing su name I still have root abilities through adbfire. I can access and change root files. The issue is once I originally grant root access on fire tv I can never get it to appear again. Is there any way to clear su.apk access without gui? In app section all su options are grayed out. It's strictly read only su. The link below is the post for renaming su files. It does work. System is still rooted. I just can't get popup to grant access to apps. I've been trying off and on for a few months. Any help would be greatly appreciated. Thanks.
http://forum.xda-developers.com/fire-tv/help/playstation-vue-fire-tv-fire-tv-stick-t3247813/page2
Not through adbfire - through adb and the shell.
Adbfire is a "eazy to use" frontend that prevents users from learning to navigate using adb commands and the shell by makeing them click buttons with preset commands backed in, that sometimes are just silly. Then it pops up fake progress counter animations to put their minds to ease.
Every time someone says that "adbfire doesn't work" I die a little bit more, deep in my heart.
But you have made it to the actual shell, so congratulations, you are using the real deal.
-
Here is what happens as far as I understand it - could be wrong - but it is a pretty educated guess.
Once you rename su and Superuser.apk - all apps loose access to it.
The prompt is not poping up, because the apps already think they have SU access - but because they cant access su.
Here is why.
Apps that require su, have to address su, and they certainly don't expect su to be named xsu.
Its great that you can call su functions by typing in xsu into the shell instead - but that won't help your apps.
If an app cant get su access - it usually just prompts su and the Superuser.apk again. There is no need to "clear Superuser.apk access" in fact - just uninstalling an app that requires root and reinstalling it again is enough for the rootmanager to forget it ever existed. So you can in fact test your theory that way. My best guess is, that you are wrong and it won't work regardless, because none of the apps calls a binary named xsu. xsu could in fact be named "makeamericagreatagain" and it would make no discernible difference.
The thing why I preface this with "I could be wrong" is, that I havent looked into how systemless root works, and how those guys get root access to their apps, without having a binary named su in /system. Maybe the apps call Superuser.apk (which is now called xSuperuser.apk so they cant find it) and xSuperuser.apk of course cant find su, because you renamed it xsu. But in any case - they are not using the usual Superuser.apks
Thanks for the quick reply. You are right about the renaming of su. I tried same thing on old tablet and got the same results. Even with having gui access. I could not get it to grant root abilities. Next step is to find a way to edit apk's and find a way change where it looks for root files. I only need to edit 3 apps. (adaway, xposed, and hdxposed) If can figure out how to do it once the others should be easier. This should be interesting.
Now here is something that could work. I'm a bit hesitant to recommend you doing it, because you are constantly modifying system files - but if you were willing to risk it before... It might work.
Read up on a program named "Remote adb Shell" in here
http://forum.xda-developers.com/showpost.php?p=69050521&postcount=3
Then maybe try two commands like these:
su -c 'mount -o remount,rw /system /system && sleep 1 && mv /system/app/Superuser.apk /system/app/XSuperuser.apk && mv /system/xbin/su /system/xbin/xsu' && exit
and
xsu -c 'mount -o remount,rw /system /system && sleep 1 && mv /system/app/XSuperuser.apk /system/app/Superuser.apk && mv /system/xbin/xsu /system/xbin/su' && exit
Now - understand, that I havent tested this myself - also - I havent looked if you need to chmod modify the su file first (add another
&& chmod 761 /system/xbin/su
- at the appropriate spot(s)), which you do according to this thread https://www.reddit.com/r/fireTV/comments/41e8z3/ps_vue_aftv_1_with_root/?st=iuk3lgx4&sh=36edc941 (which I think you took the method from) --
but if it works - it would allow you to switch between "rooted" and "non rooted" states with a few presses on your android smartphones (or tablets) screen.
Now - I don't know if you would need to reboot the AFTV for root or VUE to work again -- (make another entry with just
reboot
- in it) . The reboot might kill the concept - because switching between the states might take too long.
Also - you do this at your own risk. If you loose root (or worse.. ) as a result of this - its not my fault.
install xposed, install rootcloak and block the vue apk by package name. I use that method on my shield tv. Just reset my ftv so I'm still trying to set everything up before I get to this.
There you go.
Should have looked into the "doesn't know how to use rootcloak" angle a bit more.
Definitely the better solution. Go with that.
Just like you should go to "I'm a **** and my comments don't provide any help others than to prove I'm an asshole section."
This is a forum for questions and help. Thanks Noggind614 he gave me the correct command for the fire tv and root cloak. Don't use the phone or tablet com entry. For fire tv its. "com.snei.vue.firetv"
Thats not a command, thats literally the process name of the app others have suggested <ou to block with root cloak before.
Oh, and here is why I hate dumb people.
- They rather complain about solutions not working than to learn how they work. If you don't constantly have the filter on, that everything they say might in fact be just a made up "fact" trying to mask that they werent able to use an app - you are out of luck entirely, and situations like these happen.
- When they then resort to renaming system apps - because reddit told them to, not knowing what they are doing, and you have to explain to them, that stuff breaks, because they broke it - the< might act interested and willing to learn for a moment -
- but as soon as someone points out, that they don't know jack, their "facts" are all kinds of wrong, and the better solution was suggested by every entry in google, this forum, and even by myself (hinting at that it would be strange, that people report cloak works as recent as a month ago..) - they become tonguetied, and when you weigh in to make it clear for others that the solution the excluded from the beginning as "not working" is in fact the best one --
they take it ultra personal - and switch from thanking you for explaining to them how stuff works, to calling you a dickface -- because it becomes so very obvious whats wrong here.
So they are the assholes. They think the internet is here to serve them without even calling a dog a dog, they cause the majority of confusion in stating wrong information to begin with, they switch from thanking you for explaining to them what they are doing to calling you a dickface - because you just made it clear, that the solution someone else brought up is in fact the better one, so others wouldn't bother to go through the same pitfalls they went through - oh, and all information you have provided them so far all of a sudden becomes null and void - because it was just that, information - and not the entire step by step solution they wanted people to provide in the first place.
Now - not even "block the app with root cloak (exposed)" is enough information for someone like you in the end. No - you need a PN conversation to clarify that you should block the process everyone told you to block in the beginning. Because you didn't bother to find out how its named.
Instead of typing ps into the Fire TVs shell (or ps | grep vue), you used this forums PN function to ask someone else to do it for you. And you didn't have to know the ps command either, you probably could have looked up the apps (process) name elsewhere on the net.
Here i the mea culpa on my part. I am not a PS VUE user, because the service is not even available in my country. I might react threads though, where people rename android system files, and then complain about them "not working". I don't if blocking within root cloak using the process name of an app is something out of the ordenary, if it is, some of my criticism doesnt apply, although I highly doubt it at this point.
Tldr.
Dont ever take agreeing with someone else on what would be the best solution, as mocking you personally. I know that reddit QA culture demands, that every thread is a personalized support session for people with no clue but high aspirations - threads on forums usually are not. Clearing up "what the best solution seems to be" for the next person that reads along is something I don't do out of malice, I do out of responsibility.
Well, at least until someone calls me a **** for not providing an easier solution for them faster. Then all bets are off.
Everytime someone explains somethng on an open internet forum, there is the notion, that others are reading it, and that the information they are providing gets used further - that just the immediate support session they are driving at a time. This is the sole cause - why people might not wan't to protect you or others in the "looking fly" department - while you are actually -
- promoting, that people should modify system files - and then expect stuff to work regardlessly
- making it sound like a fact, that stuff doesn't work, when its actually working
This is not "acting like an asshole", this is actually responsible behavior.
n00bs usually don't become educated users, by calling the people explaining stuff to them dicks, or accusing them of "saying unimportant stuff, because - you just needed a step by step instruction, which you finally solicited from someone via PN - good job" - or by putting down people, that explain stuf to them, because it makes them look like n00bs.
This goes for me as well - in other areas.
Yet I never got the demand, that others should fix your issues for free, and on the spot, in detailed step by step instructions, while making it extra sure, that you can save face, and look like a hero at the end of the day - also what dicks, are they for actually daring to try to explain stuff to you instead of just fixing your problem.
Have I mentioned, that I sometimes hate what has become of the web in the recent years? Signs of getting old...
Also, yes, I do think that this response was needed.

Categories

Resources